How to remove tag spam and set language in several MKV files at once

Instructions for Linux

if you use the ‘bourne’ or ‘bourne again shell’ (bash)

after you have installed the mkvtoolnix package, you open the editor of your choice and
copy this into it:

#!/bin/sh
for f in *.mkv
do
 echo -n $f  ' '  
 mkvpropedit --delete title --edit track:v1 --set language=jpn --set flag-forced=0 --delete name --edit track:a1 --set language=ger --set flag-forced=0 --delete name --edit track:a2 --set language=jpn --set flag-forced=0 --delete name --edit track:s1 --set language=ger --set flag-forced=1 --delete name --edit track:s2 --set language=ger --set flag-forced=0 --set name=full "${f}"
done

save it as setlangs.sh

then set the execute flag on the script:
chmod +x setlangs.sh

The file is now ready for use.
Copy it into the folder with your MKV files, modify it according to the above guide, then execute it.

Thanks to @ChuckPa for these instructions!

1 Like