CogentRedTester/mpv-sub-select

please help me configure it

AdventurerRussia opened this issue · 4 comments

did I put the setup file correctly? I didn't know exactly where
"C:\Program Files\MPV\mpv\script-opts\sub-select.json"

I watch anime, so here's how to make it so that the Japanese audio track selects the titles of the subtitles that I entered?
and can I make it so that an audio track with a specific name is selected, regardless of the title of the subtitles?
for example, I have an audio track from wakanim and crunchyroll in the video, how do I get the script to select crunchyroll? if it is 2 in the list?
I copied the settings file to different folders but the script doesn't work,

[

{
    "alang": "*",
    "slang": ["*"],
    "blacklist": [ "Надписи" ]
},
{
    "alang": "*",
    "slang": "*",
    "whitelist": ["Полные"]
}

]

Sorry, it seems I somehow completely missed this question, I didn't intend to ignore you. It's probably too late but I'll try to answer your question anyway.

On windows the ~~/script-opts/ directory is generally in C:/Users/yourname/AppData/Roaming/mpv.

The only ways to choose between subtitle tracks is using the language code or by using the titles of the tracks. You can see both of these things by middle muse clicking on the subtitle button on the OSC:

mpv-shot0107

The code inside the square brackets is the language code eng everything to the right of that is the title Signs (SRT). slang chooses which language code you prefer and the whitelist/blacklist options are for filtering the titles. The example sub-select.json file has a good preset that is designed to select the Japanese audio and English subtitles of many anime files.

I don't know how Crunchyroll and Wakanim title or code their tracks, but if they have a standard word in their titles you can use the whitelist/blacklist options to filter for it.

@CogentRedTester please provide a context menu

@CogentRedTester please provide a context menu

A context menu to do what?

Hi there! I'm having some trouble getting this script to work the way it's supposed to. I've followed the instructions and placed the ".lua" file in the scripts folder and the json file in "script-opts", but it's not working as expected. The script is supposed to blacklist the number 1 "English signs" subtitle, if I am not mistaken, but it's still being recognized and automatically selected over the #2 "English Subtitles". Then when I change it to the #2 subtitles and move on to the next video of the playlist (I use a script placed in the same folder which automatically plays all videos in a folder as a playlist in mpv) it reverts back to the #1 "Signs" again, for some reason (as it did pre-script) on the next episode. Meaning I have to manually change it to the #2 yet again.

I've included all the necessary information in the script-opt config, but the blacklisting isn't happening. It's almost like the script isn't even there. Is there a special command that I need to run to enable it? I've also removed all the special priorities for English subtitles (--sid) from the regular conf file like the instructions said, but the script is still not running. Right now my only solution for this is to change the --sid if necessary for any shows I watch, and It can be really frustrating to have to change the configuration for every show, which is why I wanted to use this script. Do you have any suggestions for how I can get it to work? I would really appreciate any help you can offer.