ripose-jp / Memento

An mpv-based video player for studying Japanese
https://ripose-jp.github.io/Memento/
GNU General Public License v2.0
434 stars 21 forks source link

Subtitle search only works when media is paused #201

Closed BigBoyBarney closed 3 months ago

BigBoyBarney commented 4 months ago

Hi! Thanks for the app!

Issue

With the following settings image

Unless the media is paused, subtitle search isn't working. If I enable Pause on subtitle search hover, it pauses and searches correctly.

Screencast from 2024-03-06 20-54-35.webm

Additional note

It would be cool to have an additional option where (if Pause on subtitle search hover is enabled) the player automatically unpauses the media if the search popup is closed.

ripose-jp commented 3 months ago

Enabling search while the player is playing causes the output to drop frames. There's no way to take in a definition in the second or so that subtitle is on screen and dialog is filling your ears. I see no good use case.

It would be cool to have an additional option where (if Pause on subtitle search hover is enabled) the player automatically unpauses the media if the search popup is closed.

This is weird because the best way to close the popup is by unpausing the video. I think you have it backwards if you are finding a way to close the popup without unpausing the video. If you're left clicking the video to close the popup, try right clicking instead. It will blow your mind.

BigBoyBarney commented 3 months ago

Thanks for the reply! The right click method really does work super well!

Enabling search while the player is playing causes the output to drop frames. There's no way to take in a definition in the second or so that subtitle is on screen and dialogue is filling your ears. I see no good use case.

If you only need to look up a word every dozen subtitle lines, a quick glance at the top definition is usually enough, so I think there is a use case for it. On a side-note, if dictionary lookups are disabled by default when media is playing, what is this option supposed to do? image

Cheers!

ripose-jp commented 3 months ago

Frames getting dropped in the output generally starts to cause audio desync in mpv, so anything I can do to not drop frames is critical.

Ignoring that, here's why this feature is a bad idea. By default there is a 250ms delay between moving your cursor and a search actually starting. Then there might be 40ms or so of search time, and then finally results are painted to screen. Suppose it takes 400ms between you initiating a search and actually getting results. To properly take in everything, you would have to listen to dialog, read the subtitle, find the word you don't understand, wait for the results, find the definition you're looking for, and then try to comprehend the subtitle with that definition in mind. I don't believe that there's anyone alive that could meaningfully do all this in under two seconds. If forcing people to pause leads to better habits, I'm all for leaving this as is.

On a side-note, if dictionary lookups are disabled by default when media is playing, what is this option supposed to do?

Some people like the styling of ASS subtitles. Since Memento can't render them as they are, I have that option so people can choose to let mpv render subtitles. Of course these subtitles can't be hover searched like Memento's, so having Memento's come up on pause is the tradeoff that has to be made.