Opened 13 years ago

Closed 13 years ago

Last modified 12 years ago

#1040 closed defect (fixed)

yadif filter with movie source causes assertion failure

Reported by: ls Owned by:
Priority: normal Component: avfilter
Version: git-master Keywords: yadif abort crash
Cc: Blocked By:
Blocking: Reproduced by developer: yes
Analyzed by developer: no

Description

See log below. Example works if yadif is removed.

ffmpeg -i ~/scratch/camera-raw.mp4 -vf movie=~/scratch/camera-raw.mp4,yadif=1,scale=100:100[mov],[in][mov]overlay=10:10 -y out.mp4

ffmpeg version N-32793-g01606d1 Copyright (c) 2000-2012 the FFmpeg developers
  built on Mar  6 2012 00:02:07 with gcc 4.6.1
  configuration: --prefix=/home/ls/ffmpeg --enable-shared --disable-static --enable-gpl --enable-nonfree --enable-libmp3lame --enable-libx264 --enable-libxvid --enable-sram --cpu=core2 --enable-hwaccel=h264_vaapi --enable-hwaccel=mpeg2_vaapi --enable-hwaccel=mpeg4_vaapi --enable-libfaac --enable-x11grab --disable-ffserver --enable-libvpx --enable-libvorbis --enable-libass --enable-libfreetype
  libavutil      51. 41.100 / 51. 41.100
  libavcodec     54.  9.100 / 54.  9.100
  libavformat    54.  2.100 / 54.  2.100
  libavdevice    53.  4.100 / 53.  4.100
  libavfilter     2. 63.100 /  2. 63.100
  libswscale      2.  1.100 /  2.  1.100
  libswresample   0.  7.100 /  0.  7.100
  libpostproc    52.  0.100 / 52.  0.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '/home/ls/scratch/camera-raw.mp4':
  Metadata:
    major_brand     : mp42
    minor_version   : 0
    compatible_brands: mp42
    creation_time   : 2012-02-13 23:21:42
  Duration: 00:13:40.80, start: 0.000000, bitrate: 1022 kb/s
    Stream #0:0(eng): Video: mpeg2video (Main) (mp4v / 0x7634706D), yuv420p, 1920x1080 [SAR 1:1 DAR 16:9], 35000 kb/s, 25 fps, 25 tbr, 25k tbn, 50 tbc
    Metadata:
      creation_time   : 2012-02-13 23:21:42
      handler_name    : Video Media Handler
    Stream #0:1(eng): Audio: pcm_s16be (twos / 0x736F7774), 48000 Hz, 2 channels, s16, 1536 kb/s
    Metadata:
      creation_time   : 2012-02-13 23:21:42
      handler_name    : NRT Metadata Handler
[buffer @ 0x247e740] w:1920 h:1080 pixfmt:yuv420p tb:1/1000000 sar:1/1 sws_param:
[movie @ 0x24a9120] seek_point:0 format_name:(null) file_name:/home/ls/scratch/camera-raw.mp4 stream_index:0
[yadif @ 0x2518400] mode:1 parity:-1 auto_enable:0
[scale @ 0x2518a40] w:1920 h:1080 fmt:yuv420p -> w:100 h:100 fmt:yuva420p flags:0x4
[overlay @ 0x24c7c20] main w:1920 h:1080 fmt:yuv420p overlay x:10 y:10 w:100 h:100 fmt:yuva420p
[overlay @ 0x24c7c20] main_tb:1/1000000 overlay_tb:1/25000 -> tb:1/1000000 exact:1
[libx264 @ 0x24a8260] using SAR=1/1
[libx264 @ 0x24a8260] using cpu capabilities: MMX2 SSE2Fast SSSE3 FastShuffle SSE4.2
[libx264 @ 0x24a8260] profile High, level 4.0
[libx264 @ 0x24a8260] 264 - core 120 r0+2 a3f4407 - H.264/MPEG-4 AVC codec - Copyleft 2003-2011 - http://www.videolan.org/x264.html - options: cabac=1 ref=3 deblock=1:0:0 analyse=0x3:0x113 me=hex subme=7 psy=1 psy_rd=1.00:0.00 mixed_ref=1 me_range=16 chroma_me=1 trellis=1 8x8dct=1 cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=-2 threads=6 sliced_threads=0 nr=0 decimate=1 interlaced=0 bluray_compat=0 constrained_intra=0 bframes=3 b_pyramid=2 b_adapt=1 b_bias=0 direct=1 weightb=1 open_gop=0 weightp=2 keyint=250 keyint_min=25 scenecut=40 intra_refresh=0 rc_lookahead=40 rc=crf mbtree=1 crf=23.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 ip_ratio=1.40 aq=1:1.00
Output #0, mp4, to 'out.mp4':
  Metadata:
    major_brand     : mp42
    minor_version   : 0
    compatible_brands: mp42
    creation_time   : 2012-02-13 23:21:42
    encoder         : Lavf54.2.100
    Stream #0:0(eng): Video: h264 (![0][0][0] / 0x0021), yuv420p, 1920x1080 [SAR 1:1 DAR 16:9], q=-1--1, 25 tbn, 25 tbc
    Metadata:
      creation_time   : 2012-02-13 23:21:42
      handler_name    : Video Media Handler
    Stream #0:1(eng): Audio: aac (@[0][0][0] / 0x0040), 48000 Hz, 2 channels, s16, 128 kb/s
    Metadata:
      creation_time   : 2012-02-13 23:21:42
      handler_name    : NRT Metadata Handler
Stream mapping:
  Stream #0:0 -> #0:0 (mpeg2video -> libx264)
  Stream #0:1 -> #0:1 (pcm_s16be -> libfaac)
Press [q] to stop, [?] for help
[mpeg2video @ 0x247d480] warning: first frame is no keyframe
ffmpeg: libavfilter/vf_yadif.c:323: poll_frame: Assertion `yadif->next || !val' failed.

Change History (17)

comment:1 by Carl Eugen Hoyos, 13 years ago

Keywords: yadif added
Reproduced by developer: set
Status: newopen
$ ./ffmpeg -i tests/lena.pnm -vf movie=tests/lena.pnm,yadif[mov],[in][mov]overlay -f null -
ffmpeg version N-38562-g1879400 Copyright (c) 2000-2012 the FFmpeg developers
  built on Mar  6 2012 08:52:40 with gcc 4.3.2
  configuration: --cc=/usr/local/gcc-4.3.2/bin/gcc --enable-gpl
  libavutil      51. 41.100 / 51. 41.100
  libavcodec     54.  8.100 / 54.  8.100
  libavformat    54.  2.100 / 54.  2.100
  libavdevice    53.  4.100 / 53.  4.100
  libavfilter     2. 63.100 /  2. 63.100
  libswscale      2.  1.100 /  2.  1.100
  libswresample   0.  7.100 /  0.  7.100
  libpostproc    52.  0.100 / 52.  0.100
Input #0, image2, from 'tests/lena.pnm':
  Duration: 00:00:00.04, start: 0.000000, bitrate: N/A
    Stream #0:0: Video: ppm, rgb24, 256x256, 25 tbr, 25 tbn, 25 tbc
[buffer @ 0x8ebb9e0] w:256 h:256 pixfmt:rgb24 tb:1/1000000 sar:0/1 sws_param:
[movie @ 0x8eb0440] seek_point:0 format_name:(null) file_name:tests/lena.pnm stream_index:0
[yadif @ 0x8eb1be0] mode:0 parity:-1 auto_enable:0
[buffersink @ 0x8eaff20] auto-inserting filter 'auto-inserted scale 0' between the filter 'Parsed_overlay_2' and the filter 'out'
[yadif @ 0x8eb1be0] auto-inserting filter 'auto-inserted scale 1' between the filter 'Parsed_movie_0' and the filter 'Parsed_yadif_1'
[overlay @ 0x8eb1ee0] auto-inserting filter 'auto-inserted scale 2' between the filter 'src' and the filter 'Parsed_overlay_2'
[scale @ 0x8eb1ba0] w:256 h:256 fmt:rgb24 -> w:256 h:256 fmt:yuv420p flags:0x4
[scale @ 0x8eb1e20] w:256 h:256 fmt:rgb24 -> w:256 h:256 fmt:yuva420p flags:0x4
[overlay @ 0x8eb1ee0] main w:256 h:256 fmt:yuv420p overlay x:0 y:0 w:256 h:256 fmt:yuva420p
[overlay @ 0x8eb1ee0] main_tb:1/1000000 overlay_tb:1/25 -> tb:1/1000000 exact:1
[scale @ 0x8eb28e0] w:256 h:256 fmt:yuv420p -> w:256 h:256 fmt:rgb24 flags:0x4
Output #0, null, to 'pipe:':
  Metadata:
    encoder         : Lavf54.2.100
    Stream #0:0: Video: rawvideo (RGB[24] / 0x18424752), rgb24, 256x256, q=2-31, 200 kb/s, 90k tbn, 25 tbc
Stream mapping:
  Stream #0:0 -> #0:0 (ppm -> rawvideo)
Press [q] to stop, [?] for help
ffmpeg: libavfilter/vf_yadif.c:323: poll_frame: Assertion `yadif->next || !val' failed.

comment:2 by Cigaes, 13 years ago

I believe the patch attached to http://ffmpeg.org/pipermail/ffmpeg-devel/2012-March/121691.html fixes this. Do you confirm?

comment:3 by Carl Eugen Hoyos, 13 years ago

The patch fixes the test case I provided.

in reply to:  2 comment:4 by ls, 13 years ago

The patch results in the following error messages for the ffmpeg call I initially posted:

$ ffmpeg -i ~/scratch/camera-raw.mp4 -vf movie=~/scratch/camera-raw.mp4,yadif=1,scale=100:100[mov],[in][mov]overlay=10:10 -y out.mp4
[...]
AV Filter told us it has a frame available but failed to output one
[buffer @ 0x7f3960] request_frame() called with no available frame!
[...]

The error message is repeated forever. The reason seems to be using yadif=1. Just using yadif works. However, deinterlacing seems to be enabled automatically for movie sources anyway. It would be interesting if filtergraphs can be specified that deinterlace input videos with yadif=1.

comment:5 by Cigaes, 13 years ago

I see; this is probably a different, although related, issue. Can you try the patches I just posted:
http://ffmpeg.org/pipermail/ffmpeg-devel/2012-March/121734.html
http://ffmpeg.org/pipermail/ffmpeg-devel/2012-March/121736.html
(those two should be enough)?

Also, what happens, without these patches, if you use -f lavfi -i movie...,movie... instead of -i ... -vf movie...?

comment:6 by ls, 13 years ago

Ok I tried various combinations of movie and yadif. The behavior looks good to me if I do not use lavfi.

Example 1:

ffmpeg -i 00001.MTS -vf movie=00001.MTS,yadif=1,setpts=PTS-STARTPTS,scale=1280:720[mov],[in]yadif=1,setpts=PTS-STARTPTS,[mov]overlay=0:0 -y out.mp4

Example 2:

ffmpeg -i 00001.MTS -vf movie=00001.MTS,yadif=1,setpts=PTS-STARTPTS,scale=1280:720[mov],[in]setpts=PTS-STARTPTS,[mov]overlay=0:0 -y out.mp4

In example 2 the overlay is slow motion, which makes sense to me.

In case of using lavfi strange error messages appear. It does not matter if the patches are applied or not. The resulting file seems to have only key frames encoded: frame rate 1fps

$ ffmpeg -f lavfi -i 'movie=00001.MTS,scale=1280:720[mov];movie=00001.MTS,[mov]overlay=0:0' -y out.mp4

ffmpeg version N-32897-g12c65ef Copyright (c) 2000-2012 the FFmpeg developers
  built on Mar  8 2012 21:52:52 with gcc 4.6.1
  configuration: --prefix=/home/ls/ffmpeg --enable-shared --disable-static --enable-gpl --enable-nonfree --enable-libme --enable-libx264 --enable-libxvid --enable-sram --cpu=core2 --enable-hwaccel=h264_vaapi --enable-hwaccel=mpeg2_vaaenable-hwaccel=mpeg4_vaapi --enable-libfaac --enable-x11grab --disable-ffserver --enable-libvpx --enable-libvorbis --e-libass --enable-libfreetype
  libavutil      51. 42.100 / 51. 42.100
  libavcodec     54. 10.100 / 54. 10.100
  libavformat    54.  2.100 / 54.  2.100
  libavdevice    53.  4.100 / 53.  4.100
  libavfilter     2. 63.100 /  2. 63.100
  libswscale      2.  1.100 /  2.  1.100
  libswresample   0.  7.100 /  0.  7.100
  libpostproc    52.  0.100 / 52.  0.100
[h264 @ 0x17893a0] mmco: unref short failure
    Last message repeated 1 times                                                                                    
[h264 @ 0x17893a0] Increasing reorder buffer to 1
[movie @ 0x17850a0] seek_point:0 format_name:(null) file_name:00001.MTS stream_index:0                               
[h264 @ 0x183e400] mmco: unref short failure
    Last message repeated 1 times                                                                                    
[h264 @ 0x183e400] Increasing reorder buffer to 1
[movie @ 0x181a4a0] seek_point:0 format_name:(null) file_name:00001.MTS stream_index:0                               
[scale @ 0x1819bc0] w:1920 h:1080 fmt:yuv420p -> w:1280 h:720 fmt:yuva420p flags:0x2
[overlay @ 0x1821280] main w:1920 h:1080 fmt:yuv420p overlay x:0 y:0 w:1280 h:720 fmt:yuva420p
[overlay @ 0x1821280] main_tb:1/90000 overlay_tb:1/90000 -> tb:1/90000 exact:1
[h264 @ 0x1822700] mmco: unref short failure
    Last message repeated 1 times                                                                                    
[h264 @ 0x178b0a0] mmco: unref short failure
    Last message repeated 1 times                                                                                    
[lavfi @ 0x17843e0] Estimating duration from bitrate, this may be inaccurate
Input #0, lavfi, from 'movie=00001.MTS,scale=1280:720[mov];movie=00001.MTS,[mov]overlay=0:0':                        
  Duration: N/A, start: 2637.561589, bitrate: N/A
    Stream #0:0: Video: rawvideo (I420 / 0x30323449), yuv420p, 1920x1080 [SAR 1:1 DAR 16:9], 1 tbr, 90k tbn, 90k 
[buffer @ 0x7f3d08b3db80] w:1920 h:1080 pixfmt:yuv420p tb:1/1000000 sar:1/1 sws_param:
[libx264 @ 0x7f3d086a2a00] using SAR=1/1
[libx264 @ 0x7f3d086a2a00] using cpu capabilities: MMX2 SSE2Fast SSSE3 FastShuffle SSE4.2
[libx264 @ 0x7f3d086a2a00] profile High, level 4.0
[libx264 @ 0x7f3d086a2a00] 264 - core 120 r0+2 01f7a33 - H.264/MPEG-4 AVC codec - Copyleft 2003-2012 - http://www.vid.org/x264.html - options: cabac=1 ref=3 deblock=1:0:0 analyse=0x3:0x113 me=hex subme=7 psy=1 psy_rd=1.00:0.00 mixed_rme_range=16 chroma_me=1 trellis=1 8x8dct=1 cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=-2 threads=6 sliced_thr0 nr=0 decimate=1 interlaced=0 bluray_compat=0 constrained_intra=0 bframes=3 b_pyramid=2 b_adapt=1 b_bias=0 direct=1 tb=1 open_gop=0 weightp=2 keyint=250 keyint_min=1 scenecut=40 intra_refresh=0 rc_lookahead=40 rc=crf mbtree=1 crf=23.mp=0.60 qpmin=0 qpmax=69 qpstep=4 ip_ratio=1.40 aq=1:1.00
Output #0, mp4, to 'out.mp4':
  Metadata:
    encoder         : Lavf54.2.100
    Stream #0:0: Video: h264 (![0][0][0] / 0x0021), yuv420p, 1920x1080 [SAR 1:1 DAR 16:9], q=-1--1, 
Stream mapping:
  Stream #0:0 -> #0:0 (rawvideo -> libx264)
Press [q] to stop, [?] for help
DTS 14400, next:2120000 st:0 invalid droping
DTS 108000, next:3120000 st:0 invalid droping
DTS 21600, next:4120000 st:0 invalid droping
DTS 115200, next:5120000 st:0 invalid droping
DTS 28800, next:6120000 st:0 invalid droping
DTS 122400, next:7120000 st:0 invalid droping
DTS 36000, next:8120000 st:0 invalid droping
DTS 129600, next:9120000 st:0 invalid droping
DTS 43200, next:10120000 st:0 invalid dropinge=00:00:00.00 bitrate=   0.0kbits/s dup=0 drop=1
DTS 136800, next:11120000 st:0 invalid droping
DTS 50400, next:12120000 st:0 invalid droping
DTS 144000, next:13120000 st:0 invalid droping

If the video is scaled down further than in the example above things work:

ffmpeg -f lavfi -i 'movie=00001.MTS,yadif=1,scale=1700:-1' out.mp4

It seems to be an issue with the lavfi input device, since the following call does not produce correct results either:

ffmpeg -f lavfi -i 'movie=00001.MTS' out.mp4

Without using lavfi things work:

ffmpeg -i 00001.MTS -vf 'yadif=1,scale=1750:-1' out.mp4

Probably this is another issue but it blocks answering your second question.

comment:7 by ls, 13 years ago

I have reported one of the issues in my last comment as separate ticket, since it seems unrelated to yadif and does not occur for all files/resolutions. See ticket #1051.

Last edited 13 years ago by ls (previous) (diff)

comment:8 by Carl Eugen Hoyos, 13 years ago

Resolution: fixed
Status: openclosed

I believe the original problem was fixed, please reopen if I am wrong.

comment:9 by ls, 13 years ago

Resolution: fixed
Status: closedreopened

The behavior has changed now. I cannot reproduce the assertion anymore but using yadif=1 still does not work. It produces a huge amount of error messages (over 100mb in some seconds). Maybe this is a new issue. Please close again if this should be reported in a separate ticket.

Example:

$ ffmpeg -i 00001.MTS -vf movie=00001.MTS,yadif=1,setpts=PTS-STARTPTS,scale=1280:720[mov],[in]yadif=1,setpts=PTS-STARTPTS,[mov]overlay=0:0 -y out.mp4
ffmpeg version N-33054-g8f394a6 Copyright (c) 2000-2012 the FFmpeg developers
  built on Mar 20 2012 17:41:01 with gcc 4.6.1
  configuration: --prefix=/home/ls/ffmpeg --enable-shared --disable-static --enable-gpl --enable-nonfree --enable-libmp3lame --enable-libx264 --enable-libxvid --enable-sram --cpu=core2 --enable-hwaccel=h264_vaapi --enable-hwaccel=mpeg2_vaapi --enable-hwaccel=mpeg4_vaapi --enable-libfaac --enable-x11grab --disable-ffserver --enable-libvpx --enable-libvorbis --enable-libass --enable-libfreetype
  libavutil      51. 42.100 / 51. 42.100
  libavcodec     54. 12.100 / 54. 12.100
  libavformat    54.  2.100 / 54.  2.100
  libavdevice    53.  4.100 / 53.  4.100
  libavfilter     2. 65.101 /  2. 65.101
  libswscale      2.  1.100 /  2.  1.100
  libswresample   0.  7.100 /  0.  7.100
  libpostproc    52.  0.100 / 52.  0.100
[h264 @ 0x24521e0] mmco: unref short failure
    Last message repeated 1 times
[h264 @ 0x24521e0] Increasing reorder buffer to 1
Input #0, mpegts, from '00001.MTS':
  Duration: 00:02:54.20, start: 2637.033589, bitrate: 12993 kb/s
  Program 1 
    Stream #0:0[0x1011]: Video: h264 (High) (HDMV / 0x564D4448), yuv420p, 1920x1080 [SAR 1:1 DAR 16:9], 50 fps, 50 tbr, 90k tbn, 50 tbc
    Stream #0:1[0x1100]: Audio: ac3 (AC-3 / 0x332D4341), 48000 Hz, 5.1(side), s16, 384 kb/s
    Stream #0:2[0x1200]: Subtitle: hdmv_pgs_subtitle ([144][0][0][0] / 0x0090)
[buffer @ 0x2451c00] w:1920 h:1080 pixfmt:yuv420p tb:1/1000000 sar:1/1 sws_param:
[h264 @ 0x2490800] mmco: unref short failure
    Last message repeated 1 times
[h264 @ 0x2490800] Increasing reorder buffer to 1
[movie @ 0x244d600] seek_point:0 format_name:(null) file_name:00001.MTS stream_index:0
[yadif @ 0x24560a0] mode:1 parity:-1 auto_enable:0
[yadif @ 0x2474980] mode:1 parity:-1 auto_enable:0
[yadif @ 0x2474980] TB:0.000001
[yadif @ 0x24560a0] TB:0.000011
[scale @ 0x24740e0] w:1920 h:1080 fmt:yuv420p sar:1/1 -> w:1280 h:720 fmt:yuva420p sar:1/1 flags:0x4
[overlay @ 0x2503a20] main w:1920 h:1080 fmt:yuv420p overlay x:0 y:0 w:1280 h:720 fmt:yuva420p
[overlay @ 0x2503a20] main_tb:1/1000000 overlay_tb:1/90000 -> tb:1/9000000 exact:1
[libx264 @ 0x24538a0] using SAR=1/1
[libx264 @ 0x24538a0] using cpu capabilities: MMX2 SSE2Fast SSSE3 FastShuffle SSE4.2
[libx264 @ 0x24538a0] profile High, level 4.2
[libx264 @ 0x24538a0] 264 - core 120 r0+2 01f7a33 - H.264/MPEG-4 AVC codec - Copyleft 2003-2012 - http://www.videolan.org/x264.html - options: cabac=1 ref=3 deblock=1:0:0 analyse=0x3:0x113 me=hex subme=7 psy=1 psy_rd=1.00:0.00 mixed_ref=1 me_range=16 chroma_me=1 trellis=1 8x8dct=1 cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=-2 threads=6 sliced_threads=0 nr=0 decimate=1 interlaced=0 bluray_compat=0 constrained_intra=0 bframes=3 b_pyramid=2 b_adapt=1 b_bias=0 direct=1 weightb=1 open_gop=0 weightp=2 keyint=250 keyint_min=25 scenecut=40 intra_refresh=0 rc_lookahead=40 rc=crf mbtree=1 crf=23.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 ip_ratio=1.40 aq=1:1.00
Output #0, mp4, to 'out.mp4':
  Metadata:
    encoder         : Lavf54.2.100
    Stream #0:0: Video: h264 (![0][0][0] / 0x0021), yuv420p, 1920x1080 [SAR 1:1 DAR 16:9], q=-1--1, 50 tbn, 50 tbc
    Stream #0:1: Audio: aac (@[0][0][0] / 0x0040), 48000 Hz, 5.1(side), s16, 128 kb/s
Stream mapping:
  Stream #0:0 -> #0:0 (h264 -> libx264)
  Stream #0:1 -> #0:1 (ac3 -> libfaac)
Press [q] to stop, [?] for help
[h264 @ 0x423e500] mmco: unref short failure
    Last message repeated 1 times
[h264 @ 0x2472000] mmco: unref short failure
    Last message repeated 1 times
[buffer @ 0x2451c00] request_frame() called with no available frame!
AV Filter told us it has a frame available but failed to output one
[buffer @ 0x2451c00] request_frame() called with no available frame!
AV Filter told us it has a frame available but failed to output one
[buffer @ 0x2451c00] request_frame() called with no available frame!

comment:10 by ls, 13 years ago

With the current git head (ffmpeg V. N-33379-g788a60d) everything works fine now. No error messages are generated. yadif=1 seems to work fine. However the order of inputs to the overlay filter has changed meanwhile. Thus a working call is now:

ffmpeg -i 00000.MTS -vf movie=00000.MTS,yadif=1,setpts=PTS-STARTPTS,scale=1280:720[mov1]';'[in]yadif=1,setpts=PTS-STARTPTS[mov2]';'[mov2][mov1]overlay=0:0 -y out.mp4

This bug can be closed now, everything addressed here is fixed.

comment:11 by Carl Eugen Hoyos, 13 years ago

Resolution: fixed
Status: reopenedclosed

comment:12 by Cigaes, 13 years ago

I can not reproduce your problem with the input order of the overlay filter: for me, [0:v] [1:v] overlay=50:50 puts [1:v] on top of [0:v], as expected, either with -f lavfi and movie or with the new -filter_complex.

comment:13 by ls, 13 years ago

I retried this call from my previous example:

$ ffmpeg -i 00000.MTS -vf movie=00000.MTS,yadif=1,setpts=PTS-STARTPTS,scale=1280:720[mov],[in]yadif=1,setpts=PTS-STARTPTS,[mov]overlay=0:0 -y out.mp4
[...]
[overlay @ 0x208bf60] Overlay area (0,0)<->(1920,1080) not within the main area (0,0)<->(1280,720) or zero-sized
Error opening filters!

This worked before, I was suspecting a problem with the order maybe I am wrong and something else regarding the syntax accepted has changed. Anyway it is not too important.

comment:14 by Cigaes, 13 years ago

Ok, so this is when you use the unlabeled, "pass-through" syntax. I confirm the behaviour changed sometime in the last month.

OTOH, it seems to me that the current behaviour is correct, with regard to the documentation, and the old behaviour was not. My working example is:
testsrc [t] ; color , [t] overlay

http://ffmpeg.org/libavfilter.html#Filtergraph-syntax says that "If an output pad is not labelled, it is linked by default to the first unlabelled input pad of the next filter in the filterchain."

With the above example, t=testsrc would be the first input of overlay, and color would be the second, putting color on top of testsrc. This is consistent with the example in the documentation, "the second output pad of split is linked to the second input pad of overlay, which are both unlabelled".

And indeed, this filtergraph shows the blank frame with the current version, while an old checkout shows the test pattern.

In short: yes, it changed, but the previous behaviour was contradicting the docs.

comment:15 by ls, 13 years ago

Ok I did not notice it was deviating from the docs. Thanks for clarifying this.
I usually copy examples and modify them. They probably need to be fixed too:

Example found after the loop explanation example in the man pages:

# skip 3.2 seconds from the start of the avi file in.avi, and overlay it
# on top of the input labelled as "in".
movie=in.avi:seek_point=3.2, scale=180:-1, setpts=PTS-STARTPTS [movie];
[in] setpts=PTS-STARTPTS, [movie] overlay=16:16 [out]

comment:16 by Carl Eugen Hoyos, 12 years ago

Keywords: abort added

comment:17 by Carl Eugen Hoyos, 12 years ago

Keywords: crash added
Note: See TracTickets for help on using tickets.