Jump to content


Photo

HDR tone-mapping with mpv


Best Answer Doofus , 19 March 2019 - 09:45 PM

Here's a starter pack for those who haven't done this, before. This assumes that your desktop coloring looks like a standard desktop. This is important!

1. Download the Adobe attachment, and unzip it to; C:\Windows\System32\spool\drivers\color

2. Download the mpv config attachment, and unzip it to; %AppData%\Roaming

3. Go play a movie :)

Any questions, ask them, here :)

 

(more information and an updated configuration, can be found here)

Go to the full post


  • Please log in to reply
295 replies to this topic

#21 Doofus ONLINE  

Doofus

    Advanced Member

  • Members
  • 12282 posts
  • Local time: 09:57 AM

Posted 25 February 2019 - 01:28 PM

I experimented using the same Nvidia settings. I kept having some contrast issues with some things. Using the icc was better, but when I switched to default, it got noticably better. I did have to re-adjust my display a little, after I switched, though. I think Nvidia might have been making changes on top of the icc.
  • HugoMillette likes this

#22 Doofus ONLINE  

Doofus

    Advanced Member

  • Members
  • 12282 posts
  • Local time: 09:57 AM

Posted 25 February 2019 - 05:40 PM

At this point, anyone using Theater/mpv, I'd recommend not using the GPU settings, use the default settings and use the Windows icc. And then use mpv to make any adjustments.

#23 markyp OFFLINE  

markyp

    Advanced Member

  • Members
  • 238 posts
  • Local time: 05:57 PM

Posted 26 February 2019 - 02:36 AM

Hi doofus,

When you say default, what exactly do you mean?

#24 Doofus ONLINE  

Doofus

    Advanced Member

  • Members
  • 12282 posts
  • Local time: 09:57 AM

Posted 26 February 2019 - 09:33 PM

Hi doofus,

When you say default, what exactly do you mean?

 

5c75e8c9afecc_Snapshot_160.jpg


  • markyp likes this

#25 Doofus ONLINE  

Doofus

    Advanced Member

  • Members
  • 12282 posts
  • Local time: 09:57 AM

Posted 28 February 2019 - 12:28 AM

I just updated the icc post. It's not setting the correct colorspace for SDR content. Continue to use target-prim=bt.2020 if you are in HDR10. 


Edited by Doofus, 28 February 2019 - 01:03 AM.


#26 Doofus ONLINE  

Doofus

    Advanced Member

  • Members
  • 12282 posts
  • Local time: 09:57 AM

Posted 28 February 2019 - 12:49 AM

Yikes! Ok, the plot thickens. I have to use separate profiles for HDR and SDR. Generally using target-prim=bt.2020 for SDR, but using icc-profle-auto for HDR. Using target-prim for both is fine, but I find icc-profile is giving me better results for HDR



#27 Doofus ONLINE  

Doofus

    Advanced Member

  • Members
  • 12282 posts
  • Local time: 09:57 AM

Posted 28 February 2019 - 01:00 AM

To illustrate what I'm talking about, here're screenshots from Polar

 

icc-profile-auto

5c776a825b3b2_mpvshot0001.jpg

 

 

target-prim=bt.2020 (notice the red around the gun, and the color of the gun)

5c776ad12e417_mpvshot0002.jpg


Edited by Doofus, 28 February 2019 - 01:38 AM.


#28 Doofus ONLINE  

Doofus

    Advanced Member

  • Members
  • 12282 posts
  • Local time: 09:57 AM

Posted 28 February 2019 - 01:17 AM

If all of that is a bit confusing, here's my entire mpv.conf that I use for Theater.

gpu-api=opengl
hwdec=nvdec
target-prim=bt.2020
opengl-pbo
deband

hwdec-codecs=all

force-seekable=yes

sub-create-cc-track=yes
sub-pos=90
sub-ass-override=no
sub-forced-only

audio-device=wasapi/marantz-AVR (NVIDIA High Definition Audio)
audio-exclusive=yes

log-file="D:\mpv logs\Theater mpv log.txt"

[Convert to AC3]
profile-desc=cond:p["audio-codec-name"]=="aac" or p["audio-codec-name"]=="mp3"
af=lavcac3enc=yes:640:2

[Video Codec]
profile-desc=cond:p["video-codec"]==hevc
hwdec=nvdec
no-vf=lavfi=yadif

[HDR]
profile-desc=cond:p["video-params/primaries"]=="bt.2020"
hdr-compute-peak=yes
tone-mapping=reinhard
target-peak=250
tone-mapping-desaturate=4.0
icc-profile-auto
tone-mapping-max-boost=1.3
hwdec=nvdec
no-vf=lavfi=yadif

[Interlaced]
profile-desc=cond:p["video-frame-info/interlaced"]
vf=lavfi=yadif
hwdec=nvdec-copy

[720p]
profile-desc=cond:p["width"]==1280
hwdec=nvdec
no-vf=lavfi=yadif



Edited by Doofus, 28 February 2019 - 01:19 AM.


#29 Doofus ONLINE  

Doofus

    Advanced Member

  • Members
  • 12282 posts
  • Local time: 09:57 AM

Posted 28 February 2019 - 11:06 PM

disregard 


Edited by Doofus, 03 March 2019 - 05:12 PM.


#30 Doofus ONLINE  

Doofus

    Advanced Member

  • Members
  • 12282 posts
  • Local time: 09:57 AM

Posted 03 March 2019 - 06:35 PM

If anyone has their display in HDR10 wants to use a BT.2020 icc color profile, you can get one here.

 

http://www.color.org...b/BT2020.xalter

 

Windows' default icc is sRGB. So you might want to experiment.

 

I'm testing it with mpv, and it's looking promising. 

 

Once you get the profile installed in the OS and apply it, for mpv, you use this config, and you're pretty much done.

hdr-compute-peak=yes
tone-mapping=reinhard
icc-profile-auto

Edited by Doofus, 03 March 2019 - 09:17 PM.


#31 Doofus ONLINE  

Doofus

    Advanced Member

  • Members
  • 12282 posts
  • Local time: 09:57 AM

Posted 03 March 2019 - 09:39 PM

Using the BT.2020 icc made the colors is a little too desaturated. I think the tone-mapping is probably designed primarily for the default Windows color space. So after further testing and comparisons with HDR passthrough, using the default Windows color space (see picture), with the below mpv config, gives me my most favored result.

 

5c7c7e4f94395_Snapshot_161.jpg

hdr-compute-peak=yes
tone-mapping=reinhard
icc-profile-auto

A fantastic picture. 

 

Life of Pi

5c7c803a1c283_mpvshot0002.jpg

 

 

Lucy

5c7c8052b7361_mpvshot0001.jpg

 

 

Avengers: Infinity War

5c7c8083737cd_mpvshot0003.jpg

 

 

And here's a different shot from Chess. I've been struggling to get the brightness of this scene correct, and now it pretty much is.

5c7c80d555b0f_mpvshot0004.jpg

 

 

No more anomalous color variations. Much richer blacks. I'm very happy with these results!


Edited by Doofus, 03 March 2019 - 09:40 PM.


#32 lorac OFFLINE  

lorac

    Advanced Member

  • Members
  • 409 posts
  • Local time: 09:57 AM
  • LocationVancouver, Canada

Posted 03 March 2019 - 09:48 PM

Until next week...

Sent from my ONEPLUS A6003 using Tapatalk
  • Doofus and PrincessClevage like this

#33 Doofus ONLINE  

Doofus

    Advanced Member

  • Members
  • 12282 posts
  • Local time: 09:57 AM

Posted 03 March 2019 - 09:52 PM

Until next week...

Sent from my ONEPLUS A6003 using Tapatalk

 

lol....yeah, always looking to improve. But it'll be difficult to make this notably better. If haasn implements his plan of histogram tone-mapping, then that will be significant.



#34 lorac OFFLINE  

lorac

    Advanced Member

  • Members
  • 409 posts
  • Local time: 09:57 AM
  • LocationVancouver, Canada

Posted 03 March 2019 - 09:56 PM

Alright. I'll give it a shot. Your testing is always appreciated!

Sent from my ONEPLUS A6003 using Tapatalk
  • Doofus likes this

#35 Doofus ONLINE  

Doofus

    Advanced Member

  • Members
  • 12282 posts
  • Local time: 09:57 AM

Posted 03 March 2019 - 10:02 PM

@Luke and @ebr, for the apps that you're rolling mpv into, you may want to consider embedding this or make it an option.

--icc-profile-auto 

 https://mpv.io/manua...cc-profile-auto


Edited by Doofus, 03 March 2019 - 10:03 PM.


#36 Doofus ONLINE  

Doofus

    Advanced Member

  • Members
  • 12282 posts
  • Local time: 09:57 AM

Posted 03 March 2019 - 10:55 PM

That appears to work perfectly on my SDR display, too. But needed to bump the brightness, a little. Which also works on my HDR display.

hdr-compute-peak=yes
tone-mapping=reinhard
icc-profile-auto
brightness=3


#37 PrincessClevage OFFLINE  

PrincessClevage

    Advanced Member

  • Members
  • 1039 posts
  • Local time: 02:57 AM

Posted 04 March 2019 - 05:46 AM

Using the BT.2020 icc made the colors is a little too desaturated. I think the tone-mapping is probably designed primarily for the default Windows color space. So after further testing and comparisons with HDR passthrough, using the default Windows color space (see picture), with the below mpv config, gives me my most favored result.

5c7c7e4f94395_Snapshot_161.jpg

hdr-compute-peak=yestone-mapping=reinhardicc-profile-auto
A fantastic picture.

Life of Pi
5c7c803a1c283_mpvshot0002.jpg


Lucy
5c7c8052b7361_mpvshot0001.jpg


Avengers: Infinity War
5c7c8083737cd_mpvshot0003.jpg


And here's a different shot from Chess. I've been struggling to get the brightness of this scene correct, and now it pretty much is.
5c7c80d555b0f_mpvshot0004.jpg


No more anomalous color variations. Much richer blacks. I'm very happy with these results!
I can not see this colour profile setting in win 10 latest patch’s. Perhaps a sdr option?

Edited by PrincessClevage, 04 March 2019 - 06:28 AM.


#38 Doofus ONLINE  

Doofus

    Advanced Member

  • Members
  • 12282 posts
  • Local time: 09:57 AM

Posted 04 March 2019 - 10:47 AM

I can not see this colour profile setting in win 10 latest patch’s. Perhaps a sdr option?


What options do you have?

#39 lorac OFFLINE  

lorac

    Advanced Member

  • Members
  • 409 posts
  • Local time: 09:57 AM
  • LocationVancouver, Canada

Posted 04 March 2019 - 05:21 PM

I also don't see any options for selecting a different colour profile even after installing the ICC profile and rebooting. Since you say the default Windows profile works best I won't be too concerned.

 

Now for the MPV config you posted your full configuration a few posts back and then yesterday some slightly different settings.

 

Do you now use the same config but you've just added brightness=3 to the config?



#40 Doofus ONLINE  

Doofus

    Advanced Member

  • Members
  • 12282 posts
  • Local time: 09:57 AM

Posted 04 March 2019 - 06:16 PM

I also don't see any options for selecting a different colour profile even after installing the ICC profile and rebooting. Since you say the default Windows profile works best I won't be too concerned.

Now for the MPV config you posted your full configuration a few posts back and then yesterday some slightly different settings.

Do you now use the same config but you've just added brightness=3 to the config?


Yup, just like post #36




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users