1

I have a set of 5 images and I want to use FFmpeg to create a video sequence from them. I am using the following command to achieve this:

ffmpeg -pattern_type glob -i '*_0[0-5].png' -r 25 -t 8 -c:v libx264 -pix_fmt yuv420p output.mp4

Based on my calculations, this command should output a video sequence that lasts 8 seconds, with each image lasting 1.6 seconds (or 40 frames at a frame rate of 25 fps). However, when I run the command, it produces a video sequence that lasts only 5 frames, with each image lasting only one frame.

I am running this command on MacOS using Bash.

2
  • IMHO you should add -framerate 5/8 to make 5 images in 8 seconds Mar 21, 2023 at 13:55
  • 1
    perfect, that solves it! Mar 21, 2023 at 14:11

1 Answer 1

0

If you add to command line -framerate this will make what you want. The command will be:

ffmpeg -pattern_type glob -framerate 5/8 -i '*_0[0-5].png' -r 25 -t 8 -c:v libx264 -pix_fmt yuv420p output.mp4

This value (5/8) will ensure you have 5 "frames" for 8 seconds

You must log in to answer this question.

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