Proper settings for YouTube 4k HDR

Get answers to your questions about color grading, editing and finishing with DaVinci Resolve.
  • Author
  • Message
Offline
User avatar

joema4

  • Posts: 448
  • Joined: Wed Feb 03, 2021 3:26 pm
  • Real Name: Joe Marler

Re: Proper settings for YouTube 4k HDR

PostFri Dec 06, 2024 5:48 pm

Andrew Kolakowski wrote:...Reason is simple. YT creates different encodes ( h265, vp9,...) which takes time. Different browsers support different codecs. You need to give it a time to create all profiles... IT needs proper flagging so YT engine knows it's a HDR and properly encodes all profiles.

In this case I uploaded his test videos to Youtube six hours ago, so I don't think that's it. I tested it on several different HDR-capable machines and browsers -- and verified that using "Stats for Nerds", not just eyeballing it.

I inspected his metadata (see attached). Superficially, it looks OK. For some cases, Youtube recommends a command-line metadata tool to ensure videos are properly tagged: https://support.google.com/youtube/answer/7126552?hl=en

But no matter how it's tagged or encoded, HDR will not always work across the widely-varying devices, OSs, and browsers, even if they claim HDR capability.
Attachments
Sniper_Elite_and_Export_Metadata.jpg
Sniper_Elite_and_Export_Metadata.jpg (134.6 KiB) Viewed 2128 times
Offline

jcheil67

  • Posts: 30
  • Joined: Fri Mar 08, 2024 6:14 pm
  • Real Name: Jay Heil

Re: Proper settings for YouTube 4k HDR

PostFri Dec 06, 2024 7:00 pm

Andrew Kolakowski wrote:
You can "fix" those files with ffmpeg:
Code: Select all
fmpeg.exe -i C:\TestAsHDR.mp4 -bsf:v hevc_metadata=transfer_characteristics=16:colour_primaries=9:matrix_coefficients=9 -c copy  -movflags +write_colr C:\out.mov


This will add PQ flagging to your file.


FYI, I tried this and after about 30 mins, it showed up as HDR in YT!
I am also trying the DNxHR 10-bit format but wow does it make LARGE files. 3gb vs 66mb for h.265!I
will let everyone know of the outcome of that test. But so far, looks like the fmpeg option is the leader as far as being the ultimate winner.
Offline

jcheil67

  • Posts: 30
  • Joined: Fri Mar 08, 2024 6:14 pm
  • Real Name: Jay Heil

Re: Proper settings for YouTube 4k HDR

PostFri Dec 06, 2024 7:01 pm

joema4 wrote:
Andrew Kolakowski wrote:...Reason is simple. YT creates different encodes ( h265, vp9,...) which takes time. Different browsers support different codecs. You need to give it a time to create all profiles... IT needs proper flagging so YT engine knows it's a HDR and properly encodes all profiles.

In this case I uploaded his test videos to Youtube six hours ago, so I don't think that's it. I tested it on several different HDR-capable machines and browsers -- and verified that using "Stats for Nerds", not just eyeballing it.

I inspected his metadata (see attached). Superficially, it looks OK. For some cases, Youtube recommends a command-line metadata tool to ensure videos are properly tagged: https://support.google.com/youtube/answer/7126552?hl=en

But no matter how it's tagged or encoded, HDR will not always work across the widely-varying devices, OSs, and browsers, even if they claim HDR capability.


The frame rate of 60 vs 59.94 shouldn't matter correct? And I am curious why 59.94?? Seems like an odd number.
Offline

Andrew Kolakowski

  • Posts: 9538
  • Joined: Tue Sep 11, 2012 10:20 am
  • Location: Poland

Re: Proper settings for YouTube 4k HDR

PostFri Dec 06, 2024 7:39 pm

Don't worry about fps.
59.94 i 2x 'old' NTSC format frame rate which is 29.97 (more precisely it's 60000/1001 and 30000/1001).
60 is fine.
HDR should work across browsers. If not then no idea. 6h may not be enough to generate all profiles.

This mkv tool is really old and not needed today. Any encoder which sets properly private headers is enough.
Offline

Andrew Kolakowski

  • Posts: 9538
  • Joined: Tue Sep 11, 2012 10:20 am
  • Location: Poland

Re: Proper settings for YouTube 4k HDR

PostFri Dec 06, 2024 7:46 pm

jcheil67 wrote:
Andrew Kolakowski wrote:
You can "fix" those files with ffmpeg:
Code: Select all
fmpeg.exe -i C:\TestAsHDR.mp4 -bsf:v hevc_metadata=transfer_characteristics=16:colour_primaries=9:matrix_coefficients=9 -c copy  -movflags +write_colr C:\out.mov


This will add PQ flagging to your file.


FYI, I tried this and after about 30 mins, it showed up as HDR in YT!
I am also trying the DNxHR 10-bit format but wow does it make LARGE files. 3gb vs 66mb for h.265!I
will let everyone know of the outcome of that test. But so far, looks like the fmpeg option is the leader as far as being the ultimate winner.


Adding headers through ffmpeg bitstream filter is a good workaround- very quick and harmless. It's basically a copy operation with tiny extra bits set in the stream.
DNxHR route should also work. You could also try h264, vp9 or av1 (whatever shows in Resolve exporter)- maybe then Reoslve will set headers (not sure).
Offline
User avatar

Uli Plank

  • Posts: 25502
  • Joined: Fri Feb 08, 2013 2:48 am
  • Location: Germany and Indonesia

Re: Proper settings for YouTube 4k HDR

PostSat Dec 07, 2024 3:28 am

AFAIK AMCDXVideoPatcher by Alex Mogurenko can also change such headers.
My disaster protection: export a .drp file to a physically separated storage regularly.
Please visit digitalproduction.com/author/uliplank/

Studio 19.1.3
2017 iMac, MacOS 13.7.4, eGPU
MacBook M1 Pro and M4 Pro mini, MacOS 14.7.5
SE, USM G3
Offline

Andrew Kolakowski

  • Posts: 9538
  • Joined: Tue Sep 11, 2012 10:20 am
  • Location: Poland

Re: Proper settings for YouTube 4k HDR

PostSat Dec 07, 2024 11:01 am

AMCDXVideoPatcher doesn't change private h265 headers.
It only changes container headers which in this case is not enough.
Container headers are already set fine by Resolve.
Offline

Jordan40

  • Posts: 1
  • Joined: Sat Dec 07, 2024 3:13 pm
  • Real Name: Jordan Barrett

Re: Proper settings for YouTube 4k HDR

PostSat Dec 07, 2024 3:32 pm

Andrew Kolakowski wrote:
jcheil67 wrote:
Andrew Kolakowski wrote:
You can "fix" those files with ffmpeg:
Code: Select all
fmpeg.exe -i C:\TestAsHDR.mp4 -bsf:v hevc_metadata=transfer_characteristics=16:colour_primaries=9:matrix_coefficients=9 -c copy  -movflags +write_colr C:\out.mov


This will add PQ flagging to your file.


FYI, I tried this and after about 30 mins, it showed up as HDR in YT!
I am also trying the DNxHR 10-bit format but wow does it make LARGE files. 3gb vs 66mb for h.265!I
will let everyone know of the outcome of that test. But so far, looks like the fmpeg option is the leader as far as being the ultimate winner.


Adding headers through ffmpeg bitstream filter is a good workaround- very quick and harmless. It's basically a copy operation with tiny extra bits set in the stream.
DNxHR route should also work. You could also try h264, vp9 or av1 (whatever shows in Resolve exporter)- maybe then Reoslve will set headers (not sure).


Good info. Thanks. What would the ffmpeg commands be for HLG HDR? I have a desktop PC with Davinci Resolve Studio version, but my laptop only has free version of DR. Thanks!
Offline

Andrew Kolakowski

  • Posts: 9538
  • Joined: Tue Sep 11, 2012 10:20 am
  • Location: Poland

Re: Proper settings for YouTube 4k HDR

PostTue Dec 10, 2024 10:32 pm

You grade as HLG and then same command, except transfer_characteristics=18
Offline

CougerJoe

  • Posts: 600
  • Joined: Wed Sep 18, 2019 5:15 am
  • Real Name: bob brady

Re: Proper settings for YouTube 4k HDR

PostTue Dec 10, 2024 11:22 pm

joema4 wrote:
jcheil67 wrote:....All of us (including myself) have been able to get the first one to be recognized by YT. Just not the 2nd one (again, the point of this thread).

The current state of HDR video streaming is it's dependent on various things, some of which you cannot control. The version of the OS, type of device, version and type of browser, connection speed, etc.

Re why I didn't see HDR and others did -- that is an example. I uploaded your test videos six hours ago, so the non-HDR playback was caused by some other unknown factor. I tested it on several different HDR-capable machines and different browsers. I can see other HDR material, just not yours.



Is it in HDR now? You could give us the link in case it's in HDR but you don't see it it for some reason.
Offline
User avatar

joema4

  • Posts: 448
  • Joined: Wed Feb 03, 2021 3:26 pm
  • Real Name: Joe Marler

Re: Proper settings for YouTube 4k HDR

PostTue Dec 10, 2024 11:48 pm

CougerJoe wrote:..Is it in HDR now? You could give us the link in case it's in HDR but you don't see it it for some reason.


It shows HDR now, but it took a lot more than six hours (much less one hour). It was probably the next day before it was displayed in HDR.
Offline

dtaddis

  • Posts: 2
  • Joined: Fri May 22, 2020 8:25 pm
  • Real Name: David Addis

Re: Proper settings for YouTube 4k HDR

PostThu Feb 13, 2025 12:26 am

I just wanted to say thank you, with the ffmpeg command in this thread, I was able to export an HEVC video from Resolve, add the metadata, and upload it to YouTube. About 48 hours (!) later, it was recognised as an HDR video.

If you want to know if YouTube has recognised your video as HDR sooner than that, you could go to YouTube Studio, select your video, and go to the "Edit Video" tab on the left. Videos that later showed up as HDR had a "Videos with HDR might experience quality degradation after blur" warning at the top. Not sure if it's a 100% reliable indicator, but it seemed to correlate for me.

I was also able to add metadata to an AV1 video to get it recognised. I used the following ffmpeg command:

ffmpeg -i myvideo.mp4 -bsf:v av1_metadata=transfer_characteristics=16:color_primaries=9:matrix_coefficients=9 -c copy myvideo_hdr.mp4

Note the change of spelling. They've taken the correct spelling of "colour" from the HEVC metadata tags and changed it to the objectively incorrect spelling "color" for "color_primaries". Caught me out at first.
Attachments
Screenshot 2025-02-07 235352.png
Screenshot 2025-02-07 235352.png (7.47 KiB) Viewed 1634 times
Offline
User avatar

Uli Plank

  • Posts: 25502
  • Joined: Fri Feb 08, 2013 2:48 am
  • Location: Germany and Indonesia

Re: Proper settings for YouTube 4k HDR

PostThu Feb 13, 2025 12:57 am

That's British vs. American English.
My disaster protection: export a .drp file to a physically separated storage regularly.
Please visit digitalproduction.com/author/uliplank/

Studio 19.1.3
2017 iMac, MacOS 13.7.4, eGPU
MacBook M1 Pro and M4 Pro mini, MacOS 14.7.5
SE, USM G3
Offline

jcheil67

  • Posts: 30
  • Joined: Fri Mar 08, 2024 6:14 pm
  • Real Name: Jay Heil

Re: Proper settings for YouTube 4k HDR

PostThu Feb 13, 2025 3:52 am

dtaddis wrote:I just wanted to say thank you, with the ffmpeg command in this thread, I was able to export an HEVC video from Resolve, add the metadata, and upload it to YouTube. About 48 hours (!) later, it was recognised as an HDR video.


You are welcome! I started this thread without much hope but a bunch of GREAT people jumped in and really solved the problem once and for all. Every other google search comes up with something that doesn't work; this did.

All my videos look SO much better in HDR now:
https://www.youtube.com/@jcheil67

I thank you all again also!

Jay
Offline

Mixolydian

  • Posts: 454
  • Joined: Wed Feb 21, 2024 11:53 pm
  • Location: Planet Earth
  • Real Name: Sebastian Alvarez

Re: Proper settings for YouTube 4k HDR

PostMon Mar 03, 2025 12:06 am

joema4 wrote:
CougerJoe wrote:..Is it in HDR now? You could give us the link in case it's in HDR but you don't see it it for some reason.


It shows HDR now, but it took a lot more than six hours (much less one hour). It was probably the next day before it was displayed in HDR.


This the definitive solution. Something that I struggle with and many more do as well, called Patience. I was uploading 1 minute test videos encoded from Resolve in HDR, and following all the instructions in the YouTube help about HDR videos (https://support.google.com/youtube/answer/7126552?sjid=12962423167815852498-NA) and nothing worked. In the stats for nerds I would see bt.709, but I know the file was 2084/2020 because MediaInfo was showing that.

But today I opened the same uploads with my Apple TV 4K, which I have configured to show SDR but switch to whatever the stream is, HDR or Dolby Vision, and finally all these files were switching to HDR. So that's it, there's no need for ffmpeg or anything else, just set the encode options to Rec.2020 and St.2084 1000 nits, upload, wait a day and it's HDR.
Offline

jcheil67

  • Posts: 30
  • Joined: Fri Mar 08, 2024 6:14 pm
  • Real Name: Jay Heil

Re: Proper settings for YouTube 4k HDR

PostMon Mar 03, 2025 12:14 am

I waited plenty of days when I was doing all the tests in every possible format and suggestion that people had made. Waiting made no difference.
The only answer was the FFMpeg option which made it work without fail.
Now it's possible that YouTube upgraded their logic to somehow look for the HDR signatures in a different place.
Somebody above mentioned the technical reason why we had to run the FFMpeg against it. I don't remember the exact reason but something to do with it being in the headers but not in the file or something like that.
It's possible that YouTube now looks in both places.
Or DaVinci Resolve finally fixed the oversight and will put those headers in the right place or whatever.
But I can assure you when all of us were working on this problem when this post was first made, I had plenty of patience and no amount of patience made it work.
But good to know that now it may work without needing the extra step.
Last edited by jcheil67 on Mon Mar 03, 2025 6:14 am, edited 1 time in total.
Offline
User avatar

Marc Wielage

  • Posts: 13302
  • Joined: Fri Oct 18, 2013 2:46 am
  • Location: Palm Springs, California

Re: Proper settings for YouTube 4k HDR

PostMon Mar 03, 2025 5:20 am

In general, grading for HDR in Resolve is challenging, because you need a) a true mastering-grade display, b) the display has to be specifically calibrated for HDR, and c) you have to have the skills and experience needed to grade HDR in a way that will satisfy the filmmaker and also pass industry QC technical specs. This is harder to do than you might think.

If you haven't done HDR grading before, check out these tutorials and tech papers:

https://professional.dolby.com/content- ... al-series/

https://www.fxphd.com/product/introduction-to-hdr/

https://www.mysterybox.us/post/dolby-vi ... filmmaking

https://www.mysterybox.us/post/hdr-vide ... -hdr-video

The Mysterybox stuff goes over the details in a very "user-friendly" way, and I think people doing gaming videos and stuff like that will relate to it very easily.
Certified DaVinci Resolve Color Trainer • AdvancedColorTraining.com
Offline

Andrew Kolakowski

  • Posts: 9538
  • Joined: Tue Sep 11, 2012 10:20 am
  • Location: Poland

Re: Proper settings for YouTube 4k HDR

PostMon Mar 03, 2025 1:51 pm

Mixolydian wrote:
joema4 wrote:
CougerJoe wrote:..Is it in HDR now? You could give us the link in case it's in HDR but you don't see it it for some reason.


It shows HDR now, but it took a lot more than six hours (much less one hour). It was probably the next day before it was displayed in HDR.


This the definitive solution. Something that I struggle with and many more do as well, called Patience. I was uploading 1 minute test videos encoded from Resolve in HDR, and following all the instructions in the YouTube help about HDR videos (https://support.google.com/youtube/answer/7126552?sjid=12962423167815852498-NA) and nothing worked. In the stats for nerds I would see bt.709, but I know the file was 2084/2020 because MediaInfo was showing that.

But today I opened the same uploads with my Apple TV 4K, which I have configured to show SDR but switch to whatever the stream is, HDR or Dolby Vision, and finally all these files were switching to HDR. So that's it, there's no need for ffmpeg or anything else, just set the encode options to Rec.2020 and St.2084 1000 nits, upload, wait a day and it's HDR.


Is this coming out of latest Resolve? Post a 5 seconds sample Maybe they fixed it.
You also need to be careful with OSX vs Windows. Mac export will probably work fine, and PC not.
Offline

Mixolydian

  • Posts: 454
  • Joined: Wed Feb 21, 2024 11:53 pm
  • Location: Planet Earth
  • Real Name: Sebastian Alvarez

Re: Proper settings for YouTube 4k HDR

PostTue Mar 04, 2025 12:41 am

jcheil67 wrote:I waited plenty of days when I was doing all the tests in every possible format and suggestion that people had made. Waiting made no difference.
The only answer was the FFMpeg option which made it work without fail.
Now it's possible that YouTube upgraded their logic to somehow look for the HDR signatures in a different place.
Somebody above mentioned the technical reason why we had to run the FFMpeg against it. I don't remember the exact reason but something to do with it being in the headers but not in the file or something like that.
It's possible that YouTube now looks in both places.
Or DaVinci Resolve finally fixed the oversight and will put those headers in the right place or whatever.
But I can assure you when all of us were working on this problem when this post was first made, I had plenty of patience and no amount of patience made it work.
But good to know that now it may work without needing the extra step.


Sorry, reading again my post I seem rather arrogant and trying to imply that what you and the other people had done was without merit and you had no patience. I apologize, since that wasn't the intention in the least. Obviously at some point between those days and now Google fixed something since now it seems to be working.

What sucks is that you have to wait so long for that conversion, when the 4K conversions takes minutes, and even after it's done encoding the HDR stream, it doesn't tell you anywhere. It only says SD, HD, and 4K. I mean in the video details page, nothing tells me that it has an HDR stream. The only way seems to be to play it on a TV set or streaming device and see if the TV set switches to HDR.

But well, it seems to me that Google is just too large and things don't always work the way they should. Case in point, at the end of January I uploaded a video that has about 4,700 views now, and yet when I try to see the analytics from cities, I get only two in the chart, NYC with 11 views and some city with a very long name in Thailand that shows 12 views. So according to Google/YouTube, only 23 people from the 4,700 that watched my video live in cities, and only in two cities. So that gives you an idea of how well their systems work, even if this has nothing to do with HDR videos, but it shows a lack of attention to detail.
Offline

jcheil67

  • Posts: 30
  • Joined: Fri Mar 08, 2024 6:14 pm
  • Real Name: Jay Heil

Re: Proper settings for YouTube 4k HDR

PostTue Mar 04, 2025 1:04 am

No harm done at all.
I think the issue with YouTube and HDR is the fact that it has to convert the video that's uploaded to an HDR format that is supported by every browser on every OS. So from what I am told it doesn't necessarily make a single HDR version of your video, it may have several versions of it for different browsers and OSs and it simply selects the proper one when it detects what kind of browser / TV / whatever you are playing the video on.

I 100% agree that it's annoying that YouTube doesn't show that the video is HDR capable but instead just shows 4K SD, HD etc etc like you mentioned. I don't see any reason why they can't put some little HDR tag there to let you know that HDR is possible in this video otherwise like you said the only time you know it's working is if you play that video on an HDR device.

During a lot of the testing in this thread many months ago I was traveling on my laptop and ironically my laptop is not an HDR display but my secondary portable screen that I carry with me is. So anytime I wanted to do testing with this I had to make sure I moved the video over to the secondary screen and refreshed the browser.

I haven't had a chance to test yet to see if the fix was on DaVinci's side or on Google side but I will try to do that over the next few days and let everybody know.
Previous

Return to DaVinci Resolve

Who is online

Users browsing this forum: Google [Bot], jkitsjake, panos_mts and 316 guests