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).
There are two ways to change the output frame rate: With the -r option used as an output option. With the fps filter.
Click the Video tab for options to change the video output. Use the "Framerate (FPS)" drop-down menu to select a new frame rate.
Download and set up FFmpeg on your computer, use command line to compress video with FFmpeg by changing video codec format, lowering down bitrate, cutting video length, etc. For example, set CRF in FFmpeg to reduce video file size (ffmpeg -i input. mp4 -vcodec libx264 -crf 24 output.
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With