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

Add a first-subtitle-visibility option #9175

Closed
fxmarty opened this issue Sep 1, 2021 · 2 comments
Closed

Add a first-subtitle-visibility option #9175

fxmarty opened this issue Sep 1, 2021 · 2 comments

Comments

@fxmarty
Copy link

fxmarty commented Sep 1, 2021

Hello, this feature request is related to #8243 and #8462 .

Expected behavior of the wanted feature

Currently it is possible to toggle the subtitle visibility of both subtitles with subtitle-visibility and of the secondary subtitle assuming subtitle-visibility is set to yes.

For my use case ( https://github.com/fxmarty/rikai-mpv ), I want to make invisible the first subtitle, but to still have the ability to toggle the secondary subtitle visibility. This is currently not possible due to the note in the documentation: https://mpv.io/manual/master/#options-secondary-sub-visibility

Do you think it would be possible to add an option for toggling off/on only the first subtitle while leaving the secondary one untouched?

Many thanks for your hard work!

@avih
Copy link
Member

avih commented Sep 1, 2021

Do you think it would be possible to add an option for toggling off/on only the first subtitle

Technically it would be possible, but it's unlikely to happen. The whole secondary-sid subject is largely a hack, which is not well integrated into mpv, and its options are not really consistent with other options in terms of naming and handling.

There were some discussions about making secondary-sid a sort of equal citizen, but it was concluded that it would take a lot of hard work and will likely be sensitive to bugs, so for now there are no such plans.

I want to make invisible the first subtitle, but to still have the ability to toggle the secondary subtitle visibility

Why not just use one subtitle in such case? And when you want two, enable secondary-sid ?

@avih avih closed this as completed Sep 1, 2021
@fxmarty
Copy link
Author

fxmarty commented Sep 1, 2021

@avih Thanks a lot for your answer, this makes sense. To answer your question, the use case is to have a personalized first subtitle that is displayed not by mpv but by a script in Python and Qt, this first subtitle is typically in Japanese and the script adds a pop-up dictionary to it.

The secondary subtitle is typically in English, and the user can toggle it freely, in case the first subtitle + pop-up dictionary was not enough to understand the line.

In mpv 0.29.1 for some reason this trick https://github.com/fxmarty/rikai-mpv/blob/main/front.lua#L29 (turn off secondary sid, set transparent border / color for subs, and then turn on again the secondary sid) allowed to make the first subtitle invisible, and still have the second one visible. But I updated to 0.30.0 and the behavior changed to both first/secondary subtitles hidden (which is what you would expect honestly, I think I made use of a bug in 0.29.1 to achieve the behavior I wanted).

Anyway it is not a big deal, I will find a workaround somehow. Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants