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 the functionality to automatically toggle the WIN HDR switch on and off #15919

Open
6 tasks done
MichaelLv2020 opened this issue Feb 20, 2025 · 42 comments
Open
6 tasks done
Labels

Comments

@MichaelLv2020
Copy link

mpv Information

mpv-x86_64-20250216-git-f94b44c

Other Information

- Windows version:WIN10 22H2
- GPU model, driver and version:7900XTX
- Source of mpv:MPV
- Latest known working version:
- Issue started after the following happened:

Reproduction Steps

Before playing HDR videos, I must forcefully enable the WIN HDR switch; otherwise, HDR playback will result in errors. This is because, starting in 2021, both NVIDIA and AMD graphics card HDR API drivers have been changed. The current method that mpv uses to automatically activate the graphics card HDR API does not correctly play HDR videos. Only the WIN OS HDR method can play HDR content correctly.

Expected Behavior

Therefore, it is hoped that mpv will add the following feature:

  • When playing HDR videos, the WIN HDR switch can be automatically turned on in the background.
  • When the HDR video is closed and the mpv is closed, it should automatically turned off the WIN HDR switch in the background.
    Currently, the MPC Video Renderer has a similar function: win hdr ---Allow turn on/off,It is very convenient to play HDR video!

Actual Behavior

Add a code:-- WIN-HDR-auto<yes|no>

Log File

1

Sample Files

1

I carefully read all instruction and confirm that I did the following:

  • I tested with the latest mpv version to validate that the issue is not already fixed.
  • I provided all required information including system and mpv version.
  • I produced the log file with the exact same set of files, parameters, and conditions used in "Reproduction Steps", with the addition of --log-file=output.txt.
  • I produced the log file while the behaviors described in "Actual Behavior" were actively observed.
  • I attached the full, untruncated log file.
  • I attached the backtrace in the case of a crash.
@hooke007
Copy link
Contributor

It was acutally requested / discussed before.
#5161
#11812

@Doofussy2
Copy link

Doofussy2 commented Feb 23, 2025

Why would you need this? Just use --vo=gpu-next with --target-colorspace-hint=auto

mpv will apply the corresponding colorspace.

@MichaelLv2020
Copy link
Author

Why would you need this? Just use --vo=gpu-next with --target-colorspace-hint=auto

mpv will set the apply the corresponding colorspace.

Because I have used: UHD disc players, the built-in player of the TV, CoreELEC boxes, and other players on the PC such as the 'Movies & TV' of WIN, potplayer, mpc-be, powerDVD, and renderers like madVR, mpc video render, D3D11, I know exactly what the correct picture should look like for HDR passthrough playback! Currently, the HDR images played by mpv, which automatically activates the HDR API of the graphics card (AMD and NVIDIA) are incorrect: the saturation overflows in window mode, and the colors fade in full-screen mode. Only when the WIN HDR switch is turned on does the HDR playback show the correct picture! mpv can very conveniently adjust the peak brightness of dynamic tone mapping, the mode of tone mapping, contrast recovery, and other parameters in real-time during HDR passthrough playback, and it has very low hardware requirements, so it already has the potential to be the best player on the PC!

I am also very familiar with the HDR code for MPV: "target colorspace hint=yes", "hdr compute peak=auto", and various "tone mapping" parameters

@Doofussy2
Copy link

Only when the WIN HDR switch is turned on does the HDR playback show the correct picture!

So turn it on.

I am also very familiar with the HDR code for MPV: "target colorspace hint=yes

I said use --target-colorspace-hint=auto. Apparently, you aren't familiar.

@hooke007
Copy link
Contributor

hooke007 commented Feb 23, 2025

d3d11 doesn't work. Which is recorded here. #11812 (comment)
Also vulkan may be broken, it's up to your driver status. ref #15163

@Doofussy2
Copy link

Better to read jeeb's comment #10158 (comment)

@hooke007
Copy link
Contributor

hooke007 commented Feb 23, 2025

The only way a user is supposed to configure it, is through the Windows settings application.

If it is still true. How could other players did it? It's deprecated. It's better to forget it.
And it quoted the issues I created 5 years ago...

@Andarwinux
Copy link
Contributor

Something must be clarified here

HDR switch on Windows has never been a supported feature. This is true for neither D3D11, Vulkan, nor DXGI. Some people, out of ignorance or malice, claimed that Vulkan supports HDR switch, which is actually a driver bug, NVIDIA and AMD have fixed their drivers, so you will notice that this does not work.

Other players' implementations use undocumented, private platform APIs. mpv should never use these.

If you want HDR, just enable Windows HDR, don't try to switch automatically.

@MichaelLv2020
Copy link
Author

I am also very familiar with the HDR code for MPV: "target colorspace hint=yes

I said use --target-colorspace-hint=auto. Apparently, you aren't familiar.

My suggestion is that you first go and buy an HDR monitor, and then you'll understand the difference between "target-colorspace-hint=auto" and "target-colorspace-hint=yes"! Apparently, you don't have it and have no idea what the correct picture for HDR passthrough should look like!

@Doofussy2
Copy link

I am also very familiar with the HDR code for MPV: "target colorspace hint=yes
I said use --target-colorspace-hint=auto. Apparently, you aren't familiar.

My suggestion is that you first go and buy an HDR monitor, and then you'll understand the difference between "target-colorspace-hint=auto" and "target-colorspace-hint=yes"! Apparently, you don't have it and have no idea what the correct picture for HDR passthrough should look like!

I have an OLED display that supports both Dolby Vision and HDR10. I have Windows HDR enabled 100% of the time. I use --target-colorspace-hint=auto, and I followed the issue report and subsequent developments that resulted in the auto option. Once merged, I tested it, and made comments in the PR to my findings. I AM very familiar with its function.

And based on what everyone else here is telling you, you apparently are not understanding. Or just don't want to listen.

@hooke007
Copy link
Contributor

I have Windows HDR enabled 100% of the time.

You were talking about the different thing. My suggestion is stop meanless arguing and wait for devs' comment.
IMO it's a valid request.

@Andarwinux
Copy link
Contributor

The reason people are reluctant to enable HDR globally is that it changes the SDR hue, which is largely caused by the lack of HDR capability of their display.

My suggestion is that you first go and buy an real HDR monitor.

@Doofussy2
Copy link

Doofussy2 commented Feb 24, 2025

You should read the comments in the PR.

#15279

Just make an auto-profile for either HDR or SDR and set the appropriate target-peak. Setting 203 or lower, the swapchain is configured for SDR (bt.709 colorspace), and 204 and above will be HDR (bt.2020). Set it and forget it. This is what I use and it works well.

The easiest way to do this is set --target-peak=203, globally, then make an auto-profile for bt.2020 media and set the --target-peak for your display. I do it a a little differently because I use inverse tonemapping for bt.709 media.

Dynamically switching Windows in and out of HDR is something I've never agreed with. With the right config, you don't need to.

And by setting --target-colorspace-hint=auto, if you decide to disable Windows HDR, the colorspace will always be correctly configured. That was the point of auto.

One and done!

@MichaelLv2020
Copy link
Author

You should read the comments in the PR.

#15279

Just make an auto-profile for either HDR or SDR and set the appropriate target-peak. Setting 203 or lower, the swapchain is configured for SDR (bt.709 colorspace), and 204 and above will be HDR (bt.2020). Set it and forget it. This is what I use and it works well.

The easiest way to do this is set --target-peak=203, globally, then make an auto-profile for bt.2020 media and set the --target-peak for your display. I do it a a little differently because I use inverse tonemapping for bt.709 media.

Dynamically switching Windows in and out of HDR is something I've never agreed with. With the right config, you don't need to.

And by setting --target-colorspace-hint=auto, if you decide to disable Windows HDR, the colorspace will always be correctly configured. That was the point of auto.

One and done!

I have no interest in converting HDR to SDR for playback! If you have genuinely researched dynamic tone mapping in mpv, you should know that "target-peak=" should first be set to 10000 nits. This way, you can avoid any tone mapping (the default peak brightness for Windows displays is usually 1499 nits). Then, you gradually reduce the "target-peak=" value in nits until you find a level that matches your brightness perception while preserving as much highlight detail as possible. Therefore, it's quite obvious that the "203" nits value you mentioned is a rather laughable setting for your OLED TV and HDR passthrough playback! As for my mention of "hdr-compute-peak=auto," that was a typo on my part—it should have been "target-peak="! I hope you can understand what I'm saying!

@Doofussy2
Copy link

You should read the comments in the PR.
#15279
Just make an auto-profile for either HDR or SDR and set the appropriate target-peak. Setting 203 or lower, the swapchain is configured for SDR (bt.709 colorspace), and 204 and above will be HDR (bt.2020). Set it and forget it. This is what I use and it works well.
The easiest way to do this is set --target-peak=203, globally, then make an auto-profile for bt.2020 media and set the --target-peak for your display. I do it a a little differently because I use inverse tonemapping for bt.709 media.
Dynamically switching Windows in and out of HDR is something I've never agreed with. With the right config, you don't need to.
And by setting --target-colorspace-hint=auto, if you decide to disable Windows HDR, the colorspace will always be correctly configured. That was the point of auto.
One and done!

I have no interest in converting HDR to SDR for playback!

You didn't understand. HDR will be passed through. SDR will be played at 203 in a bt.709 colorspace.

@MichaelLv2020
Copy link
Author

You should read the comments in the PR.
#15279
Just make an auto-profile for either HDR or SDR and set the appropriate target-peak. Setting 203 or lower, the swapchain is configured for SDR (bt.709 colorspace), and 204 and above will be HDR (bt.2020). Set it and forget it. This is what I use and it works well.
The easiest way to do this is set --target-peak=203, globally, then make an auto-profile for bt.2020 media and set the --target-peak for your display. I do it a a little differently because I use inverse tonemapping for bt.709 media.
Dynamically switching Windows in and out of HDR is something I've never agreed with. With the right config, you don't need to.
And by setting --target-colorspace-hint=auto, if you decide to disable Windows HDR, the colorspace will always be correctly configured. That was the point of auto.
One and done!

I have no interest in converting HDR to SDR for playback!

You didn't understand. HDR will be passed through. SDR will be played at 203 in a bt.709 colorspace.

Unfortunately, if the WIN HDR switch is not forcibly turned on and HDR playback is attempted by automatically activating the graphics card's HDR API, although the TV's HDR status will be activated, the HDR playback image will be incorrect! Of course, if your graphics card (AMD or NVIDIA) driver is quite old, it might still work, but from what I understand, this should no longer be possible starting from 2021!

@Doofussy2
Copy link

OK. So here is one very basic way you can try what I'm suggesting.

Turn Windows HDR on.

Then try this basic config.

## VIDEO ##

vo=gpu-next
hwdec=auto

target-peak=203
target-colorspace-hint=auto


## AUTO-PROFILES ##


[HDR]
profile-cond=p["video-params/primaries"]=="bt.2020"
target-peak=1000

So for HDR, I get this

Image

And for everything else, I get this

Image

I use different values because my display was calibrated by ASUS before I bought it.

Image

@MichaelLv2020
Copy link
Author

You didn't understand. HDR will be passed through. SDR will be played at 203 in a bt.709 colorspace.

My suggestion is that you use the built-in "Movies & TV" player in the Windows system. First, forcibly enable the Windows HDR switch, and then proceed to play HDR videos. This is the most error-free method for HDR playback! It is also the simplest way to determine whether your HDR pass-through playback is functioning correctly!

@Doofussy2
Copy link

You didn't understand. HDR will be passed through. SDR will be played at 203 in a bt.709 colorspace.

My suggestion is that you use the built-in "Movies & TV" player in the Windows system. First, forcibly enable the Windows HDR switch, and then proceed to play HDR videos. This is the most error-free method for HDR playback! It is also the simplest way to determine whether your HDR pass-through playback is functioning correctly!

I've played the same file in the Windows player at the same time in mpv and put them side by side, and there is no difference.

@MichaelLv2020
Copy link
Author

I've played the same file in the Windows player at the same time in mpv and put them side by side, and there is no difference.

I regret to inform you that I did not detect your AMD or NVIDIA dedicated graphics card! Additionally, my recommendation for you is: when setting up the optimal dynamic tone mapping scheme for mpv, it's best to use videos that feature sustained high-brightness scenes, such as the movies "Aquaman" or "The Meg." Furthermore, the "Spears & Munsil UHD" disc contains HDR and Dolby Vision demonstration videos that are genuinely mastered at 10,000 nits, and it also includes highly professional 10,000-nit videos designed to test PQ EOTF compliance!

@Doofussy2
Copy link

I've played the same file in the Windows player at the same time in mpv and put them side by side, and there is no difference.

I regret to inform you that I did not detect your AMD or NVIDIA dedicated graphics card! Additionally, my recommendation for you is: when setting up the optimal dynamic tone mapping scheme for mpv, it's best to use videos that feature sustained high-brightness scenes, such as the movies "Aquaman" or "The Meg." Furthermore, the "Spears & Munsil UHD" disc contains HDR and Dolby Vision demonstration videos that are genuinely mastered at 10,000 nits, and it also includes highly professional 10,000-nit videos designed to test PQ EOTF compliance!

I have no such issues

Image

@MichaelLv2020
Copy link
Author

OK. So here is one very basic way you can try what I'm suggesting.

Can you check your HDR screenshot and see if you have noticed: "avg 1.02 cd/M2"? How much tone mapping difference can you expect to see in a frame with an average brightness of only 1.02nit?

I have no such issues

So why do you think you don't have this problem and nobody else does?
Is this harmful to your HDR playback? Am I requesting mandatory default settings?
In fact, in a large group of tens of thousands of people, I have seen many others have this problem too!

@Doofussy2
Copy link

So why do you think you don't have this problem and nobody else does? Is this harmful to your HDR playback? Am I requesting mandatory default settings? In fact, in a large group of tens of thousands of people, I have seen many others have this problem too!

I can't know that. I don't have access to their devices.

@MichaelLv2020
Copy link
Author

So why do you think you don't have this problem and nobody else does? Is this harmful to your HDR playback? Am I requesting mandatory default settings? In fact, in a large group of tens of thousands of people, I have seen many others have this problem too!

I can't know that. I don't have access to their devices.

Anyway, thank you very much for providing your MPV code, but your HDR profile judgment statement is still not rigorous. Let me show you mine:

[HDR]
profile-cond=p["video-params/primaries"] == "bt.2020" and p["video-params/gamma"] == "pq"
target-peak=10000

This is the best initial setting for any HDR video, because at the current level of HDR film and television production, there is no need for dynamic tone mapping at all!

By the way, I have measured the true maxCLL and maxFALL of most HDR movies and TV shows, as well as the avgFALL of the entire movie and TV show!

@Doofussy2
Copy link

OK. So here is one very basic way you can try what I'm suggesting.

Can you check your HDR screenshot and see if you have noticed: "avg 1.02 cd/M2"? How much tone mapping difference can you expect to see in a frame with an average brightness of only 1.02nit?

That's what --hdr-compute-peak is returning. The mastering display is 1000 nits, so that data is probably incorrect. It probably doesn't have a peak of 10,000 nits.

So why do you think you don't have this problem and nobody else does? Is this harmful to your HDR playback? Am I requesting mandatory default settings? In fact, in a large group of tens of thousands of people, I have seen many others have this problem too!

I can't know that. I don't have access to their devices.

Anyway, thank you very much for providing your MPV code, but your HDR profile judgment statement is still not rigorous. Let me show you mine:

[HDR] profile-cond=p["video-params/primaries"] == "bt.2020" and p["video-params/gamma"] == "pq" target-peak=10000

This is the best initial setting for any HDR video, because at the current level of HDR film and television production, there is no need for dynamic tone mapping at all!

By the way, I have measured the true maxCLL and maxFALL of most HDR movies and TV shows, as well as the avgFALL of the entire movie and TV show!

That was just a basic config. I use something different.

You can be more precise with other params: https://mpv.io/manual/master/#command-interface-video-params/min-luma

@MichaelLv2020
Copy link
Author

That was just a basic config. I use something different.

Why do I say that your code is not very rigorous,Because some SDR demos or anime films use "Color primes: BT.2020" for production, which is very rare, but there is still a probability of encountering it

@Doofussy2
Copy link

That was just a basic config. I use something different.
Why do I say that your code is not very rigorous,Because some SDR demos or anime films use "Color primes: BT.2020" for production, which is very rare, but there is still a probability of encountering it

So use the metadata params that I linked to.

@MichaelLv2020
Copy link
Author

I have no such issues

I can easily find posts with similar issues:#15163!
So is your 3060 Laptop GPU smarter than the 4090 Desktop GPU?

@Doofussy2
Copy link

Doofussy2 commented Feb 24, 2025

There isn't much more I can offer here. Everything works well for me.

Windows HDR shouldn't be switched on and off, as others have stated here. Microsoft doesn't want that.

@MichaelLv2020
Copy link
Author

Something must be clarified here

HDR switch on Windows has never been a supported feature. This is true for neither D3D11, Vulkan, nor DXGI. Some people, out of ignorance or malice, claimed that Vulkan supports HDR switch, which is actually a driver bug, NVIDIA and AMD have fixed their drivers, so you will notice that this does not work.

Other players' implementations use undocumented, private platform APIs. mpv should never use these.

If you want HDR, just enable Windows HDR, don't try to switch automatically.

You're right, I checked chartGPT and found out that MPC Video renderer uses the DirectShow framework, specifically designed for the Windows platform, so this feature should not be implemented by MPV! This is really a pity!

@MichaelLv2020
Copy link
Author

There isn't much more I can offer here. Everything works well for me.

Windows HDR shouldn't be switched on and off, as others have stated here. Microsoft doesn't want that and and is preventing it.
MPC player(potplayer) use mpc video renderer can achieve the functions I mentioned, otherwise I wouldn't have made this suggestion! Please don't argue over what you think should or shouldn't be, this topic can come to an end!

@Andarwinux
Copy link
Contributor

This is not related to DirectShow.
You can find mpc's HDR Switch implementation here
https://github.com/Aleksoid1978/VideoRenderer/blob/4a2f1b0c96f250847e143f273abdcf343854d83c/Source/DX11VideoProcessor.cpp#L464-L484

If you search MSDN for DISPLAYCONFIG_DEVICE_INFO_TYPE , it's not hard to find that DISPLAYCONFIG_SET_ADVANCED_COLOR_STATE and DISPLAYCONFIG_SET_HDR_STATE don't have their behaviors explicitly documented.

This means that Microsoft reserves the right to change its intended behavior without prior notice, and if it does, the HDR Switch will break. Therefore, despite the simplicity of the implementation, mpv should not do this.

If you can understand this, then it shouldn't be hard to understand why Microsoft wants you to always have Windows HDR/ACM enabled.

@kasper93
Copy link
Contributor

It's trivial to implement this as cplugin for mpv. DisplayConfigSetDeviceInfo doesn't depends on any internal rendering context to execute. And yes, this is more custom thing that rather shouldn't be in mpv core.

@Doofussy2
Copy link

Could it be used in a lua script? That way if Microsoft breaks it, then no fix is required.

@MichaelLv2020
Copy link
Author

This is not related to DirectShow. You can find mpc's HDR Switch implementation here https://github.com/Aleksoid1978/VideoRenderer/blob/4a2f1b0c96f250847e143f273abdcf343854d83c/Source/DX11VideoProcessor.cpp#L464-L484

If you search MSDN for DISPLAYCONFIG_DEVICE_INFO_TYPE , it's not hard to find that DISPLAYCONFIG_SET_ADVANCED_COLOR_STATE and DISPLAYCONFIG_SET_HDR_STATE don't have their behaviors explicitly documented.

This means that Microsoft reserves the right to change its intended behavior without prior notice, and if it does, the HDR Switch will break. Therefore, despite the simplicity of the implementation, mpv should not do this.

If you can understand this, then it shouldn't be hard to understand why Microsoft wants you to always have Windows HDR/ACM enabled.

If I keep the WIN HDR switch enabled all the time, its poor color gamut conversion is unbearable for most people's ordinary usage scenarios. Additionally, what should I do if I want to watch SDR videos? Let's shift our perspective: perhaps most people are accustomed to not forcibly enabling the WIN HDR switch, but they are unaware that the most stable and absolutely correct HDR passthrough playback in mpv requires the WIN HDR switch to be forcibly enabled first. And this is the crux of the issue! The WIN HDR switch has nothing to do with privacy, patents, copyrights, or system stability. I believe no one would turn HDR videos on and off more than 10 times in a minute—does this pose any potential risk to Microsoft?

@Obegg
Copy link

Obegg commented Feb 24, 2025

Could it be used in a lua script? That way if Microsoft breaks it, then no fix is required.

#10625

@Doofussy2
Copy link

Could it be used in a lua script? That way if Microsoft breaks it, then no fix is required.

#10625

That toggles the Windows HDR switch. This guy thinks that using that gives an incorrect output. He thinks that the old-school way is better 🤪😂

@Andarwinux
Copy link
Contributor

This is not related to DirectShow. You can find mpc's HDR Switch implementation here https://github.com/Aleksoid1978/VideoRenderer/blob/4a2f1b0c96f250847e143f273abdcf343854d83c/Source/DX11VideoProcessor.cpp#L464-L484
If you search MSDN for DISPLAYCONFIG_DEVICE_INFO_TYPE , it's not hard to find that DISPLAYCONFIG_SET_ADVANCED_COLOR_STATE and DISPLAYCONFIG_SET_HDR_STATE don't have their behaviors explicitly documented.
This means that Microsoft reserves the right to change its intended behavior without prior notice, and if it does, the HDR Switch will break. Therefore, despite the simplicity of the implementation, mpv should not do this.
If you can understand this, then it shouldn't be hard to understand why Microsoft wants you to always have Windows HDR/ACM enabled.

If I keep the WIN HDR switch enabled all the time, its poor color gamut conversion is unbearable for most people's ordinary usage scenarios. Additionally, what should I do if I want to watch SDR videos?

Windows HDR's sRGB transfer function can be controversial, but it's usually not obvious. If you do care, there are some ugly but effective workarounds

Let's shift our perspective: perhaps most people are accustomed to not forcibly enabling the WIN HDR switch, but they are unaware that the most stable and absolutely correct HDR passthrough playback in mpv requires the WIN HDR switch to be forcibly enabled first. And this is the crux of the issue!

Yes, mpv should indeed clarify in the documentation that for Windows, any form of HDR support requires Windows HDR as a prerequisite, there is no other workaround.

The WIN HDR switch has nothing to do with privacy, patents, copyrights, or system stability. I believe no one would turn HDR videos on and off more than 10 times in a minute—does this pose any potential risk to Microsoft?

I don’t know what Microsoft’s specific thoughts are, but as Windows is a desktop operating system with broad hardware compatibility, in order to ensure a consistent HDR experience, it is natural to use HDR based on composition and tone mapping:

Windows supports eDP, HDMI, DP and various other proprietary display protocols, but these protocols did not define how to output HDR and SDR signals at the same time. Due to force majeure factors such as DSC, there is a long re-handshakes time when you switch signal mode.
Windows is a multitasking environment where the user can run any number of SDR and HDR apps at the same time with overlapping windows. Therefore, it's crucial that all types of content look correct and at maximum quality when output to a display; for example, an sRGB (SDR) productivity app with a BT.2100 ST.2084 (HDR) video window playing over it.

Combining the two, if you want a seamless HDR experience, then the SDR colors have to be represented in the HDR colorspace, so tone-mapping has to be performed by the DWM, which then always outputs the HDR signal.
For this situation, the flaw of HDR Switch is self-evident. Each switch will cause the DWM to restart and the GPU to re-handshake with the monitor.
The result is that each switch will cause a black screen. Frequent DWM restarts and re-handshakes will obviously reduce system stability and lead to a bad user experience.

@Andarwinux
Copy link
Contributor

Could it be used in a lua script? That way if Microsoft breaks it, then no fix is required.

I believe you can indeed use luajit FFI to operate it.

@Doofussy2
Copy link

This is not related to DirectShow. You can find mpc's HDR Switch implementation here https://github.com/Aleksoid1978/VideoRenderer/blob/4a2f1b0c96f250847e143f273abdcf343854d83c/Source/DX11VideoProcessor.cpp#L464-L484
If you search MSDN for DISPLAYCONFIG_DEVICE_INFO_TYPE , it's not hard to find that DISPLAYCONFIG_SET_ADVANCED_COLOR_STATE and DISPLAYCONFIG_SET_HDR_STATE don't have their behaviors explicitly documented.
This means that Microsoft reserves the right to change its intended behavior without prior notice, and if it does, the HDR Switch will break. Therefore, despite the simplicity of the implementation, mpv should not do this.
If you can understand this, then it shouldn't be hard to understand why Microsoft wants you to always have Windows HDR/ACM enabled.

If I keep the WIN HDR switch enabled all the time, its poor color gamut conversion is unbearable for most people's ordinary usage scenarios. Additionally, what should I do if I want to watch SDR videos? Let's shift our perspective: perhaps most people are accustomed to not forcibly enabling the WIN HDR switch, but they are unaware that the most stable and absolutely correct HDR passthrough playback in mpv requires the WIN HDR switch to be forcibly enabled first. And this is the crux of the issue! The WIN HDR switch has nothing to do with privacy, patents, copyrights, or system stability. I believe no one would turn HDR videos on and off more than 10 times in a minute—does this pose any potential risk to Microsoft?

I can't even take this seriously. Even if there were a disparity, I highly doubt that anyone has the visual acuity tell the difference.

Most people will have cheap uncalibrated displays and shouldn't let the display tone-map. And if you did have a very expensive display that is professionally calibrated to your viewing environment, I think most people would just tell themselves they can see the difference. Not knowing what it was supposed to look like to begin with and not having the visual acuity to perceive the correct differences....should there be any.

In my case, my display is calibrated by the manufacturer, ASUS. It has specific HDR color management that can't be altered by Windows. It says so in the settings. So I don't question it's color accuracy. The peak of the display is 617 nits, so almost all HDR is going to be tone-mapped, and I still prefer what @haasn and @kasper93 have done over letting the display do all of the tone-mapping. I've been studying that, recently. Watching when mpv tone-maps. My faith is in that.

@Doofussy2
Copy link

Could it be used in a lua script? That way if Microsoft breaks it, then no fix is required.

I believe you can indeed use luajit FFI to operate it.

I'd suggest that if a change were to be made, someone should write that script.

@MichaelLv2020
Copy link
Author

re-handshakes

The focus of our discussion should be on the difference in risks between automatically turning the WIN HDR switch on and off during video playback versus manually turning it on before playback and manually turning it off after playback. Clearly, the risks are the same, but if I wanted to perform this operation 10 times within a minute, it would be impossible to do so manually! However, the risk of damage is something that an adult should be responsible for themselves! Additionally, I proposed this suggestion for another reason: if mpv relies solely on automatically activating the graphics card's HDR API to play HDR videos, the difference compared to correct HDR playback is not significant. However, those familiar with it can easily notice differences in brightness and color, which can create a false impression: that mpv's HDR passthrough playback quality is very poor!

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

No branches or pull requests

6 participants