Michael Chourdakis
Michael Chourdakis

Reputation: 11178

Video isn't recognized as HDR in YouTube upload

After managing to export HDR H.265 video with the Nvidia SDK I am trying to push to YouTube. This is a direct link to the video and here is the YouTube link, a simple 1 second green screen.

YouTube says that I need to have certain metadata in the file, so I used their tool to inject it. With MediaInfo I got this:

enter image description here

and yet my video doesn't show as HDR in YouTube.

This link has also a New York HDR file. When I upload the very same file into YouTube it isn't shown as HDR.

This YouTube video shows correctly as HDR and when I grab it and send it to mediainfo it has similar metadata:

enter image description here

but when I upload it myself to YouTube it isn't showing as HDR.

What am I missing?

Thanks a lot.

Upvotes: 1

Views: 268

Answers (1)

Michael Chourdakis
Michael Chourdakis

Reputation: 11178

For anyone interested. The metadata must be present in the codec, not in the container. Therefore, the way to achieve this via NvEnc is to include the "Color Description" flags as follows:

ne.encodeCodecConfig.hevcConfig.hevcVUIParameters.videoSignalTypePresentFlag = 1;
ne.encodeCodecConfig.hevcConfig.hevcVUIParameters.videoFormat = NV_ENC_VUI_VIDEO_FORMAT_UNSPECIFIED;
ne.encodeCodecConfig.hevcConfig.hevcVUIParameters.videoFullRangeFlag = 0;
ne.encodeCodecConfig.hevcConfig.hevcVUIParameters.colourDescriptionPresentFlag = 1;
ne.encodeCodecConfig.hevcConfig.hevcVUIParameters.colourPrimaries = NV_ENC_VUI_COLOR_PRIMARIES_BT2020;
ne.encodeCodecConfig.hevcConfig.hevcVUIParameters.transferCharacteristics = NV_ENC_VUI_TRANSFER_CHARACTERISTIC_SMPTE2084;
ne.encodeCodecConfig.hevcConfig.hevcVUIParameters.colourMatrix = NV_ENC_VUI_MATRIX_COEFFS_BT2020_NCL;

Upvotes: 1

Related Questions