ionwake 2 days ago

Sorry for the noob question but I think finally someone in this thread can answer this for me. Sometimes when I see a youtube short video it looks like its HDR is whacked up by like 500% as per the image in this page, but Im confused how this could be done. Is video processing on the video before it is uploaded somehow giving it some sort of encoding which chrome just wacks up? Or is it the hardware doing it and encoding it a certain way?

I am not talking about a slight brightness increase, I am talking Ill be scrolling youtube and suddenly this video is like a portal into another dimension its so bright.

Can anyone explain how its done?

3
harrall 2 days ago

Screens can't often do full brightness on the whole screen so if you come across a video or image that is supposed to have a higher contrast ratio, the system will darken everything and then brighten up the pixels that are supposed to be brighter.

Yes, there are formats that able to store a higher contrast ratio so that's why it doesn't happen on non-HDR content but the actual brightening of a portal on your screen isn't because of the format but because of your hardware (and software) choosing to interpret the format that way.

For more a practical example, if you had an 8-bit HDR image, 255 on the red channel (after inputting this number through a math function like HLG[1] to "extract" a brightness number) might mean "make this pixel really bright red" whereas 255 on a SDR format would mean "just regular red." However, each red channel is still a number between 0 and 255 on both formats but your hardware decided to make it brighter on the HDR format.

(Although in reality, HDR formats are often 10-bit or higher because 256 values is not enough range to store both color and brightness so you would see banding[2]. Also, I have been using RGB for my example but you can store color/brightness number many other ways, such as with chroma subsampling[3], especially when you realize human eyes are more sensitive to some colors more than others so you could "devote fewer bits" to some colors.)

[1] https://en.wikipedia.org/wiki/Hybrid_log%E2%80%93gamma

[2] https://en.wikipedia.org/wiki/Colour_banding

[3] https://en.wikipedia.org/wiki/Chroma_subsampling

kllrnohj 2 days ago

> Screens can't often do full brightness on the whole screen so if you come across a video or image that is supposed to have a higher contrast ratio, the system will darken everything and then brighten up the pixels that are supposed to be brighter.

There's no system that does that. The only thing that's kinda similar is at the display level there's a concept known as the "window size" since many displays cannot show peak brightness across the entire display. If you've ever seen brightness talked about in context of a "5%" or "10%" window size, this is what it means - the brightness the display can do when only 5% of the display is max-white, and the rest is black.

But outside of fullscreen this doesn't tend to be much of any issue in practice, and it depends on the display.

drodgers 2 days ago

> There's no system that does that.

You mean the darkening of everything else to highlight bright HDR areas? All recent Macs do, including the one I'm typing on right now. It's a little disconcerting the first time it happens, but the effect is actually great!

kllrnohj 2 days ago

Apple doesn't darken SDR to amplify HDR. They keep SDR the same brightness as it was before HDR showed up. It appears like SDR gets dimmer because of your perception of contrast, but it's not actually within a small margin of error.

dr_kiszonka 2 days ago

I use YouTube on my rather inexpensive TV. When a thumbnail of an HDR video starts playing, the whole screen brightens up significantly. I don't know as much about HDR as you do, so maybe they are using some other perceptual trick. It might also not be "full brightness." BTW, why can't screens do full brightness on the whole screen?

ionwake 2 days ago

Thank you so much for your reply - I will look into it!

detaro 2 days ago

The video is marked as containing a different color space with a higher brightness/color range. That could either be because the initial camera recorded it that way (e.g. iPhones can do that) or because someone took a "normal" video and edited it.

ionwake 2 days ago

Would this be specific software on the iphone used to record a video ? Or a default setting on a certain iphone? I ask because I only very rarely see this whacked up HDR youtube short, like super rarely.

detaro 2 days ago

Fairly sure a stock iPhone can do it, but you might need to enable it explicitly for compatibility reasons? And depending how you edit or upload the video it could get lost there too, it's still something where support is not really universal.

ionwake 2 days ago

Interesting Im starting to think that perhaps only certain video software on an iphone would allow it - which explains why its so rare?

LoganDark 2 days ago

Does this video look super whacked up to you too? It is HDR: https://www.youtube.com/watch?v=ceSiK-0HX_I

ionwake 2 days ago

Yes it is! But how does one make their video upload HDR? I am familiar with video editing but am unsure how I would perform a test, using a test video with my iphone, and upload it so it doesnt lose its HDR encoding? I believe there is a HDR setting for my phone, but I dont think it will upload by default in a HDR state such as the link you just gave me.

Thanks to everyone trying to help me understand this. I have heard of HDR for years but Ive never witnessed my macbook darken and brighten a video before like 2 months ago.

LoganDark 2 days ago

which MacBook do you have?

if you record in HDR, uploading that raw footage to YouTube should produce an HDR video. to get the raw footage, you can either upload the file directly from the phone, or AirDrop it to your Mac from Photos (you should get a .mov), or sync it to iCloud (or connect the phone over USB, maybe) and then use Photos' "File > Export Unmodified Original"

ionwake 2 days ago

I have an M1 macbook, and an iphone 13. Thanks for instructions I think you are right I have to do a specific flow so the HDR isnt lost ie in software like CapnCut I suppose. Thanks again for the help m so glad Ive slowly figured this out with ur help.

LoganDark 2 days ago

yep, plenty of software will export in non-HDR and lose the information. some software (i.e. iMovie, Final Cut Pro, DaVinci Resolve) won't lose the information when configured correctly, but HDR workflow is always a bit different than SDR.

kllrnohj 2 days ago

There's many factors in play from what your SDR white point is at, how your OS handles HDR video, what the content contains, and finally what your brain is doing.

HDR10(+) & Dolby Vision, for example, encode content at absolute luminance, so they are basically completely trash formats since that's an insane thing to expect (the spec for authoring content in this format literally just goes "lol idk do X if you think it's going to be seen in a movie theater of Y for TV and hope"). Sadly, they are also quite common. Mobile phones (both Android & iOS) are instead pushing HLG, which is better. Although then hilariously MacOS's handling of HLG was atrocious until the latest update which fixed it but only if the video contains a magic flag that iPhone sets, but isn't standard so nobody else sets it (the "avme" tag https://developer.apple.com/documentation/technotes/tn3145-h... )

There's then also just how your eyes & brain react. When HDR shows up and suddenly the white background of a page looks like a dim gray? That's 100% a perceptual illusion. The actual light being emitted didn't change, just your perception of it did. This is a very hard problem to deal with, and it's one that so far the HDR industry as a whole has basically just ignored. But it's why there's a push to artificially limit the HDR range in mixed conditions, eg https://github.com/w3c/csswg-drafts/issues/9074

ionwake 2 days ago

You clearly know alot about this, but I think there could be a misunderstanding. Not trying to offend but when I see the youtube link mentioned above in the other comment, my macbook screen literally goes darker AROUND the video , which gets brighter. I am not making this up. I think its how chrome on macbooks handles raw HDR encoding.

Can someone else confirm I am not mad?

PS - I am not trying to shut you down, you clearly know alot in the space I am just explaining what Im experiencing on this hardware.

kllrnohj 2 days ago

> my macbook screen literally goes darker AROUND the video , which gets brighter. I am not making this up

This is almost certainly your eyes playing tricks on you, actually. Setup that situation where you know if you scroll down or whatever it'll happen, but before triggering it cover up the area where the HDR will be with something solid - like a piece of cardboard or whatever. Then do it. You'll likely not notice anything change, or if there is a shift it'll be very minor. Yet as soon as you remove that thing physically covering the area, bam it'll look gray.

It's a more intense version of the simultaneous contrast illusions: https://en.wikipedia.org/wiki/Contrast_effect & https://en.wikipedia.org/wiki/Checker_shadow_illusion

Eyes be weird.

astrange 2 days ago

The screen is literally getting darker so the HDR video will appear to have more contrast.

https://prolost.com/blog/edr

kllrnohj 2 days ago

No, it literally isn't. It's literally doing the opposite, it increases the display brightness in order to show the HDR content. The SDR content is dimmed proportional to the increase such that SDR has the same emitted brightness before & after the change.

SDR brightness is not reduced to "add contrast". The blog post doesn't seem to say that anywhere, either, but if it does it's simply wrong. As a general note it seems wrong about a lot of aspects, like saying that Apple does this on non-HDR displays. They don't. It then also conflates EDR with whether or not HDR is used. EDR is simply the representation of content between apps & the compositor. It's a working space not entirely unlike scRGB where 0.0-1.0 is simply the SDR range, and it can go beyond that. But going beyond the maximum reported EDR range, which can be as low as 1.0, the result is simply clipped. So they are not "simulating" HDR on a non-HDR display.

astrange 2 days ago

I agree with what you said, but I was trying to give the layman summary ;)

> The SDR content is dimmed proportional to the increase such that SDR has the same emitted brightness before & after the change.

That's the intent, but because things aren't perfect it actually tends to get darker instead of stay perceptually the same. It depends on which panel you're using. MBPs are prone to this, XDR displays aren't.

kllrnohj 2 days ago

> I agree with what you said, but I was trying to give the layman summary ;)

Your layman summary is wrong, though. Brightness stays the same is the summary, whereas you said it gets darker.

> MBPs are prone to this, XDR displays aren't.

On my M1 16" MBP it doesn't have any issue. The transition is slow, but the end result is reasonably aligned to before the transition. But yes MBP displays are not Apple's best. Sadly that remains something exclusive to the iPad