• Skip to main content

Uly.me

cloud engineer

  • Home
  • About
  • Archives

FFMPEG Offset Audio

June 19, 2020

If your audio is out of sync, you can fix using ffmpeg.

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

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

The ffmpeg fix is fast. A 1GB file took less than 30 seconds to run. Adjust -tsoffset until you find the sweet spot.

Filed Under: Linux Tagged With: audio, ffmpeg, offset, sync, video

Search This Website

Subscribe Via Email

  • Home
  • About
  • Archives

Copyright © 2023