CogentRedTester / mpv-sub-select

An advanced conditional subtitle track selector for mpv player
MIT License
89 stars 8 forks source link

Need Help With Configuration #9

Closed george-emerald closed 2 years ago

george-emerald commented 2 years ago

For some reason I am unable to properly install the script. I put the sub-select.lua file in the scripts folder and the sub-select.json file in the script-opts folder. I have not used the sub-select.conf file as I don't know where to put it. My .json file is as follows

[
    {
        "alang": "jpn"
        "slang": ["jpn", "enm", "eng"]
        "blacklist": ["sign", "signs", "translation only"]
        "whitelist": ["commie", "honorifics"]
    },
    {
        "alang": "eng"
        "slang": ["forced", "no"]
    },
        {
                "alang": "el"
                "slang": "no"
        },
    {
        "alang": "*"
        "slang": "eng"
    }
]

So, if an audio track has the language English it should try a forced track and if there isn't one, subtitles should be turned off. Yet, when I tested this with a video with English audio and an English non-forced subtitle track, the english subtitles were selected, as if mpv did the selection and not the script. Maybe I have to copy sub-select.conf somewhere for it to work? Please help.

george-emerald commented 2 years ago

Edit: I fixed the formatting by adding commas, but ["forced", "no"] selects the english sub track even though it's not forced on the example file, so I switched to "no".

CogentRedTester commented 2 years ago

Forget my previous (deleted) comment I misread your config. Please upload a log file generated with the --log-file option. Make sure you open this file that you've been testing with.

george-emerald commented 2 years ago

Here you go: https://pastebin.com/raw/GK201mcG

george-emerald commented 2 years ago

That was using this .json:

[
    {
        "alang": "jpn",
        "slang": ["jpn", "enm", "eng"],
        "blacklist": ["signs", "translation only"],
        "whitelist": ["commie", "honorifics"]
    },
    {
        "alang": "gre",
        "slang": "no"
    },
    {
        "alang": "eng",
        "slang": ["forced", "no"]
    },
    {
        "alang": "*",
        "slang": "eng"
    }
]

Expected behaviour would be it selecting no subtitles track, since there are no forced ones in the file. Yet it chooses the eng track which isn't forced as though it deferred to mpv.

CogentRedTester commented 2 years ago

I believe that the latest commit should have fixed this. Please let me know.

george-emerald commented 2 years ago

I redownloaded and it's fixed. Thanks!

george-emerald commented 2 years ago

@CogentRedTester please help me with my new issue! I'm still having issues.

CogentRedTester commented 2 years ago

I'll look at it shortly.