Content #
Using -r option #
To set the video frame rate we use the -r option before the output file, the syntax is:
ffmpeg -i input -r fps output
For example to change the frame rate of the film.avi file from 25 to
ffmpeg -i input.avi -r 30 output.mp4
When using a raw input format, the -r option can be used also before the input.
Using fps filter #
Another way to set a frame rate is to use an fps filter, what is useful especially in the filterchains.
For example, to change the input frame rate of the clip.mpg file to the value 25, we use the command:
ffmpeg -i clip.mpg -vf fps=fps=25 clip.webm
Predefined values for frame rate #
Predefined abbreviations for the frame rate
Abbreviation, Exact value, Corresponding FPS ntsc-film, 24000/1001, 23.97 film, 24/1, 24 pal/qpal/spal, 25/1, 25 ntsc/qntsc/sntsc, 30000/1001, 29.97
For example to set the frame rate 29.97 fps, the next 3 commands give the same result:
ffmpeg -i input.avi -r 29.97 output.mpg
ffmpeg -i input.avi -r 30000/1001 output.mpg
ffmpeg -i input.avi -r ntsc output.mpg
From #
FFmpeg Basics