mpv-player / mpv-player/mpv

Allow to select unknown language with --slang

Open
#9,370 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

meta:feature-request
Dominant language
C
Stars
37k
Forks
3.5k
Avg merge
1d 10h
Merged PRs (30d)
22

Description

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.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by tracing how the --slang option selects subtitle tracks and how --sid interacts with configuration files; the issue mentions the man-page section “File-specific Configuration Files” for related behavior. Done means --slang accepts a special value such as unknown and selects the first subtitle track without a language tag, while preserving existing --sid behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
c
Domain
cli
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.