Open MichaelLv2020 opened 3 years ago
I've been wrestling with this, for a while. And the answer to your question is, it doesn't look like this is going to be set at runtime.
I've raised the question, here: https://github.com/mpv-player/mpv/issues/7346
And partially, here: https://github.com/mpv-player/mpv/issues/7406
Your best way, is:
Turn HDR on, leave it in 8bit. SDR will play correctly, you won't notice the difference (I've run a boat load of tests). HDR stuff will for the most part, play correctly, but I have had anomalies. To correct those, create an auto-profile for bt.2020 stuff. Along the lines you already have, but like this:
[HDR]
profile-desc=HDR stuff
profile-cond=p["video-params/primaries"]=="bt.2020"
target-trc=pq
target-prim=bt.2020
I've chosen to set my Nvidia GPU to 4:2:2 12bpc, and run everything at --target-prim=bt.2020
and --target-trc=pq
. The gamma is a little darker, probably due to the Nvidia driver, but that's easily compensated for. I find I prefer the color saturation. Probably caused by the high contrast.
The automatic switching in Windows, is all but gone. The last time I tested that with something that I previously knew would achieve it.... it no longer worked. MadVR now uses the Nvidia API to flip the HDR switch on and off. It's a workaround, and a crap one. Not sure what happens with iGPUs. Being able to set the colorspace at runtime, in an auto-profile would be another workaround, but the SDR picture won't look any different if you leave your display in 8 bit.
_> I've been wrestling with this, for a while. And the answer to your question is, it doesn't look like this is going to be set at runtime.
I've raised the question, here: #7346
And partially, here: #7406
Your best way, is:
Turn HDR on, leave it in 8bit. SDR will play correctly, you won't notice the difference (I've run a boat load of tests). HDR stuff will for the most part, play correctly, but I have had anomalies. To correct those, create an auto-profile for bt.2020 stuff. Along the lines you already have, but like this:
[HDR] profile-desc=HDR stuff profile-cond=p["video-params/primaries"]=="bt.2020" target-trc=pq target-prim=bt.2020
I've chosen to set my Nvidia GPU to 4:2:2 12bpc, and run everything at
--target-prim=bt.2020
and--target-trc=pq
. The gamma is a little darker, probably due to the Nvidia driver, but that's easily compensated for. I find I prefer the color saturation. Probably caused by the high contrast.The automatic switching in Windows, is all but gone. The last time I tested that with something that I previously knew would achieve it.... it no longer worked. MadVR now uses the Nvidia API to flip the HDR switch on and off. It's a workaround, and a crap one. Not sure what happens with iGPUs. Being able to set the colorspace at runtime, in an auto-profile would be another workaround, but the SDR picture won't look any different if you leave your display in 8 bit._
**Thank you for your suggestion, but I did a lot testing and comparation: The video quality of the activated graphics card HDR API is obviously better than that of the WIN10 OS HDR API. In addition, some film professionals have tested the PQ curve of the two, the HDR PQ curve of the graphics card appears smoother. Of course, the more important reason why I don't want to turn on the WIN10 HDR switch is: the interface will be abnormally bright, so when you don't want to watch movies, You have to manually turn off the WIN10 HDR again!
Now my temporary solution is to use two mpv programs to run HDR and SDR respectively**
Yes, this why I use the Nvidia color settings in the control panel. The picture quality is much better. With SDR stuff, I'm less than puritanical. It's rubbish to begin with. I actually think SDR stuff is improved by this. Just today, I was retesting what 'standard' SDR looks like. I couldn't get used to it.
That said, VLC does actually achieve what you're looking for. I don't know how it differs from mpv, in this way. Possible runtime preconfigurations?
I will give my support for the ability to set csp at runtime. This would be a great function to have. @jeeb any chance of that happening?
@Doofussy2 that is on my todo list. Have just been busy with $dayjob and other things.
@Doofussy2 that is on my todo list. Have just been busy with $dayjob and other things.
That's excellent! Thank you @jeeb, and I am not meaning to pressure you. I know that this is an unpaid project for you guys. I very much appreciate the work.
Through "d3d11-output-csp=pq" you can automatically activate the HDR API of the graphics card. This is much better than manually opening the HDR of WIN10, but it will also force the activation of HDR when playing SDR videos. In addition, by writing the profile "profile-desc" =cond:p["video-params/primaries"]=="bt.2020" also cannot switch "d3d11-output-csp=pq".
Please add a new function: "d3d11-output-csp=pq" will only take effect when playing HDR, or it can be switched on and off through the profile