This (very) simple bash script uses MKVToolNix to find Matroska (mkv) files where the first audio track has an undefined language code und
and sets the language to a hardcoded value.
mkv2lang
can be used as a postprocessing script for Sickrage - specify the path to the script within Sickrage postprocessing settings and Sickrage will run the script automatically on postprocessed files.
Note that the script will begin making changes immediately without confirmation. Take care.
- Install MKVToolNix from the MKVToolNix respositories to ensure a recent version is installed.
- Edit
mkv2lang
to set your preferred default language - runmkvmerge --list-languages
to see the available language codes. - Optional: copy
mkv2lang
to/usr/local/bin
or somewhere similar for system-wide usage. chmod +x mkv2lang
- Go!
- Run recursively in the current folder:
mkv2lang
- Run recursively in some folder:
mkv2lang /some/folder
- Run on a single file:
mkv2lang somefile.mkv