Set Language From Title
This flow element looks for any audio or subtitle tracks that have no language code set, and attempts to work out the language from the track's title. If a language is found, the track's language is set to the ISO 639-2 language code for that language.
This is useful for files that have lost their language tags but still have the language in their track titles, for example a track titled English / AC3 / 5.1 will have its language set to eng.
Tracks that already have a language set are skipped. A track with the language und (undetermined) is treated as having no language.
Type
The type of tracks that should be updated
| Type | Description |
|---|---|
| Audio | Only audio tracks are updated |
| Subtitle | Only subtitle tracks are updated |
| Audio and Subtitle | Both audio and subtitle tracks are updated |
How the Language is Found
- If the entire title is a language, it is used. This can be a language name, an ISO 639-2 code, or an ISO 639-1 code, e.g.
English,engoren. - Otherwise the title is split into words, and each word (or group of words) is checked against the known language names, in English, the language's native name, French and German. Longer matches are checked first, so
Chinese Traditionalis matched beforeChinese. - Three letter ISO 639-2 codes are also matched inside a title, e.g.
JPN / FLAC / Stereo.
Two letter ISO 639-1 codes are only matched when they are the entire title. Inside a larger title they are too ambiguous, for example HI (hearing impaired) is also the code for Hindi.
Common track title words that are also language codes, such as SSA or ALT, are ignored.
Examples
| Title | Language |
|---|---|
| English | eng |
| en | eng |
| English / AC3 / 5.1 | eng |
| French (Forced) | fre |
| SDH English | eng |
| Deutsch / DTS-HD MA / 7.1 | deu |
| Español | spa |
| 日本語 | jpn |
| Chinese Traditional | zht |
| JPN / FLAC / Stereo | jpn |
| Commentary | not set |
| AC3 / 5.1 | not set |
Outputs
- One or more tracks had their language set from their title
- No tracks were updated