ripose-jp / Memento

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

Unexpected behaviour while in full screen mode #50

Open dkaknbk opened 2 years ago

dkaknbk commented 2 years ago

I've been having an issue since I installed Memento on a new machine a few days ago. Whenever I watch I watch a video and enter full screen mode, the screen will flash black for a second and jump around for a bit and starts behaving erratically. The full screen playback acts as if it is on top of everything else (e.g. the windows popup volume indication when changing system volume is invisible) and if I manually take a screenshot, it will always be from the moment I first entered full screen rather than the frame I took the screenshot of. Similarly, when I start recording my screen when playing a video in windowed mode and switching into full screen, the audio will continue playing normally but the video recording is stuck in the frame when I entered full screen.

I've recorded the following video to demonstrate: First I enter and leave full screen twice to demonstrate the flashes and jumping around, then I watch the same scene in windowed mode and then in full screen mode. For some reason, the full screen playback is a still frame in the recording, even though it displayed fine on my end: https://files.catbox.moe/tzh2xl.mp4

This only occurs in Memento, the latest version of regular mpv work perfectly fine.

ripose-jp commented 2 years ago

A lot of what you're talking about seems related to known issues between OpenGL, Windows, and Qt. https://doc.qt.io/qt-5/windows-issues.html

I can confirm that the issue with popup windows and volume indicators not showing up is fixed by doing the hack in "Fullscreen OpenGL Based Windows". I have been aware of this for awhile, but I find the 1px border off putting for content that doesn't fill the entire aspect ratio. It's also the reason that the menu bar doesn't appear in fullscreen on Windows, even though it does on Linux.

I've included a picture of what the hack looks like. Click it and then fullscreen your browser with F11 to get an idea of what it really looks like.

image

As for the transition from fullscreen to maximized looking bad, I'm also not sure there's anything I can do. All of that is handled by Qt, so it's kind of out of my hands.

dkaknbk commented 2 years ago

After doing some more experimenting last night, I figured out that none of these issues (except the transition to full screen looking bad but that doesn't matter at all) happen when Nvidia Optimus is turned on, so it seems all of this only occurs when Memento is forced to use my dedicated GPU rather than the internal one. So if this is not possible or hard to fix, I at least found a reliable workaround if I happen to need to take screenshots or record scenes right out of Memento. Thanks for looking into it.

ripose-jp commented 2 years ago

For what it's worth all the problems you described were reproducible, but I only tested it on my 980ti, so it's very possible that it's just Nvidia's fault.

dkaknbk commented 2 years ago

I thought I might give you an update on this, I have been using the option "Enable Menu Bar in fullscreen (Not Recommended)" option for a while now when using my dedicated GPU exclusively and like you predicted, that has resolved all the problems I stated in this issue. I haven't had any problems at all while using this option and I don't mind the one pixel border at all, but maybe it would be nice if it could be changed to be black instead of grey to blend in better with the black background so it stands out less.

ripose-jp commented 2 years ago

could be changed to be black instead of grey to blend in better with the black background so it stands out less.

Not possible. Windows doesn't expose any method in their API that would allow me to do that.