Created
June 30, 2021 15:17
-
-
Save tonioriol/82fa621d6200ce7bb716013e47d1392b to your computer and use it in GitHub Desktop.
Convert avi to mkv and set audio lang tags with MKVToolNix
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# convert avi to mkv and set audio lang tags | |
# brew install mkvtoolnix | |
# loop all avi files in current folder | |
for file in *.avi; do | |
# replace original avi ext by mkv ext | |
mkv="${file%.*}.mkv" | |
# convert avi to mkv | |
mkvmerge -o "${mkv}" "${file}" | |
# edit converted mkv and set audio channel 1 to "es", 2 to "ca" and 3 to "en" | |
mkvpropedit "${mkv}" --edit track:a1 --set language=es --edit track:a2 --set language=ca --edit track:a3 --set language=en | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment