srtextract - Extract subtitles from MKV files
srtextract extracts subtitles from MKV files under a directory and writes them in order to be compatible with DLNA servers (such as Samsung PC Share manager)
If you just want to see what the script would do without actually extracting
- things pass in --dry-run
- --dry-run combined with logging verbosity will output what actions the script
- subextract ~/Videos rum -l eng --dry-run -vvv
Found file /home/user/Videos/video1.mkv Selected subtitle track 1 name rum for video1.mkv Writing /home/user/Videos/video1.srt
Found file /home/user/Videos/video2.mkv Subtitle already exists for /home/user/Videos/video2.mkv
Finished analyzing /home/user/Videos
- Overwriting already existing subtitles
- Passing in the --overwrite flag will overwrite existing subtitles if a
suitable subtitles is found in the MKV file.
- Default mode (diff-only)
- Will only log newly found subtitles
- Verbose mode (-v)
- List MKV files that are found, selected subtitles and other actions performed by the script
You can define which language you want extracted from files with the --language
(or -l) parameter.
- subextract /path/to/Videos rum
Will extract only Romanian language subtitles for every MKV file under the path
You can also allow fallback languages:subextract /path/to/Videos/ rum -l eng
This will attempt to extract Romanian subtitles, but if no Romanian subtitles
are found in a file will attempt to extract and English subtitle
If no suitable subtitles are found, nothing is extracted.
Default language is English (if no other languages are specified).
Compatible languages can be found with mkvmerge --list-languages