Skip to content

Instantly share code, notes, and snippets.

@bluefeet
Last active February 26, 2019 06:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bluefeet/997512427ab27bf4e4fbf3d84d40571b to your computer and use it in GitHub Desktop.
Save bluefeet/997512427ab27bf4e4fbf3d84d40571b to your computer and use it in GitHub Desktop.
ffmpeg \
-i video.mkv \ # Great video, japanese audio.
-itsoffset -1.0 \ # audio.mp4 is behind by 1 second.
-i audio.mp4 \ # Bad video, english audio.
-map 0:v:0 \ # Video from file 0 (video.mkv).
-map 1:a:0 \ # English audio from file 1 (audio.mp4).
-map 0:a:0 \ # Japanese audio from file 0.
-c copy \ # Don't convert anything, just copy the streams.
new.mkv # Great video, and with both japanese and english audio tracks.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment