Skip to content

Instantly share code, notes, and snippets.

@outlyer
Created March 15, 2018 05:03
Show Gist options
  • Save outlyer/5143a01bdc3554fb6018cd9fb767ca39 to your computer and use it in GitHub Desktop.
Save outlyer/5143a01bdc3554fb6018cd9fb767ca39 to your computer and use it in GitHub Desktop.
Tool to default unknown audio tracks in MKV files to English (therby avoiding unnecessary subtitles)
#!/bin/sh
#
# Requires mkvtoolnix
#
find . -name \*.mkv | while read file
do
mkvinfo "$file" | grep -q 'Language: und'
if [ $? = 0 ]; then
echo $file
mkvpropedit --edit track:v1 --set language=eng --edit track:a1 --set language=eng "$file"
fi
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment