Re: [FFmpeg-devel] [PATCH v3 2/2] lavd: deprecate opengl outdev
Le sextidi 26 fructidor, an CCXXIV, Josh de Kock a écrit : > This device depends on SDL which is deprecated. Are we in the business of deprecating things that do not have a replacement, now? Before deprecating the best video output device, making some effort to port it to something more modern would be required. Regards, -- Nicolas George signature.asc Description: Digital signature ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH] configure: don't build ffserver unless explicitly enabled
Le sextidi 26 fructidor, an CCXXIV, Sven C. Dack a écrit : > This could interfere with users' current scripts for running ffserver and > turn into "adding insult to injury" for the time it is still around. Deprecation messages go to stderr. If users' scripts rely on the format of stderr, breaking them is not insult or injury, it's didactic. Regards, -- Nicolas George signature.asc Description: Digital signature ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH] configure: don't build ffserver unless explicitly enabled
On 11/09/16 08:39, Nicolas George wrote: Le sextidi 26 fructidor, an CCXXIV, Sven C. Dack a écrit : This could interfere with users' current scripts for running ffserver and turn into "adding insult to injury" for the time it is still around. Deprecation messages go to stderr. If users' scripts rely on the format of stderr, breaking them is not insult or injury, it's didactic. Regards, Error messages go to stderr and one sometimes parses these to respond to an error. Excluding it from the default build rules is a good idea. Let the code still be around while it works and only when it proofs it no longer does do you drop it. Who knows when this will be and if not somebody steps up. If you feel strongly about doing something then how about maintaining it? ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH] configure: don't build ffserver unless explicitly enabled
Le sextidi 26 fructidor, an CCXXIV, Sven C. Dack a écrit : > Error messages go to stderr and one sometimes parses these to respond to an > error. This is bogus and should not be considered a reason for design decisions. If there are cases where this is actually necessary, then report them and we can reflect on a correct solution. Regards, -- Nicolas George signature.asc Description: Digital signature ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
[FFmpeg-devel] [PATCH] avfilter/vf_w3fdif: add >8 but <16 bit support
Signed-off-by: Paul B Mahol --- libavfilter/vf_w3fdif.c | 134 --- libavfilter/w3fdif.h | 5 +- libavfilter/x86/vf_w3fdif_init.c | 9 +-- 3 files changed, 133 insertions(+), 15 deletions(-) diff --git a/libavfilter/vf_w3fdif.c b/libavfilter/vf_w3fdif.c index cde17d2..8b8a2f4 100644 --- a/libavfilter/vf_w3fdif.c +++ b/libavfilter/vf_w3fdif.c @@ -43,6 +43,7 @@ typedef struct W3FDIFContext { AVFrame *prev, *cur, *next; ///< previous, current, next frames int32_t **work_line; ///< lines we are calculating int nb_threads; +int max; W3FDIFDSPContext dsp; } W3FDIFContext; @@ -75,6 +76,11 @@ static int query_formats(AVFilterContext *ctx) AV_PIX_FMT_YUVA420P, AV_PIX_FMT_YUVA422P, AV_PIX_FMT_YUVA444P, AV_PIX_FMT_GBRP, AV_PIX_FMT_GBRAP, AV_PIX_FMT_GRAY8, +AV_PIX_FMT_YUV420P9, AV_PIX_FMT_YUV422P9, AV_PIX_FMT_YUV444P9, +AV_PIX_FMT_YUV420P10, AV_PIX_FMT_YUV422P10, AV_PIX_FMT_YUV444P10, +AV_PIX_FMT_YUV420P12, AV_PIX_FMT_YUV422P12, AV_PIX_FMT_YUV444P12, +AV_PIX_FMT_YUV420P14, AV_PIX_FMT_YUV422P14, AV_PIX_FMT_YUV444P14, +AV_PIX_FMT_GBRP9, AV_PIX_FMT_GBRP10, AV_PIX_FMT_GBRP12, AV_PIX_FMT_GBRP14, AV_PIX_FMT_NONE }; @@ -148,7 +154,7 @@ static void filter_complex_high(int32_t *work_line, } } -static void filter_scale(uint8_t *out_pixel, const int32_t *work_pixel, int linesize) +static void filter_scale(uint8_t *out_pixel, const int32_t *work_pixel, int linesize, int max) { int j; @@ -156,12 +162,111 @@ static void filter_scale(uint8_t *out_pixel, const int32_t *work_pixel, int line *out_pixel = av_clip(*work_pixel, 0, 255 * 256 * 128) >> 15; } +static void filter16_simple_low(int32_t *work_line, +uint8_t *in_lines_cur8[2], +const int16_t *coef, int linesize) +{ +uint16_t *in_lines_cur[2] = { (uint16_t *)in_lines_cur8[0], (uint16_t *)in_lines_cur8[1] }; +int i; + +linesize /= 2; +for (i = 0; i < linesize; i++) { +*work_line= *in_lines_cur[0]++ * coef[0]; +*work_line++ += *in_lines_cur[1]++ * coef[1]; +} +} + +static void filter16_complex_low(int32_t *work_line, + uint8_t *in_lines_cur8[4], + const int16_t *coef, int linesize) +{ +uint16_t *in_lines_cur[4] = { (uint16_t *)in_lines_cur8[0], + (uint16_t *)in_lines_cur8[1], + (uint16_t *)in_lines_cur8[2], + (uint16_t *)in_lines_cur8[3] }; +int i; + +linesize /= 2; +for (i = 0; i < linesize; i++) { +*work_line= *in_lines_cur[0]++ * coef[0]; +*work_line += *in_lines_cur[1]++ * coef[1]; +*work_line += *in_lines_cur[2]++ * coef[2]; +*work_line++ += *in_lines_cur[3]++ * coef[3]; +} +} + +static void filter16_simple_high(int32_t *work_line, + uint8_t *in_lines_cur8[3], + uint8_t *in_lines_adj8[3], + const int16_t *coef, int linesize) +{ +uint16_t *in_lines_cur[3] = { (uint16_t *)in_lines_cur8[0], + (uint16_t *)in_lines_cur8[1], + (uint16_t *)in_lines_cur8[2] }; +uint16_t *in_lines_adj[3] = { (uint16_t *)in_lines_adj8[0], + (uint16_t *)in_lines_adj8[1], + (uint16_t *)in_lines_adj8[2] }; +int i; + +linesize /= 2; +for (i = 0; i < linesize; i++) { +*work_line += *in_lines_cur[0]++ * coef[0]; +*work_line += *in_lines_adj[0]++ * coef[0]; +*work_line += *in_lines_cur[1]++ * coef[1]; +*work_line += *in_lines_adj[1]++ * coef[1]; +*work_line += *in_lines_cur[2]++ * coef[2]; +*work_line++ += *in_lines_adj[2]++ * coef[2]; +} +} + +static void filter16_complex_high(int32_t *work_line, + uint8_t *in_lines_cur8[5], + uint8_t *in_lines_adj8[5], + const int16_t *coef, int linesize) +{ +uint16_t *in_lines_cur[5] = { (uint16_t *)in_lines_cur8[0], + (uint16_t *)in_lines_cur8[1], + (uint16_t *)in_lines_cur8[2], + (uint16_t *)in_lines_cur8[3], + (uint16_t *)in_lines_cur8[4] }; +uint16_t *in_lines_adj[5] = { (uint16_t *)in_lines_adj8[0], + (uint16_t *)in_lines_adj8[1], + (uint16_t *)in_lines_adj8[2], + (uint16_t *)in_lines_adj8[3], + (uint16_t *)in_lines_adj8[4] }; +int i; + +linesize /= 2; +for (i = 0;
Re: [FFmpeg-devel] [PATCH] configure: don't build ffserver unless explicitly enabled
On 11/09/16 10:45, Nicolas George wrote: Le sextidi 26 fructidor, an CCXXIV, Sven C. Dack a écrit : Error messages go to stderr and one sometimes parses these to respond to an error. This is bogus and should not be considered a reason for design decisions. If there are cases where this is actually necessary, then report them and we can reflect on a correct solution. No, it's not bogus. It's what sometimes must be done. For example, just this morning did I again have to pipe the output of ffprobe through "|&" because it likes to print its findings to stderr and not simply stdout. Not meaning to derail the topic, but to make a point close "to home". All I am really saying is that I don't quite agree with Carl. However seeing how you feel so strongly about what to put into ffserver are you volunteering to become it's new maintainer (... congrats!). If one doesn't want to be its maintainer than I don't see how one can afford to have this opinion. Rather should one follow the general coding rule of FFmpeg to keep changes minimal and to check if these cannot be made even smaller. Sven ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH] avformat/segment: fix the duration error of use output_ts_offset
On Sat, Sep 10, 2016 at 06:47:38PM +0800, Steven Liu wrote: > 2016-09-10 13:55 GMT+08:00 Aman Gupta : > > > I confirmed your latest patch fixes the issue and is working as expected > > now. > > > > Thank you! > > > > Aman > > > > On Sat, Sep 10, 2016 at 7:00 AM, Steven Liu > > wrote: > > > >> > >> Steven Liu 于2016年9月9日 周五下午7:59写道: > >> > >>> 2016-09-09 16:33 GMT+08:00 Steven Liu : > >>> > > > 2016-09-09 16:10 GMT+08:00 Steven Liu : > > > > > > > 2016-09-09 15:33 GMT+08:00 Steven Liu : > > > >> > >> > >> 2016-09-09 15:28 GMT+08:00 Aman Gupta : > >> > >>> I tried your patch and TARGETDURATION is fixed, but it is still > >>> creating some segments which are only 0.2s instead of 2s. > >>> > >>> Aman > >>> > >>> On Thu, Sep 8, 2016 at 8:14 PM, Steven Liu > >>> wrote: > >>> > This patch can merge with 1da00be009aa74400042bf470b9a5ffbd82a1c5e > i have checked this modify: > > ./ffmpeg -i ~/facebook.mp4 -c copy -f segment -segment_time 2 > -output_ts_offset 80 -segment_list output-test.m3u8 -v debug > output-test-%03d.ts > > #EXTM3U > #EXT-X-VERSION:3 > #EXT-X-MEDIA-SEQUENCE:0 > #EXT-X-ALLOW-CACHE:YES > #EXT-X-TARGETDURATION:10 > #EXTINF:4.12, > output-test-000.ts > #EXTINF:7.84, > output-test-001.ts > #EXTINF:4.20, > output-test-002.ts > #EXTINF:2.92, > output-test-003.ts > #EXTINF:1.84, > output-test-004.ts > #EXTINF:2.24, > output-test-005.ts > #EXTINF:2.00, > output-test-006.ts > #EXTINF:3.56, > > > [root@localhost linux]# ffmpeg -i output-test.m3u8 > ffmpeg version N-80917-ga1a240b Copyright (c) 2000-2016 the FFmpeg > developers > built with gcc 4.4.7 (GCC) 20120313 (Red Hat 4.4.7-17) > configuration: --prefix=/usr/ --libdir=/usr/lib64 > --enable-libx264 --enable-libfaac --enable-gpl --enable-nonfree > libavutil 55. 28.100 / 55. 28.100 > libavcodec 57. 48.102 / 57. 48.102 > libavformat57. 41.100 / 57. 41.100 > libavdevice57. 0.102 / 57. 0.102 > libavfilter 6. 47.100 / 6. 47.100 > libswscale 4. 1.100 / 4. 1.100 > libswresample 2. 1.100 / 2. 1.100 > libpostproc54. 0.100 / 54. 0.100 > Input #0, hls,applehttp, from 'output-test.m3u8': > Duration: 00:03:21.04, start: 81.40, bitrate: 0 kb/s > Program 0 > Metadata: > variant_bitrate : 0 > Stream #0:0: Video: h264 (High) ([27][0][0][0] / 0x001B), > yuv420p, 720x528 [SAR 1:1 DAR 15:11], 25 fps, 25 tbr, 90k tbn, 50 tbc > Stream #0:1: Audio: ac3 ([129][0][0][0] / 0x0081), 48000 Hz, > 5.1(side), fltp, 384 kb/s > At least one output file must be specified > > > > [root@localhost linux]# ffmpeg -i output-test-000.ts -i > output-test-001.ts > ffmpeg version N-80917-ga1a240b Copyright (c) 2000-2016 the FFmpeg > developers > built with gcc 4.4.7 (GCC) 20120313 (Red Hat 4.4.7-17) > configuration: --prefix=/usr/ --libdir=/usr/lib64 > --enable-libx264 --enable-libfaac --enable-gpl --enable-nonfree > libavutil 55. 28.100 / 55. 28.100 > libavcodec 57. 48.102 / 57. 48.102 > libavformat57. 41.100 / 57. 41.100 > libavdevice57. 0.102 / 57. 0.102 > libavfilter 6. 47.100 / 6. 47.100 > libswscale 4. 1.100 / 4. 1.100 > libswresample 2. 1.100 / 2. 1.100 > libpostproc54. 0.100 / 54. 0.100 > Input #0, mpegts, from 'output-test-000.ts': > Duration: 00:00:04.12, start: 81.40, bitrate: 1299 kb/s > Program 1 > Metadata: > service_name: Service01 > service_provider: FFmpeg > Stream #0:0[0x100]: Video: h264 (High) ([27][0][0][0] / > 0x001B), yuv420p, 720x528 [SAR 1:1 DAR 15:11], 25 fps, 25 tbr, 90k > tbn, 50 > tbc > Stream #0:1[0x101](und): Audio: ac3 ([129][0][0][0] / 0x0081), > 48000 Hz, 5.1(side), fltp, 384 kb/s > Input #1, mpegts, from 'output-test-001.ts': > Duration: 00:00:07.90, start: 85.464000, bitrate: 1679 kb/s > Program 1 > Metadata: > service_name: Service01 > service_provider: FFmpeg > Stream #1:0[0x100]: Video: h264 (High) ([27][0][0][0] / > 0x001B), yuv420p, 720x528 [SAR 1:1 DAR 15:11], 25 fps, 25 tbr, 90k > tbn, 50 > tbc > >>
Re: [FFmpeg-devel] [PATCH 3/3] lavf/mov: reindent
On Fri, Sep 09, 2016 at 09:07:32PM -0500, Rodger Combs wrote: > --- > libavformat/mov.c | 158 > +++--- > 1 file changed, 79 insertions(+), 79 deletions(-) LGTM thx [...] -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB What does censorship reveal? It reveals fear. -- Julian Assange signature.asc Description: Digital signature ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH v3 2/2] lavd: deprecate opengl outdev
On 11/09/2016 08:36, Nicolas George wrote: Le sextidi 26 fructidor, an CCXXIV, Josh de Kock a écrit : This device depends on SDL which is deprecated. Are we in the business of deprecating things that do not have a replacement, now? Before deprecating the best video output device, making some effort to port it to something more modern would be required. Regards, For achieving the same result as the SDL/opengl outdevs you can do something like: ffmpeg -i t.mov -c:v ffv1 -c:a aac -f fifo -fifo_format mov -map 0:v fifo.mov & mpv fifo.mov Either way, an outdev isn't really the right place for a preview; what if you want to check how video/audio looks/sounds half way down a filtergraph? An avfilter would make much more sense for this. ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH] avformat/segment: fix the duration error of use output_ts_offset
2016-09-11 18:22 GMT+08:00 Michael Niedermayer : > On Sat, Sep 10, 2016 at 06:47:38PM +0800, Steven Liu wrote: > > 2016-09-10 13:55 GMT+08:00 Aman Gupta : > > > > > I confirmed your latest patch fixes the issue and is working as > expected > > > now. > > > > > > Thank you! > > > > > > Aman > > > > > > On Sat, Sep 10, 2016 at 7:00 AM, Steven Liu > > > wrote: > > > > > >> > > >> Steven Liu 于2016年9月9日 周五下午7:59写道: > > >> > > >>> 2016-09-09 16:33 GMT+08:00 Steven Liu : > > >>> > > > > > > 2016-09-09 16:10 GMT+08:00 Steven Liu : > > > > > > > > > > > 2016-09-09 15:33 GMT+08:00 Steven Liu : > > > > > >> > > >> > > >> 2016-09-09 15:28 GMT+08:00 Aman Gupta : > > >> > > >>> I tried your patch and TARGETDURATION is fixed, but it is still > > >>> creating some segments which are only 0.2s instead of 2s. > > >>> > > >>> Aman > > >>> > > >>> On Thu, Sep 8, 2016 at 8:14 PM, Steven Liu < > lingjiujia...@gmail.com> > > >>> wrote: > > >>> > > This patch can merge with 1da00be009aa74400042bf470b9a5f > fbd82a1c5e > > i have checked this modify: > > > > ./ffmpeg -i ~/facebook.mp4 -c copy -f segment -segment_time 2 > > -output_ts_offset 80 -segment_list output-test.m3u8 -v debug > > output-test-%03d.ts > > > > #EXTM3U > > #EXT-X-VERSION:3 > > #EXT-X-MEDIA-SEQUENCE:0 > > #EXT-X-ALLOW-CACHE:YES > > #EXT-X-TARGETDURATION:10 > > #EXTINF:4.12, > > output-test-000.ts > > #EXTINF:7.84, > > output-test-001.ts > > #EXTINF:4.20, > > output-test-002.ts > > #EXTINF:2.92, > > output-test-003.ts > > #EXTINF:1.84, > > output-test-004.ts > > #EXTINF:2.24, > > output-test-005.ts > > #EXTINF:2.00, > > output-test-006.ts > > #EXTINF:3.56, > > > > > > [root@localhost linux]# ffmpeg -i output-test.m3u8 > > ffmpeg version N-80917-ga1a240b Copyright (c) 2000-2016 the > FFmpeg > > developers > > built with gcc 4.4.7 (GCC) 20120313 (Red Hat 4.4.7-17) > > configuration: --prefix=/usr/ --libdir=/usr/lib64 > > --enable-libx264 --enable-libfaac --enable-gpl --enable-nonfree > > libavutil 55. 28.100 / 55. 28.100 > > libavcodec 57. 48.102 / 57. 48.102 > > libavformat57. 41.100 / 57. 41.100 > > libavdevice57. 0.102 / 57. 0.102 > > libavfilter 6. 47.100 / 6. 47.100 > > libswscale 4. 1.100 / 4. 1.100 > > libswresample 2. 1.100 / 2. 1.100 > > libpostproc54. 0.100 / 54. 0.100 > > Input #0, hls,applehttp, from 'output-test.m3u8': > > Duration: 00:03:21.04, start: 81.40, bitrate: 0 kb/s > > Program 0 > > Metadata: > > variant_bitrate : 0 > > Stream #0:0: Video: h264 (High) ([27][0][0][0] / 0x001B), > > yuv420p, 720x528 [SAR 1:1 DAR 15:11], 25 fps, 25 tbr, 90k tbn, > 50 tbc > > Stream #0:1: Audio: ac3 ([129][0][0][0] / 0x0081), 48000 Hz, > > 5.1(side), fltp, 384 kb/s > > At least one output file must be specified > > > > > > > > [root@localhost linux]# ffmpeg -i output-test-000.ts -i > > output-test-001.ts > > ffmpeg version N-80917-ga1a240b Copyright (c) 2000-2016 the > FFmpeg > > developers > > built with gcc 4.4.7 (GCC) 20120313 (Red Hat 4.4.7-17) > > configuration: --prefix=/usr/ --libdir=/usr/lib64 > > --enable-libx264 --enable-libfaac --enable-gpl --enable-nonfree > > libavutil 55. 28.100 / 55. 28.100 > > libavcodec 57. 48.102 / 57. 48.102 > > libavformat57. 41.100 / 57. 41.100 > > libavdevice57. 0.102 / 57. 0.102 > > libavfilter 6. 47.100 / 6. 47.100 > > libswscale 4. 1.100 / 4. 1.100 > > libswresample 2. 1.100 / 2. 1.100 > > libpostproc54. 0.100 / 54. 0.100 > > Input #0, mpegts, from 'output-test-000.ts': > > Duration: 00:00:04.12, start: 81.40, bitrate: 1299 kb/s > > Program 1 > > Metadata: > > service_name: Service01 > > service_provider: FFmpeg > > Stream #0:0[0x100]: Video: h264 (High) ([27][0][0][0] / > > 0x001B), yuv420p, 720x528 [SAR 1:1 DAR 15:11], 25 fps, 25 tbr, > 90k tbn, 50 > > tbc > > Stream #0:1[0x101](und): Audio: ac3 ([129][0][0][0] / > 0x0081), > > 48000 Hz, 5.1(side), fltp, 384 kb/s > > Input #1, mpegts, from 'output-test-001.ts': > > Duration: 00:00:07.90, start: 85.464000, bitrate: 1679 kb/s > >
Re: [FFmpeg-devel] [PATCH 1/3] lavf: add AV_DISPOSITION_TIMED_THUMBNAILS
On Fri, Sep 09, 2016 at 09:07:30PM -0500, Rodger Combs wrote: > --- > ffprobe.c | 1 + > libavformat/avformat.h | 12 +--- > tests/ref/fate/concat-demuxer-extended-lavf-mxf | 2 +- > tests/ref/fate/concat-demuxer-extended-lavf-mxf_d10 | 2 +- > tests/ref/fate/concat-demuxer-simple1-lavf-mxf | 4 ++-- > tests/ref/fate/concat-demuxer-simple1-lavf-mxf_d10 | 4 ++-- > tests/ref/fate/concat-demuxer-simple2-lavf-ts | 4 ++-- > tests/ref/fate/ffprobe_compact | 6 +++--- > tests/ref/fate/ffprobe_csv | 6 +++--- > tests/ref/fate/ffprobe_default | 3 +++ > tests/ref/fate/ffprobe_flat | 3 +++ > tests/ref/fate/ffprobe_ini | 3 +++ > tests/ref/fate/ffprobe_json | 9 ++--- > tests/ref/fate/ffprobe_xml | 6 +++--- > 14 files changed, 42 insertions(+), 23 deletions(-) LGTM assuming people have no objections to the design thx [...] -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB When the tyrant has disposed of foreign enemies by conquest or treaty, and there is nothing more to fear from them, then he is always stirring up some war or other, in order that the people may require a leader. -- Plato signature.asc Description: Digital signature ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH 01/11] lavf: add a flag to enable/disable automatic bitstream filtering
On Fri, Sep 09, 2016 at 11:37:15PM -0500, Rodger Combs wrote: > This is mostly useful for muxers that wrap other muxers, such as dashenc > and segment. The actual duplicated bitstream filtering is largely harmless, > but delaying the header can cause problems when the muxer intended the header > to be written to a separate file. > --- > libavformat/avformat.h | 1 + > libavformat/mux.c | 5 - > libavformat/options_table.h | 3 ++- > 3 files changed, 7 insertions(+), 2 deletions(-) LGTM also please add a note to the commit message if patches have been approved / reviewed / LGTM-ed so no time is wasted re-reviewing if a patch is reposted thx [...] -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB You can kill me, but you cannot change the truth. signature.asc Description: Digital signature ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH] avformat/segment: fix the duration error of use output_ts_offset
On Sun, Sep 11, 2016 at 08:10:12PM +0800, Steven Liu wrote: > 2016-09-11 18:22 GMT+08:00 Michael Niedermayer : > > > On Sat, Sep 10, 2016 at 06:47:38PM +0800, Steven Liu wrote: > > > 2016-09-10 13:55 GMT+08:00 Aman Gupta : > > > > > > > I confirmed your latest patch fixes the issue and is working as > > expected > > > > now. > > > > > > > > Thank you! > > > > > > > > Aman > > > > > > > > On Sat, Sep 10, 2016 at 7:00 AM, Steven Liu > > > > wrote: > > > > > > > >> > > > >> Steven Liu 于2016年9月9日 周五下午7:59写道: > > > >> > > > >>> 2016-09-09 16:33 GMT+08:00 Steven Liu : > > > >>> > > > > > > > > > 2016-09-09 16:10 GMT+08:00 Steven Liu : > > > > > > > > > > > > > > > 2016-09-09 15:33 GMT+08:00 Steven Liu : > > > > > > > >> > > > >> > > > >> 2016-09-09 15:28 GMT+08:00 Aman Gupta : > > > >> > > > >>> I tried your patch and TARGETDURATION is fixed, but it is still > > > >>> creating some segments which are only 0.2s instead of 2s. > > > >>> > > > >>> Aman > > > >>> > > > >>> On Thu, Sep 8, 2016 at 8:14 PM, Steven Liu < > > lingjiujia...@gmail.com> > > > >>> wrote: > > > >>> > > > This patch can merge with 1da00be009aa74400042bf470b9a5f > > fbd82a1c5e > > > i have checked this modify: > > > > > > ./ffmpeg -i ~/facebook.mp4 -c copy -f segment -segment_time 2 > > > -output_ts_offset 80 -segment_list output-test.m3u8 -v debug > > > output-test-%03d.ts > > > > > > #EXTM3U > > > #EXT-X-VERSION:3 > > > #EXT-X-MEDIA-SEQUENCE:0 > > > #EXT-X-ALLOW-CACHE:YES > > > #EXT-X-TARGETDURATION:10 > > > #EXTINF:4.12, > > > output-test-000.ts > > > #EXTINF:7.84, > > > output-test-001.ts > > > #EXTINF:4.20, > > > output-test-002.ts > > > #EXTINF:2.92, > > > output-test-003.ts > > > #EXTINF:1.84, > > > output-test-004.ts > > > #EXTINF:2.24, > > > output-test-005.ts > > > #EXTINF:2.00, > > > output-test-006.ts > > > #EXTINF:3.56, > > > > > > > > > [root@localhost linux]# ffmpeg -i output-test.m3u8 > > > ffmpeg version N-80917-ga1a240b Copyright (c) 2000-2016 the > > FFmpeg > > > developers > > > built with gcc 4.4.7 (GCC) 20120313 (Red Hat 4.4.7-17) > > > configuration: --prefix=/usr/ --libdir=/usr/lib64 > > > --enable-libx264 --enable-libfaac --enable-gpl --enable-nonfree > > > libavutil 55. 28.100 / 55. 28.100 > > > libavcodec 57. 48.102 / 57. 48.102 > > > libavformat57. 41.100 / 57. 41.100 > > > libavdevice57. 0.102 / 57. 0.102 > > > libavfilter 6. 47.100 / 6. 47.100 > > > libswscale 4. 1.100 / 4. 1.100 > > > libswresample 2. 1.100 / 2. 1.100 > > > libpostproc54. 0.100 / 54. 0.100 > > > Input #0, hls,applehttp, from 'output-test.m3u8': > > > Duration: 00:03:21.04, start: 81.40, bitrate: 0 kb/s > > > Program 0 > > > Metadata: > > > variant_bitrate : 0 > > > Stream #0:0: Video: h264 (High) ([27][0][0][0] / 0x001B), > > > yuv420p, 720x528 [SAR 1:1 DAR 15:11], 25 fps, 25 tbr, 90k tbn, > > 50 tbc > > > Stream #0:1: Audio: ac3 ([129][0][0][0] / 0x0081), 48000 Hz, > > > 5.1(side), fltp, 384 kb/s > > > At least one output file must be specified > > > > > > > > > > > > [root@localhost linux]# ffmpeg -i output-test-000.ts -i > > > output-test-001.ts > > > ffmpeg version N-80917-ga1a240b Copyright (c) 2000-2016 the > > FFmpeg > > > developers > > > built with gcc 4.4.7 (GCC) 20120313 (Red Hat 4.4.7-17) > > > configuration: --prefix=/usr/ --libdir=/usr/lib64 > > > --enable-libx264 --enable-libfaac --enable-gpl --enable-nonfree > > > libavutil 55. 28.100 / 55. 28.100 > > > libavcodec 57. 48.102 / 57. 48.102 > > > libavformat57. 41.100 / 57. 41.100 > > > libavdevice57. 0.102 / 57. 0.102 > > > libavfilter 6. 47.100 / 6. 47.100 > > > libswscale 4. 1.100 / 4. 1.100 > > > libswresample 2. 1.100 / 2. 1.100 > > > libpostproc54. 0.100 / 54. 0.100 > > > Input #0, mpegts, from 'output-test-000.ts': > > > Duration: 00:00:04.12, start: 81.40, bitrate: 1299 kb/s > > > Program 1 > > > Metadata: > > > service_name: Service01 > > > service_provider: FFmpeg > > > Stream #0:0[0x100]: Video: h264 (High) ([27][0][0][0] / > > > 0x001B), yuv420p, 720x528 [SAR 1:1 DAR 15:11], 25 f
Re: [FFmpeg-devel] [PATCH v3 2/2] lavd: deprecate opengl outdev
Le sextidi 26 fructidor, an CCXXIV, Josh de Kock a écrit : > For achieving the same result as the SDL/opengl outdevs you can do something > like: > > ffmpeg -i t.mov -c:v ffv1 -c:a aac -f fifo -fifo_format mov -map 0:v > fifo.mov & mpv fifo.mov This is nowhere near the same functionality. > Either way, an outdev isn't really the right place for a preview; what if > you want to check how video/audio looks/sounds half way down a filtergraph? > An avfilter would make much more sense for this. Show me the code. But deprecating features without replacement is not ok. Regards, -- Nicolas George signature.asc Description: Digital signature ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH] configure: don't build ffserver unless explicitly enabled
Le sextidi 26 fructidor, an CCXXIV, Sven C. Dack a écrit : > No, it's not bogus. Yes, it is. > It's what sometimes must be done. For example, just this > morning did I again have to pipe the output of ffprobe through "|&" because > it likes to print its findings to stderr and not simply stdout. Not meaning > to derail the topic, but to make a point close "to home". Are you sure you should not have been using ffprobe? > All I am really saying is that I don't quite agree with Carl. However seeing > how you feel so strongly about what to put into ffserver are you > volunteering to become it's new maintainer (... congrats!). I do not care at all about ffserver, but the argument of parsing stderr to revuse a warning is completely void, period. Regards, -- Nicolas George signature.asc Description: Digital signature ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH] configure: don't build ffserver unless explicitly enabled
On 11/09/16 15:12, Nicolas George wrote: I do not care at all about ffserver, but the argument of parsing stderr to revuse a warning is completely void, period. Regards, Please no foot stomping of opinions. When you cannot see how changing the output can confuse scripts of users then that's ok, but you then shouldn't act like a child. Show some more maturity, please. Sven ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH] configure: don't build ffserver unless explicitly enabled
Le sextidi 26 fructidor, an CCXXIV, Sven C. Dack a écrit : > Please no foot stomping of opinions. When you cannot see how changing the > output can confuse scripts of users then that's ok I see how it can do that, but you refuse to understand that this part of the output is not meant to be parsed, unlike, for example, the output of ffprobe. If some information is only available in stderr output, then we can consider adding a clean solution for that. Please share any precise information you have on the matter. Otherwise, it is just idle handwaving. > but you then shouldn't > act like a child. Show some more maturity, please. I leave to you the responsibility of name calling. Regards, -- Nicolas George signature.asc Description: Digital signature ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH] configure: don't build ffserver unless explicitly enabled
On Sun, Sep 11, 2016 at 5:04 PM, Sven C. Dack wrote: > On 11/09/16 15:12, Nicolas George wrote: >> >> I do not care at all about ffserver, but the argument of parsing stderr to >> revuse a warning is completely void, period. >> >> Regards, > > > Please no foot stomping of opinions. When you cannot see how changing the > output can confuse scripts of users then that's ok, but you then shouldn't > act like a child. Show some more maturity, please. > All the text output of the CLI tools goes to stderr, and we have never considered it to be "stable" for the sake of people that parse arbitrary log output - and nor should we, because that would be a terrible situation to be in if we can't even change, add, or adjust the log output of our tools. - Hendrik ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
[FFmpeg-devel] [PATCH] avdev: Add SDL2 output device
This actually seems to work now, it didn't in the past, so maybe SDL2 was patched or something changed in FFmpeg. I will make an avfilter of this as well as the outdev. Signed-off-by: Josh de Kock --- configure| 24 ++- libavdevice/Makefile | 1 + libavdevice/alldevices.c | 1 + libavdevice/sdl2.c | 373 +++ 4 files changed, 398 insertions(+), 1 deletion(-) create mode 100644 libavdevice/sdl2.c diff --git a/configure b/configure index b11ca7f..b3b43a9 100755 --- a/configure +++ b/configure @@ -292,6 +292,7 @@ External library support: --disable-schannel disable SChannel SSP, needed for TLS support on Windows if openssl and gnutls are not used [autodetect] --disable-sdldisable sdl [autodetect] + --disable-sdl2 disable sdl2 [autodetect] --disable-securetransport disable Secure Transport, needed for TLS support on OSX if openssl and gnutls are not used [autodetect] --enable-x11grab enable X11 grabbing (legacy) [no] @@ -1548,6 +1549,7 @@ EXTERNAL_LIBRARY_LIST=" openssl schannel sdl +sdl2 securetransport videotoolbox x11grab @@ -2022,6 +2024,7 @@ HAVE_LIST=" perl pod2man sdl +sdl2 section_data_rel_ro texi2html threads @@ -2945,6 +2948,7 @@ pulse_outdev_deps="libpulse" qtkit_indev_extralibs="-framework QTKit -framework Foundation -framework QuartzCore" qtkit_indev_select="qtkit" sdl_outdev_deps="sdl" +sdl2_outdev_deps="sdl2" sndio_indev_deps="sndio_h" sndio_outdev_deps="sndio_h" v4l_indev_deps="linux_videodev_h" @@ -5850,7 +5854,24 @@ if enabled gcrypt; then fi fi -if ! disabled sdl; then + +SDL2_CONFIG="${cross_prefix}sdl2-config" +if check_pkg_config sdl2 SDL_events.h SDL_PollEvent; then +check_cpp_condition SDL.h "(SDL_MAJOR_VERSION<<16 | SDL_MINOR_VERSION<<8 | SDL_PATCHLEVEL) >= 0x020001" $sdl2_cflags && +check_cpp_condition SDL.h "(SDL_MAJOR_VERSION<<16 | SDL_MINOR_VERSION<<8 | SDL_PATCHLEVEL) < 0x020100" $sdl2_cflags && +enable sdl2 +else + if "${SDL2_CONFIG}" --version > /dev/null 2>&1; then +sdl2_cflags=$("${SDL2_CONFIG}" --cflags) +sdl2_libs=$("${SDL2_CONFIG}" --libs) +check_cpp_condition SDL.h "(SDL_MAJOR_VERSION<<16 | SDL_MINOR_VERSION<<8 | SDL_PATCHLEVEL) >= 0x020001" $sdl2_cflags && +check_cpp_condition SDL.h "(SDL_MAJOR_VERSION<<16 | SDL_MINOR_VERSION<<8 | SDL_PATCHLEVEL) < 0x020100" $sdl2_cflags && +enable sdl2 + fi +fi +enabled sdl2 && add_cflags $sdl2_cflags && add_extralibs $sdl2_libs + +if ! disabled sdl && ! enabled sdl2; then SDL_CONFIG="${cross_prefix}sdl-config" if check_pkg_config sdl SDL_events.h SDL_PollEvent; then check_cpp_condition SDL.h "(SDL_MAJOR_VERSION<<16 | SDL_MINOR_VERSION<<8 | SDL_PATCHLEVEL) >= 0x010201" $sdl_cflags && @@ -6480,6 +6501,7 @@ echo "network support ${network-no}" echo "threading support ${thread_type-no}" echo "safe bitstream reader ${safe_bitstream_reader-no}" echo "SDL support ${sdl-no}" +echo "SDL2 support ${sdl2-no}" echo "opencl enabled${opencl-no}" echo "JNI support ${jni-no}" echo "texi2html enabled ${texi2html-no}" diff --git a/libavdevice/Makefile b/libavdevice/Makefile index 585827b..1c4b4d3 100644 --- a/libavdevice/Makefile +++ b/libavdevice/Makefile @@ -41,6 +41,7 @@ OBJS-$(CONFIG_PULSE_OUTDEV) += pulse_audio_enc.o \ pulse_audio_common.o OBJS-$(CONFIG_QTKIT_INDEV) += qtkit.o OBJS-$(CONFIG_SDL_OUTDEV)+= sdl.o +OBJS-$(CONFIG_SDL2_OUTDEV) += sdl2.o OBJS-$(CONFIG_SNDIO_INDEV) += sndio_dec.o sndio.o OBJS-$(CONFIG_SNDIO_OUTDEV) += sndio_enc.o sndio.o OBJS-$(CONFIG_V4L2_INDEV)+= v4l2.o v4l2-common.o timefilter.o diff --git a/libavdevice/alldevices.c b/libavdevice/alldevices.c index 26aecf2..c0a9d9a 100644 --- a/libavdevice/alldevices.c +++ b/libavdevice/alldevices.c @@ -64,6 +64,7 @@ void avdevice_register_all(void) REGISTER_INOUTDEV(PULSE,pulse); REGISTER_INDEV (QTKIT,qtkit); REGISTER_OUTDEV (SDL, sdl); +REGISTER_OUTDEV (SDL2, sdl2); REGISTER_INOUTDEV(SNDIO,sndio); REGISTER_INOUTDEV(V4L2, v4l2); //REGISTER_INDEV (V4L, v4l diff --git a/libavdevice/sdl2.c b/libavdevice/sdl2.c new file mode 100644 index 000..8959ebc --- /dev/null +++ b/libavdevice/sdl2.c @@ -0,0 +1,373 @@ +/* + * Copyright (c) 2011 Stefano Sabatini + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License,
Re: [FFmpeg-devel] [PATCH] configure: don't build ffserver unless explicitly enabled
On 11/09/16 16:31, Nicolas George wrote: I see how it can do that, but you refuse to understand that this part of the output is not meant to be parsed, unlike, for example, the output of ffprobe. Nonsense. All messages, regardless if send to stdout or stderr, can be parsed. There is no rule in this world that says you shouldn't or couldn't do so. But regardless of this, when you are no longer maintaining the code then you can also no longer insist on users having to accept the consequences of changes. The change, to print a single message, has no gain to the users who are still using ffserver. They will not thank you for abandoning the program, they may even feel annoyed by the message each time it prints, and as I pointed out before can cause them problems. You really want to leave the code untouched and provide it "as is" until the time it gets dropped. Put the message into configure, put it into the manpage, on the webpages and the --help documentation, but please don't just pop it out onto stderr. Sven ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH] configure: don't build ffserver unless explicitly enabled
On Sun, Sep 11, 2016 at 06:17:01PM +0100, Sven C. Dack wrote: > On 11/09/16 16:31, Nicolas George wrote: > > I see how it can do that, but you refuse to understand that this part of the > > output is not meant to be parsed, unlike, for example, the output of > > ffprobe. > > Nonsense. All messages, regardless if send to stdout or stderr, can be > parsed. There is no rule in this world that says you shouldn't or couldn't > do so. Aside from the stdout output in ffprobe, no stdout/stderr output is standardized in FFmpeg and thus can be changed at will (and does regularly). You can try to parse it, but there is zero warranty that it will work the next day. Regards, -- Clément B. ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH v4] lavf : scale_vaapi : add denoise/sharpless support
On Fri, Sep 09, 2016 at 11:31:22 +0800, Jun Zhao wrote: > v4 : - fix sharpless typo(sharpless -> sharpness) [...] > Date: Tue, 30 Aug 2016 14:36:00 +0800 > Subject: [PATCH v4] lavf : scale_vaapi : add denoise/sharpless support. > > add denoise/sharpless support, used scope [-1, 100] as the input > scope. Well, the commit message still contains the typo, twice. Also, please drop the space character before the colon. The top line of the commit message should probably read: lavfi/scale_vaapi: add denoise/sharpless support Moritz ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH] ffprobe: add -show_headers_first option
On date Saturday 2016-09-10 13:51:34 +0200, Nicolas George encoded: > Le tridi 23 fructidor, an CCXXIV, Stefano Sabatini a écrit : > > We have the -show_entries option, and we can extend it to consider > > order. The equivalent syntax will then be: > > > > ffprobe -show_entries format,streams,packets > > As I said, I never really understood what -show_entries does. I had > remembered it was for enabling/disabling fields within sections, not > enabling/disabling sections. I suppose the reasoning is that it does not > make sense to enable a field in a section if the section is not printed. -show_entries is the generalization of the various -show_* options, with the added bonus that it make it possible to specify which sections and fields to show (and possibly ignore all the other ones). > > Still, the result is that the same effect can be achieved by several > different means, with slightly different contours, and I think this is not > good for anybody: users are confused about the "right" way of doing it, > maintainers have a higher risk of breaking something. > > I think it may be time to put aside all the options that were added to > implement features incrementally in a backward-compatible way, and rebuild a > brand new syntax for all the features at once. I see your point, but while -show_entries has its warts, I don't think it really complicates the syntax, since there is a straight mapping from the legacy -show_X options to -show_entries X. > > > ffprobe -show > > > format,streams,packets,rewind,packets+frames=silent=1,streams > > Now the problem with this idea is the interaction with > > -read_packets. The option was useful to force reading of packets so > > that the gained information was also available in the streams and > > format sections (but without showing the packets output). > > > > I can think about extending the -show_entries syntax, so that we could > > have: > > > > -show_entries !packets,format,streams > > > > What I don't like is that this special syntax will only work with > > packets (it makes no sense for the other sections). > > This issue of reading packets to extract information but not clutter the > output with them is the reason I suggested in my example > "packets+frames=silent=1". > > Still, the inconsistent syntax does not bother me either way: I think users > can understand that a feature (doing the probe but suppressing the output) > only works for a particular section, but they can also understand that the > same feature works for all sections but is only useful for one. Therefore, > we do whichever is simpler to implement and just make sure to explain it in > the doc. > > There is another, more confusing case, where "print sections in order" can > not work: packets and frames must be probed and printed together. > > I think it would help to think of the steps not as sections to print but as > tasks to perform. Most tasks are just printing a section, but the task about > packets has three optional subtasks: printing the packets, decoding the > frames, printing the frames (of course, printing the frames without decoding > makes no sense). > > If we design things to allow tasks to have aliases ("f" for "formats") and > allow aliases to have different defaults for options, things can work in a > way that is both convenient and logical. Consider a single task, > "packets_and_frames", with three options, "print_packets=[01]", > "decode_frames=[01]", "print_frames=[01]", and aliases: "packets" causing > the options to default to 1/0/0, "frames" to 0/1/1; any other combination > can be achieved by setting the options explicitly. At the moment we could simplify the logic, and assume a single section named packets_and_frames (this can be probably be done with small effort): I'm working on the code these days and many difficulties stem from the fact that the data structure describing the sections is not a tree. > The enabling or disabling of individual fields can also be an option to > tasks. That allow to support the same features as -show_entries in a more > logical way. In other words you're suggesting to move to an option systems and drop/deprecate the current system based on marking what needs to be shown (which is easy as long as you have a fixed order). But even assuming an option-based syntax specifying the operations you still have problems with the order of operations. In the specific case of the subject patch, I will need to specify the order of sections to print, and the options system (at least the one implemented in ffmpeg) is order-independent, so: show_format,show_streams,show_packets will have the same effect of: show_packets,show_format,show_streams [...] -- FFmpeg = Frightening Fierce Mysterious Powered Extended Goblin ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH] configure: don't build ffserver unless explicitly enabled
On 11/09/16 18:27, Clément Bœsch wrote: Aside from the stdout output in ffprobe, no stdout/stderr output is standardized in FFmpeg and thus can be changed at will (and does regularly). You can try to parse it, but there is zero warranty that it will work the next day. Regards, Did you at least read the second part of my mail? Because I sure do get you don't care. It's all you, Nicolas and Hendrik have been saying here really. What I want you to do is to snap out of it and to start caring. Put the message where it belongs, meaning, put it into the documentation. ffserver is not dead just yet and you should really follow the regular coding rules until it is. And of course do users often have to accept the consequences of a changes, but they also only ever will do so when a change brings an actual gain. Nobody wants to accept a useless change. Your change, to put a message to stderr into the code, just has no gain for anyone who is using it and can only upset. Can we agree on this or am I talking to a wall? Sven ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH] Select cubic and lanczos as alternative where super-sampling is not supported
Moin Sven, On Fri, Sep 09, 2016 at 11:13:55 +0100, Sven C. Dack wrote: I may be missing something, but my excuse is that I can't test, but just inspect by looking at it: > + if (s->interp_algo == NPPI_INTER_SUPER && > + (out_width > in_width && out_height > in_height)) { > + s->interp_algo = NPPI_INTER_LANCZOS; > + av_log(ctx, AV_LOG_WARNING, "super-sampling not supported for > output dimensions, using lanczos instead.\n"); > + } > + if (s->interp_algo == NPPI_INTER_SUPER && > + !(out_width < in_width && out_height < in_height)) { > + s->interp_algo = NPPI_INTER_CUBIC; > + av_log(ctx, AV_LOG_WARNING, "super-sampling not supported for > output dimensions, using cubic instead.\n"); > + } > +} Let's assume s->interp_algo=NPPI_INTER_SUPER, out_width>in_width, out_height>in_height: if (true && (true && true)) { } if (true && !(false && false) { } Both blocks will be entered! Didn't you see both messages when testing? Your commit message says ffmpeg needs to choose a different algo if both dimensions aren't smaller, that's the second if(), which should be the top-level decider: > + if (s->interp_algo == NPPI_INTER_SUPER && > + !(out_width < in_width && out_height < in_height)) { Then you seem to choose lanczos only if both are greater, so let me do this as such: > + if (out_width > in_width && out_height > in_height) { > + s->interp_algo = NPPI_INTER_LANCZOS; > + av_log(ctx, AV_LOG_WARNING, "super-sampling not supported for > output dimensions, using lanczos instead.\n"); > + } then the rest (i.e. one larger or equal, one smaller) would be cubic: > + else { > + s->interp_algo = NPPI_INTER_CUBIC; > + av_log(ctx, AV_LOG_WARNING, "super-sampling not supported for > output dimensions, using cubic instead.\n"); > + } > + } Was that the intent? Gruß, Moritz ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH] configure: don't build ffserver unless explicitly enabled
On Sun, Sep 11, 2016 at 06:52:50PM +0100, Sven C. Dack wrote: > On 11/09/16 18:27, Clément Bœsch wrote: > > Aside from the stdout output in ffprobe, no stdout/stderr output is > > standardized in FFmpeg and thus can be changed at will (and does > > regularly). You can try to parse it, but there is zero warranty that it > > will work the next day. > > > > Regards, > > Did you at least read the second part of my mail? Because I sure do get you > don't care. It's all you, Nicolas and Hendrik have been saying here really. > What I want you to do is to snap out of it and to start caring. Put the > message where it belongs, meaning, put it into the documentation. ffserver > is not dead just yet and you should really follow the regular coding rules > until it is. And of course do users often have to accept the consequences of > a changes, but they also only ever will do so when a change brings an actual > gain. Nobody wants to accept a useless change. Your change, to put a message > to stderr into the code, just has no gain for anyone who is using it and can > only upset. Can we agree on this or am I talking to a wall? I think we disagree, because no user of a working setup will ever read the documentation just to check for deprecated tools. Having the warning at runtime is the most efficient way to reach out a maximum of users as soon as possible so they have time to migrate their setup. A bit like deprecation warning in API at build time. -- Clément B. ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH] avdev: Add SDL2 output device
On Sun, Sep 11, 2016 at 04:38:12PM +0100, Josh de Kock wrote: > This actually seems to work now, it didn't in the past, so maybe SDL2 > was patched or something changed in FFmpeg. > > I will make an avfilter of this as well as the outdev. > > Signed-off-by: Josh de Kock > --- > configure| 24 ++- > libavdevice/Makefile | 1 + > libavdevice/alldevices.c | 1 + > libavdevice/sdl2.c | 373 > +++ > 4 files changed, 398 insertions(+), 1 deletion(-) > create mode 100644 libavdevice/sdl2.c very nice! Acked-by: Michael [...] -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB Asymptotically faster algorithms should always be preferred if you have asymptotical amounts of data signature.asc Description: Digital signature ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH] avdev: Add SDL2 output device
On Sun, Sep 11, 2016 at 08:02:12PM +0200, Michael Niedermayer wrote: > On Sun, Sep 11, 2016 at 04:38:12PM +0100, Josh de Kock wrote: > > This actually seems to work now, it didn't in the past, so maybe SDL2 > > was patched or something changed in FFmpeg. > > > > I will make an avfilter of this as well as the outdev. > > > > Signed-off-by: Josh de Kock > > --- > > configure| 24 ++- > > libavdevice/Makefile | 1 + > > libavdevice/alldevices.c | 1 + > > libavdevice/sdl2.c | 373 > > +++ > > 4 files changed, 398 insertions(+), 1 deletion(-) > > create mode 100644 libavdevice/sdl2.c > > very nice! > > Acked-by: Michael > Note that it disables ffplay by default; so I'd better wait for a consensus with that regard before -- Clément B. ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH] Select cubic and lanczos as alternative where super-sampling is not supported
On 11/09/16 18:55, Moritz Barsnick wrote: Moin Sven, On Fri, Sep 09, 2016 at 11:13:55 +0100, Sven C. Dack wrote: I may be missing something, but my excuse is that I can't test, but just inspect by looking at it: + if (s->interp_algo == NPPI_INTER_SUPER && + (out_width > in_width && out_height > in_height)) { + s->interp_algo = NPPI_INTER_LANCZOS; + av_log(ctx, AV_LOG_WARNING, "super-sampling not supported for output dimensions, using lanczos instead.\n"); + } + if (s->interp_algo == NPPI_INTER_SUPER && + !(out_width < in_width && out_height < in_height)) { + s->interp_algo = NPPI_INTER_CUBIC; + av_log(ctx, AV_LOG_WARNING, "super-sampling not supported for output dimensions, using cubic instead.\n"); + } +} The value s->interp_algo gets change in each body. There is no way it can enter the second body if it entered the first, because the value is part of both the conditions. I thought about some neat logic at first, but decided to do it this way for more readability. Now you've put me on the spot... Your call. Sven ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH] avdev: Add SDL2 output device
On 11/09/2016 19:04, Clément Bœsch wrote: On Sun, Sep 11, 2016 at 08:02:12PM +0200, Michael Niedermayer wrote: On Sun, Sep 11, 2016 at 04:38:12PM +0100, Josh de Kock wrote: This actually seems to work now, it didn't in the past, so maybe SDL2 was patched or something changed in FFmpeg. I will make an avfilter of this as well as the outdev. Signed-off-by: Josh de Kock --- configure| 24 ++- libavdevice/Makefile | 1 + libavdevice/alldevices.c | 1 + libavdevice/sdl2.c | 373 +++ 4 files changed, 398 insertions(+), 1 deletion(-) create mode 100644 libavdevice/sdl2.c very nice! Acked-by: Michael Note that it disables ffplay by default; so I'd better wait for a consensus with that regard before I will convert ffplay to sdl2, and then resubmit the patchset (probably later this week). ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH] avdev: Add SDL2 output device
On Sun, Sep 11, 2016 at 07:05:38PM +0100, Josh de Kock wrote: > On 11/09/2016 19:04, Clément Bœsch wrote: > > On Sun, Sep 11, 2016 at 08:02:12PM +0200, Michael Niedermayer wrote: > > > On Sun, Sep 11, 2016 at 04:38:12PM +0100, Josh de Kock wrote: > > > > This actually seems to work now, it didn't in the past, so maybe SDL2 > > > > was patched or something changed in FFmpeg. > > > > > > > > I will make an avfilter of this as well as the outdev. > > > > > > > > Signed-off-by: Josh de Kock > > > > --- > > > > configure| 24 ++- > > > > libavdevice/Makefile | 1 + > > > > libavdevice/alldevices.c | 1 + > > > > libavdevice/sdl2.c | 373 > > > > +++ > > > > 4 files changed, 398 insertions(+), 1 deletion(-) > > > > create mode 100644 libavdevice/sdl2.c > > > > > > very nice! > > > > > > Acked-by: Michael > > > > > > > Note that it disables ffplay by default; so I'd better wait for a > > consensus with that regard before > > > I will convert ffplay to sdl2, and then resubmit the patchset (probably > later this week). You can also just disable sdl2 by default until every code relying on sdl1 has a sdl2 alternative so this can be applied earlier. -- Clément B. ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH] Select cubic and lanczos as alternative where super-sampling is not supported
On Sun, Sep 11, 2016 at 19:04:39 +0100, Sven C. Dack wrote: > the second body if it entered the first, because the value is part of both > the > conditions. D'uh, I missed that part. (It wasn't obvious enough to me. ;-)) > I thought about some neat logic at first, but decided to do it this > way for more readability. Now you've put me on the spot... Your call. In that case, the code you wrote is just fine, albeit a bit more difficult to grasp - for me. It's not my call at all, I'm just commenting. Moritz ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH] configure: don't build ffserver unless explicitly enabled
Le sextidi 26 fructidor, an CCXXIV, Sven C. Dack a écrit : > Did you at least read the second part of my mail? Because I sure do get you > don't care. It's all you, Nicolas and Hendrik have been saying here really. Not really. > ffserver Please stop about ffserver. This branch of the discussion is not about ffserver, it is about you not understanding 40+ years of good software design, namely the separation between normalized reliable output on stdout and human-readable diagnosis output on stderr. stderr is not for parsing. If you do not understand why, ask Ken Thompson, or really any good book on system programming. But if you are parsing the stderr output of ffmpeg, you are doing something wrong. Not ffmpeg: you. We can probably help you to fix your programs if you tell us exactly your issue, but until now you have only been vague. And accommodating wrong practices will never be a motivation in the evolution of ffmpeg. This is the second time I explain this with different words. There will be no third time. Regards, -- Nicolas George signature.asc Description: Digital signature ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH] configure: don't build ffserver unless explicitly enabled
On 11/09/16 18:57, Clément Bœsch wrote: I think we disagree, because no user of a working setup will ever read the documentation just to check for deprecated tools. Having the warning at runtime is the most efficient way to reach out a maximum of users as soon as possible so they have time to migrate their setup. A bit like deprecation warning in API at build time. You are trying to cater to the wrong people. There sure are people who don't read the documentation, but who are they? ... There are those who don't upgrade and consequently have no need to read NEWS or the documentation - them you don't need to care for obviously. They will read about it in the documentation when the time comes for them to upgrade. Then there are those who expect everything to stay the same only to learn the hard way of a change - them you don't need to care for and they also won't appreciate it when you do. Then there are those who don't read the output of ffserver, because of how they run it (i.e. from a script as a daemon) and who only occasionally check their logs - they either belong to the group of "hard learners" or they have read the documentation. Your point really only makes sense if you wanted to care for people who care for documentation, which means you should properly document it. People who need to migrate have nothing to migrate to - they will try to use the existing releases as long as it works for them. They may be seeing the printed message for a lot longer than you would want them to. They won't find anything good about the loss of ffserver or having to find a replacement. They won't like the message, only a few will ever be actually grateful for it, but even they will not like it or care for it after seeing it for the hundredth time. Sven ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
[FFmpeg-devel] [PATCH v3 1/3] lavd: Add SDL2 output device
Acked-by: Michael Niedermayer Signed-off-by: Josh de Kock --- configure| 23 +++ libavdevice/Makefile | 1 + libavdevice/alldevices.c | 1 + libavdevice/sdl2.c | 373 +++ 4 files changed, 398 insertions(+) create mode 100644 libavdevice/sdl2.c diff --git a/configure b/configure index b11ca7f..d6c02fe 100755 --- a/configure +++ b/configure @@ -292,6 +292,7 @@ External library support: --disable-schannel disable SChannel SSP, needed for TLS support on Windows if openssl and gnutls are not used [autodetect] --disable-sdldisable sdl [autodetect] + --disable-sdl2 disable sdl2 [autodetect] --disable-securetransport disable Secure Transport, needed for TLS support on OSX if openssl and gnutls are not used [autodetect] --enable-x11grab enable X11 grabbing (legacy) [no] @@ -1548,6 +1549,7 @@ EXTERNAL_LIBRARY_LIST=" openssl schannel sdl +sdl2 securetransport videotoolbox x11grab @@ -2022,6 +2024,7 @@ HAVE_LIST=" perl pod2man sdl +sdl2 section_data_rel_ro texi2html threads @@ -2945,6 +2948,7 @@ pulse_outdev_deps="libpulse" qtkit_indev_extralibs="-framework QTKit -framework Foundation -framework QuartzCore" qtkit_indev_select="qtkit" sdl_outdev_deps="sdl" +sdl2_outdev_deps="sdl2" sndio_indev_deps="sndio_h" sndio_outdev_deps="sndio_h" v4l_indev_deps="linux_videodev_h" @@ -5876,6 +5880,24 @@ if ! disabled sdl; then fi enabled sdl && add_cflags $sdl_cflags && add_extralibs $sdl_libs +if ! disabled sdl2 && ! enabled sdl; then +SDL2_CONFIG="${cross_prefix}sdl2-config" +if check_pkg_config sdl2 SDL_events.h SDL_PollEvent; then +check_cpp_condition SDL.h "(SDL_MAJOR_VERSION<<16 | SDL_MINOR_VERSION<<8 | SDL_PATCHLEVEL) >= 0x020001" $sdl2_cflags && +check_cpp_condition SDL.h "(SDL_MAJOR_VERSION<<16 | SDL_MINOR_VERSION<<8 | SDL_PATCHLEVEL) < 0x020100" $sdl2_cflags && +enable sdl2 +else + if "${SDL2_CONFIG}" --version > /dev/null 2>&1; then +sdl2_cflags=$("${SDL2_CONFIG}" --cflags) +sdl2_libs=$("${SDL2_CONFIG}" --libs) +check_cpp_condition SDL.h "(SDL_MAJOR_VERSION<<16 | SDL_MINOR_VERSION<<8 | SDL_PATCHLEVEL) >= 0x020001" $sdl2_cflags && +check_cpp_condition SDL.h "(SDL_MAJOR_VERSION<<16 | SDL_MINOR_VERSION<<8 | SDL_PATCHLEVEL) < 0x020100" $sdl2_cflags && +enable sdl2 + fi +fi +fi +enabled sdl2 && add_cflags $sdl2_cflags && add_extralibs $sdl2_libs + disabled securetransport || { check_func SecIdentityCreate "-Wl,-framework,CoreFoundation -Wl,-framework,Security" && check_lib2 "Security/SecureTransport.h Security/Security.h" "SSLCreateContext SecItemImport" "-Wl,-framework,CoreFoundation -Wl,-framework,Security" && enable securetransport; } @@ -6480,6 +6502,7 @@ echo "network support ${network-no}" echo "threading support ${thread_type-no}" echo "safe bitstream reader ${safe_bitstream_reader-no}" echo "SDL support ${sdl-no}" +echo "SDL2 support ${sdl2-no}" echo "opencl enabled${opencl-no}" echo "JNI support ${jni-no}" echo "texi2html enabled ${texi2html-no}" diff --git a/libavdevice/Makefile b/libavdevice/Makefile index 585827b..1c4b4d3 100644 --- a/libavdevice/Makefile +++ b/libavdevice/Makefile @@ -41,6 +41,7 @@ OBJS-$(CONFIG_PULSE_OUTDEV) += pulse_audio_enc.o \ pulse_audio_common.o OBJS-$(CONFIG_QTKIT_INDEV) += qtkit.o OBJS-$(CONFIG_SDL_OUTDEV)+= sdl.o +OBJS-$(CONFIG_SDL2_OUTDEV) += sdl2.o OBJS-$(CONFIG_SNDIO_INDEV) += sndio_dec.o sndio.o OBJS-$(CONFIG_SNDIO_OUTDEV) += sndio_enc.o sndio.o OBJS-$(CONFIG_V4L2_INDEV)+= v4l2.o v4l2-common.o timefilter.o diff --git a/libavdevice/alldevices.c b/libavdevice/alldevices.c index 26aecf2..c0a9d9a 100644 --- a/libavdevice/alldevices.c +++ b/libavdevice/alldevices.c @@ -64,6 +64,7 @@ void avdevice_register_all(void) REGISTER_INOUTDEV(PULSE,pulse); REGISTER_INDEV (QTKIT,qtkit); REGISTER_OUTDEV (SDL, sdl); +REGISTER_OUTDEV (SDL2, sdl2); REGISTER_INOUTDEV(SNDIO,sndio); REGISTER_INOUTDEV(V4L2, v4l2); //REGISTER_INDEV (V4L, v4l diff --git a/libavdevice/sdl2.c b/libavdevice/sdl2.c new file mode 100644 index 000..cad0713 --- /dev/null +++ b/libavdevice/sdl2.c @@ -0,0 +1,373 @@ +/* + * Copyright (c) 2016 Josh de Kock + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the Lic
[FFmpeg-devel] [PATCH v3 3/3] lavd: deprecate opengl outdev
This device depends on SDL which is deprecated. Signed-off-by: Josh de Kock --- Changelog| 2 +- doc/outdevs.texi | 2 ++ libavdevice/opengl_enc.c | 2 ++ 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/Changelog b/Changelog index f609a86..6c9f766 100644 --- a/Changelog +++ b/Changelog @@ -27,7 +27,7 @@ version : - weave filter - gblur filter - avgblur filter -- deprecated sdl outdev +- deprecated sdl and opengl outdev version 3.1: diff --git a/doc/outdevs.texi b/doc/outdevs.texi index cfcc176..34afa6f 100644 --- a/doc/outdevs.texi +++ b/doc/outdevs.texi @@ -214,6 +214,8 @@ See also @url{http://linux-fbdev.sourceforge.net/}, and fbset(1). @section opengl OpenGL output device. +This device is deprecated and will be removed in a future release. + To enable this output device you need to configure FFmpeg with @code{--enable-opengl}. This output device allows one to render to OpenGL context. diff --git a/libavdevice/opengl_enc.c b/libavdevice/opengl_enc.c index 1dbbb80..d611830 100644 --- a/libavdevice/opengl_enc.c +++ b/libavdevice/opengl_enc.c @@ -1064,6 +1064,8 @@ static av_cold int opengl_write_header(AVFormatContext *h) AVStream *st; int ret; +av_log(h, AV_LOG_WARNING, "The opengl output device is deprecated.\n"); + if (h->nb_streams != 1 || h->streams[0]->codecpar->codec_type != AVMEDIA_TYPE_VIDEO || h->streams[0]->codecpar->codec_id != AV_CODEC_ID_RAWVIDEO) { -- 2.7.4 (Apple Git-66) ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
[FFmpeg-devel] [PATCH v3 2/3] lavd: deprecate SDL device
SDL1 has been unmaintained for quite a while (version 1.2.15 was released 4 years ago). Due to how SDL2 works (it requires the main thread), there won't be able to be a replacement to the SDL avdevice if FFmpeg were to switch to SDL2 in the future. This commit would also help in getting ffplay to switch to SDL2 as there'd no longer be a dependency on the SDL avdevice. Signed-off-by: Josh de Kock --- Changelog | 1 + doc/outdevs.texi | 2 ++ libavdevice/sdl.c | 2 ++ 3 files changed, 5 insertions(+) diff --git a/Changelog b/Changelog index 64695c8..f609a86 100644 --- a/Changelog +++ b/Changelog @@ -27,6 +27,7 @@ version : - weave filter - gblur filter - avgblur filter +- deprecated sdl outdev version 3.1: diff --git a/doc/outdevs.texi b/doc/outdevs.texi index e68653f..cfcc176 100644 --- a/doc/outdevs.texi +++ b/doc/outdevs.texi @@ -320,6 +320,8 @@ ffmpeg -i INPUT -f pulse "stream name" SDL (Simple DirectMedia Layer) output device. +This device is deprecated and will be removed in a future release. + This output device allows one to show a video stream in an SDL window. Only one SDL window is allowed per application, so you can have only one instance of this output device in an application. diff --git a/libavdevice/sdl.c b/libavdevice/sdl.c index 4322750..06ef35c 100644 --- a/libavdevice/sdl.c +++ b/libavdevice/sdl.c @@ -237,6 +237,8 @@ static int sdl_write_header(AVFormatContext *s) AVCodecParameters *par = st->codecpar; int i, ret; +av_log(s, AV_LOG_WARNING, "The SDL output device is deprecated.\n"); + if (!sdl->window_title) sdl->window_title = av_strdup(s->filename); if (!sdl->icon_title) -- 2.7.4 (Apple Git-66) ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH v3 1/3] lavd: Add SDL2 output device
On 9/11/16, Josh de Kock wrote: > Acked-by: Michael Niedermayer > Signed-off-by: Josh de Kock > --- > configure| 23 +++ > libavdevice/Makefile | 1 + > libavdevice/alldevices.c | 1 + > libavdevice/sdl2.c | 373 > +++ > 4 files changed, 398 insertions(+) > create mode 100644 libavdevice/sdl2.c > > diff --git a/configure b/configure > index b11ca7f..d6c02fe 100755 > --- a/configure > +++ b/configure > @@ -292,6 +292,7 @@ External library support: >--disable-schannel disable SChannel SSP, needed for TLS support on > Windows if openssl and gnutls are not used > [autodetect] >--disable-sdldisable sdl [autodetect] > + --disable-sdl2 disable sdl2 [autodetect] >--disable-securetransport disable Secure Transport, needed for TLS > support > on OSX if openssl and gnutls are not used > [autodetect] >--enable-x11grab enable X11 grabbing (legacy) [no] > @@ -1548,6 +1549,7 @@ EXTERNAL_LIBRARY_LIST=" > openssl > schannel > sdl > +sdl2 > securetransport > videotoolbox > x11grab > @@ -2022,6 +2024,7 @@ HAVE_LIST=" > perl > pod2man > sdl > +sdl2 > section_data_rel_ro > texi2html > threads > @@ -2945,6 +2948,7 @@ pulse_outdev_deps="libpulse" > qtkit_indev_extralibs="-framework QTKit -framework Foundation -framework > QuartzCore" > qtkit_indev_select="qtkit" > sdl_outdev_deps="sdl" > +sdl2_outdev_deps="sdl2" > sndio_indev_deps="sndio_h" > sndio_outdev_deps="sndio_h" > v4l_indev_deps="linux_videodev_h" > @@ -5876,6 +5880,24 @@ if ! disabled sdl; then > fi > enabled sdl && add_cflags $sdl_cflags && add_extralibs $sdl_libs > > +if ! disabled sdl2 && ! enabled sdl; then > +SDL2_CONFIG="${cross_prefix}sdl2-config" > +if check_pkg_config sdl2 SDL_events.h SDL_PollEvent; then > +check_cpp_condition SDL.h "(SDL_MAJOR_VERSION<<16 | > SDL_MINOR_VERSION<<8 | SDL_PATCHLEVEL) >= 0x020001" $sdl2_cflags && > +check_cpp_condition SDL.h "(SDL_MAJOR_VERSION<<16 | > SDL_MINOR_VERSION<<8 | SDL_PATCHLEVEL) < 0x020100" $sdl2_cflags && > +enable sdl2 > +else > + if "${SDL2_CONFIG}" --version > /dev/null 2>&1; then > +sdl2_cflags=$("${SDL2_CONFIG}" --cflags) > +sdl2_libs=$("${SDL2_CONFIG}" --libs) > +check_cpp_condition SDL.h "(SDL_MAJOR_VERSION<<16 | > SDL_MINOR_VERSION<<8 | SDL_PATCHLEVEL) >= 0x020001" $sdl2_cflags && > +check_cpp_condition SDL.h "(SDL_MAJOR_VERSION<<16 | > SDL_MINOR_VERSION<<8 | SDL_PATCHLEVEL) < 0x020100" $sdl2_cflags && > +enable sdl2 > + fi > +fi > +fi > +enabled sdl2 && add_cflags $sdl2_cflags && add_extralibs $sdl2_libs > + > disabled securetransport || { check_func SecIdentityCreate > "-Wl,-framework,CoreFoundation -Wl,-framework,Security" && > check_lib2 "Security/SecureTransport.h Security/Security.h" > "SSLCreateContext SecItemImport" "-Wl,-framework,CoreFoundation > -Wl,-framework,Security" && > enable securetransport; } > @@ -6480,6 +6502,7 @@ echo "network support ${network-no}" > echo "threading support ${thread_type-no}" > echo "safe bitstream reader ${safe_bitstream_reader-no}" > echo "SDL support ${sdl-no}" > +echo "SDL2 support ${sdl2-no}" > echo "opencl enabled${opencl-no}" > echo "JNI support ${jni-no}" > echo "texi2html enabled ${texi2html-no}" > diff --git a/libavdevice/Makefile b/libavdevice/Makefile > index 585827b..1c4b4d3 100644 > --- a/libavdevice/Makefile > +++ b/libavdevice/Makefile > @@ -41,6 +41,7 @@ OBJS-$(CONFIG_PULSE_OUTDEV) += > pulse_audio_enc.o \ > pulse_audio_common.o > OBJS-$(CONFIG_QTKIT_INDEV) += qtkit.o > OBJS-$(CONFIG_SDL_OUTDEV)+= sdl.o > +OBJS-$(CONFIG_SDL2_OUTDEV) += sdl2.o > OBJS-$(CONFIG_SNDIO_INDEV) += sndio_dec.o sndio.o > OBJS-$(CONFIG_SNDIO_OUTDEV) += sndio_enc.o sndio.o > OBJS-$(CONFIG_V4L2_INDEV)+= v4l2.o v4l2-common.o > timefilter.o > diff --git a/libavdevice/alldevices.c b/libavdevice/alldevices.c > index 26aecf2..c0a9d9a 100644 > --- a/libavdevice/alldevices.c > +++ b/libavdevice/alldevices.c > @@ -64,6 +64,7 @@ void avdevice_register_all(void) > REGISTER_INOUTDEV(PULSE,pulse); > REGISTER_INDEV (QTKIT,qtkit); > REGISTER_OUTDEV (SDL, sdl); > +REGISTER_OUTDEV (SDL2, sdl2); > REGISTER_INOUTDEV(SNDIO,sndio); > REGISTER_INOUTDEV(V4L2, v4l2); > //REGISTER_INDEV (V4L, v4l > diff --git a/libavdevice/sdl2.c b/libavdevice/sdl2.c > new file mode 100644 > index 000..cad0713 > --- /dev/null > +++ b/libavdevice/sdl2.c > @@ -0,0 +1,373 @@ > +/* > + * Copyright (c) 2016
Re: [FFmpeg-devel] [PATCH] avdev: Add SDL2 output device
Nice, seeing how often this has been pitched in the past. On Sun, Sep 11, 2016 at 16:38:12 +0100, Josh de Kock wrote: > This actually seems to work now, it didn't in the past, so maybe SDL2 > was patched or something changed in FFmpeg. Interesting... > + * Copyright (c) 2011 Stefano Sabatini Does this show the age of the patch, or is this from the original sdl1 implementation? > +{ "window_fullscreen", "set SDL window fullscreen", > OFFSET(window_fullscreen), AV_OPT_TYPE_INT, { .i64 = 0 }, INT_MIN, INT_MAX, > AV_OPT_FLAG_ENCODING_PARAM }, > +{ "window_borderless", "set SDL window border off", > OFFSET(window_fullscreen), AV_OPT_TYPE_INT, { .i64 = 0 }, INT_MIN, INT_MAX, > AV_OPT_FLAG_ENCODING_PARAM }, a) These should be _BOOL nowadays. b) There's a copy/paste error there, disabling window_borderless. Moritz ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH] avdev: Add SDL2 output device
On 11/09/2016 20:00, Moritz Barsnick wrote: Nice, seeing how often this has been pitched in the past. On Sun, Sep 11, 2016 at 16:38:12 +0100, Josh de Kock wrote: This actually seems to work now, it didn't in the past, so maybe SDL2 was patched or something changed in FFmpeg. Interesting... + * Copyright (c) 2011 Stefano Sabatini Does this show the age of the patch, or is this from the original sdl1 implementation? I started with the SDL1 implementation then after a few failed attempts to convert it over I deleted everything except for the settings and the header, then rewrote everything, I've updated the header in the latest iteration. +{ "window_fullscreen", "set SDL window fullscreen", OFFSET(window_fullscreen), AV_OPT_TYPE_INT, { .i64 = 0 }, INT_MIN, INT_MAX, AV_OPT_FLAG_ENCODING_PARAM }, +{ "window_borderless", "set SDL window border off", OFFSET(window_fullscreen), AV_OPT_TYPE_INT, { .i64 = 0 }, INT_MIN, INT_MAX, AV_OPT_FLAG_ENCODING_PARAM }, a) These should be _BOOL nowadays. Ok. b) There's a copy/paste error there, disabling window_borderless. Thanks! -- Josh ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH] configure: don't build ffserver unless explicitly enabled
On 11/09/16 19:45, Nicolas George wrote: Please stop about ffserver. This branch of the discussion is not about ffserver, it is about you not understanding 40+ years of good software design, namely the separation between normalized reliable output on stdout and human-readable diagnosis output on stderr. stderr is not for parsing. If you do not understand why, ask Ken Thompson, or really any good book on system programming. But if you are parsing the stderr output of ffmpeg, you are doing something wrong. Not ffmpeg: you. We can probably help you to fix your programs if you tell us exactly your issue, but until now you have only been vague. And accommodating wrong practices will never be a motivation in the evolution of ffmpeg. This is the second time I explain this with different words. There will be no third time. This isn't how a discussion works where you get to stomp your opinion down onto others and get to make it personal. But if you want it personal, I can give you personal, because if you haven't learned in 40 years that users do parse error messages then you have only proven how little you know and what an ignorant you are. Luckily are you a coward, too, and have walked out of the discussion, which seems to be the upside to your character. Was this personal enough for you? Sven ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
[FFmpeg-devel] Strategy to optimally playback audio & video
Hi all, My app needs best performance video playback in high resolutions. I have a graphic engine polling the video frames and an audio engine polling decoded audio packets. The problem is, sometimes, the audio thread needs data that are not ready, so it decodes all packets until it got the required audio data. In this case video frames are also decoded and pushed in a queue. But if it implies decoding 10 HD video frames, I won’t get the audio data in time and I’ll get audio issues. (I have a few videos in which I have 10 consecutive video frames, then audio content, then 10 frames ….) What should I do in this case ? I see various solutions: 1- I could put in cache more than one second of audio and video and I should be ok, but with 4k movies, keeping 30 frames could imply using a huge amount of memory and I would like to avoid that. 2- I could open the file twice, one for video and one for audio, but I would use even more RAM and it would decrease performances because parsing the file twice 3- I could avoid decoding video frames if I’m missing audio data but that would imply seeking back after to get a clean video frame (so decoding again from previous keyframe), so I think that’s not a option at all. 4- Any better option ? I hope I’m on the right mailing list. Thanks a lot, Kind regards, Matt Beghin ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] Evolution of lavfi's design and API
On 9/10/16, Nicolas George wrote: > Le quartidi 24 fructidor, an CCXXIV, Paul B Mahol a ecrit : >> So everybody agrees, we should proceed. > > I am proceeding, but as you can see in the patch, there is still a fair > amount of work to be done. Still, people can help if they want to speed > things up, especially since a significant part of the work is design > decisions that I can not do alone and will need to be discussed. > > What needs to be done (using this mail as a notepad, but including the > tasks > where help is required): > > - Finish documenting the scheduling and make sure the implementation > matches > the documentation. > > - Discuss if "private_fields.h" is acceptable or decide another solution. > > - Clearly identify and isolate the parts of the scheduling that are needed > only for request_frame()/request_frame() compatibility. > > - Decide exactly what parts of the scheduling are the responsibility of > filters (possibly in the compatibility activate function) and what parts > are handled by the framework. > > - Think ahead about threading and use wrapper to access fields that will > require locking or synchronization. > > - Think about features whose need I realized while trying to get it > working: > distinguish productive / processing activation, synchronize several > filter > graphs. > > Please feel free to ask details about any of these points: not only would > getting interest help me stay motivated, but discussing implementation > details and explaining the design would help me having a clear idea of the > whole system. For start removal of recursiveness is mostly I'm interested in. What needs to be done for that, can I help somehow? ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
[FFmpeg-devel] [PATCH v4 1/3] lavd: Add SDL2 output device
Integrated comments from Moritz Barsnick. Acked-by: Michael Niedermayer Signed-off-by: Josh de Kock --- configure| 25 +++- libavdevice/Makefile | 1 + libavdevice/alldevices.c | 1 + libavdevice/sdl2.c | 373 +++ 4 files changed, 399 insertions(+), 1 deletion(-) create mode 100644 libavdevice/sdl2.c diff --git a/configure b/configure index b11ca7f..b16988a 100755 --- a/configure +++ b/configure @@ -292,6 +292,7 @@ External library support: --disable-schannel disable SChannel SSP, needed for TLS support on Windows if openssl and gnutls are not used [autodetect] --disable-sdldisable sdl [autodetect] + --disable-sdl2 disable sdl2 [autodetect] --disable-securetransport disable Secure Transport, needed for TLS support on OSX if openssl and gnutls are not used [autodetect] --enable-x11grab enable X11 grabbing (legacy) [no] @@ -1548,6 +1549,7 @@ EXTERNAL_LIBRARY_LIST=" openssl schannel sdl +sdl2 securetransport videotoolbox x11grab @@ -2022,6 +2024,7 @@ HAVE_LIST=" perl pod2man sdl +sdl2 section_data_rel_ro texi2html threads @@ -2945,6 +2948,7 @@ pulse_outdev_deps="libpulse" qtkit_indev_extralibs="-framework QTKit -framework Foundation -framework QuartzCore" qtkit_indev_select="qtkit" sdl_outdev_deps="sdl" +sdl2_outdev_deps="sdl2" sndio_indev_deps="sndio_h" sndio_outdev_deps="sndio_h" v4l_indev_deps="linux_videodev_h" @@ -5850,7 +5854,7 @@ if enabled gcrypt; then fi fi -if ! disabled sdl; then +if ! disabled sdl && ! enabled sdl2; then SDL_CONFIG="${cross_prefix}sdl-config" if check_pkg_config sdl SDL_events.h SDL_PollEvent; then check_cpp_condition SDL.h "(SDL_MAJOR_VERSION<<16 | SDL_MINOR_VERSION<<8 | SDL_PATCHLEVEL) >= 0x010201" $sdl_cflags && @@ -5876,6 +5880,24 @@ if ! disabled sdl; then fi enabled sdl && add_cflags $sdl_cflags && add_extralibs $sdl_libs +if ! disabled sdl2 && ! enabled sdl; then +SDL2_CONFIG="${cross_prefix}sdl2-config" +if check_pkg_config sdl2 SDL_events.h SDL_PollEvent; then +check_cpp_condition SDL.h "(SDL_MAJOR_VERSION<<16 | SDL_MINOR_VERSION<<8 | SDL_PATCHLEVEL) >= 0x020001" $sdl2_cflags && +check_cpp_condition SDL.h "(SDL_MAJOR_VERSION<<16 | SDL_MINOR_VERSION<<8 | SDL_PATCHLEVEL) < 0x020100" $sdl2_cflags && +enable sdl2 +else + if "${SDL2_CONFIG}" --version > /dev/null 2>&1; then +sdl2_cflags=$("${SDL2_CONFIG}" --cflags) +sdl2_libs=$("${SDL2_CONFIG}" --libs) +check_cpp_condition SDL.h "(SDL_MAJOR_VERSION<<16 | SDL_MINOR_VERSION<<8 | SDL_PATCHLEVEL) >= 0x020001" $sdl2_cflags && +check_cpp_condition SDL.h "(SDL_MAJOR_VERSION<<16 | SDL_MINOR_VERSION<<8 | SDL_PATCHLEVEL) < 0x020100" $sdl2_cflags && +enable sdl2 + fi +fi +fi +enabled sdl2 && add_cflags $sdl2_cflags && add_extralibs $sdl2_libs + disabled securetransport || { check_func SecIdentityCreate "-Wl,-framework,CoreFoundation -Wl,-framework,Security" && check_lib2 "Security/SecureTransport.h Security/Security.h" "SSLCreateContext SecItemImport" "-Wl,-framework,CoreFoundation -Wl,-framework,Security" && enable securetransport; } @@ -6480,6 +6502,7 @@ echo "network support ${network-no}" echo "threading support ${thread_type-no}" echo "safe bitstream reader ${safe_bitstream_reader-no}" echo "SDL support ${sdl-no}" +echo "SDL2 support ${sdl2-no}" echo "opencl enabled${opencl-no}" echo "JNI support ${jni-no}" echo "texi2html enabled ${texi2html-no}" diff --git a/libavdevice/Makefile b/libavdevice/Makefile index 585827b..1c4b4d3 100644 --- a/libavdevice/Makefile +++ b/libavdevice/Makefile @@ -41,6 +41,7 @@ OBJS-$(CONFIG_PULSE_OUTDEV) += pulse_audio_enc.o \ pulse_audio_common.o OBJS-$(CONFIG_QTKIT_INDEV) += qtkit.o OBJS-$(CONFIG_SDL_OUTDEV)+= sdl.o +OBJS-$(CONFIG_SDL2_OUTDEV) += sdl2.o OBJS-$(CONFIG_SNDIO_INDEV) += sndio_dec.o sndio.o OBJS-$(CONFIG_SNDIO_OUTDEV) += sndio_enc.o sndio.o OBJS-$(CONFIG_V4L2_INDEV)+= v4l2.o v4l2-common.o timefilter.o diff --git a/libavdevice/alldevices.c b/libavdevice/alldevices.c index 26aecf2..c0a9d9a 100644 --- a/libavdevice/alldevices.c +++ b/libavdevice/alldevices.c @@ -64,6 +64,7 @@ void avdevice_register_all(void) REGISTER_INOUTDEV(PULSE,pulse); REGISTER_INDEV (QTKIT,qtkit); REGISTER_OUTDEV (SDL, sdl); +REGISTER_OUTDEV (SDL2, sdl2); REGISTER_INOUTDEV(SNDIO,sndio); REGISTER_INOUTDEV(V4L2, v4l2); //REGISTER_INDEV (V4L, v4l diff --git a/libavdevice/sd
Re: [FFmpeg-devel] [PATCH] configure: don't build ffserver unless explicitly enabled
On Sun, Sep 11, 2016 at 7:52 PM, Sven C. Dack wrote: > On 11/09/16 18:27, Clément Bœsch wrote: >> >> Aside from the stdout output in ffprobe, no stdout/stderr output is >> standardized in FFmpeg and thus can be changed at will (and does >> regularly). You can try to parse it, but there is zero warranty that it >> will work the next day. >> >> Regards, > > > Did you at least read the second part of my mail? Because I sure do get you > don't care. It's all you, Nicolas and Hendrik have been saying here really. > What I want you to do is to snap out of it and to start caring. Put the > message where it belongs, meaning, put it into the documentation. ffserver > is not dead just yet and you should really follow the regular coding rules > until it is. And of course do users often have to accept the consequences of > a changes, but they also only ever will do so when a change brings an actual > gain. Nobody wants to accept a useless change. Your change, to put a message > to stderr into the code, just has no gain for anyone who is using it and can > only upset. Can we agree on this or am I talking to a wall? > We don't care because "caring" would severly limit the things we can change in the code. Do we have to argue everytime we want to extend a warning or error message in the future? No, we really do not want to start doing that, and thus we will also not now. There are limits to how much "stability" we can realistically provide, and warnings/errors on the console are not part of that. - Hendrik ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH v4 1/3] lavd: Add SDL2 output device
On 9/11/16, Josh de Kock wrote: > Integrated comments from Moritz Barsnick. > > Acked-by: Michael Niedermayer > Signed-off-by: Josh de Kock > --- > configure| 25 +++- > libavdevice/Makefile | 1 + > libavdevice/alldevices.c | 1 + > libavdevice/sdl2.c | 373 > +++ > 4 files changed, 399 insertions(+), 1 deletion(-) > create mode 100644 libavdevice/sdl2.c > identation after switch is still wrong. ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
[FFmpeg-devel] [PATCH v5 1/3] lavd: Add SDL2 output device
Acked-by: Michael Niedermayer Signed-off-by: Josh de Kock --- configure| 25 +++- libavdevice/Makefile | 1 + libavdevice/alldevices.c | 1 + libavdevice/sdl2.c | 373 +++ 4 files changed, 399 insertions(+), 1 deletion(-) create mode 100644 libavdevice/sdl2.c diff --git a/configure b/configure index b11ca7f..b16988a 100755 --- a/configure +++ b/configure @@ -292,6 +292,7 @@ External library support: --disable-schannel disable SChannel SSP, needed for TLS support on Windows if openssl and gnutls are not used [autodetect] --disable-sdldisable sdl [autodetect] + --disable-sdl2 disable sdl2 [autodetect] --disable-securetransport disable Secure Transport, needed for TLS support on OSX if openssl and gnutls are not used [autodetect] --enable-x11grab enable X11 grabbing (legacy) [no] @@ -1548,6 +1549,7 @@ EXTERNAL_LIBRARY_LIST=" openssl schannel sdl +sdl2 securetransport videotoolbox x11grab @@ -2022,6 +2024,7 @@ HAVE_LIST=" perl pod2man sdl +sdl2 section_data_rel_ro texi2html threads @@ -2945,6 +2948,7 @@ pulse_outdev_deps="libpulse" qtkit_indev_extralibs="-framework QTKit -framework Foundation -framework QuartzCore" qtkit_indev_select="qtkit" sdl_outdev_deps="sdl" +sdl2_outdev_deps="sdl2" sndio_indev_deps="sndio_h" sndio_outdev_deps="sndio_h" v4l_indev_deps="linux_videodev_h" @@ -5850,7 +5854,7 @@ if enabled gcrypt; then fi fi -if ! disabled sdl; then +if ! disabled sdl && ! enabled sdl2; then SDL_CONFIG="${cross_prefix}sdl-config" if check_pkg_config sdl SDL_events.h SDL_PollEvent; then check_cpp_condition SDL.h "(SDL_MAJOR_VERSION<<16 | SDL_MINOR_VERSION<<8 | SDL_PATCHLEVEL) >= 0x010201" $sdl_cflags && @@ -5876,6 +5880,24 @@ if ! disabled sdl; then fi enabled sdl && add_cflags $sdl_cflags && add_extralibs $sdl_libs +if ! disabled sdl2 && ! enabled sdl; then +SDL2_CONFIG="${cross_prefix}sdl2-config" +if check_pkg_config sdl2 SDL_events.h SDL_PollEvent; then +check_cpp_condition SDL.h "(SDL_MAJOR_VERSION<<16 | SDL_MINOR_VERSION<<8 | SDL_PATCHLEVEL) >= 0x020001" $sdl2_cflags && +check_cpp_condition SDL.h "(SDL_MAJOR_VERSION<<16 | SDL_MINOR_VERSION<<8 | SDL_PATCHLEVEL) < 0x020100" $sdl2_cflags && +enable sdl2 +else + if "${SDL2_CONFIG}" --version > /dev/null 2>&1; then +sdl2_cflags=$("${SDL2_CONFIG}" --cflags) +sdl2_libs=$("${SDL2_CONFIG}" --libs) +check_cpp_condition SDL.h "(SDL_MAJOR_VERSION<<16 | SDL_MINOR_VERSION<<8 | SDL_PATCHLEVEL) >= 0x020001" $sdl2_cflags && +check_cpp_condition SDL.h "(SDL_MAJOR_VERSION<<16 | SDL_MINOR_VERSION<<8 | SDL_PATCHLEVEL) < 0x020100" $sdl2_cflags && +enable sdl2 + fi +fi +fi +enabled sdl2 && add_cflags $sdl2_cflags && add_extralibs $sdl2_libs + disabled securetransport || { check_func SecIdentityCreate "-Wl,-framework,CoreFoundation -Wl,-framework,Security" && check_lib2 "Security/SecureTransport.h Security/Security.h" "SSLCreateContext SecItemImport" "-Wl,-framework,CoreFoundation -Wl,-framework,Security" && enable securetransport; } @@ -6480,6 +6502,7 @@ echo "network support ${network-no}" echo "threading support ${thread_type-no}" echo "safe bitstream reader ${safe_bitstream_reader-no}" echo "SDL support ${sdl-no}" +echo "SDL2 support ${sdl2-no}" echo "opencl enabled${opencl-no}" echo "JNI support ${jni-no}" echo "texi2html enabled ${texi2html-no}" diff --git a/libavdevice/Makefile b/libavdevice/Makefile index 585827b..1c4b4d3 100644 --- a/libavdevice/Makefile +++ b/libavdevice/Makefile @@ -41,6 +41,7 @@ OBJS-$(CONFIG_PULSE_OUTDEV) += pulse_audio_enc.o \ pulse_audio_common.o OBJS-$(CONFIG_QTKIT_INDEV) += qtkit.o OBJS-$(CONFIG_SDL_OUTDEV)+= sdl.o +OBJS-$(CONFIG_SDL2_OUTDEV) += sdl2.o OBJS-$(CONFIG_SNDIO_INDEV) += sndio_dec.o sndio.o OBJS-$(CONFIG_SNDIO_OUTDEV) += sndio_enc.o sndio.o OBJS-$(CONFIG_V4L2_INDEV)+= v4l2.o v4l2-common.o timefilter.o diff --git a/libavdevice/alldevices.c b/libavdevice/alldevices.c index 26aecf2..c0a9d9a 100644 --- a/libavdevice/alldevices.c +++ b/libavdevice/alldevices.c @@ -64,6 +64,7 @@ void avdevice_register_all(void) REGISTER_INOUTDEV(PULSE,pulse); REGISTER_INDEV (QTKIT,qtkit); REGISTER_OUTDEV (SDL, sdl); +REGISTER_OUTDEV (SDL2, sdl2); REGISTER_INOUTDEV(SNDIO,sndio); REGISTER_INOUTDEV(V4L2, v4l2); //REGISTER_INDEV (V4L, v4l diff --git a/libavdevice/sdl2.c b/libavdevice/sdl2.c new file mode 100
Re: [FFmpeg-devel] [PATCH v4 1/3] lavd: Add SDL2 output device
On 9/11/2016 4:46 PM, Josh de Kock wrote: -if ! disabled sdl; then +if ! disabled sdl && ! enabled sdl2; then SDL_CONFIG="${cross_prefix}sdl-config" if check_pkg_config sdl SDL_events.h SDL_PollEvent; then check_cpp_condition SDL.h "(SDL_MAJOR_VERSION<<16 | SDL_MINOR_VERSION<<8 | SDL_PATCHLEVEL) >= 0x010201" $sdl_cflags && @@ -5876,6 +5880,24 @@ if ! disabled sdl; then fi enabled sdl && add_cflags $sdl_cflags && add_extralibs $sdl_libs +if ! disabled sdl2 && ! enabled sdl; then +SDL2_CONFIG="${cross_prefix}sdl2-config" +if check_pkg_config sdl2 SDL_events.h SDL_PollEvent; then +check_cpp_condition SDL.h "(SDL_MAJOR_VERSION<<16 | SDL_MINOR_VERSION<<8 | SDL_PATCHLEVEL) >= 0x020001" $sdl2_cflags && +check_cpp_condition SDL.h "(SDL_MAJOR_VERSION<<16 | SDL_MINOR_VERSION<<8 | SDL_PATCHLEVEL) < 0x020100" $sdl2_cflags && +enable sdl2 +else + if "${SDL2_CONFIG}" --version > /dev/null 2>&1; then +sdl2_cflags=$("${SDL2_CONFIG}" --cflags) +sdl2_libs=$("${SDL2_CONFIG}" --libs) +check_cpp_condition SDL.h "(SDL_MAJOR_VERSION<<16 | SDL_MINOR_VERSION<<8 | SDL_PATCHLEVEL) >= 0x020001" $sdl2_cflags && +check_cpp_condition SDL.h "(SDL_MAJOR_VERSION<<16 | SDL_MINOR_VERSION<<8 | SDL_PATCHLEVEL) < 0x020100" $sdl2_cflags && +enable sdl2 + fi +fi +fi +enabled sdl2 && add_cflags $sdl2_cflags && add_extralibs $sdl2_libs + SDL2 is also probably going to require special-casing -mconsole into sdl2_libs for MinGW like we already do for SDL1's sdl_libs. Nothing changed in that regard on SDL's side, IIRC. ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH v4 1/3] lavd: Add SDL2 output device
On Sun, Sep 11, 2016 at 21:46:58 +0100, Josh de Kock wrote: > +{ "window_fullscreen", "set SDL window fullscreen", > OFFSET(window_fullscreen), AV_OPT_TYPE_BOOL, { .i64 = 0 }, INT_MIN, INT_MAX, > AV_OPT_FLAG_ENCODING_PARAM }, > +{ "window_borderless", "set SDL window border off", > OFFSET(window_borderless), AV_OPT_TYPE_BOOL, { .i64 = 0 }, INT_MIN, INT_MAX, > AV_OPT_FLAG_ENCODING_PARAM }, Limits should be 0, 1. (It might accept anything, and I do see cases for "-1" as "auto", but 0 and 1 really make sense here.) Moritz ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
[FFmpeg-devel] [PATCH v6 1/3] lavd: Add SDL2 output device
Acked-by: Michael Niedermayer Signed-off-by: Josh de Kock --- configure| 28 +++- libavdevice/Makefile | 1 + libavdevice/alldevices.c | 1 + libavdevice/sdl2.c | 373 +++ 4 files changed, 402 insertions(+), 1 deletion(-) create mode 100644 libavdevice/sdl2.c diff --git a/configure b/configure index b11ca7f..6ef2410 100755 --- a/configure +++ b/configure @@ -292,6 +292,7 @@ External library support: --disable-schannel disable SChannel SSP, needed for TLS support on Windows if openssl and gnutls are not used [autodetect] --disable-sdldisable sdl [autodetect] + --disable-sdl2 disable sdl2 [autodetect] --disable-securetransport disable Secure Transport, needed for TLS support on OSX if openssl and gnutls are not used [autodetect] --enable-x11grab enable X11 grabbing (legacy) [no] @@ -1548,6 +1549,7 @@ EXTERNAL_LIBRARY_LIST=" openssl schannel sdl +sdl2 securetransport videotoolbox x11grab @@ -2022,6 +2024,7 @@ HAVE_LIST=" perl pod2man sdl +sdl2 section_data_rel_ro texi2html threads @@ -2945,6 +2948,7 @@ pulse_outdev_deps="libpulse" qtkit_indev_extralibs="-framework QTKit -framework Foundation -framework QuartzCore" qtkit_indev_select="qtkit" sdl_outdev_deps="sdl" +sdl2_outdev_deps="sdl2" sndio_indev_deps="sndio_h" sndio_outdev_deps="sndio_h" v4l_indev_deps="linux_videodev_h" @@ -5850,7 +5854,7 @@ if enabled gcrypt; then fi fi -if ! disabled sdl; then +if ! disabled sdl && ! enabled sdl2; then SDL_CONFIG="${cross_prefix}sdl-config" if check_pkg_config sdl SDL_events.h SDL_PollEvent; then check_cpp_condition SDL.h "(SDL_MAJOR_VERSION<<16 | SDL_MINOR_VERSION<<8 | SDL_PATCHLEVEL) >= 0x010201" $sdl_cflags && @@ -5876,6 +5880,27 @@ if ! disabled sdl; then fi enabled sdl && add_cflags $sdl_cflags && add_extralibs $sdl_libs +if ! disabled sdl2 && ! enabled sdl; then +SDL2_CONFIG="${cross_prefix}sdl2-config" +if check_pkg_config sdl2 SDL_events.h SDL_PollEvent; then +check_cpp_condition SDL.h "(SDL_MAJOR_VERSION<<16 | SDL_MINOR_VERSION<<8 | SDL_PATCHLEVEL) >= 0x020001" $sdl2_cflags && +check_cpp_condition SDL.h "(SDL_MAJOR_VERSION<<16 | SDL_MINOR_VERSION<<8 | SDL_PATCHLEVEL) < 0x020100" $sdl2_cflags && +enable sdl2 +else + if "${SDL2_CONFIG}" --version > /dev/null 2>&1; then +sdl2_cflags=$("${SDL2_CONFIG}" --cflags) +sdl2_libs=$("${SDL2_CONFIG}" --libs) +check_cpp_condition SDL.h "(SDL_MAJOR_VERSION<<16 | SDL_MINOR_VERSION<<8 | SDL_PATCHLEVEL) >= 0x020001" $sdl2_cflags && +check_cpp_condition SDL.h "(SDL_MAJOR_VERSION<<16 | SDL_MINOR_VERSION<<8 | SDL_PATCHLEVEL) < 0x020100" $sdl2_cflags && +enable sdl2 + fi +fi +if test $target_os = "mingw32"; then +sdl2_libs="$sdl2_libs -mconsole" +fi +fi +enabled sdl2 && add_cflags $sdl2_cflags && add_extralibs $sdl2_libs + disabled securetransport || { check_func SecIdentityCreate "-Wl,-framework,CoreFoundation -Wl,-framework,Security" && check_lib2 "Security/SecureTransport.h Security/Security.h" "SSLCreateContext SecItemImport" "-Wl,-framework,CoreFoundation -Wl,-framework,Security" && enable securetransport; } @@ -6480,6 +6505,7 @@ echo "network support ${network-no}" echo "threading support ${thread_type-no}" echo "safe bitstream reader ${safe_bitstream_reader-no}" echo "SDL support ${sdl-no}" +echo "SDL2 support ${sdl2-no}" echo "opencl enabled${opencl-no}" echo "JNI support ${jni-no}" echo "texi2html enabled ${texi2html-no}" diff --git a/libavdevice/Makefile b/libavdevice/Makefile index 585827b..1c4b4d3 100644 --- a/libavdevice/Makefile +++ b/libavdevice/Makefile @@ -41,6 +41,7 @@ OBJS-$(CONFIG_PULSE_OUTDEV) += pulse_audio_enc.o \ pulse_audio_common.o OBJS-$(CONFIG_QTKIT_INDEV) += qtkit.o OBJS-$(CONFIG_SDL_OUTDEV)+= sdl.o +OBJS-$(CONFIG_SDL2_OUTDEV) += sdl2.o OBJS-$(CONFIG_SNDIO_INDEV) += sndio_dec.o sndio.o OBJS-$(CONFIG_SNDIO_OUTDEV) += sndio_enc.o sndio.o OBJS-$(CONFIG_V4L2_INDEV)+= v4l2.o v4l2-common.o timefilter.o diff --git a/libavdevice/alldevices.c b/libavdevice/alldevices.c index 26aecf2..c0a9d9a 100644 --- a/libavdevice/alldevices.c +++ b/libavdevice/alldevices.c @@ -64,6 +64,7 @@ void avdevice_register_all(void) REGISTER_INOUTDEV(PULSE,pulse); REGISTER_INDEV (QTKIT,qtkit); REGISTER_OUTDEV (SDL, sdl); +REGISTER_OUTDEV (SDL2, sdl2); REGISTER_INOUTDEV(SNDIO,sndio); REGISTER_INOUTDEV(V4L2, v4l2); //REGISTER_INDEV (
Re: [FFmpeg-devel] [PATCH] avformat/mux: implement AVFMT_FLAG_SHORTEST
On Fri, Aug 12, 2016 at 09:51:19PM +0200, Clément Bœsch wrote: > On Fri, Aug 12, 2016 at 09:50:37PM +0200, Clément Bœsch wrote: > > On Fri, Aug 12, 2016 at 09:28:08PM +0200, Michael Niedermayer wrote: > > [...] > > > if (s->internal->nb_interleaved_streams == stream_count) > > > -flush = 1; > > > +flush = 2; > > > > > > > Can you do something better than this? > > > > To elaborate: a more explicit state (enum or whatever) used a 2nd variable added docs applied thx [..] -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB Many that live deserve death. And some that die deserve life. Can you give it to them? Then do not be too eager to deal out death in judgement. For even the very wise cannot see all ends. -- Gandalf signature.asc Description: Digital signature ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH] configure: don't build ffserver unless explicitly enabled
On 11/09/16 21:41, Hendrik Leppkes wrote: We don't care because "caring" would severly limit the things we can change in the code. Your logic would be sound if the code hadn't been declared as deprecated. I do agree that for live code the users have to accept changes when it means there is a real gain from it, but because it has been declared as deprecated are you trying to make changes to code when you officially no longer want to make changes. You then wouldn't put a message into ffmpeg to point out that it hasn't been declared as deprecated. Although I am sure there may be a some users who could be happy about such a message, maybe some may even be worried about the news of ffserver and find such direct message useful. Yet would I not consider this to be a real gain or an acceptable change. I am guessing for once you wish to be lazy and by sticking the message into ffserver, thinking since it is going away anyway why care? But it's not actually user friendly, because anyone who is using it will now get this message each and every time they starting the server. And it's not like there aren't good places to put the announcement. Sven PS: I swear I've sent the last message only once! :) ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH] lavc/ffjni: do not error out if the last non-mandatory field/method cannot be found
On Fri, Sep 09, 2016 at 04:40:00PM +0200, Matthieu Bouron wrote: > From: Matthieu Bouron > > --- > libavcodec/ffjni.c | 2 ++ > 1 file changed, 2 insertions(+) LGTM thx [...] -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB I do not agree with what you have to say, but I'll defend to the death your right to say it. -- Voltaire signature.asc Description: Digital signature ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH v5 5/5] avformat/tee: Use BSF list API
On 09/10/2016 10:48 AM, Nicolas George wrote: Le sextidi 16 fructidor, an CCXXIV, sebechlebsky...@gmail.com a écrit : From: Jan Sebechlebsky Signed-off-by: Jan Sebechlebsky --- Changes since the last version of the patch: - added check for avcodec_parameters_copy return value - fixed stray space - rewritten cycle receiving packets from bsf so case when av_interleaved_write_frame returns EAGAIN is treated as error. There is a stray empty line at the end. LGTM, thanks. I've removed stray empty line localy and applied the patch. Thanks Regards, Jan ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH] libavcodec/mmaldec.c: add interlaced_frame and format struct to AVFrame for deinterlacing]
On Sun, Aug 14, 2016 at 05:02:03PM +0200, Jens Ziller wrote: > Am Samstag, den 13.08.2016, 13:16 +0200 schrieb Jens Ziller: > > Am Freitag, den 12.08.2016, 17:12 +0200 schrieb Michael Niedermayer: > > > > > > On Sun, Jul 31, 2016 at 07:09:26PM +0200, Jens Ziller wrote: > > > > > > > > > > > > Am Sonntag, den 31.07.2016, 16:33 +0100 schrieb Mark Thompson: > > > > > > > > > > > > > > > On 31/07/16 15:51, Jens Ziller wrote: > > > > > > > > > > > > > > > > > > > > > > > > Am Samstag, den 30.07.2016, 17:30 +0100 schrieb Mark > > > > > > Thompson: > > > [...] > > > > > > > > > > > > > > > > > > > > > > > Consider this sequence, where we want to decode a single image > > > > > and > > > > > then do something with it: > > > > > > > > > > open decoder > > > > > decode frame > > > > > close decoder > > > > > open > > > > > give it the frame we got from the decoder > > > > > > > > > > To me that looks like it will invoke undefined behaviour > > > > > (segfault or > > > > > read garbage) when trying to access data[2] in the second > > > > > component, > > > > > because the pointer appears to be to the MMAL_ES_FORMAT_T in > > > > > the > > > > > MMAL_PORT_T on the decoder which we just destroyed. If not, > > > > > where is > > > > > the reference which keeps that pointer valid living? > > > > With MMAL decoder it works: > > > > > > > > - configure decoder > > > > - send many frames (in my tests between 5 and 20+) to decoder > > > > - decoder give MMAL_ES_FORMAT_T > > > > - configure decoder output port with given struct <- here we have > > > > the > > > > pointer > > > > - decoder send the first decoded frame > > > > > > > > The struct lives before the first frame is available. Decode a > > > > single > > > > frame is a spezial thing. The MMAL decoder is not made for this. > > > > > > > > A > > > > local copy from format struct make no sense for me. > > > well, it makes sense to us for the code to work and not have > > > undefined > > > behavior. > > > Please correct me if iam wrong but Hendrik, Mark and me are saying > > > the same thing more or less, i think you should change the patch > > > > > > also additionally, its nice if we can keep data[0..2] available for > > > the raw 3 YUV planes, it might one day somewhere be nice to > > > download > > > the raw data into [0..2], using up the 2nd for this struct is not > > > pretty > > For YUV planes AV_PIX_FMT_YUV420P are the better choice > > not AV_PIX_FMT_MMAL. > > But you have me convinced that I write a new patch, test it and send > > it > > to the ml. > > > Here are the new version. No data[2] pointer more. For this AVFrame > top_field_first and AVCodecContext->framerate is used. > > regards jens > mmaldec.c | 20 > 1 file changed, 20 insertions(+) > e1e1ab964f9024ea523085fe7ddca4549601d51a > 0001-v5-fill-AVFrame-interlaced_frame-and-top_field_first.patch > From 66f0e12eb3e7d83113b76d8e0a71d0da328de195 Mon Sep 17 00:00:00 2001 > From: Jens Ziller > Date: Sun, 14 Aug 2016 16:44:39 +0200 > Subject: [PATCH] v5 fill AVFrame->interlaced_frame and top_field_first with > MMAL_PARAMETER_VIDEO_INTERLACE_TYPE_T and AVCodecContext->framerate from > MMAL_ES_FORMAT_T for deinterlacer and renderer applied thanks [...] -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB When you are offended at any man's fault, turn to yourself and study your own failings. Then you will forget your anger. -- Epictetus signature.asc Description: Digital signature ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH v4] lavf : scale_vaapi : add denoise/sharpless support
On 2016/9/10 3:29, Mark Thompson wrote: > On 09/09/16 04:31, Jun Zhao wrote: >> v4 : - fix sharpless typo(sharpless -> sharpness) >> - when don't support denoise/sharpness, report the error and return >> - fix denoise/sharpness params buffer leak in error handle >> v3 : fix sharpless mapping issue >> v2 : fix filter support flag check logic issue >> >> From d1f0b556bdd6be4dffcd3b1b93cba5cd1098908a Mon Sep 17 00:00:00 2001 >> From: Jun Zhao >> Date: Tue, 30 Aug 2016 14:36:00 +0800 >> Subject: [PATCH v4] lavf : scale_vaapi : add denoise/sharpless support. > > I think libavfilter is generally "lavfi" ("lavf" is libavformat). Thanks for you correct me, will re-submit the patch with correct prefix "lavfi" > >> add denoise/sharpless support, used scope [-1, 100] as the input >> scope. >> >> Signed-off-by: Jun Zhao >> --- >> libavfilter/vf_scale_vaapi.c | 112 >> +++ >> 1 file changed, 112 insertions(+) >> >> diff --git a/libavfilter/vf_scale_vaapi.c b/libavfilter/vf_scale_vaapi.c >> index 8dd5acf..e48e201 100644 >> --- a/libavfilter/vf_scale_vaapi.c >> +++ b/libavfilter/vf_scale_vaapi.c >> @@ -53,6 +53,14 @@ typedef struct ScaleVAAPIContext { >> int output_width; >> int output_height; >> >> +VAProcFilterCap denoise_caps; >> +int denoise; // enable denoise algo. level is the optional >> + // value from the interval [-1, 100], -1 means >> disabled >> + >> +VAProcFilterCap sharpness_caps; >> +int sharpness; // enable sharpness. level is the optional value >> + // from the interval [-1, 100], -1 means disabled >> + >> } ScaleVAAPIContext; >> >> >> @@ -117,6 +125,8 @@ static int scale_vaapi_config_output(AVFilterLink >> *outlink) >> AVVAAPIFramesContext *va_frames; >> VAStatus vas; >> int err, i; >> +unsigned int num_denoise_caps = 1; >> +unsigned int num_sharpness_caps = 1; >> >> scale_vaapi_pipeline_uninit(ctx); >> >> @@ -225,6 +235,28 @@ static int scale_vaapi_config_output(AVFilterLink >> *outlink) >> goto fail; >> } >> >> +if (ctx->denoise != -1) { >> +vas = vaQueryVideoProcFilterCaps(ctx->hwctx->display, >> ctx->va_context, >> + VAProcFilterNoiseReduction, >> + &ctx->denoise_caps, >> &num_denoise_caps); >> +if (vas != VA_STATUS_SUCCESS) { >> +av_log(ctx, AV_LOG_ERROR, "Failed to query denoise caps " >> + "context: %d (%s).\n", vas, vaErrorStr(vas)); >> +return AVERROR(EIO); >> +} >> +} >> + >> +if (ctx->sharpness != -1) { >> +vas = vaQueryVideoProcFilterCaps(ctx->hwctx->display, >> ctx->va_context, >> + VAProcFilterSharpening, >> + &ctx->sharpness_caps, >> &num_sharpness_caps); >> +if (vas != VA_STATUS_SUCCESS) { >> +av_log(ctx, AV_LOG_ERROR, "Failed to query sharpness caps " >> + "context: %d (%s).\n", vas, vaErrorStr(vas)); >> +return AVERROR(EIO); >> +} >> +} >> + >> av_freep(&hwconfig); >> av_hwframe_constraints_free(&constraints); >> return 0; >> @@ -250,6 +282,14 @@ static int vaapi_proc_colour_standard(enum AVColorSpace >> av_cs) >> } >> } >> >> +static float map_to_range( >> +int input, int in_min, int in_max, >> +float out_min, float out_max) >> +{ >> +return (input - in_min) * (out_max - out_min) / (in_max - in_min) + >> out_min; >> +} >> + >> + >> static int scale_vaapi_filter_frame(AVFilterLink *inlink, AVFrame >> *input_frame) >> { >> AVFilterContext *avctx = inlink->dst; >> @@ -259,6 +299,10 @@ static int scale_vaapi_filter_frame(AVFilterLink >> *inlink, AVFrame *input_frame) >> VASurfaceID input_surface, output_surface; >> VAProcPipelineParameterBuffer params; >> VABufferID params_id; >> +VABufferID denoise_id; >> +VABufferID sharpness_id; >> +VABufferID filter_bufs[8]; > > VAProcFilterCount might be a better number than 8 as an upper bound on the > number of filters which could ever be added to this. agree > >> +int num_filter_bufs = 0; >> VAStatus vas; >> int err; >> >> @@ -290,6 +334,43 @@ static int scale_vaapi_filter_frame(AVFilterLink >> *inlink, AVFrame *input_frame) >> av_log(ctx, AV_LOG_DEBUG, "Using surface %#x for scale output.\n", >> output_surface); >> >> +if (ctx->denoise != -1) { >> +VAProcFilterParameterBuffer denoise; >> +denoise.type = VAProcFilterNoiseReduction; >> +denoise.value = map_to_range(ctx->denoise, 0, 100, >> + ctx->denoise_caps.range.min_value, >> + ctx->denoise_caps.range.max_value); >> +vas = vaCreateBuffer(ctx->hwctx->display, ctx->va_context, >> +
Re: [FFmpeg-devel] [PATCH v4] lavf : scale_vaapi : add denoise/sharpless support
On 2016/9/12 1:37, Moritz Barsnick wrote: > On Fri, Sep 09, 2016 at 11:31:22 +0800, Jun Zhao wrote: >> v4 : - fix sharpless typo(sharpless -> sharpness) > [...] > >> Date: Tue, 30 Aug 2016 14:36:00 +0800 >> Subject: [PATCH v4] lavf : scale_vaapi : add denoise/sharpless support. >> >> add denoise/sharpless support, used scope [-1, 100] as the input >> scope. > > Well, the commit message still contains the typo, twice. > > Also, please drop the space character before the colon. The top line of > the commit message should probably read: > lavfi/scale_vaapi: add denoise/sharpless support Thanks for you correct me, will re-submit the patch with correct prefix as your comments. > > Moritz > ___ > ffmpeg-devel mailing list > ffmpeg-devel@ffmpeg.org > http://ffmpeg.org/mailman/listinfo/ffmpeg-devel > ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel