How to Detect VFR or CFR Video Using FFprobe

Determining whether a video file uses a Variable Frame Rate (VFR) or a Constant Frame Rate (CFR) is crucial for smooth video editing, transcoding, and playback compatibility. This article provides a straightforward guide on how to use ffprobe—the command-line media analyzer bundled with FFmpeg—to inspect your video files and quickly identify if they are VFR or CFR.

Method 1: Comparing Frame Rates (The Quick Check)

The fastest way to check for VFR is to compare the nominal frame rate against the average frame rate.

Run the following command in your terminal:

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

How to interpret the output:

You will see two values, for example:

r_frame_rate=30/1
avg_frame_rate=30/1

Method 2: Analyzing Frame Durations (The Definitive Check)

Comparing average frame rates can occasionally be inconclusive. To get a 100% accurate result, you can inspect the actual presentation duration of every individual frame.

Run this command to output the duration of each frame:

ffprobe -v error -select_streams v:0 -show_entries frame=pkt_duration_time -of csv=p=0 input.mp4

To easily count the unique frame durations (on Linux, macOS, or Git Bash on Windows), pipe the output to sort and uniq:

ffprobe -v error -select_streams v:0 -show_entries frame=pkt_duration_time -of csv=p=0 input.mp4 | sort | uniq -c

How to interpret the output: