Skip to content

Example Configs

CogentRedTester edited this page Feb 20, 2023 · 2 revisions

In the following examples you can replace eng? with your native language of choice.

According to the mpv manual:

Different container formats employ different language codes. DVDs use ISO 639-1 two-letter language codes, Matroska, MPEG-TS and NUT use ISO 639-2 three-letter language codes, while OGM uses a free-form identifier.

Wikipedia has a decent list of language codes.

Use native subtitles with foreign language audio.

[
    {
        "alang": "eng?",
        "slang": "no"
    },
    {
        "alang": "*",
        "slang": [ "eng?", "und" ]
    }
]

Prefer forced subtitles.

[
    {
        "alang": ["eng?", "und"],
        "slang": ["eng?", "und"],
        "condition": "sub.forced"
    }
]

Prefer anime subs over dubs.

[
    {
        "alang": ["jpn", "ja"],
        "slang": [ "eng?", "und" ],
        "blacklist": [ "sign" ]
    },
    {
        "alang": "eng?",
        "slang": [ "eng?", "und" ],
        "whitelist": [ "sign", "song" ]
    }
]

Prefer ass subs.

The important part is the condition and inherit values. You need to repeat these for any other preferences.

[
    {
        "alang": "*",
        "slang": "eng?",
        "condition": "sub.codec == 'ass'"
    },
    {
        "inherit": "^",
        "condition": "sub.codec ~= 'ass'"
    }
]

Prefer external subs.

The important part is the condition and inherit values. You need to repeat these for any other preferences.

[
    {
        "alang": "*",
        "slang": "eng?",
        "condition": "sub.external"
    },
    {
        "inherit": "^",
        "condition": "not sub.external"
    }
]

Prefer both external and ass but prioritise external.

The important part is the condition and inherit values. You need to repeat these for any other preferences.

[
    {
        "alang": "*",
        "slang": "eng?",
        "condition": "sub.external and sub.codec == 'ass'" 
    },
    {
        "inherit": "^",
        "condition": "sub.external and sub.codec ~= 'ass'" 
    },
    {
        "inherit": "^",
        "condition": "sub.codec == 'ass'" 
    },
    {
         "inherit": "^",
         "condition": "sub.codec ~= 'ass'"
    }
]