Changing Frame Rate — When to Use the -r Option vs the fps Filter

There are many situations where you need to change a video’s frame rate (fps). Common examples include converting 30fps footage to 24fps for a cinematic feel, compressing 60fps video to 30fps for the web, or creating a 1fps timelapse. FFmpeg offers two main methods — the -r option and the -vf fps filter — and using each in the right context is recommended. This article explains the differences and provides practical command examples verified with ffmpeg 6.1.

Tested with: ffmpeg 6.1.1 / Ubuntu 24.04


1. Checking the Current Frame Rate (ffprobe)

Before converting, check the source file’s frame rate.

ffprobe -v error -select_streams v:0 -show_entries stream=r_frame_rate,avg_frame_rate -of default=noprint_wrappers=1 input.mp4

Example output:

r_frame_rate=30/1
avg_frame_rate=30/1

r_frame_rate is the frame rate recorded in the container metadata, while avg_frame_rate is the average frame rate calculated from the actual number of frames. For variable frame rate (VFR) video, these two values may differ.


2. The -r Option (Output Frame Rate Specification)

Place -r on the output side to specify the frame rate.

ffmpeg -i input.mp4 -r 30 -c:v libx264 -crf 23 -c:a copy output.mp4

The official documentation describes the output-side -r option as: “Duplicate or drop frames right before encoding them to achieve constant output frame rate fps.” This means it achieves the target frame rate by duplicating or dropping frames immediately before encoding.


3. The -vf fps Filter (More Precise Control)

ffmpeg -i input.mp4 -vf fps=30 -c:v libx264 -crf 23 -c:a copy output.mp4

The fps filter operates as part of the filter graph and outputs frames while referencing their timestamps.


4. Differences Between -r and the fps Filter

The two approaches are similar but have important behavioral differences.

Comparison-r (output option)-vf fps=N (filter)
Processing timingImmediately before encodingWithin the filter graph (earlier stage)
Timestamp referenceLimitedReferences frame timestamps
Combining with other filtersCan be used as-isCan be integrated into a filter chain
VFR (variable frame rate) sourceMay be unstableGenerally provides more stable conversion

General recommendation: For simple frame rate conversion, -vf fps=N often produces more accurate behavior. For variable frame rate source material in particular, the fps filter can yield more stable results. The -r option is convenient for simple use cases or when combining with other options.


5. Decreasing Frame Rate (Frame Dropping)

Example of converting a 60fps video to 30fps.

ffmpeg -i input.mp4 -vf fps=30 -c:v libx264 -crf 23 -c:a copy output.mp4

When decreasing the frame rate, the fps filter drops excess frames to match the specified rate. No frame interpolation (generation of intermediate frames) is performed. Frames are simply thinned out.


6. Increasing Frame Rate (Frame Duplication)

Example of converting a 24fps video to 60fps.

ffmpeg -i input.mp4 -vf fps=60 -c:v libx264 -crf 23 -c:a copy output.mp4

When increasing the frame rate, the fps filter achieves the target rate by duplicating existing frames. No new intermediate frames are generated (the smoothness of motion is the same as the original source). For true frame interpolation (generating intermediate frames via motion estimation), a different approach such as the minterpolate filter is required.


7. Practical Frame Rate Conversion Use Cases

60fps → 30fps (for web delivery)

ffmpeg -i input.mp4 -vf fps=30 -c:v libx264 -crf 23 -c:a copy output.mp4

29.97fps → 25fps (for PAL standard)

ffmpeg -i input.mp4 -vf fps=25 -c:v libx264 -crf 23 -c:a copy output.mp4

30fps → 24fps (cinematic look)

ffmpeg -i input.mp4 -vf fps=24 -c:v libx264 -crf 23 -c:a copy output.mp4

8. Timelapse Application: -vf fps=1

For converting a sequence of images into a timelapse video, the typical approach is to read the images as a 1-image-per-second slideshow and output at a higher frame rate. Note that commands dealing with image sequences (img%03d.png, etc.) are shown in text blocks per CI rules.

ffmpeg -framerate 1 -i img%03d.png -c:v libx264 -r 30 -pix_fmt yuv420p output.mp4

To generate a low-frame-rate thumbnail video from an existing video at 1fps:

ffmpeg -i input.mp4 -vf fps=1 -c:v libx264 -crf 23 output.mp4

This produces a low-frame-rate video that extracts one frame per second from the source video.


9. Frame Rate and Audio Synchronization

Changing the frame rate does not affect audio timestamps, which are independent, so synchronization is normally maintained automatically. However, when making large frame rate changes (such as converting to 1fps), care is needed with audio handling. For processes that alter the video timeline — such as timelapse conversion — it is recommended to either remove audio with -an or explicitly specify the intended audio processing.



Tested with: ffmpeg 6.1.1 / Ubuntu 24.04 (GitHub Actions runner)
Primary sources: ffmpeg.org/ffmpeg.html / ffmpeg.org/ffmpeg-filters.html / ffmpeg.org/ffmpeg-codecs.html