How to detect and fix variable frame rate video uploads before they break your pipeline
Screen recording tools like OBS, QuickTime, Loom, and phone capture apps produce variable frame rate (VFR) video, which causes audio drift when processed by transcoders that assume a constant frame rate (CFR). The drift is subtle at first but becomes clearly noticeable around the four-minute mark, making it a silent but serious problem for platforms that accept user-uploaded tutorials, demos, or gameplay footage. A two-tier detection approach using ffprobe can identify VFR files: a cheap header comparison between r_frame_rate and avg_frame_rate serves as a first-pass filter, followed by a per-frame timestamp analysis to confirm irregular gaps. Once a VFR file is confirmed, FFmpeg 8's -fps_mode cfr flag can normalize it at ingest before it causes downstream issues. The article provides Python 3.11 scripts and ffprobe commands to automate both detection tiers efficiently.
This is an AI-generated summary. ShortSingh links to the original source for the complete article.

Discussion (0)
Log in to join the discussion and vote.
Log in