Skip to content

Instantly share code, notes, and snippets.

@weblogix
Created July 13, 2019 08:17
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 weblogix/dfc51c80ad2aef8af9f9adfb46394691 to your computer and use it in GitHub Desktop.
Save weblogix/dfc51c80ad2aef8af9f9adfb46394691 to your computer and use it in GitHub Desktop.
[ffmpeg] #ffmpeg

Change mkv container to mp4 - with subtitles and all audio channels

ffmpeg -i test.mkv -c copy -map 0:4 -map 0:3 -map 0:2 -map 0:1 -map 0:0 -c:s mov_text test.mp4

Batch:

for i in *.mkv; do ffmpeg -i "$i" -c copy -map 0:1 -map 0:0 -c:s mov_text "${i%.*}.mp4"; done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment