Audio Out of Sync? Why Video and Audio Drift Apart (and How to Fix It)

Why does a video play fine on your computer but the audio runs ahead on your phone? Why does the sound drift later and later toward the end of a long edit?

You edit a 30-minute video, export it, and realize the last five minutes have the audio lagging half a second behind the picture. You record a screen capture, and the middle section has audible visual mismatch. The same MP4 plays perfectly on a computer but drifts out of sync on a phone. These scenarios all share the same root: audio-video sync (AV sync)—a recurring headache for editors whose causes are usually not complex, but whose diagnosis requires some foundational knowledge.

Timestamps: The Foundation of AV Sync

Two kinds of A/V desync: a constant offset vs a growing drift

In a video file, audio and video are stored separately—inside a container (MP4, MKV, MOV), the compressed video stream and compressed audio stream are two independent data streams. The player aligns them using timestamps.

Every data packet (video frame or audio sample) carries a timestamp:

  • PTS (Presentation Time Stamp): when this frame/audio segment should be displayed/played
  • DTS (Decoding Time Stamp): when this frame needs to be decoded (PTS and DTS differ when B-frames are present)

The player's job is straightforward: read each packet's PTS and output the corresponding video and audio data at the moment the timestamp dictates.

Why Timestamps Go Wrong

Common causes of timestamp errors:

  1. Editing operations: cuts and merges that don't correctly rebuild timestamps (copy mode vs. re-encode) can introduce small offsets
  2. Variable frame rate (VFR) footage: phone screen recordings with non-uniform PTS spacing cause cumulative drift
  3. Sample rate mismatch: audio sample rate (44.1 kHz vs. 48 kHz) incompatible with video frame rate creates cumulative offset per second
  4. Container muxing errors: fast muxing methods (copy mode) may truncate or round timestamps

VFR: The #1 Cause of Screen Recording AV Sync Issues

VFR (Variable Frame Rate) is the most common cause of audio-video sync problems in phone screen recordings.

What Is VFR?

Phone screen recording software (both iOS and Android native recording) typically uses VFR: when the screen is static, it records at a lower frame rate to save space and battery; when the content changes rapidly, it switches to a higher frame rate for smoothness.

VFR is "non-standard" at the file level—most editing software (especially entry-level tools) assumes the input is CFR (Constant Frame Rate) and interprets timestamps at fixed intervals. The result: the clip's "true duration" is miscalculated, audio plays at a fixed rate, and the total duration of the audio track no longer matches the video track.

Typical Symptoms of VFR-Induced Sync Drift

  • Imported VFR footage drifts further out of sync the longer it plays in the editor's preview
  • Merging several VFR clips and exporting yields a file with rhythmic desync from start to finish
  • The video plays fine on the phone (phone players handle VFR well) but is out of sync on a computer

Handling VFR Footage

  1. Convert to CFR: before importing into editing software, use a tool (Shutter Encoder, FFmpeg) to convert VFR to CFR. FFmpeg example: ffmpeg -i input.mp4 -vsync cfr -r 30 output.mp4
  2. Use software with VFR support: DaVinci Resolve (some versions), Premiere Pro (with correct project settings), and other professional tools handle VFR reasonably well; entry-level editors generally don't
  3. Understand the trade-off: VFR→CFR conversion may duplicate or drop static frames, causing subtle stutter—but this is an acceptable cost for reliable AV sync

Sample Rate-Induced Cumulative Drift

This is another common cause of sync issues, especially noticeable in long videos (>15 minutes).

How It Happens

Suppose the video frame rate is 29.97 fps (NTSC) and the audio sample rate is 44.1 kHz. In theory, the container's timestamp system synchronizes them. Problems arise when:

  • Audio re-sampling: 48 kHz audio placed into a 44.1 kHz project, with imprecise or low-quality sample rate conversion
  • Frame rate approximations: fractional differences between 23.976 fps and 24 fps, or 29.97 and 30 fps, accumulate over hundreds of thousands of frames into visible error

Calculating Sync Error

For a 30-minute video:

  • Audio at 48 kHz mistakenly played at 44.1 kHz speed: 30 min × (48/44.1 - 1) ≈ 30 × 0.088 ≈ 2.65 minutes of offset—but it's rarely this extreme because the player's timestamp system compensates for most of it. The residual offset is the problem.

A more common scenario: 100-200 ms of drift in a 10-minute video due to sample rate rounding errors—precisely in the "something feels off but I can't pinpoint it" zone. This is one of the most frustrating situations for editors.

Checking and Fixing

  1. Check project audio settings: ensure the project's audio sample rate matches your source material
  2. Standardize sample rates: transcode all audio material to the target sample rate before importing (48 kHz is the standard for video production)
  3. Check export settings: verify the audio sample rate is not changed automatically during export

Editing Software Workflow Pitfalls

The Stream Copy Trap

When quickly merging or cutting videos, many tools default to "stream copy" mode (no re-encode) and simply replicate the data packets' timestamps. If the source material has minor PTS errors (from VFR, phone recording, concatenation), these errors are preserved intact—or even amplified by certain players.

Fix: after key operations (like merging clips from different sources), perform a full re-encode, which resets PTS and aligns the timeline.

Mixing Footage at Different Frame Rates

Putting 24 fps (cinematic), 30 fps (phone recording), and 60 fps (game capture) on the same timeline forces the editor to perform frame-rate conversion. Frame insertion or dropping during this process can cause visual stutter, but generally doesn't directly affect the audio timeline—unless the frame-rate conversion changes the output's total duration, creating a mismatch with the audio track duration.

Practical Troubleshooting Methods

The Clap Test

Before shooting or recording, capture a 1-2 second clap (or slate)—the moment your hands meet in the frame should align with the start of the clap sound on the waveform. If this sync reference aligns perfectly on the timeline, the source material is fine; if not, the source itself has a sync issue.

Waveform Inspection

Zoom into the audio waveform timeline in your editing software, find a sharp transient (clap, door slam, click), and check whether the waveform's leading edge aligns with the corresponding action in the video frame.

Quantifying the Offset

Shift the audio track left or right in your editing software (typically in 5 ms steps), find the alignment point, and record the offset value. Then compensate for that offset in your export settings or metadata.

Common Misconceptions

  1. "AV sync problems are caused by the phone during recording." More often, the issue is how the editing software or player handles timestamps. The original phone recording typically plays fine on the phone itself.
  2. "All editing software handles VFR the same way." Professional tools (Premiere Pro, DaVinci Resolve) have significantly improved VFR support in recent versions; entry-level and online editors mostly still assume CFR.
  3. "If the player shows sync problems, the file is broken." It could be the player's decoder—try another player (VLC, IINA, MPV) to confirm.
  4. "Adding black frames fixes AV sync." No. Adding black frames changes the video's total duration without correcting the timestamp baseline. Fix AV sync by addressing timestamps and sample rate.

Practical Tips

  • Convert VFR→CFR for phone screen recordings first: this single preventive step saves hours of debugging later. One FFmpeg operation upstream prevents problems downstream.
  • Standardize project settings: before starting to edit, confirm the project's frame rate (23.976/29.97 vs. integer choice) and audio sample rate (48 kHz for consistency), and ensure all material matches.
  • Check sync periodically in long videos: for projects over 10 minutes, jump to the middle, later sections, and end during preview to check sync—don't only check the beginning.
  • Verify after export: play the exported file in VLC or another media player—don't rely solely on your editing software's preview, which can mask sync issues.
  • Use audio offset if available: some export settings include an "audio offset" parameter (in milliseconds) for compensating known fixed delays.
  • Don't use stream copy with VFR sources: merging VFR sources in copy mode accumulates PTS errors. Perform a full re-encode for such operations.

Further Reading

This site's merging and cutting tools automatically detect timestamp consistency in source files during long-video operations. If the tool detects a potential AV sync risk, it will suggest using full re-encode mode to ensure sync accuracy in the output file.

Related Tools