Skip to content

Setting subs-with-matching-audio=no does not work #4702

Description

@low-batt

System and IINA version:

  • macOS 13.6.1
  • IINA 1.3.3

Expected behavior:
When the mpv option subs-with-matching-audio is set to no in IINA's Advanced settings, playing the attached video English.mp4 will set the subtitle track to <None> and no subtitles will be displayed.

From the mpv manual:

--subs-with-matching-audio=<yes|no>
When autoselecting a subtitle track, select a full/non-forced one even if the selected audio stream matches your preferred subtitle language (default: yes). If this option is set to no, a non-forced subtitle track that matches the audio language will never be autoselected by mpv regardless of the value of --slang or --subs-fallback.

This allows someone who plays videos in various languages to specify that they only want to see subtitles by default if the subtitle language does not match the audio language.

With the three attached files downloaded to a directory, and Subtitles.en.srt.txt renamed to removed the .txt suffix required by GitHub, playing the video English.mp4 with mpv 0.37.0 as shown here:

mpv --sub-auto=all --subs-with-matching-audio=no English.mp4

Will load the subtitles but not select them. No subtitles will be displayed.

Playing the video Japanese.mp4 as shown here:

mpv --sub-auto=all --subs-with-matching-audio=no Japanese.mp4 

Will load, select and display the subtitles automatically.

Actual behavior:
When the mpv option subs-with-matching-audio is set to no in IINA's Advanced settings, playing the attached video English.mp4 IINA loads, selects and displays the English subtitles as if subs-with-matching-audio was set to yes.

Whenever possible IINA should support mpv options. I see no reason why IINA should not support subs-with-matching-audio, so I have entered this as a defect. Once this option is working, a setting should be added to IINA to avoid the need to configure this option in IINA's Advanced settings.

The ability to automatically suppress subtitle section when the language matches the audio language was requested in IINA's Telegram Group, prompting this investigate into the mpv feature.

Steps to reproduce:

  • Start IINA
  • Click on Settings… under the IINA menu
  • The settings panel appears
  • On the left side of the panel click on Advanced
  • Slide the Enable advanced settings toggle button to be on (blue)
  • In the Additional mpv options section click on +
  • A new entry appears in the table
  • Double click on name and replace it with subs-with-matching-audio
  • Double click on value and replace it with no
  • Restart IINA to activate the new settings
  • Play the attached video English.mp4
  • English subtitles are selected and displayed as if the subs-with-matching-audio setting was ignored

Changing IINA's Auto Load setting to Disabled under the Subtitle tab in IINA's settings and adding sub-auto set to all in the Additional mpv options setting under the Advanced tab so that mpv instead of IINA loads the subtitle file also exhibits the same behavior.

English.mp4
Japanese.mp4

Subtitles.en.srt.txt

  • MPV does not have this problem.

How often does this happen?
Every time with the provided files.

Metadata

Metadata

Assignees

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions