• Skip to main content

Uly.me

cloud engineer

  • Home
  • About
  • Archives

FFMPEG Fix Audio Sync

June 14, 2020

If you have a video with audio sync issues, you can easily fix it using ffmpeg. It takes 2 inputs: the filename and delay: 0.100 is 100 ms or 0.1 seconds. Output file has -fixed appended to it. It’s fast. Only takes 2-3 seconds to process a 1.5 hour recording.

Here’s the script.

ffmpeg -i livestream.mp4 \
-itsoffset 0.100 \
-i livestream.mp4 \
-map 0:0 -map 1:1 \
-acodec copy \
-vcodec copy \
livestream-fixed.mp4

ffmpeg -i livestream.mp4 \ -itsoffset 0.100 \ -i livestream.mp4 \ -map 0:0 -map 1:1 \ -acodec copy \ -vcodec copy \ livestream-fixed.mp4

Filed Under: Linux Tagged With: audio, delay, ffmpeg, fix, sync

Search This Website

Subscribe Via Email

  • Home
  • About
  • Archives

Copyright © 2023