-
Notifications
You must be signed in to change notification settings - Fork 69
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
frame-step still flashes icon under certain conditions #44
Comments
This was my intention behind #40, to move pause icon logic to a script binding much like |
The icon is flashing because mpv is sending play/pause events on frame seek. But only sometimes, which is just weird... It might be fixable by maybe waiting a couple milliseconds and flash the indicator only if the state didn't change back. Would need to research how fast are these events triggering. But no promises, dunno when I'll have time to look into it. |
All right, I've figured out why mpv sends those short play->pause events. When you hold the frame step key, mpv resumes playback for the duration it is pressed, which is a pretty nice feature, but it does fuck up pause indicator. So I added a filter for short play/pause changes. Try it out and let me know if it works fine for you: |
I see, so that's why the same issue doesn't happen with |
Yes. Do you experience it always, or only sometimes? Because it's pretty much nonexistent for me on all videos I've tried. Even on my slow linux laptop. |
When you hold frame-step key, you unpause the video. That's why it flashes. |
Well of course, that just resumes the video, there is no way how to filter that out. I was asking about performing actual framesteps. But I agree that flashing the indicator when holding framestep button is undesirable. I'm definitely not adding custom frame stepping commands. That just feels like I'm re-implementing mpv here. I guess following the @po5 suggestion and adding flash-pause-indicator command as a secondary command to play/pause bindings is the only way how to get the ideal behavior. I wanted to solve this without increasing configuration surface but oh well. |
You can try it: https://raw.githubusercontent.com/darsain/uosc/dev/uosc.lua Usage: Set option For flashing the indicator, add to bindings:
Or this for the static one:
|
Works great, except that with |
@po5 O.O can't replicate. I even added |
Thanks, the manual flash indicator really works well! This should solve all my original issues for now. |
Can you give me steps/config to reproduce? This is not happening to me on any system or video file I've tried. Also make sure you are on latest dev: https://raw.githubusercontent.com/darsain/uosc/dev/uosc.lua |
I updated mpv and tried again with a new config from a scratch.
In my
That's it, basically. Actually, a correction to my previous post. The static pause indicator can go away without any mouse movements. The mouse movement is only necessary for making it show up. |
Oh, was able to replicate after I removed my ontop-when-playing script. I'll look into it later. |
So after half an hour of head scratching and frustration I hopped into #mpv on freenode and a kind soul avih told me this is a know race condition bug on windows that happens during pause, where overlay update requests are sometimes being ignored (mpv-player/mpv#8350). So the only thing I could do is add a 50ms timeout that asks mpv to update the overlay again. 30ms was still having issues, 40ms was fine, but to be safe I made it 50ms. Tell me if it works for you or if it needs to be increased. |
I was experiencing this on Linux so definitely not Windows-only. I don't know whether this is within the scope of this issue but frame-stepping forwards with |
Would you mind trying this:
mp.observe_property("pause", "bool", function(n, v)
mp.osd_message("pause: " .. (v and "yes" or "no"))
end)
Report whether you only see the "pause: no" messages in addition to the "pause: yes" ones? If you only see "pause: yes", would you mind posting a log of it (add Thanks. EDIT: I think it would be more appropriate to post your result at mpv-player/mpv#8350 . Thanks. |
@tomasklaen I notice the workaround doesn't work any more. |
Is there anything more we can do apart of adding more time to that the timeout? |
On the latest version,
frame-step
can cause the pause/play icon to flash, if you hold down the corresponding shortcut for a long enough period. As you hold it down, the 'play' icon will eventually flash. Once you let it go, the 'pause' icon will then flash.Is this intended behavior?
Strangely, this does not happen with
frame-step-back
.Also, on certain short videos,
frame-step
will flash the pause/play icon even if you simply tap on the key once. (I can provide the video, if you want to investigate it further. But I believe these two issues are probably intertwined.)The text was updated successfully, but these errors were encountered: