`mv "$" "$subtitlename.$tracknumber. # 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 mkvbatchmultiplex- Batch multiplex video files using MKVToolnix generated command line MKVmergeBatcher- Create/execute custom created models to batch you Mkvmerge work MKVToolNix-Sequential-Batch-Mapper- I created this as way to process a bunch of mkv files in a series using the original MKVToolNix-batch program as a reference. # 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.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |