Subtitle Extractor
Extracts subtitle tracks and saves them to the destination.
Language
The ISO 639-2 language code to use.
Can use a regular expression to match multiple languages.
en|jpn|deu
Title
Optional check against the title of the subtitle.
Regex
A regular expression can be used, C# format, this will ignore the case of the title, and if the regular expression is a match, the subtitle will continue the other checks for extraction (e.g. Language)
String
If a basic string is entered, this string must be contained in the tracks title, case will be ignored.
Extract All
If all matching subtitles should be extracted.
Output File
Where to save the the output file to. For example to save it with the original file as a srt output.
{folder.Orig.FullName}\{file.Orig.FileName}.srt
If left blank an srt subtitle will be created in the same folder as the original input file.
The subtitle variables can also be used here.
File Name Format
Only shown when Extract All is checked.
An optional format for the names of the extracted subtitles, without the extension. The extension is added automatically based on the subtitle type. If the format does not include a folder, the subtitles are saved in the same folder as the original file.
If left blank the original file name and the language code will be used, e.g. Home Alone.spa.srt.
Any of the subtitle variables can be used. Variables that are empty are removed along with their separator, so a format of {file.Orig.FileNameNoExtension}.{sub.Language}.{sub.Type|lower} will produce Home Alone.spa.srt for a track with no flags.
If the video file's extension ends up in the name, e.g. by using {file.Orig.FileName} instead of {file.Orig.FileNameNoExtension}, it is removed automatically, so {file.Orig.FileName}.{sub.Language} gives Home Alone.spa.srt, not Home Alone.mkv.spa.srt.
If multiple subtitles resolve to the same name, a number is appended, e.g. Home Alone.spa.1.srt.
Examples
| Format | Result |
|---|---|
{file.Orig.FileNameNoExtension}.{sub.Language}.{sub.Type|lower} | Home Alone.spa.forced.srt |
{file.Orig.FileNameNoExtension}.{sub.Language}.{sub.Type|lower} | Home Alone.spa.sdh.srt |
{file.Orig.FileNameNoExtension}.{sub.Language}.{sub.Type|lower} | Home Alone.spa.default.srt |
{file.Orig.FileNameNoExtension}.{sub.LanguageName}({sub.Commentary}) | Home Alone.Spanish(Commentary).srt |
{file.Orig.FileNameNoExtension}.{sub.Language}.{sub.Forced|lower}.{sub.HearingImpaired|lower} | Home Alone.spa.forced.sdh.srt |
Forced Only
If only forced subtitles should be extracted.
Only Text Subtitles
If only text subtitles should be extracted, all image based subtitles will be skipped.
Extract as SRT/SUP
Forces extracted subtitles to be saved as .srt for text-based subtitles and .sup for image-based subtitles.
Outputs
- Subtitle(s) extracted
- No subtitles extracted
Variables
| Variable | Description | Type | Example |
|---|---|---|---|
| sub.FileName | The full path of the extract subtitle file | string | /path/to/subtitle.sub |
Subtitle Variables
These variables are set for each subtitle track as it is extracted and can be used in Output File and File Name Format.
| Variable | Description | Type | Example |
|---|---|---|---|
| sub.Language | The language code of the subtitle | string | spa |
| sub.LanguageName | The English name of the language | string | Spanish |
| sub.Title | The title of the subtitle track | string | Spanish (Forced) |
| sub.Codec | The codec of the subtitle track | string | subrip |
| sub.Index | The index of the subtitle track | number | 0 |
| sub.Forced | Forced if the subtitle is forced, otherwise empty | string | Forced |
| sub.HearingImpaired | SDH if the subtitle is hearing impaired (flagged, or the title contains SDH, HI or CC), otherwise empty | string | SDH |
| sub.Default | Default if the subtitle is the default track, otherwise empty | string | Default |
| sub.Commentary | Commentary if the title contains "comment", otherwise empty | string | Commentary |
| sub.Type | The first that applies of Forced, SDH, Commentary or Default, otherwise empty | string | Forced |
Formatters can be applied to these, e.g. {sub.Type|lower} gives forced.