I have a sequence of images, named from 00001.png to 00322.png. I want to create a video from that image sequence, for which I have used the following command:

ffmpeg -i %05d.png -c:v libx264 -vf fps=100 -pix_fmt yuv420p triangles.mp4

The video renders correctly, but the length is of 13 seconds (according to vlc or youtube), when it should be of 3 seconds. Am I doing something wrong?

1 Answer 1


Image sequences have a framerate associated with them. When not specified, a default value of 25 is set.

The fps filter converts a stream from its input framerate to the target framerate. However, it aims to preserve sync, so frames are dropped or duplicated while source frames are kept as close as possible to their source timestamp.

All you need to do here is set a custom framerate for the image sequence, so

ffmpeg -framerate 100 -i %05d.png -c:v libx264 -pix_fmt yuv420p triangles.mp4

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .