Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support subtitle visibility #4235

Closed
low-batt opened this issue Feb 22, 2023 · 8 comments · Fixed by #4237
Closed

Support subtitle visibility #4235

low-batt opened this issue Feb 22, 2023 · 8 comments · Fixed by #4237

Comments

@low-batt
Copy link
Contributor

What you want IINA to do:
This is a request for IINA to directly support the mpv options sub-visibility and secondary-sub-visibility. These options disable/enable the rendering of subtitles, similar to muting audio.

Support must include menu items to toggle the state. The menu items must adhere to Apple's Human Interface Guidelines on Menus, specifically the section on Toggled items.

IINA already has a Subtitles menu so new menu items must be under that menu. The current convention in the menu is to use the prefix Second for items that pertain to secondary subtitles. I suggest using Visible and Second Visible for the names of the items with checkmarks to indicate the state.

The menu items must include associated keyboard shortcuts. The key bindings used by mpv are:

Key Command
v cycle sub-visibility
Alt+v cycle secondary-sub-visibility

IINA does not currently contain bindings for these keys so IINA should use the same bindings as mpv.

When subtitle visibility changes an OSD message must be shown so the user knows if subtitle rendering is enabled or disabled.

This request originates out of discussions concerning issue #4234.

What IINA does currently:
Currently this mpv feature is only available through custom key bindings, which does not provide feedback to the user as to the current state of subtitle visibility.

Why you think this should be added:
Subtitles is one area where IINA has a feature not found in mpv (without plugins), the ability to download from web sites that provide subtitles. IINA should insure other subtitle functions are supported. The mpv subtitle visibility feature is a convenience feature similar to being able to quickly mute audio.

Examples of other projects that have something similar:
This is a mpv feature.

@shelbyKiraM
Copy link

AHHH this feature had been driving me crazy... I accidentally hid the subs but FINALLY found the fix here. Even when I used J to go between the subs they weren't reappearing. I'm sure there's some reason for this but why not just go to None with J?

@low-batt
Copy link
Contributor Author

Thanks for commenting. Sorry you were tripped up by this mpv feature. I was unaware of this particular feature and I too would have been very confused if I had accidentally enabled it.

Your experience provides another justification as to why this feature is needed. If you are using the mpv key bindings and accidentally type a "v" subtitles disappear and there is currently no indication in IINA that it is due to this feature.

And if the IINA setting Resume last playback position is enabled restarting IINA will not make subtitles visible again as this is one of the settings that is remembered and restored on a per file basis. This Terminal session shows me checking the attributes that were saved for a particular video:

low-batt@gag ~$ md5 -qs '/Users/low-batt/Movies/resume-failure.mp4' | xargs -I % cat ~/Library/Application\ Support/com.colliderli.iina/watch_later/%
start=46.450000
pause=yes
sub-visibility=no
low-batt@gag ~$

That the setting may be sticky across a restart of IINA makes accidentally enabling this feature a confusion situation.

As to why this feature does not change the subtitle selection to None

This is a mpv feature so I have to guess what the designers of this feature were thinking. Imagine if muting audio changed the speaker selection to None. If you have more than one set of speakers you can't the just quickly unmute, you have to select the speakers you want to use again.

So think of this feature like muting for subtitles. You want to quickly temporarily stop displaying subtitles and then be able to quickly enable displaying them again.

@low-batt low-batt self-assigned this Feb 23, 2023
@homocomputeris
Copy link

Currently this mpv feature is only available through custom key bindings

It's also in the mpv preset:
mpv_v

@low-batt
Copy link
Contributor Author

Thanks for having my back and checking my work. Yes, my first post was incorrect. In my second post I do indicate if you are using the mpv key bindings you can run into this. This adds to the importance of providing a GUI for this mpv feature. More news on that shortly…

low-batt added a commit that referenced this issue Feb 24, 2023
This commit will:
- Add a Hide Subtitles/Show Subtitles item to the Subtitles menu
- Add a Hide Second Subtitles/Show Second Subtitles item to the
  Subtitles menu
- Add a key binding mapping v to cycle sub-visibility
- Add a key binding mapping Alt-v to cycle secondary-sub-visibility
- Add a new OSD message Subtitle Visibility: On/Off
- Add a new OSD message Second Subtitle Visibility: On/Off
- Add secondary-sub-visibility to watch-later-options
- Add logging of watch-later-options

These changes add a graphical user interface for the mpv features that
control subtitle visibility.
@low-batt low-batt linked a pull request Feb 24, 2023 that will close this issue
2 tasks
@low-batt
Copy link
Contributor Author

The commit in the pull request will:

  • Add a Hide Subtitles/Show Subtitles item to the Subtitles menu
  • Add a Hide Second Subtitles/Show Second Subtitles item to the Subtitles menu
  • Add a key binding mapping v to cycle sub-visibility
  • Add a key binding mapping ⌥v to cycle secondary-sub-visibility
  • Add a new OSD message Subtitle Visibility: On/Off
  • Add a new OSD message Second Subtitle Visibility: On/Off
  • Add secondary-sub-visibility to watch-later-options
  • Add logging of watch-later-options

With these changes the Subtitles menu looks like:
issue-4235-menu

The new OSD message looks like:
issue-4235-OSD

As always critical review comments welcome.

low-batt added a commit that referenced this issue Feb 25, 2023
This commit will:
- Add a Hide Subtitles/Show Subtitles item to the Subtitles menu
- Add a Hide Second Subtitles/Show Second Subtitles item to the
  Subtitles menu
- Add a key binding mapping v to cycle sub-visibility
- Add a key binding mapping Alt-v to cycle secondary-sub-visibility
- Add a new OSD messages Subtitles Hidden/Visible
- Add a new OSD messages Second Subtitles Hidden/Visible
- Add secondary-sub-visibility to watch-later-options
- Add logging of watch-later-options

These changes add a graphical user interface for the mpv features that
control subtitle visibility.
@low-batt
Copy link
Contributor Author

Based on review feedback the new OSD messages now look like:
issue-4235-OSD-Hidden
issue-4235-ODS-visible

svobs pushed a commit to svobs/iina-advance that referenced this issue Mar 13, 2023
This commit will:
- Add a Hide Subtitles/Show Subtitles item to the Subtitles menu
- Add a Hide Second Subtitles/Show Second Subtitles item to the
  Subtitles menu
- Add a key binding mapping v to cycle sub-visibility
- Add a key binding mapping Alt-v to cycle secondary-sub-visibility
- Add a new OSD message Subtitle Visibility: On/Off
- Add a new OSD message Second Subtitle Visibility: On/Off
- Add secondary-sub-visibility to watch-later-options
- Add logging of watch-later-options

These changes add a graphical user interface for the mpv features that
control subtitle visibility.
svobs pushed a commit to svobs/iina-advance that referenced this issue Mar 13, 2023
This commit will:
- Add a Hide Subtitles/Show Subtitles item to the Subtitles menu
- Add a Hide Second Subtitles/Show Second Subtitles item to the
  Subtitles menu
- Add a key binding mapping v to cycle sub-visibility
- Add a key binding mapping Alt-v to cycle secondary-sub-visibility
- Add a new OSD messages Subtitles Hidden/Visible
- Add a new OSD messages Second Subtitles Hidden/Visible
- Add secondary-sub-visibility to watch-later-options
- Add logging of watch-later-options

These changes add a graphical user interface for the mpv features that
control subtitle visibility.
low-batt added a commit that referenced this issue May 17, 2023
This commit will:
- Add a Hide Subtitles/Show Subtitles item to the Subtitles menu
- Add a Hide Second Subtitles/Show Second Subtitles item to the
  Subtitles menu
- Add a key binding mapping v to cycle sub-visibility
- Add a key binding mapping Alt-v to cycle secondary-sub-visibility
- Add a new OSD message Subtitle Visibility: On/Off
- Add a new OSD message Second Subtitle Visibility: On/Off
- Add secondary-sub-visibility to watch-later-options
- Add logging of watch-later-options

These changes add a graphical user interface for the mpv features that
control subtitle visibility.
low-batt added a commit that referenced this issue May 17, 2023
This commit will:
- Add a Hide Subtitles/Show Subtitles item to the Subtitles menu
- Add a Hide Second Subtitles/Show Second Subtitles item to the
  Subtitles menu
- Add a key binding mapping v to cycle sub-visibility
- Add a key binding mapping Alt-v to cycle secondary-sub-visibility
- Add a new OSD messages Subtitles Hidden/Visible
- Add a new OSD messages Second Subtitles Hidden/Visible
- Add secondary-sub-visibility to watch-later-options
- Add logging of watch-later-options

These changes add a graphical user interface for the mpv features that
control subtitle visibility.
low-batt added a commit that referenced this issue May 17, 2023
This commit will:
- Add a Hide Subtitles/Show Subtitles item to the Subtitles menu
- Add a Hide Second Subtitles/Show Second Subtitles item to the
  Subtitles menu
- Add buttons for controlling visibility of subtitles to the SUBTITLES
  tab of the Quick Settings Panel
- Add a key binding mapping v to cycle sub-visibility
- Add a key binding mapping Alt-v to cycle secondary-sub-visibility
- Add a new OSD messages Subtitles Hidden and Subtitles Visible
- Add a new OSD messages Second Subtitles Hidden and Second Subtitles
  Visible
- Add secondary-sub-visibility to watch-later-options
- Add logging of watch-later-options

These changes add a graphical user interface for the mpv features that
control subtitle visibility.
@low-batt
Copy link
Contributor Author

The latest proposed changes add switches to the SUBTITLES tab of the quick settings panel as seen here:
issue-4235-panel

low-batt added a commit that referenced this issue May 27, 2024
This commit will:
- Add a Hide Subtitles/Show Subtitles item to the Subtitles menu
- Add a Hide Second Subtitles/Show Second Subtitles item to the
  Subtitles menu
- Add a key binding mapping v to cycle sub-visibility
- Add a key binding mapping Alt-v to cycle secondary-sub-visibility
- Add a new OSD message Subtitle Visibility: On/Off
- Add a new OSD message Second Subtitle Visibility: On/Off
- Add secondary-sub-visibility to watch-later-options
- Add logging of watch-later-options

These changes add a graphical user interface for the mpv features that
control subtitle visibility.
low-batt added a commit that referenced this issue May 27, 2024
This commit will:
- Add a Hide Subtitles/Show Subtitles item to the Subtitles menu
- Add a Hide Second Subtitles/Show Second Subtitles item to the
  Subtitles menu
- Add a key binding mapping v to cycle sub-visibility
- Add a key binding mapping Alt-v to cycle secondary-sub-visibility
- Add a new OSD messages Subtitles Hidden/Visible
- Add a new OSD messages Second Subtitles Hidden/Visible
- Add secondary-sub-visibility to watch-later-options
- Add logging of watch-later-options

These changes add a graphical user interface for the mpv features that
control subtitle visibility.
low-batt added a commit that referenced this issue May 27, 2024
This commit will:
- Add a Hide Subtitles/Show Subtitles item to the Subtitles menu
- Add a Hide Second Subtitles/Show Second Subtitles item to the
  Subtitles menu
- Add buttons for controlling visibility of subtitles to the SUBTITLES
  tab of the Quick Settings Panel
- Add a key binding mapping v to cycle sub-visibility
- Add a key binding mapping Alt-v to cycle secondary-sub-visibility
- Add a new OSD messages Subtitles Hidden and Subtitles Visible
- Add a new OSD messages Second Subtitles Hidden and Second Subtitles
  Visible
- Add secondary-sub-visibility to watch-later-options
- Add logging of watch-later-options

These changes add a graphical user interface for the mpv features that
control subtitle visibility.
@lhc70000
Copy link
Member

lhc70000 commented Jun 5, 2024

image
I think we can just put a switch here to indicate whether the subtitle is shown.

lhc70000 pushed a commit that referenced this issue Jun 5, 2024
This commit will:
- Add a Hide Subtitles/Show Subtitles item to the Subtitles menu
- Add a Hide Second Subtitles/Show Second Subtitles item to the
  Subtitles menu
- Add a key binding mapping v to cycle sub-visibility
- Add a key binding mapping Alt-v to cycle secondary-sub-visibility
- Add a new OSD message Subtitle Visibility: On/Off
- Add a new OSD message Second Subtitle Visibility: On/Off
- Add secondary-sub-visibility to watch-later-options
- Add logging of watch-later-options

These changes add a graphical user interface for the mpv features that
control subtitle visibility.
lhc70000 pushed a commit that referenced this issue Jun 5, 2024
This commit will:
- Add a Hide Subtitles/Show Subtitles item to the Subtitles menu
- Add a Hide Second Subtitles/Show Second Subtitles item to the
  Subtitles menu
- Add a key binding mapping v to cycle sub-visibility
- Add a key binding mapping Alt-v to cycle secondary-sub-visibility
- Add a new OSD messages Subtitles Hidden/Visible
- Add a new OSD messages Second Subtitles Hidden/Visible
- Add secondary-sub-visibility to watch-later-options
- Add logging of watch-later-options

These changes add a graphical user interface for the mpv features that
control subtitle visibility.
lhc70000 pushed a commit that referenced this issue Jun 5, 2024
This commit will:
- Add a Hide Subtitles/Show Subtitles item to the Subtitles menu
- Add a Hide Second Subtitles/Show Second Subtitles item to the
  Subtitles menu
- Add buttons for controlling visibility of subtitles to the SUBTITLES
  tab of the Quick Settings Panel
- Add a key binding mapping v to cycle sub-visibility
- Add a key binding mapping Alt-v to cycle secondary-sub-visibility
- Add a new OSD messages Subtitles Hidden and Subtitles Visible
- Add a new OSD messages Second Subtitles Hidden and Second Subtitles
  Visible
- Add secondary-sub-visibility to watch-later-options
- Add logging of watch-later-options

These changes add a graphical user interface for the mpv features that
control subtitle visibility.
lhc70000 added a commit that referenced this issue Jun 5, 2024
Close support subtitle visibility, #4235
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants