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. Replace mpv with the March 10 2019 build 64 bit or 32 bit

 

    Just download it and unzip it to; %AppData%\Roaming\Emby-Theater\system\x64\mpv

 

4. 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
324 replies to this topic

#121 lightsout OFFLINE  

lightsout

    Advanced Member

  • Members
  • 616 posts
  • Local time: 04:18 AM

Posted 23 March 2019 - 10:16 AM

My basic and limited understanding is that rgb = hightest bandwidth requirements, then 4:4:4 then 4:2:2 then 4:2:0

Depending what combination of hz and bit rate will dictate your hardware requirements. I will see if I can find the link that shows you the limitations of hdmi versions. Only the new hdmi standard has higher enough bandwidth to support 4:4:4 or rgb at 10bit 60hz 4K Rez

I know my HDMI chain is good. But now I see what your saying I found the manual to my TV and it takes a specific combination to get 4:4:4. I'll have to me with it today.

#122 Doofus OFFLINE  

Doofus

    Advanced Member

  • Members
  • 12617 posts
  • Local time: 04:18 AM

Posted 25 March 2019 - 12:12 AM

For anyone interested, here's a link to some icc profiles. The rec 2020 doesn't work as well as the adobe profile, for me. But maybe it will work, for you. There are some SDR profiles, too.

 

http://color.support/iccprofiles.html

 

UPDATE:

 

Apparently the rec2020 is calibrated to Gamma 2.4. Switching my display to gamma 2.4, it does look better. Still testing...

 

 

UPDATE 2:

 

No bueno for me. The color inaccuracies I was getting, I also get with that profile. Maybe it'll work better, for you guys. 


Edited by Doofus, 25 March 2019 - 12:24 AM.


#123 Doofus OFFLINE  

Doofus

    Advanced Member

  • Members
  • 12617 posts
  • Local time: 04:18 AM

Posted 25 March 2019 - 09:45 PM

I know my HDMI chain is good. But now I see what your saying I found the manual to my TV and it takes a specific combination to get 4:4:4. I'll have to me with it today.

 

@lightsout

Take a look at your receiver settings, too. I bought a new receiver recently, because I thought it didn't support HDR passthrough at 60Hz. I was just looking at the manual for the old receiver, and it turns out that I needed to do some jiggery pokery with it, and it should have worked. But what the manual said was that if I set it to 4:4:4, and my connected equipment didn't support 4:4:4, the picture would turn red. So maybe something similar is happening with yours?



#124 lightsout OFFLINE  

lightsout

    Advanced Member

  • Members
  • 616 posts
  • Local time: 04:18 AM

Posted 25 March 2019 - 10:17 PM

@lightsout

Take a look at your receiver settings, too. I bought a new receiver recently, because I thought it didn't support HDR passthrough at 60Hz. I was just looking at the manual for the old receiver, and it turns out that I needed to do some jiggery pokery with it, and it should have worked. But what the manual said was that if I set it to 4:4:4, and my connected equipment didn't support 4:4:4, the picture would turn red. So maybe something similar is happening with yours?

Thanks yeah mine has a setting for 4k 60hz called enhanced. I did learn that my TV has to be getting a 60HZ signal to do 4:4:4. So I can't let ET or MadVR auto change the resolution.



#125 Doofus OFFLINE  

Doofus

    Advanced Member

  • Members
  • 12617 posts
  • Local time: 04:18 AM

Posted 25 March 2019 - 10:22 PM

Thanks yeah mine has a setting for 4k 60hz called enhanced. I did learn that my TV has to be getting a 60HZ signal to do 4:4:4. So I can't let ET or MadVR auto change the resolution.

 

Ah, that's interesting. You sound like you have a Marantz or Denon receiver? I have a Marantz.



#126 lightsout OFFLINE  

lightsout

    Advanced Member

  • Members
  • 616 posts
  • Local time: 04:18 AM

Posted 25 March 2019 - 10:26 PM

Ah, that's interesting. You sound like you have a Marantz or Denon receiver? I have a Marantz.

Yes Denon X1400h. On an unrelated note I am having some weird issues with color in HDR content. In ET with tone mapping it looks great. But now madvr with mpc the color looks kind of dim. Not terrible like when its all washed out because its not processing the HDR right. But I have the new spider man and he looks kind of orange with madvr.

 

I have the same issue with emby on the Shield with this file (its 2160p) but it looks correct with the plex app on the Shield.

 

So poor looking red with madvr and emby on Shield

Vibrant red with ET and Plex on Shield.

 

Really strange.



#127 Doofus OFFLINE  

Doofus

    Advanced Member

  • Members
  • 12617 posts
  • Local time: 04:18 AM

Posted 25 March 2019 - 10:40 PM

Yes Denon X1400h. On an unrelated note I am having some weird issues with color in HDR content. In ET with tone mapping it looks great. But now madvr with mpc the color looks kind of dim. Not terrible like when its all washed out because its not processing the HDR right. But I have the new spider man and he looks kind of orange with madvr.

 

I have the same issue with emby on the Shield with this file (its 2160p) but it looks correct with the plex app on the Shield.

 

So poor looking red with madvr and emby on Shield

Vibrant red with ET and Plex on Shield.

 

Really strange.

 

The only thing I can think of is that Plex and ET are tone mapping, and the madVR and Emby Shield is passing the metadata? And there's a difference in your TV calibration/color settings?



#128 lightsout OFFLINE  

lightsout

    Advanced Member

  • Members
  • 616 posts
  • Local time: 04:18 AM

Posted 25 March 2019 - 10:52 PM

The only thing I can think of is that Plex and ET are tone mapping, and the madVR and Emby Shield is passing the metadata? And there's a difference in your TV calibration/color settings?

As far as I know the only one tone mapping is ET. Pretty should the HDR thing comes on for all the rest.
It's definitely some setting but I'm at a loss. On a positive note ET looks great. It's frustrating and I'm kind of tired of messing with it lol.

#129 Doofus OFFLINE  

Doofus

    Advanced Member

  • Members
  • 12617 posts
  • Local time: 04:18 AM

Posted 25 March 2019 - 11:13 PM

As far as I know the only one tone mapping is ET. Pretty should the HDR thing comes on for all the rest.
It's definitely some setting but I'm at a loss. On a positive note ET looks great. It's frustrating and I'm kind of tired of messing with it lol.

 

Ha! I honestly think madVR is a PITA and a waste of time. I don't know what's happening with Shield, but I love how I have mpv/Theater, right now. It's not absolutely identical to HDR passthrough, and I think that is a good thing. I was comparing other HDR videos on Shield to mpv, and I prefer mpv, at this point. But there is no accounting for taste :) I just can't stand the jiggery pokery I have to do to get madVR to work. It just isn't worth the effort. I think it was @Jdiesel that postulated that doesn't everyone want to watch the video exactly as the way it was designed (paraphrasing)? The answer is, no. Before the advent of such technology, anyone who bought a TV would adjust the settings to their preference. Nothing has changed. Just because some stranger says this is the way I want you to see it, doesn't mean you should abandon your own preferences.  When I was comparing multiple HDR titles between passthrough and how mpv tone maps, I found that most of the time, I preferred what mpv was doing. And I can tweak it to my own taste. I prefer a brighter image, and I can achieve this, with mpv, while not losing color saturation. It's an improvement. I don't want other people deciding how I should watch something. They don't have my eyes, my retinas, my viewing environment, my display or my taste. Why should I watch it their way? It makes no sense. 

 

Excuse the rant :D


Edited by Doofus, 25 March 2019 - 11:16 PM.


#130 lightsout OFFLINE  

lightsout

    Advanced Member

  • Members
  • 616 posts
  • Local time: 04:18 AM

Posted 25 March 2019 - 11:34 PM

Ha! I honestly think madVR is a PITA and a waste of time. I don't know what's happening with Shield, but I love how I have mpv/Theater, right now. It's not absolutely identical to HDR passthrough, and I think that is a good thing. I was comparing other HDR videos on Shield to mpv, and I prefer mpv, at this point. But there is no accounting for taste :) I just can't stand the jiggery pokery I have to do to get madVR to work. It just isn't worth the effort. I think it was @Jdiesel that postulated that doesn't everyone want to watch the video exactly as the way it was designed (paraphrasing)? The answer is, no. Before the advent of such technology, anyone who bought a TV would adjust the settings to their preference. Nothing has changed. Just because some stranger says this is the way I want you to see it, doesn't mean you should abandon your own preferences.  When I was comparing multiple HDR titles between passthrough and how mpv tone maps, I found that most of the time, I preferred what mpv was doing. And I can tweak it to my own taste. I prefer a brighter image, and I can achieve this, with mpv, while not losing color saturation. It's an improvement. I don't want other people deciding how I should watch something. They don't have my eyes, my retinas, my viewing environment, my display or my taste. Why should I watch it their way? It makes no sense. 

 

Excuse the rant :D

Lol I have to agree, in the past I have used settings I didn't really like because they were supposed to be more correct. I would like to read up on doing some tweaking with MPV.

So weird finding. My TV can only do 4:4:4 when at 60HZ. But that does the weird color thing. So I tried going back to 23hz, which in testing is only 4:2:2, and its looking right again. So apparently

I don't want it doing 4:4:4, glad I figured something out because this sort of thing bugs me.



#131 Doofus OFFLINE  

Doofus

    Advanced Member

  • Members
  • 12617 posts
  • Local time: 04:18 AM

Posted 26 March 2019 - 12:13 AM

Lol I have to agree, in the past I have used settings I didn't really like because they were supposed to be more correct. I would like to read up on doing some tweaking with MPV.

So weird finding. My TV can only do 4:4:4 when at 60HZ. But that does the weird color thing. So I tried going back to 23hz, which in testing is only 4:2:2, and its looking right again. So apparently

I don't want it doing 4:4:4, glad I figured something out because this sort of thing bugs me.

 

mpv has a plethora of options. The icc is what sets the parameters for use of RGB conversion to screen output. Giving greater accuracy (if using a compatible icc).

 

Here is my present mpv.conf

gpu-api=auto
hwdec=d3d11va
icc-profile=C:\Windows\System32\spool\drivers\color\Adobe RGB (1998) D65 WP 2.2 Gamma.icc
icc-contrast=20000
deband
saturation=0
brightness=0
deinterlace=no

video-sync=display-vdrop

hwdec-codecs=all

demuxer-lavf-analyzeduration=3

screenshot-format=jpg
screenshot-high-bit-depth=yes

force-seekable=yes

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

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

[Interlaced]
profile-desc=cond:p["video-frame-info/interlaced"]
deinterlace=yes
hwdec=d3d11va-copy

[720p]
profile-desc=cond:p["width"]==1280
deinterlace=no

[HDR]
profile-desc=cond:p["video-params/primaries"]=="bt.2020"
hdr-compute-peak=yes
tone-mapping=reinhard
icc-profile=C:\Windows\System32\spool\drivers\color\Adobe RGB (1998) D65 WP 2.2 Gamma.icc
icc-contrast=inf
brightness=0
saturation=0
hwdec=d3d11va
deinterlace=no

Edited by Doofus, 28 March 2019 - 12:39 AM.


#132 lightsout OFFLINE  

lightsout

    Advanced Member

  • Members
  • 616 posts
  • Local time: 04:18 AM

Posted 26 March 2019 - 12:09 PM

Thanks for that. Looks like your converting aac and mp3 to ac3? Any reason I'm particular?

#133 Doofus OFFLINE  

Doofus

    Advanced Member

  • Members
  • 12617 posts
  • Local time: 04:18 AM

Posted 26 March 2019 - 12:19 PM

I have a lot of media with stereo AAC, and I have 7.1.2 Atmos speaker arrangement. Hearing only stereo audio is not very nice. So I convert to AC3 then my receiver processes it to Atmos. It makes my music sound much better, that's why I added mp3 conversion, too.

#134 lightsout OFFLINE  

lightsout

    Advanced Member

  • Members
  • 616 posts
  • Local time: 04:18 AM

Posted 26 March 2019 - 02:02 PM

I have a lot of media with stereo AAC, and I have 7.1.2 Atmos speaker arrangement. Hearing only stereo audio is not very nice. So I convert to AC3 then my receiver processes it to Atmos. It makes my music sound much better, that's why I added mp3 conversion, too.

Ah I see your one of those guys :) I like to keep stereo music stereo. To each is own of course.

 

How do you like the Atmos setup? I just bought a new house and I have a 5.1 setup. The surrounds are in walls that are behind the couch. I have high vaulted ceilings so atmos would be quite a chore, what that my wife wouldn't appreciate lol.



#135 Doofus OFFLINE  

Doofus

    Advanced Member

  • Members
  • 12617 posts
  • Local time: 04:18 AM

Posted 26 March 2019 - 02:22 PM

I love my audio. While not a true audiophile, I'm particular about my surround sound. I will only use cabinet speakers. The Atmos is of little consequence, just a fun thing. But the audio at ear level is something I strive to get, correct. I hear all the extraneous sounds. I've been to some excellent movie theaters and I much prefer my own audio. I want the clarity and detail. It's also why I don't use neuralx. It loses a lot of the detail. It's funny that people think that stereo is how music is meant to be. The original incarnation of recorded audio was mono, because that was the best they could do. Then came stereo, also because that was the best they could do. And it became so consistent, it stuck. But actual audio, any audio, is immersive. That's how we're supposed to hear it. So continuing to listen in stereo when I can do so much better, really makes no sense.

#136 lightsout OFFLINE  

lightsout

    Advanced Member

  • Members
  • 616 posts
  • Local time: 04:18 AM

Posted 26 March 2019 - 04:12 PM

I love my audio. While not a true audiophile, I'm particular about my surround sound. I will only use cabinet speakers. The Atmos is of little consequence, just a fun thing. But the audio at ear level is something I strive to get, correct. I hear all the extraneous sounds. I've been to some excellent movie theaters and I much prefer my own audio. I want the clarity and detail. It's also why I don't use neuralx. It loses a lot of the detail. It's funny that people think that stereo is how music is meant to be. The original incarnation of recorded audio was mono, because that was the best they could do. Then came stereo, also because that was the best they could do. And it became so consistent, it stuck. But actual audio, any audio, is immersive. That's how we're supposed to hear it. So continuing to listen in stereo when I can do so much better, really makes no sense.

But if the source is stereo then you just get "fake" immersive. ;)

 

What mode do you use on your AVR to convert stereo to Atmos? Does it have an actual atmos upmixing mode? My receiver does Atmos but when it only have 5.1 (actually 5.2) speakers setup it doesn't show up. So it will play an atmos track in True HD unless you hook up the height speakers. 



#137 Doofus OFFLINE  

Doofus

    Advanced Member

  • Members
  • 12617 posts
  • Local time: 04:18 AM

Posted 26 March 2019 - 04:24 PM

But if the source is stereo then you just get "fake" immersive. ;)

What mode do you use on your AVR to convert stereo to Atmos? Does it have an actual atmos upmixing mode? My receiver does Atmos but when it only have 5.1 (actually 5.2) speakers setup it doesn't show up. So it will play an atmos track in True HD unless you hook up the height speakers.


Right, but a manufacturered immersion is better than none.

My receiver is set to auto, and is calibrated for the speaker arrangement. So AC3 is expanded to all speakers. And as long as it's well engineered stereo, the audio fields are correctly separated. It doesn't say Atmos on the receiver, it only displays what the input it is, as it's bitstreamed.

#138 lightsout OFFLINE  

lightsout

    Advanced Member

  • Members
  • 616 posts
  • Local time: 04:18 AM

Posted 26 March 2019 - 04:28 PM

But your doing some sort of processing to get it to change the bistreamed stereo to something else correct? Shouldn't that have a name? I've never used Marantz just Denon and Onkyo.

#139 Doofus OFFLINE  

Doofus

    Advanced Member

  • Members
  • 12617 posts
  • Local time: 04:18 AM

Posted 26 March 2019 - 04:53 PM

Don't quote me on this, but I believe the receiver just turns on the amps that have been allocated to speakers, and generates audio for them, that don't already have audio. That's pretty much what object based processing is. HDMI doesn't support more than 7.1 so for the other channels, the receiver has to generate the audio, itself. But in this case there is no metadata, so it just analyzes the audio and extrapolates.

#140 lightsout OFFLINE  

lightsout

    Advanced Member

  • Members
  • 616 posts
  • Local time: 04:18 AM

Posted 26 March 2019 - 05:35 PM

Interesting. Do you do that to audio from a Blu Ray source as well? Or just low quality audio?




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users