-
Notifications
You must be signed in to change notification settings - Fork 3k
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
HDR video appears dull and incorrect when unpaused or switched to fullscreen #16053
Comments
Set |
Doesn't do anything. In the mean time I found that vo=gpu fares better and displays HDR properly while unpaused and fullscreen, but it has other issues like SDR-in-HDR video playback appearing extremely bright/corrupted when paused (but not while playing). |
This might be a Windows issue. Do you have multiple GPUs? An iGPU as well your Nvidia? If yes, go into your Windows display settings and specify using your Nvidia GPU for mpv and don't let Windows decide. Windows seems to have a hiccup with the window management when multiple GPUs are present. |
Forcing mpv to dGPU in windows display settings had no effect. |
What if you specify the adapter in mpv? |
No effect. |
Try disabling --video-sync |
No effect. |
Have you tried running it from the commandline? --no-config --vo=gpu-next --target-colorspace-hint=yes |
That doesn't work either. I did spend quite a bit of time starting from --no-config and trying to isolate problem options, but it seems that gpu-next doesn't want to play nice no matter what. |
I can't reproduce this. With vo_gpu I get similar results. I always have. But with gpu-next, I get stable results. With vo_gpu, I have to set colorspace and trc. So using vo_gpu and setting --target-prim=bt.2020 --target-trc=pq it would stabilize. |
I'm not sure exactly what the cause is, but disabling MPO may help debug the issue. |
Great idea. I tried disabling MPOs via the reg edits on this page: https://nvidia.custhelp.com/app/answers/detail/a_id/5157/%7E/after-updating-to-nvidia-game-ready-driver-461.09-or-newer%2C-some-desktop-apps And now HDR looks correct while playing (i.e. unpaused) in windowed mode. However, it still becomes dull when switching to fullscreen. At least this is progress. |
It seems that for some reason there is a difference in tone-mapping between Composed Flip and Independent Flip. I'm not sure if this is a Microsoft or NVIDIA problem, and I've been unable to reproduce this myself. As a workaround, you should be able to make windowed fullscreen fallback to the Composed Flip with some overlays? |
Indeed, re-enabling MPO restored the previous behaviour. I also noticed that opening the start menu with win key while the video is fullscreen will revert to correct looking HDR (for as long as the start menu is open). So it clearly has something to do with window management. |
From your description, the metadata appears to be getting lost. So, possibly related ro how mpv establishes the swapchain? I still have an unresolved issue relating to that from several years ago. But I've never experienced it with gpu-next. |
The HDR only looks partially broken however. It still looks like HDR video (much brighter highlights than watching the same video in tonemapped SDR, at least), just not good and broken looking HDR. Could that be the case if the metadata is getting lost? I've finally recorded a video that shows the difference clearly, maybe this is useful information. The exposure on the video is quite right so the bright region detail loss you can see is exactly what I see in person: 2.mp4 |
That looks like its switching between passthrough and being tone-mapped. Look at the peak difference in the collar. That suggests to me that this is related to the swapchain. Either momentarily being defeated, or being put in the background somehow. When you pause playback, what happens if you use frame advance |
Might this have something to do with |
Frame advance appears as normal unless I hold > down, then it looks wrong. As for --d3d11-flip, I get these errors with it set to no (and the resulting output looks extremely washed out): [vo/gpu-next/d3d11] Color space RGB_FULL_G2084_NONE_P2020 (12) is not supported by this swapchain! |
I wasn't suggesting to disable it, instead that there maybe was a bug with its operation. Disabling it will revert to tonemapping.
That was kinda what I was expecting. That sample you're using has a frame rate of 60, so you likely won't see changes every frame. But you are seeing changes, as I have in the report I made a few years ago. If you play a video with 23 fps, and frame advance, is the issue more noticeable? |
Things just got a bit weirder. I downloaded this 24fps HDR video "Samsung Extreme Sports UHD 4K Demo.ts" and now the opposite problem occurs: while windowed and paused, the video appears wrong (same dull highlights and bright region detail loss as the other video) whereas playing the video or switching it to fullscreen (whether playing or paused) causes it to look correct. As for frame advance, it is also the opposite of before, with single frame advances having no effect while holding > will restore the correct look of the video. |
I think this is related to the issue I reported years ago, and I'm now suspecting it has something to do with |
mpv Information
Other Information
Reproduction Steps
Opening the HDR video in mpv and pausing it, then unpausing it and/or switching to fullscreen
Expected Behavior
mpv plays HDR video with correct looking brightness and TRC
Actual Behavior
When playing HDR videos via Chrome (whether via Youtube or playing the downloaded webms in Chrome directly), the video appears correct with very bright highlights and correct looking EOTF with proper detail visibility, whether paused or unpaused or windowed/fullscreened.
In mpv, the video only appears 'correct' (i.e. matching Chrome) while paused and windowed; upon unpausing the video or switching to fullscreen, it becomes duller looking with less highlight brightness, less vivid colours and some kind of wrong looking EOTF that makes detail visibility worse. Additionally, while windowed and paused, the video will momentarily flash to the duller look while the "Screenshot: filename.etc" message is visible in the top left corner, and will also momentarily flash to the duller look when moving the mouse away from the focused window.
Additional information:
Screenshots: I was unable to get screenshots to work in a way where they usefully showed any difference. With screenshot-format=avif, the screenshots produced were entirely red and looked identical to each other anyway. I suspect tonemapped SDR screenshots would also fail to capture the observed difference, but if anyone knows how to configure the screenshot options in such a way that they can produce useful information I'll be happy to give it a try.
OBS recording: I tried taking an OBS recording with HDR settings to see if it could capture the difference, but strangely the issue did not show up in the recording, with the sample video appearing correct at all times in the recording when moused over and toggled between windowed and fullscreen and/or paused-unpaused (I used Chrome to view the OBS recording)
Log File
output.txt
Sample Files
No response
I carefully read all instruction and confirm that I did the following:
--log-file=output.txt
.The text was updated successfully, but these errors were encountered: