#11610(swscale:new): scale with reference prevents video to be scaled with a second scale filter instance
#11610: scale with reference prevents video to be scaled with a second scale filter instance -------------------------------------+------------------------------------- Reporter: Alexander | Type: defect Status: new | Priority: normal Component: swscale | Version: 7.1 Keywords: scale | Blocked By: scale2ref | Blocking: | Reproduced by developer: 0 Analyzed by developer: 0 | -------------------------------------+------------------------------------- == Summary of the bug: A user needs to overlay a logo which is scaled using a reference video as input. The reference video should be also scaled in the same command. **Result:** Scale filter fails to scale a video that is used as input for the reference. **Tests:** Logo scaled without reference video does not prevent video to be scaled (the video is scaled, logo scaled, logo overlayed). == How to reproduce: {{{ % ffmpeg -y -t 10 -i 'input.mp4' -loop 1 -t 13 -i logo.png -filter_complex "\ \ [0:v]scale=-2:720[prepaired]; \ [1:v][prepaired]scale=-1:rw/8[logo_scaled]; \ [prepaired][logo_scaled]overlay=10:10" -c:v libx264 -preset fast output.mp4 ffmpeg version N-119657-gf1b3e51950 [2025-05-22] [7.1.git] built with gcc 12 (Debian 12.2.0-14+deb12u1) }}} Patches should be submitted to the ffmpeg-devel mailing list and not this bug tracker. -- Ticket URL: <https://trac.ffmpeg.org/ticket/11610> FFmpeg <https://ffmpeg.org> FFmpeg issue tracker
#11610: scale with reference prevents video to be scaled with a second scale filter instance -------------------------------------+------------------------------------- Reporter: Alexander | Owner: (none) Type: defect | Status: new Priority: normal | Component: swscale Version: 7.1 | Resolution: Keywords: scale | Blocked By: scale2ref | Blocking: | Reproduced by developer: 0 Analyzed by developer: 0 | -------------------------------------+------------------------------------- Comment (by Gyan): The scaled input video gets consumed by the 2nd scale filter so can't be fed to overlay. Use the split filter first. {{{ [0:v]scale=-2:720,split=2[base][ref]; \ [1:v][ref]scale=-1:rw/8[logo_scaled]; \ [base][logo_scaled]overlay=10:10" }}} -- Ticket URL: <https://trac.ffmpeg.org/ticket/11610#comment:1> FFmpeg <https://ffmpeg.org> FFmpeg issue tracker
#11610: scale with reference prevents video to be scaled with a second scale filter instance -------------------------------------+------------------------------------- Reporter: Alexander | Owner: (none) Type: defect | Status: new Priority: normal | Component: swscale Version: 7.1 | Resolution: Keywords: scale | Blocked By: scale2ref | Blocking: | Reproduced by developer: 0 Analyzed by developer: 0 | -------------------------------------+------------------------------------- Comment (by Alexander): Thank you, good work around. -- Ticket URL: <https://trac.ffmpeg.org/ticket/11610#comment:2> FFmpeg <https://ffmpeg.org> FFmpeg issue tracker
#11610: Split automatically when input needs a consumed output -------------------------------------+------------------------------------- Reporter: Alexander | Owner: (none) Type: enhancement | Status: new Priority: normal | Component: swscale Version: 7.1 | Resolution: Keywords: scale | Blocked By: scale2ref | Blocking: | Reproduced by developer: 0 Analyzed by developer: 0 | -------------------------------------+------------------------------------- Changes (by Alexander): * summary: scale with reference prevents video to be scaled with a second scale filter instance => Split automatically when input needs a consumed output * type: defect => enhancement Old description:
== Summary of the bug:
A user needs to overlay a logo which is scaled using a reference video as input. The reference video should be also scaled in the same command.
**Result:** Scale filter fails to scale a video that is used as input for the reference.
**Tests:** Logo scaled without reference video does not prevent video to be scaled (the video is scaled, logo scaled, logo overlayed).
== How to reproduce: {{{ % ffmpeg -y -t 10 -i 'input.mp4' -loop 1 -t 13 -i logo.png -filter_complex "\ \ [0:v]scale=-2:720[prepaired]; \ [1:v][prepaired]scale=-1:rw/8[logo_scaled]; \ [prepaired][logo_scaled]overlay=10:10" -c:v libx264 -preset fast output.mp4
ffmpeg version N-119657-gf1b3e51950 [2025-05-22] [7.1.git]
built with gcc 12 (Debian 12.2.0-14+deb12u1) }}} Patches should be submitted to the ffmpeg-devel mailing list and not this bug tracker.
New description: == Summary on UX: A user needs to overlay a logo which is scaled using a reference video as input. The reference video should be also scaled in the same command. Scale filter fails to scale a video that is used as input for the reference. No error showed, so the user does not have a clue for debugging. == How to reproduce: {{{ [0:v]scale=-2:720[prepaired]; \ [1:v][prepaired]scale=-1:rw/8[logo_scaled]; \ [prepaired][logo_scaled]overlay=10:10 ffmpeg version N-119657-gf1b3e51950 [2025-05-22] [7.1.git] built with gcc 12 (Debian 12.2.0-14+deb12u1) }}} The working example: {{{ [0:v]scale=-2:720,split=2[base][ref]; \ [1:v][ref]scale=-1:rw/8[logo_scaled]; \ [base][logo_scaled]overlay=10:10" }}} While showing an error would be a great help for a user, splitting the output automatically could highly improve user experience. -- -- Ticket URL: <https://trac.ffmpeg.org/ticket/11610#comment:3> FFmpeg <https://ffmpeg.org> FFmpeg issue tracker
#11610: Split automatically when input needs an already consumed output -------------------------------------+------------------------------------- Reporter: Alexander | Owner: (none) Type: enhancement | Status: new Priority: normal | Component: swscale Version: 7.1 | Resolution: Keywords: scale | Blocked By: scale2ref | Blocking: | Reproduced by developer: 0 Analyzed by developer: 0 | -------------------------------------+------------------------------------- Changes (by Alexander): * summary: Split automatically when input needs a consumed output => Split automatically when input needs an already consumed output -- Ticket URL: <https://trac.ffmpeg.org/ticket/11610#comment:4> FFmpeg <https://ffmpeg.org> FFmpeg issue tracker
#11610: Split automatically when input needs an already consumed output -------------------------------------+------------------------------------- Reporter: Alexander | Owner: (none) Type: enhancement | Status: new Priority: normal | Component: avfilter Version: 7.1 | Resolution: Keywords: split | Blocked By: avfilter scale scale2ref | Blocking: | Reproduced by developer: 0 Analyzed by developer: 0 | -------------------------------------+------------------------------------- Changes (by Alexander): * component: swscale => avfilter * keywords: scale scale2ref => split avfilter scale scale2ref -- Ticket URL: <https://trac.ffmpeg.org/ticket/11610#comment:5> FFmpeg <https://ffmpeg.org> FFmpeg issue tracker
#11610: Auto dummy-"split" for filters expecting > 1 input? -------------------------------------+------------------------------------ Reporter: Alexander | Owner: (none) Type: enhancement | Status: new Priority: normal | Component: avfilter Version: git-master | Resolution: Keywords: split | Blocked By: Blocking: | Reproduced by developer: 0 Analyzed by developer: 1 | -------------------------------------+------------------------------------ Changes (by MasterQuestionable): * analyzed: 0 => 1 * cc: MasterQuestionable (added) * keywords: split avfilter scale scale2ref => split * summary: Split automatically when input needs an already consumed output => Auto dummy-"split" for filters expecting > 1 input? * version: 7.1 => git-master Comment: ͏ I find this seems to work: ͏ `ffmpeg -v debug -hide_banner -nostdin -nostats -f lavfi -i "testsrc=d=1,split=2[-][-]; [-][-]hstack" -c copy -f null -` ͏ . ͏ Duplicate label names..? -- Ticket URL: <https://trac.ffmpeg.org/ticket/11610#comment:6> FFmpeg <https://ffmpeg.org> FFmpeg issue tracker
participants (1)
-
FFmpeg