[FFmpeg-user] Using filename pattern and filter_complex

Taner Sener tanersener at gmail.com
Thu Jun 21 14:43:12 EEST 2018


Hi all,

Do you know if it is possible to access streams of input files defined by a
filename pattern? I want to use them inside -filter_complex but didn't find
a demuxer which provides me that. Tried concat and image2 demuxers but both
didn't work. Concat demuxer is concatenating them as it should be and
image2 is doing something similar. Maybe I'm missing something.

This is my example. There are input images specified with 'photo%d.jpg'
pattern. I'm trying to use the second one inside -filter_complex with [1:v]
but it gives 'Invalid file index' error.

ffmpeg \

-i ../photos/photo%d.jpg \

-filter_complex \

"[1:v]scale=trunc(iw/2)*2:trunc(ih/2)*2[video]" \

-map [video] -c:v rawvideo -pix_fmt yuv420p out.mp4

Invalid file index 1 in filtergraph description
[1:v]scale=trunc(iw/2)*2:trunc(ih/2)*2[video].

Thanks


More information about the ffmpeg-user mailing list