mpv-player / mpv

🎥 Command line video player
https://mpv.io
Other
28.04k stars 2.88k forks source link

Allow to select unknown language with --slang #9370

Open tastytea opened 2 years ago

tastytea commented 2 years ago

Expected behavior of the wanted feature

I have an MKV with a subtitle track that has no language tag. The OSD displays it as “1/1 [unknown] Subtitles”.

It would be nice if --slang would accept a special keyword, maybe unknown, to select the first subtitle track with unknown language.

Note that --sid will not work in the config file because it overwrites --slang.

Alternative behavior of the wanted feature

A new option for selecting a fallback sid would also work for me, but the special keyword in --slang would be more flexible.

Log file

output.txt

The subtitle is detected as this:

[…]
[   0.062][i][cplayer]      Subs  --sid=1 'Subtitles' (ass)
[…]

Workaround

In case someone else has the same problem: If you put --use-filedir-conf in the config file, mpv will try to load a mpv.conf from the same directory as the file played. So you could put --sid=1 in there. See the section “File-specific Configuration Files” in the man-page.

N-R-K commented 1 year ago

In case someone else has the same problem: If you put --use-filedir-conf in the config file, mpv will try to load a mpv.conf from the same directory as the file played. So you could put --sid=1 in there. See the section “File-specific Configuration Files” in the man-page.

If it's a local file (and not being streamed from network) doesn't it make more sense to just edit the metadata and put the correct language tag in?