Skip to content
This repository has been archived by the owner on Nov 25, 2022. It is now read-only.

mkv-extract-subtitles issue with last version of mkvmerge V36. #3

Open
cesalo opened this issue Aug 21, 2019 · 2 comments
Open

mkv-extract-subtitles issue with last version of mkvmerge V36. #3

cesalo opened this issue Aug 21, 2019 · 2 comments

Comments

@cesalo
Copy link

cesalo commented Aug 21, 2019

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.

@ghost
Copy link

ghost commented Jun 13, 2021

A 2-year-late THANK YOU!! 👍

@moisespr123
Copy link

Thanks for this.

moisespr123 added a commit to moisespr123/mkv-bash-tools that referenced this issue Aug 8, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants