Opened 16 months ago
Last modified 16 months ago
#11610 new enhancement
Auto dummy-"split" for filters expecting > 1 input?
| Reported by: | Alexander | Owned by: | |
|---|---|---|---|
| Priority: | normal | Component: | avfilter |
| Version: | git-master | Keywords: | split |
| Cc: | Alexander, MasterQuestionable | Blocked By: | |
| Blocking: | Reproduced by developer: | no | |
| Analyzed by developer: | yes |
Description (last modified by )
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.
Change History (6)
follow-up: 2 comment:1 by , 16 months ago
comment:2 by , 16 months ago
Thank you, good work around. Seems like a skill issue. It would be great to split automatically, so I'll make a feature request.
comment:3 by , 16 months ago
| Description: | modified (diff) |
|---|---|
| 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 |
comment:4 by , 16 months ago
| Summary: | Split automatically when input needs a consumed output → Split automatically when input needs an already consumed output |
|---|
comment:5 by , 16 months ago
| Component: | swscale → avfilter |
|---|---|
| Keywords: | split avfilter added |
comment:6 by , 16 months ago
| Analyzed by developer: | set |
|---|---|
| Cc: | added |
| Keywords: | avfilter scale scale2ref removed |
| Summary: | Split automatically when input needs an already consumed output → Auto dummy-"split" for filters expecting > 1 input? |
| Version: | 7.1 → git-master |
͏ 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..?



The scaled input video gets consumed by the 2nd scale filter so can't be fed to overlay. Use the split filter first.