Skip to content

Instantly share code, notes, and snippets.

@Roninkoi
Last active October 31, 2022 15:43
Show Gist options
  • Select an option

  • Save Roninkoi/d51c989682938a5cdf3ad51280c69efc to your computer and use it in GitHub Desktop.

Select an option

Save Roninkoi/d51c989682938a5cdf3ad51280c69efc to your computer and use it in GitHub Desktop.
Change default audio and subtitle track in mkv files
#!/bin/sh
# set audio and subtitle track 2 as default in mkv files (typically japanese with english subtitles)
for file in *.mkv ; do
mkvpropedit "$file" --edit track:a1 --set flag-default=0 --set flag-forced=0 \
--edit track:a2 --set flag-default=1 --set flag-forced=0 \
--edit track:s1 --set flag-default=0 --set flag-forced=0 \
--edit track:s2 --set flag-default=1 --set flag-forced=0
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment