[FFmpeg-user] ffmpeg generate the video from non-sequential images

Moritz Barsnick barsnick at gmx.net
Tue Oct 30 11:12:16 EET 2018

On Mon, Oct 29, 2018 at 17:29:29 +0100, Ayush Narsaria wrote:
> When I try your suggestion I get this error:

Sorry, as Carl Eugen kindly pointed out, I failed to place the
"-start_number" option as an input option.

> res_%d.png: No such file or directory
> So the filenames start from res_05.png till res_180.png but there are some

Well, in honesty, you said the name would be res_5.png, not
res_05.png. That's a difference for the "%d" operator. You need to
force min two digits with filling zeros: "%02d".

> files missing in between like res_13.png etc.
> Would that be a problem?

Yes. In that case, you would place the list of images in a text file:
file res_05.png
file res_07.png
file res_12.png

and use the concat demuxer:
$ ffmpeg -r 5 -f concat -i in.txt -c:v libx264 output.mp4

(Should work. ;-) I get peculiar DTS warnings though, must investigate.)


More information about the ffmpeg-user mailing list