
mkvpropedit, MKVToolNix GUI's chapter & header editors: often the programs have to relocate the Master elements in which the modifications were done. The programs will now create the EBML Void element inside the EBML Head element, making them a level 1 element instead of a level 0 element. This isn't widely supported by programs including MKVToolNix itself, causing them to declare such files as invalid. In that case the programs used to shrink the EBML Head & write a small EBML Void element between the updated EBML Head & the following element, usually a Matroska Segment element. mkvpropedit, MKVToolNix GUI's chapter & header editors: when the Matroska version numbers stored in the EBML Head element are updated, the updated EBML Head element might be smaller than the existing one. The programs will no longer abort with error messages such as assertion "false" failed. The applications will no longer try to write those elements, even if they're found in the file to be modified. mkvpropedit, MKVToolNix GUI's chapter & header editors: updated the list of deprecated Matroska elements. Only affects the VobSub & USF subtitle extraction. mkvextract: IETF BCP 47/RFC 5646 language tags: mkvextract will now use & prefer IETF BCP 47 track language elements if they're present. mkvmerge: fixed reversed attachment selection: -attachments !4 would not copy any attachment instead of all attachments but the one with ID 4. mkvmerge: Matroska reader: fixed reading files with EBML Void elements before the Matroska Segment element. The heuristic has simply been removed, fixing #3392. Unfortunately this affected valid subtitle files with intentional huge gaps in timestamps, e.g. mkvmerge: HDMV PGS subtitles: reverted the change that implemented a heuristic for detecting bogus timestamps & attempting to fix them. Instead the parser will remember the last known-good position & restart from there after more data is available. mkvmerge: AV1 parser: fixed the parser completely aborting when parsing the OBU size field fails due to there not being enough data to parse. MKVToolNix GUI: info tool: added information about the file (directory, size, modification timestamp) at the top of each tab. MKVToolNix GUI: multiplexer: when dragging & dropping directories to the "attachments" tab, the files contained in those directories will be attached. Lines prefixed with#GUI# are suitable for machine parsing, won't be translated and are guaranteed not to change in format. If GUI mode is active, a specially formatted line #GUI#splitting_before_timestamp is output as well. mkvmerge: when splitting is active the program will output the timestamps actually used for making the decision when to split. mkvmerge: AV1 parser: the variable-width OBU size field will be re-written with minimal length if it's encoded longer than necessary. You can find more information about it and its underlying technology, the Extensible Binary Meta Language (EBML), at What's New Matroska is a new multimedia file format aiming to become the new container format for the future. Save this script nameyouwant.With these tools, one can get information about (mkvinfo) Matroska files, extract tracks/data from (mkvextract) Matroska files and create (mkvmerge) Matroska files from other media files. `mv "$" "$subtitlename.$tracknumber.srt" > /dev/null 2>&1` # Not our desired language: add a number to the filename and keep anyway, just in case
# Regex to remove credits at the end of subtitles (read my reason why!) # Check if subtitle passes our language filter (10 or more matches) Langtest=`egrep -ic ' you | to | the ' "$subtitlename".srt.tmp` # Do a super-primitive language guess: ENGLISH `mkvextract tracks "$filename" $tracknumber:"$" > /dev/null 2>&1`
Tracknumber=`echo $subline | egrep -o "" | head -1` Mkvmerge -i "$filename" | grep 'subtitles' | while read subline # Find out which tracks contain the subtitles # Get all the MKV files in this dir and its subdirsįind "$DIR" -type f -name '*.mkv' | while read filename # If no directory is given, work in local dir # Extract subtitles from each MKV file in the given directory
sudo apt-get install mkvtoolnixĪnother tip now because mkv files may contain many subtitles, so the tip is this script that you can search for the language you want, so for example if you want English it will download just English.