Adjust framerate MPG4 in ffMpeg
I'm trying to create a MPG4 movie from a bunch of png's. I want the movie to show one of the PNG-pictures every 1/5th second. So I tried the following command:
ffmpeg -i ffmpeg_temp/%05d.png -r 5 video.mp4
Now I get a movie of only 40 seconds, in which lot's of frames completely disappear.
I have around a 1000 pictures and want that to 开发者_开发技巧be a movie of around 3 minutes (5 fps).
You need to put the -r 5
before the -i ffmpeg_temp/%05d.png
since options apply to the following file. In other words, the input is being read at the default 25fps and the output file has a frame rate of 5fps.
From the FFmpeg documentation:
As a general rule, options are applied to the next specified file. Therefore, order is important, and you can have the same option on the command line multiple times. Each occurrence is then applied to the next input or output file.
精彩评论