Skip to content

Instantly share code, notes, and snippets.

@StevenMaude
Last active August 21, 2020 10:05
Show Gist options
  • Save StevenMaude/74b39365ac44c05c663599e57f493ac8 to your computer and use it in GitHub Desktop.
Save StevenMaude/74b39365ac44c05c663599e57f493ac8 to your computer and use it in GitHub Desktop.
Adjust audio-video sync of videos slightly to compensate for audio delay problems in Ubuntu with Bluetooth audio
#!/bin/sh -eu
# Not sure if this is a headset issue or Ubuntu issue.
# Maybe your itsoffset differs: the value here works for me
# Usage: ./bluetooth_audio_shift.sh <video_filename>
ffmpeg -i "$1" -itsoffset 0.350 -i "$1" -vcodec copy -acodec copy -map 0:1 -map 1:0 -strict -2 "$1.audio-shift.mp4"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment