Skip to main content

Subtitle Extractor

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​

FormatResult
{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​

  1. Subtitle(s) extracted
  2. No subtitles extracted

Variables​

VariableDescriptionTypeExample
sub.FileNameThe full path of the extract subtitle filestring/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.

VariableDescriptionTypeExample
sub.LanguageThe language code of the subtitlestringspa
sub.LanguageNameThe English name of the languagestringSpanish
sub.TitleThe title of the subtitle trackstringSpanish (Forced)
sub.CodecThe codec of the subtitle trackstringsubrip
sub.IndexThe index of the subtitle tracknumber0
sub.ForcedForced if the subtitle is forced, otherwise emptystringForced
sub.HearingImpairedSDH if the subtitle is hearing impaired (flagged, or the title contains SDH, HI or CC), otherwise emptystringSDH
sub.DefaultDefault if the subtitle is the default track, otherwise emptystringDefault
sub.CommentaryCommentary if the title contains "comment", otherwise emptystringCommentary
sub.TypeThe first that applies of Forced, SDH, Commentary or Default, otherwise emptystringForced

Formatters can be applied to these, e.g. {sub.Type|lower} gives forced.