Improve detection/filtering of predefined YouTube subtitles in particular cases
Nobody has claimed this yet.
- Dominant language
- C
- Stars
- 37k
- Forks
- 3.5k
- Avg merge
- 1d 10h
- Merged PRs (30d)
- 22
Description
Hi. This can be either a question or a feature request. Here's an example to illustrate things.
In this YT video for example, if you want to access the (apparently only) available english predefined subtitles, they are named en-en-nP7-2PuUI7o (see attached screenshot), and they are #45 on a list of more than 200 subtitles. I know other videos with similar naming issues.
Here's my current Windows command line: mpv https://www.youtube.com/watch?v=dfnCAmr569k --slang=en --ytdl-raw-options=ignore-config=,sub-lang=en,write-sub=,write-auto-sub=
I have tried to find a correct syntax for sub-lang. Unfortunately it seems that wildcards such as sub-lang=en* are not supported at this time. See this past issue: https://github.com/mpv-player/mpv/issues/8518
Hence my question: is there any way to improve such Windows command line and get the wanted english subtitles easily without cycling through more than 200 subtitles?
Otherwise I'd like to make a feature request so that MPV can be improved accordingly.
Thanks in advance!

Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the example with mpv and the shown --slang and --ytdl-raw-options settings, then review the behavior around sub-lang and the prior issue #8518. The change would need a defined way to select the intended predefined English subtitle without cycling through more than 200 entries; the issue does not name files or tests.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- c
- Domain
- audio-video-rtc, cli
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100