DJI Mavic, Air and Mini Drones
Friendly, Helpful & Knowledgeable Community
Join Us Now

Uploading HDR video to YouTube: What you need to know!

BlueBay

Well-Known Member
Joined
Sep 4, 2018
Messages
87
Reactions
55
Location
Antigua & London
I just thought I'd share the information regarding my journey to find out exactly what is required to upload true HDR content to YouTube. Because it's difficult to get any clear information.

Plus the YouTube upload process does nothing to validate the content, which is very poor in my view. You can wait for hours to see if the upload was successful and not realise that the encoding does not meet the upload requirements!

So, here is the link to the latest YouTube HDR upload requirements:

Upload High Dynamic Range (HDR) videos - YouTube Help

H.265 is not supported, only H.264.
 

Attachments

  • screenshot-support.google.com-2018.09.19-16-50-42.png
    screenshot-support.google.com-2018.09.19-16-50-42.png
    84.8 KB · Views: 66
  • Like
Reactions: AeroJ
Yes, h265 (HEVC) is supported and supports 10-bit PQ (HDR-10) on YouTube. I do encoding and video engineering for one of the online movie streaming companies and have tested our UHD HDR encodes on YouTube.

It's important to have the proper metadata in place in order for everything to work correctly. We use ffmpeg and x265 so I can't vouch for any other encoding tools but it does work. Since displaying HDR is dependent on the actual display device i am not sure what YouTube's player is doing on display and whether or not it is simply tonemapping everything or if would display (for example) 1000nit content correctly if your display is capable. In the browser it at least interprets the HDR metadata correctly and does the proper colorspace conversion and gets the gamma (transfer characteristic) correct, so that is good.

Uploaded File said:
Video
ID : 1
Format : HEVC
Format/Info : High Efficiency Video Coding
Commercial name : HDR10
Format profile : Main 10@L5@Main
Codec ID : hev1
Codec ID/Info : High Efficiency Video Coding
Duration : 12 min 14 s
Bit rate : 7 902 kb/s
Maximum bit rate : 16.8 Mb/s
Width : 3 840 pixels
Height : 2 160 pixels
Display aspect ratio : 16:9
Frame rate mode : Variable
Frame rate : 23.976 (23976/1000) FPS
Minimum frame rate : 11.988 FPS
Maximum frame rate : 23.976 FPS
Original frame rate : 23.976 (24000/1001) FPS
Color space : YUV
Chroma subsampling : 4:2:0 (Type 2)
Bit depth : 10 bits
Bits/(Pixel*Frame) : 0.040
Stream size : 692 MiB (98%)
Writing library : x265 2.7+14-d7c26df32fae:[Linux][GCC 4.8.5][64 bit][noasm] 10bit

Tagged date : UTC 2018-09-19 17:54:53
Color range : Limited
Color primaries : BT.2020
Transfer characteristics : PQ
Matrix coefficients : BT.2020 non-constant
Mastering display color primaries : Display P3
Mastering display luminance : min: 0.0500 cd/m2, max: 1000 cd/m2
Maximum Content Light Level : 500 cd/m2
Maximum Frame-Average Light Level : 300 cd/m2

YouTube Converted File said:
Video
ID : 1
Format : VP9
Codec ID : V_VP9
Duration : 12 min 15 s
Bit rate : 20.4 Mb/s
Width : 3 840 pixels
Height : 2 160 pixels
Display aspect ratio : 16:9
Frame rate mode : Constant
Frame rate : 23.976 (24000/1001) FPS
Color space : YUV
Bits/(Pixel*Frame) : 0.102
Stream size : 1.74 GiB (95%)
Language : English
Default : Yes
Forced : No
Color range : Limited
Color primaries : BT.2020
Transfer characteristics : PQ
Matrix coefficients : BT.2020 non-constant
 
Yes, h265 (HEVC) is supported and supports 10-bit PQ (HDR-10) on YouTube. I do encoding and video engineering for one of the online movie streaming companies and have tested our UHD HDR encodes on YouTube.

It's important to have the proper metadata in place in order for everything to work correctly. We use ffmpeg and x265 so I can't vouch for any other encoding tools but it does work. Since displaying HDR is dependent on the actual display device i am not sure what YouTube's player is doing on display and whether or not it is simply tonemapping everything or if would display (for example) 1000nit content correctly if your display is capable. In the browser it at least interprets the HDR metadata correctly and does the proper colorspace conversion and gets the gamma (transfer characteristic) correct, so that is good.

Thanks for letting us know that H.265 works, despite there being no mention that this is supported within the YouTube documentation. I also really appreciate the extra technical data - thanks again for this, it's very helpful.

I've been reading a lot about the HDR metadata and how we (content creators, directors, producers) can specify elements such as the color space & gamma etc. This eliminates the criticism of HDR regarding the accuracy of the rendering on the device as specified by the content creator. Viewers can adjust HDR parameters via their device if they wish, but at least they have the option of viewing the content as intended.
 
Last edited:
It's a tough one. Especially with HDR. When we master for HDR we use a hardware/software combination that starts at $60k for just the basics, and that doesn't include a calibrated monitor (~$30-50k). A simplified ffmpeg encode might look something like:

ffmpeg -i INPUTFILE ffmpeg -i -c:v libx265 -pix_fmt yuv420p10le -preset veryslow -x265-params bitrate=BITRATE:vbv-maxrate=MAXRATE:vbv-bufsize=BUFSIZE:range=limited:colorprim=bt2020:transfer=smpte2084:colormatrix=bt2020nc:master-display='G(Xg,Yg)B(Xb,Yb)R(Xr,Yr)WP(Xw,Yw)L(Lmax,Lmin)':max-cll='CLL,FALL' OUTPUTFILE

The stuff in RED describes typical encoding bitrate stuff, the stuff in GREEN tells the display that this is wide gamut color that is graded in HDR (i.e. tells the display to "turn on" HDR mode - this is what lights up the icon on your HDR TV, if it has one), the stuff in FUSCHIA is the calibration of your monitor so that the display can properly adapt if it can't reach the full capabilities of the monitor the program was graded on (this is typical as a professional post house will have the highest capabilities - greater than almost all consumer displays, but the consumer display can adapt given that it knows what the colorist was looking at) and the THIS COLOR WHATEVER IT IS at the end is a measurement of the actual content itself when you are finished grading that warns the display how bright the picture will actually get so it can scale accordingly and prevent clipping.

Some software will take care of this for you, but I have yet to find any consumer-friendly encoder that does it correctly or completely. FFMPEG isn't that difficult if you aren't afraid of the terminal and is very efficient (many of the GUI products are just FFMPEG with limited access to features under the hood anyway, like Handbrake).

I find it really interesting that the Mavic 2 Pro chose to shoot in HLG HDR. This makes sense in that HLG (Hybrid-Log-Gamma) is just SDR with extended dynamic range so that if you play HLG content on a non-HDR display it will look ok, whereas if you play HDR-10 (PQ) HDR on a non HDR display it will look very flat and desaturated, much as DLog-M does before you grade it (its the same idea, use a log gamma curve to record and preserve extra dynamic range you can't with typical broadcast gamma). While many HDR displays support HLG (when I play my M2P HLG footage direct on my TV it shows the HLG icon and displays correctly) there is little to no HLG commercial content in the US (HLG was created by BBC and NHK) most US commercial content is either HDR-10 (as in the ffmpeg example above) or DolbyVision (requiring a proprietary licensed system to create).

Regardless, my point is that creating HDR requires careful setup of every step in the workflow to maintain the colorspace and wide color gamut. I see so many examples of "HDR" content that, even though they say they are HDR, the content only uses the dynamic range of standard dynamic range because at some point in their pipeline the system converted the content, mapping the tonality to standard broadcast colorspace in the middle while the input file and output settings were set to HDR.
 
Haha. Glad it was helpful. A friend of mine asked what HDR meant the other day and then she accused me of “mansplaining” when my response was more than a sentence.

#cantwin
 
  • Like
Reactions: Dan C
Haha. Glad it was helpful. A friend of mine asked what HDR meant the other day and then she accused me of “mansplaining” when my response was more than a sentence.

#cantwin

Ha! I get that too! I now ask if they want a low fidelity or high fidelity explanation! :)

Thanks again for the detailed explanation of HDR & HLG. I found it very well written with a logical structure.

Now for the question of 12-bit, 10-bit & 8-bit content. I assume that it's not possible to produce true HDR in 8-bit, is that correct?

I know that we are way ahead of the curve in this discussion, most of the developed consumer World is 8-bit and will be for some time, the high-end consumers can squeeze 10-bit and Pro's or very high-end consumers have access to 12-bit.

For me, as a 'Prosumer', I think the sweet spot is 10-bit HDR, as it really makes for some jaw-dropping & eye-popping content!

Regarding HLG, I can understand why the BBC have chosen this broadcast strategy for now, but it will be difficult to broadcast in the USA without HDR10.
 
Last edited:
It's a tough one. Especially with HDR. When we master for HDR we use a hardware/software combination that starts at $60k for just the basics, and that doesn't include a calibrated monitor (~$30-50k). A simplified ffmpeg encode might look something like:

ffmpeg -i INPUTFILE ffmpeg -i -c:v libx265 -pix_fmt yuv420p10le -preset veryslow -x265-params bitrate=BITRATE:vbv-maxrate=MAXRATE:vbv-bufsize=BUFSIZE:range=limited:colorprim=bt2020:transfer=smpte2084:colormatrix=bt2020nc:master-display='G(Xg,Yg)B(Xb,Yb)R(Xr,Yr)WP(Xw,Yw)L(Lmax,Lmin)':max-cll='CLL,FALL' OUTPUTFILE

The stuff in RED describes typical encoding bitrate stuff, the stuff in GREEN tells the display that this is wide gamut color that is graded in HDR (i.e. tells the display to "turn on" HDR mode - this is what lights up the icon on your HDR TV, if it has one), the stuff in FUSCHIA is the calibration of your monitor so that the display can properly adapt if it can't reach the full capabilities of the monitor the program was graded on (this is typical as a professional post house will have the highest capabilities - greater than almost all consumer displays, but the consumer display can adapt given that it knows what the colorist was looking at) and the THIS COLOR WHATEVER IT IS at the end is a measurement of the actual content itself when you are finished grading that warns the display how bright the picture will actually get so it can scale accordingly and prevent clipping.

Some software will take care of this for you, but I have yet to find any consumer-friendly encoder that does it correctly or completely. FFMPEG isn't that difficult if you aren't afraid of the terminal and is very efficient (many of the GUI products are just FFMPEG with limited access to features under the hood anyway, like Handbrake).

I find it really interesting that the Mavic 2 Pro chose to shoot in HLG HDR. This makes sense in that HLG (Hybrid-Log-Gamma) is just SDR with extended dynamic range so that if you play HLG content on a non-HDR display it will look ok, whereas if you play HDR-10 (PQ) HDR on a non HDR display it will look very flat and desaturated, much as DLog-M does before you grade it (its the same idea, use a log gamma curve to record and preserve extra dynamic range you can't with typical broadcast gamma). While many HDR displays support HLG (when I play my M2P HLG footage direct on my TV it shows the HLG icon and displays correctly) there is little to no HLG commercial content in the US (HLG was created by BBC and NHK) most US commercial content is either HDR-10 (as in the ffmpeg example above) or DolbyVision (requiring a proprietary licensed system to create).

Regardless, my point is that creating HDR requires careful setup of every step in the workflow to maintain the colorspace and wide color gamut. I see so many examples of "HDR" content that, even though they say they are HDR, the content only uses the dynamic range of standard dynamic range because at some point in their pipeline the system converted the content, mapping the tonality to standard broadcast colorspace in the middle while the input file and output settings were set to HDR.

Hi, Nice to meet you.
Your information is what I really wanted and thanksful.

Anyway, if I watch HLG videos which were recorded from Mavic 2 pro(H.265 setting) on my Sony X940E(HLG, DV, HDR10 support), Can I watch it as HDR contents without color grading?
 
Lycus Tech Mavic Air 3 Case

DJI Drone Deals

New Threads

Forum statistics

Threads
134,438
Messages
1,594,781
Members
162,975
Latest member
JNard1