natural-harmonia-gropius / hdr-toys

Componentized Rec.2100 to Rec.709 conversion shader for mpv-player, featuring dynamic curves and a uniform color space.
MIT License
119 stars 1 forks source link

Noob questions #18

Closed ghost closed 1 year ago

ghost commented 1 year ago

Hi! I made this account just to ask some noob questions, I hope you don't mind. I'm trying to tonemap hdr to sdr and after 2 weeks of just searching forums and trying hundrends of changes to the settings of different video players I've found that your config with mvp is the closest I've come. To be exact, the tm process changed to hable and +3 added to contrast and brightness and lowering the saturation a bit. I want 4k hdr videos to look exactly or close to their 1080p counterpart, I understand that it's difficult due to many variables but after so much time wasted I'm desperate. If you have any suggestions to make it even better I would be very grateful, or maybe should I just take it or leave it? 2 further side questions: With you config the interface changes color, can i reverse that? What does the [gray] setting do? Sorry for the block of text, have a great day.

natural-harmonia-gropius commented 1 year ago

I hope you don't mind.

Feel free to talk.

I've found that your config with mvp is the closest I've come. To be exact, the tm process changed to hable and +3 added to contrast and brightness and lowering the saturation a bit.

I completely abandoned tone-mapping of mpv, As a more optimal solution, I use https://github.com/natural-harmonia-gropius/hdr-toys. The TM curve in dynamic is called "hable2", But it's completely different thing from mpv's "hable".

With you config the interface changes color, can i reverse that?

I also want to solve, but did not find a way.

A more in-depth answer: I let mpv output the HDR signal to skip its internal tone-mapping, UI color changes are a side effect.

If you are saying changes also in SDR, remove:

script-opts-add=uosc-foreground=FFFBFE
script-opts-add=uosc-foreground_text=1C1B1F
script-opts-add=uosc-background=1C1B1F
script-opts-add=uosc-background_text=FFFBFE

What does the [gray] setting do?

Some comics use this format, and they are usually processed with a half-tone filter. I want to smooth out the gaps between the dots.

danbezerra commented 1 year ago

Allow me to jump on this thread with a question as well. I noticed you added tone-mapping=clip to your latest MPV.conf file. Since I'm still getting educated on MPV (I mainly use MadVR until now), I spent some time reading the MPV wiki and got surprised that Clip is not an option that they recommend. Would you mind explaining why you decided to go with it?

Still on the same subject - Not sure if you saw what MadVR recently implemented. It's a roll-off of clipped pixels, implemented as a post process of the core DTM steps and limited to cases where clipping would occur. Would something similar make sense here? you can follow some of the initial discussion here:

https://www.avsforum.com/threads/improving-madvr-hdr-to-sdr-mapping-for-projector-no-support-questions.2954506/page-764

natural-harmonia-gropius commented 1 year ago

--tone-mapping did nothing with my config, I bypassed it.

why you decided to go with it?

tone-mapping=clip could speedup the startup on my pc, that libplacebo may calculates lut or do somethngs here.

> It's a roll-off of clipped pixels

I use global peak metering so there shouldn't have clipped pixels. The existing white parts are just very bright and have low contrast.

madshi: I've implemented Javs' requested "roll-off of clipped pixels", as an alternative to gamut roll-off.

It's gamut-mapping/compress.

ghost commented 1 year ago

Thanks for the quick response. Yes, I know about hdr toys, i downloaded the whole config file here, placed it in mpv's folder in roaming, then deleted stuff i don't want (yet). The toys are the only thing in shaders and their helper in scripts. Then in mpv.conf I tried all the tm options from the table on the toys' page. Only dynamic, bt446a and hable looks ok to me, the latter being the best, hable2 seems to be the same as hable but just a little bit brighter. The main criteria I used for comparison was a scene in TLOU when they overlook the giraffes and the sky is much grayer or on some much brighter and washed out, unsalvageable even by tweaking the equalizer except on those 4 tm options. The 2 hables are still too dark so I boosted stuff as I said. So just as my last question, do you know any other options I could change to try and make it even closer to the sdr version as the colors still don't match exactly? Although it kinda looks better now but I just want to exhaust all possibilites as a sunk cost fallacy.

natural-harmonia-gropius commented 1 year ago

all the tm options

I implement them as in their books, In fact I am not satisfied with TMs other than dynamic.

The 2 hables are still too dark

If you use tone-mappng/clip and also feels too dark, try glsl-shader-opts-add=L_sdr=100

when they overlook the giraffes and the sky is much grayer or on some much brighter and washed out

Clips pls. ffmpeg -i input.mp4 -ss 00:00 -t 10 output.mp4

make it even closer to the sdr version as the colors still don't match exactly?

Screenshot pls. In design of dynamic, hue should be preserved, only bright areas will be desaturated.

do you know any other options I could change to try

No, may could be provide based on samples.

ghost commented 1 year ago

tone-mappng/clip is darker on dark areas and makes the sky insanely bright to the point you can't see anything blue. Also, after trying another 4k bluray I realized even if hable works for me on the tlou, it won't on others. So what's the point of tuning the settings to my liking when it won't work on all, plus even if it did, it still wouldn't be 100% accurate to the studio's vision. You can close the thread now, thank you for your time, I truly appreciate the help.

natural-harmonia-gropius commented 1 year ago

tone-mappng/clip is darker on dark areas and makes the sky insanely bright to the point you can't see anything blue.

That is the purpose of clip. The sky in both is white, while the tree tops, sand, grass in the second one is also white, which obviously deviates from the creator's intention. Conversely, if you feel the scene is not bright enough, It means the reference white of creator used is lower.

image image

You can close the thread now

😊