Skip to content

Externally loaded subtitles not automatically selected #5399

@low-batt

Description

@low-batt

IINA Version

1.3.5

Release Channel

Release

macOS Version

macOS 15.3

Steps to Reproduce

  • Download the YouTube video Predictions on the USA - With many different Subtitles
  • Download the 17 .vtt subtitle files associated with this video
  • Start IINA
  • Click on Settings… under the IINA menu
  • The settings panel appears
  • On the left side of the panel click on Subtitle
  • Select Subtitles containing media filename for the Auto Load setting
  • Play the above video
  • Under the Subtitles menu open the submenu Subtitle
  • Notice <None> is selected
  • Notice the list runs from #18 to #34

Expected Behavior

After loading external subtitle files IINA automatically selects one to be shown.

Actual Behavior

After loading the external subtitles files subtitles are not displayed.

From a very quick look into this problem I'm thinking IINA is loading the same subtitle file more than once and in reaction to that libmpv is removing the track that was previously loaded. The code that selects a subtitle is found in PlayerCore.fileStarted:

setTrack(1, forType: .sub)

That code is setting the mpv sid option:

--sid=<ID|auto|no>
Display the subtitle stream specified by <ID>. auto selects the default, no disables subtitles.

This code assumes there is a subtitle track with an ID of 1, but libmpv is usually deleting the track with that ID as a duplicate.

At least that is what it seems like is happening from a very quick look into this.

Crash Report or Process Sample

No response

Logs

iina.log

mpv.log

Sample Files

Download the YouTube video Predictions on the USA - With many different Subtitles along with the associated subtitle files.

How often can you reproduce the issue

Usually.

Required Actions

  • I tried my best to search from the existing issues (including closed issues) and didn't find duplicated issues.

Optional Actions

  • I tested with the Nightly build and confirmed the issue is not fixed.
  • I tested with the latest version of mpv and confirmed mpv doesn't have this issue.

Metadata

Metadata

Assignees

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions