FFmpeg Cookbook

Fix Audio Sync Tool

Audio ahead of or behind the video? Shift it by a precise number of milliseconds. Video stays untouched — nothing is uploaded.

🔒 Local processing only — your file never leaves the browser
🎬🔊
Drag & drop a video, or tap to select
MP4 / MOV / MKV / WebM, up to 500 MB
🎬

Set how far to shift the audio.

Positive delays the audio (use it when the sound plays too early). Negative advances the audio (use it when the sound is late). This tool fixes a constant offset; if the gap grows over the clip, that is drift — see the audio-drift guide below.
Processing… 0%

What this tool does

  • Delay the audio (when the sound plays too early) or advance it (when the sound is late)
  • Nudge by ±100 / ±500 ms or type an exact millisecond value
  • Checks whether the file even has an audio track before you start
  • Video is stream-copied — no quality loss to the picture
  • Fully local processing — your file never leaves the browser

How to use

  1. 1

    Drop your video

    MP4 / MOV / MKV / WebM, up to 500 MB. The tool checks for an audio track first.

  2. 2

    Set the offset

    Positive delays the audio (sound is early); negative advances it (sound is late). Use the slider, the nudge buttons, or type a value.

  3. 3

    Apply and check

    Play the result to confirm the timing, then download. Re-run with a different value if it is not quite right.

What each setting means

Positive offset (delay)
Adds silence at the start of the audio via `adelay`. Use when the sound is ahead of the picture. Never drops audio.
Negative offset (advance)
Trims the start of the audio via `atrim`. Use when the sound lags the picture. Needs a known clip length.
Output
MP4 with the video copied (`-c:v copy`) and audio re-encoded to AAC 192k, plus `+faststart`.

Recommended settings

Lip-sync slightly off after a screen recording
Try ±100–300 ms, preview, adjust
Screen and lecture captures often land a fraction of a second out.
Sound is clearly ahead of the picture
Positive offset (delay audio)
adelay adds silence — safe and easy to undo.
Sound trails the picture
Negative offset (advance audio)
Trims the leading audio so it starts sooner.

Common pitfalls

Symptom: The gap grows over the clip instead of staying constant

Cause: That is drift, not a fixed offset — usually a variable frame rate or a sample-rate mismatch.

Fix: See the [audio-drift guide](/en/articles/fix-audio-drift/); a single offset cannot fix drift.

Symptom: "No audio track to shift"

Cause: The video has no audio stream.

Fix: There is nothing to sync — check you uploaded the right file.

Symptom: Conversion fails on a .mov / .webm

Cause: The video codec may not fit MP4 with stream-copy.

Fix: Convert to H.264 MP4 first, then retry.

Equivalent FFmpeg commands

Reference commands you can run on the desktop FFmpeg CLI.

Delay audio by 300 ms
ffmpeg -i input.mp4 -filter_complex "[0:a:0]adelay=300:all=1,asetpts=PTS-STARTPTS[a]" -map 0:v:0 -map "[a]" -c:v copy -c:a aac -b:a 192k -movflags +faststart output.mp4
Advance audio by 300 ms
ffmpeg -i input.mp4 -filter_complex "[0:a:0]atrim=start=0.3,asetpts=PTS-STARTPTS[a]" -map 0:v:0 -map "[a]" -c:v copy -c:a aac -b:a 192k -movflags +faststart output.mp4

Browser support & limits

  • Fixes a constant offset only — not drift that grows over the clip
  • Keeps the first audio track; any extra audio tracks are dropped
  • Max input size: 500 MB; output is MP4 (H.264 video copied + AAC audio)

Privacy

This tool runs ffmpeg.wasm directly in your browser. Files never leave your device — everything runs locally. Read the privacy policy →

Frequently asked questions

Which way do I shift?

If the sound plays before the action, delay the audio (positive offset). If the sound comes after, advance it (negative offset).

Does it reduce quality?

The video is copied untouched. Only the audio is re-encoded to AAC, which is practically inaudible for a sync fix.

It is in sync at the start but drifts later — will this fix it?

No. That is drift, which needs resampling — see the audio-drift guide. This tool fixes a constant offset.

How do I do this from the command line?

Delay: `ffmpeg -i input.mp4 -filter_complex "[0:a:0]adelay=300:all=1[a]" -map 0:v:0 -map "[a]" -c:v copy -c:a aac output.mp4`. To advance, swap the filter for `atrim=start=0.3,asetpts=PTS-STARTPTS`.

Related tools

Related FFmpeg recipes