Support for YouTube HDR/HLG in CoreELEC

We have been working the last few days to finally get HDR to work in YouTube.
Starting with version 19.2-Matrix_rc2, CoreELEC introduces support for both HDR10 and HLG formats with the VP9 codec, which is primarily used in YouTube.
Make sure that InputStream.Adaptive is installed and that MPEG-DASH is enabled, and the HDR toggle is enabled in YouTube settings.

A coupe of interesting tidbits for comparison purposes:

  • HLG videos play as HDR10 (incorrectly) in YouTube in Android on Amlogic.
  • Apparently, the HDR metadata in Kodi on Android is currently mapped incorrectly. This issue affects all Android based platforms, but it is likely to be fixed in the future, as I’ve opened a pull request with a proposed fix.

@noggin I’m not 100% sure on the correctness of the metadata, though. I see that you have a HD Fury, could you please verify that the metadata you see in the Kodi or dmesg log (search for config) matches the metadata that is actually going to the display?


I just tested this out and it works perfectly on my Ugoos X2 (S905X2) box. The only thing I had to do to make it work was to un-tick ‘Disable GUI Scaling’ to remove some flickering, I expect this is a side-effect of using that setting. One disabled though it looks great!

If it could be at all possible for it to work with the GUI Scaling it would be perfect!

Nice work!
Wich youtube addon need to be installed?

The YouTube addon from the Kodi repository. I’m not familiar with any others.

@FXB78 UI flickering issue has been discussed in length on this forum. It’s a hardware limitation, some devices work OK with this option, while others not so much. That’s why it’s an option you can toggle on or off. In any case, it does not affect video quality, only GUI elements, and only at resolutions higher than 1080P.

I’m aware of the previous discussions, and with scaling enabled I never have any issues with video or UI flickering, even when watching 4K video. However when testing 4K HDR with YouTube I see flickering of the Video, regardless of the UI being visible or not. I just thought I’d mention it considering that’s what this thread is about.

If it’s a hardware limitation then fine, I can always disable it if need be.

I think @Vasco has mentioned that he fixed flickering by unchecking the Force 4:2:2 option in CoreELEC System settings.

The changes have been pushed and will be in the next nightly build.


Yes, worked for me!

There are two bugs in RC2:

  1. Some VP9 HDR content that does not have Content Light Level (CLL) metadata still doesn’t play in HDR. (The Redwoods and The World In HDR demo videos that you can find on the kodi wiki)
  2. The Luminance metadata was not passed correctly to the kernel, which in turn must have used nothing or a default value.
  3. Chromaticity was also completely wrong, but it has been fixed and should be correct now.

These 2 issues were fixed and will be included in the next nightly, and also in any future stable build.


YouTube fails me a lot, I get this message. I have it well configured with its api but not it ends up working fine.

Although this post is quite a bit off topic, you should really set up your own personal API keys.
We use YouTube a lot in my home, and I’ve never had a problem after setting up my own keys. Search the forum, there have been long threads about it.

1 Like

Works without a hiccup so far on any of the 4K HDR content I’ve thrown at it. Thanks so much!

I installed YouTube just to try this. Works well on both minix u22 boxes. Thanks Just need that Dolby Vision :star_struck:

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.

About | FAQ | Terms of Service | Privacy Policy | Legal Notice