Log in

View Full Version : I Have Published a HDR10 to HLG Converter


Pages : 1 2 3 4 5 6 7 8 9 [10]

wyup
12th July 2025, 15:31
I did try ffmpeg's libplacebo colorspace conversion to convert HDR10 to HLG with this command:

ffmpeg -init_hw_device vulkan -i .\PQmovie.mp4 -vf libplacebo=colorspace=bt2020c:color_primaries=bt2020:color_trc=arib-std-b67:range=tv -c:v libx265 -tune grain -b:v 15M HLG.mp4

.. but I get different colors and exposure to the original,both when viewed on a HDR tv and tonemapped to SDR on my PC. Movie is 99.45% under 1,000 nits. Real MaxCLL is 1,077 nits measured with madvr. Mediainfo says MaxCLL 690.

I thought of filing a bug on libplacebo, but I'm realising I should need to adjust a exposure compensation or a reference diffuse white with your pq2hlg script to get it right. I don't have the SDR counterpart to compare, so how can I find a reference white value to get the same exposure as the HDR10 master?

wswartzendruber
14th July 2025, 00:32
There are some ways to determine reference white if you don't have an SDR disc:

1. Go to Blu-ray.com and look it up. You can use those screenshots (once grayscaled) to compare against the same frame of the 4K disc, if you can find said frame.

2. Go through the 4K movie and try to find a bright white sheet of paper that's well lit. Not with a spot light, but with area lighting. Then use the bundled pqprev script to take a snapshot of that. Open an image editor and sample a pixel there. Compare its brightness and find the closest one in this table:

https://wswartzendruber.net/uploads/pq-values.txt

That number of nits is the movie's reference white value.

wyup
15th July 2025, 22:11
How do I sample the pixel from the screenshot? It's supposed to give me RGB values, not the luminance signal percentage..

wswartzendruber
17th July 2025, 05:20
How do I sample the pixel from the screenshot? It's supposed to give me RGB values, not the luminance signal percentage..
Just open it up in an image editor and sample the pixel. If you're app shows colors at 0..255 and it says 127, then it's a pixel that's at 50% PQ.

(About 100 nits, in other words.)

wswartzendruber
3rd June 2026, 06:26
I thought I'd share that I just stumbled upon this little cookie:

Mastering display luminance : min: 0.0050 cd/m2, max: 4000 cd/m2
Maximum Content Light Level : 10000 cd/m2

From Godzilla (1998).

FranceBB
21st June 2026, 21:07
I thought I'd share that I just stumbled upon this little cookie:


From Godzilla (1998).

People: "Why?"
Colorist: Because...!

Hopefully it was done on a scene-by-scene basis and it's not a lousy mapping, but I wouldn't be surprised if it was the latter... :(
(or perhaps there's option 3: the metadata is just wrong and nothing actually peaks that high).

If you're actually going to measure it, let us know, I'm curious now.