Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Using the same input file in multiple filters in ffmpeg?

Tags:

ffmpeg

I have an image that I want to concatenate to multiple video streams. I have the following below, but it's giving me an error when I use the [d] a second time in the filter complex.

Stream specifier 'd' in filtergraph description [3:v]scale=640x360,setdar=dar=16/9[d];[0:v][d]concat[a]; [a][1:v]concat[c]; [2:v][d]concat[e]; [c][e]vstack=inputs=2[b] matches no streams.

I have the following

ffmpeg -i W1.webm -itsoffset 10 -i W1.webm -i W1.webm -loop 1 -framerate 24 -t 10 -i I1.jpg -filter_complex "[3:v]scale=640x360,setdar=dar=16/9[d];[0:v][1:v]concat[a]; [v][d]concat[c];[c][a]vstack=inputs=2[b]" -map [b] Output.webm

What can I do to resolve this?

like image 903
Kaxemer Avatar asked Dec 13 '25 04:12

Kaxemer


1 Answers

Processed streams generated within filtergraphs can be used only one. You have to use the split filter to clone the stream and pass one copy to further filters.

ffmpeg -i W1.webm -itsoffset 10 -i W1.webm -i W1.webm -loop 1 -framerate 24 -t 10 -i I1.jpg -filter_complex "[3:v]scale=640x360,setdar=dar=16/9,split=2[d1][d2];[0:v][d1]concat[a]; [a][1:v]concat[c]; [2:v][d2]concat[e]; [c][e]vstack=inputs=2[b]" -map [b] Output.webm

like image 190
Gyan Avatar answered Dec 16 '25 05:12

Gyan



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!