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

Moritz Barsnick barsnick at gmx.net
Mon Oct 29 17:21:01 EET 2018


On Mon, Oct 29, 2018 at 14:59:43 +0100, Ayush Narsaria wrote:
> My png files are numbered from res-5.png to res-180.png.
> 
> The command I give is :
> ffmpeg -framerate 5 -pattern_type glob -i '*.png' -c:v libx264 output.mp4

The globbing will probably order your files alphabetically, making
res-1*.png come before res-2.png. resulting in incorrect order.

I suggest:
$ ffmpeg -framerate 5 -i 'res-%d.png' -start_number 5 -c:v libx264 output.mp4
(Untested. Perhaps you need a different "-pattern_type" than glob.)

The numbers must still be sequential though.

Moritz


More information about the ffmpeg-user mailing list