Constant vs Variable Frame Rate: How to Diagnose Audio Sync
Reviewed 21 November 2026. Constant frame rate and variable frame rate describe timing, not image quality. A constant-frame-rate stream aims for evenly spaced presentation times. A variable-frame-rate stream can use different intervals between frames. Either can be valid. The practical question is whether the file's timestamps, editor, encoder, and destination agree.
Begin with the symptom
Write down what actually happens before converting anything. Useful distinctions include:
- audio starts in sync but gradually drifts;
- audio is offset by the same amount for the entire file;
- motion stutters while audio remains correct;
- only an editor timeline is wrong, while normal playback is correct;
- the exported file differs from both the source and the timeline.
A fixed offset and progressive drift usually point to different causes. A fixed offset can come from an edit, priming, or an incorrect start timestamp. Progressive drift can come from mismatched clocks, dropped samples, damaged timestamps, or software interpreting variable timing as constant.
Inspect the declared rates
Start with a concise stream report:
ffprobe -v error -select_streams v:0 -show_entries stream=codec_name,time_base,r_frame_rate,avg_frame_rate,start_time,duration,nb_frames -of default=noprint_wrappers=1 input.mp4
avg_frame_rate is an average. r_frame_rate is a stream rate field used by FFmpeg and should not be treated as proof that the stream is constant. time_base describes the unit used for timestamps. Some fields can be absent or estimated, depending on the container and demuxer.
Measure presentation timestamps
Frame or packet timestamps show the timing that summary fields can hide:
ffprobe -v error -select_streams v:0 -show_entries frame=best_effort_timestamp_time,pkt_duration_time -of csv=p=0 input.mp4
Calculate the difference between consecutive presentation times. Uniform differences suggest constant pacing. Multiple legitimate differences suggest variable pacing. Isolated gaps or backwards timestamps deserve investigation. For long files, sample several sections with -read_intervals rather than assuming the first seconds represent the entire recording.
Compare audio and video timelines
Run a second report for audio:
ffprobe -v error -select_streams a:0 -show_entries stream=time_base,start_time,duration,sample_rate,channels -of default=noprint_wrappers=1 input.mp4
Compare start times and end times, then verify them by listening and watching. Container-level duration can differ from individual stream duration. An absent duration field is not automatically an error. The demuxer may calculate timing from packets instead.
Decide whether conversion is justified
Do not convert a healthy file only because two reported rate fields differ. A conversion is justified when the destination requires a constant rate, the editing system misinterprets the source, or a controlled test proves that normalization fixes the real symptom.
FFmpeg's fps filter converts to a specified constant frame rate by dropping or duplicating frames as needed. For example:
ffmpeg -i input.mp4 -vf "fps=30000/1001" -c:v libx264 -crf 18 -preset medium -c:a aac -b:a 192k output-cfr.mp4
This creates a new encode at approximately 29.97 frames per second. It is not lossless, and it can change motion cadence. Choose a rate supported by the intended destination and normally preserve the acquisition rate. YouTube's upload guidance recommends the same frame rate used for recording.
Understand the filter choice
The fps filter drops or duplicates frames to meet the target. FFmpeg also provides a framerate filter that interpolates frames, which creates new intermediate pictures. Interpolation can introduce artifacts around motion, edges, overlays, and cuts. It is not a general repair for timing faults.
If the video is correct but audio has a fixed offset, changing frame rate may make the file worse. Diagnose the start timestamps and edit history first. If sync drifts, compare the length of the source clocks and check whether the capture lost frames or samples.
A controlled verification workflow
- Keep the original file unchanged and record its hash.
- Capture stream summaries and timestamp samples from the start, middle, and end.
- Reproduce the symptom in the exact player, editor, or upload destination where it occurs.
- Create a short test conversion with explicit frame-rate and audio settings.
- Compare motion, sync, duration, stream count, and metadata with the original.
- Convert the complete file only after the short test passes.
Limitations
Timestamp inspection cannot identify every capture fault or editor bug. Hardware recorders, screen-capture tools, Bluetooth audio, damaged containers, and long-running independent clocks can each produce different symptoms. Always preserve the source and test the final file in the real delivery environment.
Primary sources
- ffprobe documentation for packet, frame, stream, and interval inspection.
- FFmpeg filter documentation for the
fpsandframeratefilters. - YouTube recommended upload encoding settings for the guidance to preserve the recorded frame rate.