Skip to content

Instantly share code, notes, and snippets.

@Drowze
Last active March 21, 2022 09:52
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Drowze/ebf34b159fcb12599a2baa5a7e1cbbd9 to your computer and use it in GitHub Desktop.
Save Drowze/ebf34b159fcb12599a2baa5a7e1cbbd9 to your computer and use it in GitHub Desktop.
#mkv #mkvmerge Remove audio/subtitle from a batch of mkv files

Get the ids of the tracks with mkvinfo <file name> e.g.:

video 0
audio_disliked 1 (default)
audio_liked 2
subtitles_disliked 3 (default)
subtitles_liked 4

On windows cmd, on the folder of the files:

mkdir DEMUXED
for /f "delims=" %a in ('dir /b *.mkv') do mkvmerge -o "DEMUXED/%a" --video-tracks 0 --audio-tracks 2 --subtitle-tracks 4 --default-track 2 --default-track 4 "%a"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment