Convert YouTube HDR for the vero4k

Hi,
The current youtube plugin (and/or kodi) does not support 4k HDR content yet (Codec vp9.2) but i want to play some videos on my hopefully soon arriving vero4k, as its my only 4k hdr compatible player (my older LG OLED built in player is lacking lots of functuality) i was wondering what are the best settings for this?

I can download the 4k content with youtube-dl but will the vero4k play vp9.2 directly our should i convert the video to hevc using ffmpeg?

Anyone done something like that yet?
Thanks!

Vero 4K can play VP9 so you don’t need to do any transcoding.

I’m not sure if YouTube HDR has the right meta-data. It would be interesting if you could report back your findings.

Sam

did a few test conversions today and on my home pc (4 Core i5) even converting a 3min clip of 4k HDR content from vp9.2 to HEVC took almost an hour. But i got it working on the tvs built in player (i was amazed as it was the first HDR video i got working besides LG demos)

But getting youtubes hdr content working without transcoding would definatly be a huge time saver :smile: and i could automate the process of downloading and muxing video and audio on my home server.

cant wait to get my vero to do some testing!

Had a look at this myself with my newly acquired Vero 4K.

I have plenty of 2160p/HDR content playing beautifully but YouTube videos that are supposedly in HDR downloaded using youtube-dl don’t play back with the correct colour space - my TV (Sony XD93) doesn’t switch to HDR mode.

An example file: - YouTube

If downloading the “best” quality video using youtube-dl which is identified as:
337 webm 3840x2160 2160p60 HDR 17970k , vp9.2, 60fps, video only, 154.40MiB

…then a .webm file is produced.

Mediainfo 17.12 gives some pretty barebones info about it:

General
Complete name                            : Real 4K HDR 60fps - OLED Art in HDR-yuaRV9hCI8A.webm
Format                                   : WebM
Format version                           : Version 4 / Version 2
File size                                : 154 MiB
Duration                                 : 1 min 14 s
Overall bit rate                         : 17.3 Mb/s
Writing application                      : google/video-file
Writing library                          : google/video-file

Video
ID                                       : 1
Format                                   : VP9
Codec ID                                 : V_VP9
Duration                                 : 1 min 14 s
Bit rate                                 : 16.6 Mb/s
Width                                    : 3 840 pixels
Height                                   : 2 160 pixels
Display aspect ratio                     : 16:9
Frame rate mode                          : Constant
Frame rate                               : 60.000 FPS
Color space                              : YUV
Bits/(Pixel*Frame)                       : 0.033
Stream size                              : 148 MiB (96%)
Language                                 : English
Default                                  : Yes
Forced                                   : No
Color range                              : Limited
Color primaries                          : BT.2020
Transfer characteristics                 : PQ
Matrix coefficients                      : BT.709

This seems to be missing the same kind of metadata that other HDR files contain after the “Color primaries” line like:

Matrix coefficients                      : BT.2020 non-constant
Mastering display color primaries        : R: x=1.000000 y=1.000000, G: x=1.000000 y=1.000000, B: x=1.000000 y=1.000000, White point: x=1.000000 y=1.000000
Mastering display luminance              : min: 0.1000 cd/m2, max: 0 cd/m2

So, I’m not sure that any media player trying to play them would display them correctly.

Any ideas of another way to get these YouTube HDR videos to play correctly?

You can try forcing 10-bit output which will also change the colour space presently.

Sam

Ah - I see, that might help. How is that achieved? Thanks…

Try: echo “444,10bit” | sudo tee /sys/class/amhdmitx/amhdmitx0/attr

Sad to hear its not working out of the box.
My Vero 4K did not arrive yet so i cant join testing.

These are the ffmpeg flag to convert the youtube HDR videos to working hevc for my tvs builtin player:
ffmpeg.exe -i “%YOUTUBE-HDR-VP92-VIDEO%” -i “%YOUTUBE-AUDIO%” -c:a ac3 -b:a 192k -c:v libx265 -tag:v hvc1 -crf 22 -pix_fmt yuv420p10le -x265-params “colorprim=bt2020:transfer=smpte2084:colormatrix=bt2020nc” test.mkv

Maybe they are for some use.

Does your display give you an HDR10 icon when you start playback?

@sam_nazarko
After the HEVC Conversion it works on my TV with HDR Icon popping up. But i cant compare it to the vp9 file, this one wont playback at all on my tv.

The .webm files received straight from youtube-dl do not trigger HDR mode on my Sony.

As for that setting to force 10-bit output, is it supposed to take effect immediately (I entered it via an SSH session), or do I need to do anything else?

I have a feeling that the .webm files simply don’t have the correct HDR metadata. If mediainfo can’t see it then I wouldn’t have thought any decoder/renderer would know what to do…VP9 (Profile 2) could be different of course.

If no HDR is triggered then the problem is with the file unfortunately. Changing the attributes won’t help unfortunately.

Sam

Found another one that has slightly different mediainfo properties:

General
Complete name                            : The World in HDR in 4K (ULTRA HD)-tO01J-M3g0U.webm
Format                                   : WebM
Format version                           : Version 4 / Version 2
File size                                : 323 MiB
Duration                                 : 2 min 34 s
Overall bit rate                         : 17.5 Mb/s
Writing application                      : google/video-file
Writing library                          : google/video-file

Video
ID                                       : 1
Format                                   : VP9
Codec ID                                 : V_VP9
Duration                                 : 2 min 34 s
Bit rate                                 : 16.8 Mb/s
Width                                    : 3 840 pixels
Height                                   : 2 160 pixels
Display aspect ratio                     : 16:9
Frame rate mode                          : Constant
Frame rate                               : 59.940 FPS
Color space                              : YUV
Bits/(Pixel*Frame)                       : 0.034
Stream size                              : 310 MiB (96%)
Language                                 : English
Default                                  : Yes
Forced                                   : No
Color range                              : Limited
Color primaries                          : BT.2020
Transfer characteristics                 : PQ
Matrix coefficients                      : BT.2020 non-constant

This one at least has “Color Primaries” and “Matrix coefficients” as the same colour space.

It still doesn’t trigger HDR mode for me…

Still not sure if I forced the output to 10-bit however. I can’t see any perceivable difference having set it vs. leaving “attr” blank. Do I need to restart Kodi for it to take effect?

Should not be necessary.
Make sure Adjust Refresh Rate is enabled.

BT2020 != HDR. I don’t think the HDR metadata works properly on YouTube yet. I recall seeing similar comments.

Fair enough. Not to worry…there are a lot of HDR-capable devices that even have the YouTube app baked in that still don’t support the HDR vids properly, none of the Sony 4K TVs released thus far support it…wish Google had chosen a more broad standard like HDR10.

Yes - BT.2020 doesn’t mean HDR. It specs colour primaries and the RGB->YCbCr matrix. The EOTF needs to specified separately for HDR. (The EOTF is the Electro Optical Transfer Function and specifies how the video signal should be output in light level terms)

However the Transfer Characteristic of PQ (Perceptive Quantisation) in the Media Info suggests a PQ EOTF should be used - which is an HDR EOTF. ST.2084 is a PQ EOTF for instance.

(HLG HDR is not PQ-based and uses a different EOTF - not all HDR is PQ.)

Just wanted to report that i installed my vero 4k yesterday and everything works great :slight_smile:
HDR works great with my 2015 LG OLED in my converted (HEVC) Youtube Videos and other demos from the internet.

But direct youtube vp9.2/webm files dont switch to HDR mode at the moment as reported before.

Hi

Any progress on .web VP 9 profile 2 HDR files?

I also try to open The World in HDR in 4K (ULTRA HD)-tO01J-M3g0U.webm on my Philips POS 9002 TV with no luck:(

Colours are washed out. I tried echo “444,10bit” | sudo tee /sys/class/amhdmitx/amhdmitx0/attr but my Tv doen’t display HDR popout :frowning:

Best regards

VP9 Playback is working as expected

Are you sure that YouTube is getting an HDR file however? I believe there are limits on the quality that it receives

@lukcinek
Couldnt get VP9.2 (HDR) working either. Guess there is no support for this yet. They playback fine but won’t switch my tv to HDR like HEVC encoded content.
The files downloaded with youtube-dl (GitHub - ytdl-org/youtube-dl: Command-line program to download videos from YouTube.com and other video sites) should be HDR, on my PC they definatly look like it on players.