How to fix audio that is out of sync with the video
Audio out of sync has two different shapes, and they need different fixes. A constant offset (sound always half a second late) is fixed by shifting the audio track once, which FFmpeg can do without re-encoding. Drift (in sync at the start, more and more off later) comes from variable frame rate or mismatched sample rates, and is fixed by re-encoding to a constant frame rate with resampled audio. Before fixing the file, make sure it is the file: Bluetooth headphones alone can add 100 to 300 ms of delay.
Step 1: is it the player or the file?
- Play the file in two different players (VLC and your system player) on wired speakers.
- If only one player or only Bluetooth is off, the file is fine. In VLC, adjust temporarily with J and K (50 ms steps) or Tools > Track Synchronization.
- If every player shows the same problem, the file needs fixing.
Step 2: measure
Find a moment with a clear sound (a clap, a door, a word starting with "p"). Note how far off it is at the start and near the end of the video.
- Same at start and end: constant offset.
- Grows over time: drift.
Fix a constant offset with FFmpeg (lossless)
Delay the audio by 0.3 seconds:
`` ffmpeg -i input.mp4 -itsoffset 0.3 -i input.mp4 -map 0:v -map 1:a -c copy fixed.mp4 ``
Make audio earlier by 0.3 seconds by delaying the video instead:
`` ffmpeg -itsoffset 0.3 -i input.mp4 -i input.mp4 -map 0:v -map 1:a -c copy fixed.mp4 ``
Fix drift by re-encoding
Phones and screen recorders often record with a variable frame rate; some editors and players mishandle it. Convert to a constant frame rate and let the audio resampler follow the timestamps:
`` ffmpeg -i input.mp4 -vf fps=30 -c:v libx264 -crf 18 -af aresample=async=1000 -c:a aac -b:a 192k fixed.mp4 ``
In HandBrake, choose the original frame rate and tick Constant Framerate on the Video tab.
If drift is linear (exactly X seconds off per hour), the audio sample rate was mislabelled, e.g. 48,000 Hz audio stored as 44,100. Stretching it with -af atempo= plus the correct ratio fixes it, but check the sample rate first with ffprobe.
Fix sync in an editor
In Premiere Pro, DaVinci Resolve or Shotcut, unlink audio and video, slide the audio until a clear sound lines up, and export. For drift in Premiere, interpret the footage at its true frame rate first.
Sync problems after a crash or repair
If the recording was interrupted and you rebuilt its index, the timing in the new index comes from the reference file: frame rate, audio sample rate and how the camera interleaves audio and video. A reference recorded with different settings (another resolution, frame rate or audio mode) can produce a file that plays but drifts. Repair again with a reference recorded with exactly the same settings. In FixMP4, the preview shows whether sync is correct before you export.
Some cameras write audio and video in large alternating chunks; if the recording broke in the middle of a chunk, the last seconds may have audio without video or the other way round. That is expected and limited to the very end.
Prevent drift in screen recordings
In OBS, set a constant frame rate in Settings > Video, use 48 kHz audio in Settings > Audio, and record to MKV or fragmented MP4, then remux. On phones, recording in a fixed-frame-rate mode (where available) helps if you edit later.
Common situations
| Situation | Likely cause | Fix |
|---|---|---|
| Off only with Bluetooth headphones | Bluetooth latency | Player delay setting, or wired audio |
| Off by the same amount everywhere | Constant offset in the file | FFmpeg -itsoffset (lossless) |
| Gets worse over a long recording | Variable frame rate or sample-rate mismatch | Re-encode to constant frame rate |
| Off only in the editor | Editor mis-reading VFR footage | Convert to CFR before editing |
| Off after a crash repair | Reference with different settings | Repair again with a matching reference |
| Off only in a YouTube upload | Upload of VFR file | Re-encode to CFR, re-upload |
Checking the frame rate mode
MediaInfo shows "Frame rate mode: Variable" for VFR files. With FFmpeg, compare the average and real frame rates:
`` ffprobe -v error -select_streams v:0 -show_entries stream=avg_frame_rate,r_frame_rate -of default=nw=1 input.mp4 ``
If they differ noticeably, the file is variable frame rate, and converting it to a constant rate before editing prevents most drift problems.
Why sync breaks in the first place
Video files carry separate timestamps for every video frame and every audio packet. Players line them up using those timestamps, not by counting frames. Sync goes wrong when the timestamps are missing, wrong, or interpreted differently: a phone that slows its frame rate in low light, a screen recorder that drops frames when the CPU is busy, a capture card whose audio clock runs slightly faster than the video clock, or a repair that rebuilt timestamps from assumptions. Knowing which applies tells you whether one shift is enough or the whole file must be retimed.
FixMP4 compared with other options
| Feature | FixMP4 | Desktop repair suites | untrunc (CLI) | VLC |
|---|---|---|---|---|
| Runs where | Browser, on your device | Desktop app | Command line | Desktop player |
| Keeps your file on your device | ✓ | ✓ | ✓ | ✓ |
| Nothing to install | ✓ | ✕ | ✕ | ✕ |
| Rebuilds a missing MP4/MOV index | ✓ | ✓ | ✓ | ✕ |
| Preview of your own repaired file before paying | ✓ | Trial (varies) | Free tool | n/a |
| Voice Memos / AAC without a reference | Usually | Varies | ✕ | ✕ |
| Formats beyond MP4/MOV/M4A | ✕ | ✓ | Many (FFmpeg) | Plays many |
Frequently asked questions
Why is my audio out of sync only in one player?
The player or its audio output (often Bluetooth) adds delay. If other players are in sync, the file is fine.
What is the difference between offset and drift?
An offset is the same delay throughout. Drift grows over time, usually from variable frame rate or mismatched sample rates.
Can I fix sync without re-encoding?
A constant offset, yes, with FFmpeg's -itsoffset and -c copy. Drift usually needs re-encoding.
Why is a repaired video out of sync?
The index was rebuilt with wrong timing, often because the reference file used different settings. Use a reference recorded with identical settings.