Opened 3 months ago
Closed 3 months ago
#10858 closed defect (fixed)
Break in [concat] when using filter_complex between 6.0 and 6.1
Reported by: | Markizano Draconus | Owned by: | |
---|---|---|---|
Priority: | normal | Component: | ffmpeg |
Version: | 6.1 | Keywords: | filter_complex overlay |
Cc: | Blocked By: | ||
Blocking: | Reproduced by developer: | no | |
Analyzed by developer: | no |
Description (last modified by )
Summary of the issue
EOF on input when joining overlays. Works in 6.0, fails in 6.1.
I have a filter_complex script that is trying to take two videos as input and overlay a trim'd snippet scaled down a little from one over the other in a fade-in/fade-out type of fashion.
In ffmpeg-6.0 [1], this works, but in ffmpeg-6.1 [2] this fails with the error described below.
[1]:
ffmpeg version n6.0 Copyright (c) 2000-2023 the FFmpeg developers built with gcc 10 (Debian 10.2.1-6) configuration: --prefix=/usr/local --arch=amd64 --toolchain=hardened --incdir=/usr/include/x86_64-linux-gnu --libdir=/usr/lib/x86_64-linux-gnu --enable-chromaprint --enable-encoder=libx264 --enable-encoder=libx265 --enable-frei0r --enable-gpl --enable-ladspa --enable-libaom --enable-libass --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libcodec2 --enable-libdav1d --enable-libdc1394 --enable-libdrm --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libiec61883 --enable-libjack --enable-libmfx --enable-libmp3lame --enable-libmysofa --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-libpulse --enable-librabbitmq --enable-librsvg --enable-librubberband --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libsrt --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libx264 --enable-libx264 --enable-libx265 --enable-libx265 --enable-libxcb --enable-libxcb-shm --enable-libxcb-xfixes --enable-libxml2 --enable-libxvid --enable-libzmq --enable-libzvbi --enable-lv2 --enable-nonfree --enable-omx --enable-openal --enable-opencl --enable-opengl --enable-opengl --enable-openssl --enable-pocketsphinx --enable-sdl2 --enable-shared libavutil 58. 2.100 / 58. 2.100 libavcodec 60. 3.100 / 60. 3.100 libavformat 60. 3.100 / 60. 3.100 libavdevice 60. 1.100 / 60. 1.100 libavfilter 9. 3.100 / 9. 3.100 libswscale 7. 1.100 / 7. 1.100 libswresample 4. 10.100 / 4. 10.100 libpostproc 57. 1.100 / 57. 1.100
[2]:
ffmpeg version n6.1 Copyright (c) 2000-2023 the FFmpeg developers built with gcc 12 (Debian 12.2.0-14) configuration: --prefix=/usr/local --arch=amd64 --toolchain=hardened --incdir=/usr/include/x86_64-linux-gnu --libdir=/usr/lib/x86_64-linux-gnu --enable-chromaprint --enable-encoder=libx264 --enable-encoder=libx265 --enable-frei0r --enable-gpl --enable-ladspa --enable-libaom --enable-libass --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libcodec2 --enable-libdav1d --enable-libdc1394 --enable-libdrm --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libiec61883 --enable-libjack --enable-libmp3lame --enable-libmysofa --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-libpulse --enable-librabbitmq --enable-librsvg --enable-librubberband --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libsrt --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libx264 --enable-libx264 --enable-libx265 --enable-libx265 --enable-libxcb --enable-libxcb-shm --enable-libxcb-xfixes --enable-libxml2 --enable-libxvid --enable-libzmq --enable-libzvbi --enable-lv2 --enable-nonfree --enable-omx --enable-openal --enable-opencl --enable-opengl --enable-opengl --enable-openssl --enable-pocketsphinx --enable-sdl2 --enable-shared --enable-libvpl libavutil 58. 29.100 / 58. 29.100 libavcodec 60. 31.102 / 60. 31.102 libavformat 60. 16.100 / 60. 16.100 libavdevice 60. 3.100 / 60. 3.100 libavfilter 9. 12.100 / 9. 12.100 libswscale 7. 5.100 / 7. 5.100 libswresample 4. 12.100 / 4. 12.100 libpostproc 57. 3.100 / 57. 3.100
Expected Output
Process the two files in an overlay and combine the results as the filter_complex describes.
Actual Output
Error (trimmed, full version below) saying:
[fc#0 @ 0x556978fc6e40] Error while filtering: Invalid data found when processing input=3.92x Failed to inject frame into filter network: Invalid data found when processing input Error while filtering: Invalid data found when processing input Conversion failed!
How to Reproduce
Contents of 02-conditionals.filter_complex
:
[0:v]fps=29,trim=start=0:end=9.6,setpts=PTS-STARTPTS[vstart]; [0:a]atrim=start=0:end=9.6,asetpts=PTS-STARTPTS[astart]; [0:v]fps=29,trim=start=9.6:end=16.5,setpts=PTS-STARTPTS[vbackDrop]; [0:a]atrim=start=9.6:end=16.5,asetpts=PTS-STARTPTS[abackDrop]; [1:v]fps=29,trim=start=53.1:end=60,setpts=PTS-STARTPTS,scale=608x1080,setsar=1:1,fade=in:st=0:d=5:alpha=1[vref]; [1:a]atrim=start=53.1:end=60,asetpts=PTS-STARTPTS,afade=in:st=0:d=5,volume=0.5[aref]; [vbackDrop][vref]overlay=(W-w)/2:(H-h)/2,setpts=PTS-STARTPTS[vlead]; [abackDrop][aref]amix[alead]; [0:v]fps=29,trim=start=16.5:end=257,setpts=PTS-STARTPTS[vrest]; [0:a]atrim=start=16.5:end=257,asetpts=PTS-STARTPTS[arest]; [vstart][astart][vlead][alead][vrest][arest]concat=v=1:a=1:n=3[video][audio]
FFMPEG command executed
$ ffmpeg -i if-conditionals.mkv -i programming-basics.mkv \ -filter_complex_script 02-conditionals.filter_complex \ -map_metadata -1 -map [video] -map [audio] \ -c:v h264 -pix_fmt yuv420p -crf 28 -metadata:s:v language=en \ -c:a aac -metadata:s:a language=en \ -y 02-conditionals.mkv
Full output attached as ffmpeg-20240212-120354.log.
Resources used in this were too large to attach, so they are available here:
https://markizano.net/misc/02-if-conditions.tgz
SHA1: b583e9883ec62393df47efcdf00a5abd9f6af227
SHA256: 47633c840fede1e39ecc59981ae6e15745dd0c521683849e3980573f856eda40
Resources have been signed with C5EAC623531280A9A4067E705419010671E96AA3
https://markizano.net/misc/02-if-conditions.tgz.asc
Signature is available as well.
Contents of tarball:
$ tree -h 02-if-conditions [ 108] 02-if-conditions ├── [ 44] build │ └── [ 748] 02-conditionals.filter_complex ├── [1.1M] ffmpeg-20240212-120354.log ├── [ 970] readme.md ├── [ 63] resources │ ├── [ 88M] if-conditionals.mkv │ └── [ 40M] programming-basics.mkv └── [ 325] run-ffmpeg.sh 3 directories, 6 files
Hope these details help!
Attachments (1)
Change History (6)
by , 3 months ago
Attachment: | ffmpeg-20240212-120354.log added |
---|
comment:1 by , 3 months ago
Description: | modified (diff) |
---|
comment:2 by , 3 months ago
I suggest you try simplifying your command line and your filter complex expression. With a long command line and filter complex script as yours, it is quite difficult to find the root cause. You can also try to find the commit which caused the regression.
comment:4 by , 3 months ago
Summary: | Break in [overlay]? when using filter_complex between 6.0 and 6.1 → Break in [concat] when using filter_complex between 6.0 and 6.1 |
---|
I was looking at the logs a little closer and discovered that it made it through overlay, but was getting EOF on concat.
This issue appears to be present on git-tag 6.1
, 6.1.1
and at least 3e79074c (current tip of release/6.1), but absent on master. Whatever the latest release will be next (6.2 or 7.0, not sure), I don't think this will be an issue going forward.
I can confirm that this is corrected on at least the master branch.
Thanks much, Gyan! Great find!
I learned a lot in this experience as well. Future tickets will have more simple filter_complexes to try to isolate where an issue may be. Thank you so much for the help!
comment:5 by , 3 months ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
ffmpeg
-report
contents