mpv-player / mpv-player/mpv

Sub-add select flag attribute for secondary track

Open
#17,891 1 comment 2 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

Currently, the primary subtitle supports one-step addition and selection via "sub-add subs select". However, for secondary subtitles, I need add the track first, then switch using secondary-sid. Since the track ID is not directly accessible, I have to iterate all tracks to locate it. This workaround is overly complicated even with Lua scripts.

Alternative behavior of the wanted feature

To simplify this, we could implement a more convenient solution:

  1. Support a one-step command like sub-add subs select secondary;
  2. Or allow direct switching using the unique subtitle title or other unique attributes;
  3. Alternatively, we could directly retrieve the total number of subtitle tracks, since the ID of an appended subtitle is always the last one
Log File

No response

Sample Files

No response

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 the existing sub-add subs select command and the secondary-sid property handling in mpv. Compare how primary and secondary subtitle tracks are identified, then review related command or property tests; done means an agreed interface lets scripts add and select a secondary subtitle without iterating all tracks.

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
Quiet
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.