Change a video's frame rate to 30 fps with the -r flag
Sometimes a source is at an unusual frame rate (cinema 23.976, NTSC 29.97, high-frame-rate 60, slow-motion 120) and the target player or workflow expects 30 fps. The -r flag sets the output frame rate; FFmpeg resamples timestamps to match.
The command
ffmpeg -i input.mp4 -r 30 output.mp4What it does
FFmpeg re-stamps every output frame to the requested frame rate. For sources at a different rate, FFmpeg drops or duplicates frames to match. For a 60 fps source going to 30 fps, every other frame is dropped; for a 24 fps source, frames are duplicated to pad to 30.
When to use it
For workflows that expect 30 fps: some broadcast specs, some social media processors, some older editing tools. For modern web delivery, the source frame rate is usually fine; modern players handle 23.976, 25, 29.97, 30, 50, and 60 fps without complaint.
Video and audio requirements
Any decodable source. The output frame rate is exactly the requested value; FFmpeg does not honor the NTSC fractional rates unless you specify them (-r 30000/1001 for 29.97). The audio is unaffected.
Things to avoid
- Converting 24 fps cinema to 30 fps. The 3:2 pulldown is not what
-r 30does; it duplicates frames, which produces a juddery 30 fps output. For proper pulldown, use telecine or accept the source's 23.976 rate. - Forgetting that
-rapplies to the output, not the input. To force the input's frame rate, use-rbefore-ias an input option. - Converting 60 fps to 30 fps when the motion is fast. The dropped frames are arbitrary, and a fast-moving object may appear to jump. For slow-motion or smooth playback, keep the higher frame rate.
- Using
-r 30on an NTSC source expecting 29.97. Specify-r 30000/1001for exact NTSC, or accept the small frame-rate difference for most delivery.