mkv-bash-tools
mkv-bash-tools copied to clipboard
mkv-extract-subtitles issue with last version of mkvmerge V36.
I've been using this specific script for years to automate the sub extraction from mkv files. I used my own to do the encoding .. etc .. but I found this script very helpful. I recently built a new Linux machine using Fedora 30 and for my surprise all my scripts were working except for this. My family needs the subs so it was rather annoying. It seems the issue is related with the command: mkvmerge --identify-verbose which doesn't exist anymore at least in V36. Checking some of the notes from mkvmerge it seems this has been done on purpose to use a JSON like output. This output has been replaced by a -J and this messes up with the script. I had the option to downgrade the version of mkvmerge but one of the reasons I was installing a new server was for compatibility issues. Anyway, more than an issue this is just to let everybody using this script know that changing the following line: tracks=$(LANG=en_US.utf8 LANGUAGE=en_US.utf8 mkvmerge --identify-verbose "$file_name" | tail --lines=+2) by: tracks=$(LANG=en_US.utf8 LANGUAGE=en_US.utf8 mkvmerge -J "$file_name" | jq -r '.tracks | map("Track ID " + (.id | tostring) + ": " + .type + " " + .codec + " language:" + .properties.language + " codec_id:" + .properties.codec_id + " track_name:" + .properties.track_name ) | join("\n")' | tail --lines=+2) ** you need to install jq - yum install jq. The script maintains all his functionality. I haven't done extensive testing but it seems to be working fine. Thanks.
A 2-year-late THANK YOU!! 👍
Thanks for this.