#11366(undetermined:new): Regression when prepending/concatenating still image to video
#11366: Regression when prepending/concatenating still image to video -------------------------------------+------------------------------------- Reporter: mahozad | Type: defect Status: new | Priority: normal Component: | Version: 7.1 undetermined | Keywords: concat | Blocked By: concatenate filter_complex | Blocking: | Reproduced by developer: 1 Analyzed by developer: 0 | -------------------------------------+------------------------------------- **Summary of the bug:** I'm using FFmpeg to create clips with ability to concat an image to be shown at the start of the clip for the specified duration: https://github.com/mahozad/cutcon It uses FFmpeg CLI. FFmpeg version 6.1.1 (and I think also version 5.1.2) worked as expected. When upgrading to FFmpeg 7.1, the result video just contains the intro image and then just ends. I'm not sure if this is a regression. Maybe my FFmpeg command is "wrong" and it should have failed in previous versions as well? **How to reproduce:** FFmpeg 7.1 and also FFmpeg-full 2024-12-19-git-494c961379 downloaded from https://www.gyan.dev/ffmpeg/builds/ both tested on Windows 11. Here is an example FFmpeg invocation (formatted, each option in a new line) to reproduce the problem. It tries to create a clip from an input MP4 file and show an image at the start for 8 seconds. The image size is coerced to be at maximum the size of video and is padded with black color if its aspect ratio is different than the video. There is some other filters too. {{{ path/to/ffmpeg.exe -y -nostdin -loglevel info -stats_period 0.1s -accurate_seek -ss 356500ms -to 378500ms -i path/to/a/video.mp4 -loop 1 -framerate 25 -t 8s -i path/to/a/picture.jpg -t 8s -f lavfi -i aevalsrc=0 -filter_complex [0] yadif=1 [media-de-interlaced]; [media-de-interlaced] scale=iw*sar:ih [media-anamorphic-fixed]; [media-anamorphic-fixed] pad=ceil(iw/2)*2:ceil(ih/2)*2 [media-odd- pixel-number-fixed]; [media-odd-pixel-number-fixed] setsar=1/1 [media-source-aspect- ratio-normalized]; [media-source-aspect-ratio-normalized] null [media]; [1][media] scale2ref='if(gt(main_a,a),min(main_w,iw),min(main_h,ih)*main_a)':'if(gt(main_a,a),min(main_w,iw)/main_a,min(main_h,ih))' [intro-image-max-size-coerced][media]; [1][media] scale2ref=iw:ih [size-template][media]; [size-template] drawbox=w=iw:h=ih:t=fill:color=#000000 [intro- background]; [intro-background][intro-image-max-size-coerced] overlay=x='(W-w)/2':y='(H-h)/2' [intro-with-background]; [intro-with-background] setsar=1/1 [intro-source-aspect-ratio- normalized]; [intro-source-aspect-ratio-normalized] null [intro]; [intro][2][media] concat=n=2:v=1:a=1 -c:v libx264 -c:a aac -crf 23 -r 25 -metadata encoding_tool=Cutcon v1.2.3 path/to/output.mp4 }}} -- Ticket URL: <https://trac.ffmpeg.org/ticket/11366> FFmpeg <https://ffmpeg.org> FFmpeg issue tracker
#11366: Regression when prepending/concatenating still image to video -------------------------------------+------------------------------------- Reporter: mahozad | Owner: (none) Type: defect | Status: new Priority: normal | Component: avfilter Version: 7.1 | Resolution: Keywords: concat | Blocked By: concatenate filter_complex | Blocking: | Reproduced by developer: 1 Analyzed by developer: 0 | -------------------------------------+------------------------------------- Changes (by MasterQuestionable): * cc: MasterQuestionable (added) * component: undetermined => avfilter Comment: ͏ Probably relevant: ͏ https://trac.ffmpeg.org/ticket/11257#comment:3 ͏ ("scale2ref" removed..?) ͏ Try removing various options to ascertain the minimal reproducible. -- Ticket URL: <https://trac.ffmpeg.org/ticket/11366#comment:1> FFmpeg <https://ffmpeg.org> FFmpeg issue tracker
#11366: Regression when prepending/concatenating still image to video -------------------------------------+------------------------------------- Reporter: mahozad | Owner: (none) Type: defect | Status: new Priority: normal | Component: avfilter Version: 7.1 | Resolution: Keywords: concat | Blocked By: concatenate filter_complex | Blocking: | Reproduced by developer: 1 Analyzed by developer: 0 | -------------------------------------+------------------------------------- Comment (by mahozad): OK. So simplifying the filter to the below still does **not** work: {{{ -filter_complex [0] null [media]; [1][media] scale2ref='if(gt(main_a,a),min(main_w,iw),min(main_h,ih)*main_a)':'if(gt(main_a,a),min(main_w,iw)/main_a,min(main_h,ih))' [intro-image-max-size-coerced][media]; [intro-image-max-size-coerced] null [intro]; [intro][2][media] concat=n=2:v=1:a=1 }}} But simplyfing it even more does work: {{{ -filter_complex [0] null [media]; [1] null [intro]; [intro][2][media] concat=n=2:v=1:a=1 }}} -- Ticket URL: <https://trac.ffmpeg.org/ticket/11366#comment:2> FFmpeg <https://ffmpeg.org> FFmpeg issue tracker
#11366: Regression when prepending/concatenating still image to video -------------------------------------+------------------------------------- Reporter: mahozad | Owner: (none) Type: defect | Status: new Priority: normal | Component: avfilter Version: 7.1 | Resolution: Keywords: concat | Blocked By: concatenate filter_complex | Blocking: | Reproduced by developer: 1 Analyzed by developer: 0 | -------------------------------------+------------------------------------- Comment (by mahozad): Is there any solution or fix for this? -- Ticket URL: <https://trac.ffmpeg.org/ticket/11366#comment:3> FFmpeg <https://ffmpeg.org> FFmpeg issue tracker
#11366: Regression when prepending/concatenating still image to video -------------------------------------+------------------------------------- Reporter: mahozad | Owner: (none) Type: defect | Status: closed Priority: important | Component: avfilter Version: 7.1 | Resolution: fixed Keywords: concat | Blocked By: concatenate filter_complex | regression | Blocking: | Reproduced by developer: 1 Analyzed by developer: 0 | -------------------------------------+------------------------------------- Changes (by Marton Balint): * keywords: concat concatenate filter_complex => concat concatenate filter_complex regression * priority: normal => important * resolution: => fixed * status: new => closed Comment: Fixed in a736ac72bb2e457484724f0589fd11a2b2b5f852. -- Ticket URL: <https://trac.ffmpeg.org/ticket/11366#comment:4> FFmpeg <https://ffmpeg.org> FFmpeg issue tracker
participants (1)
-
FFmpeg