I completely forgot re-encoding does lose quality each encode, total brainfart. For now it saves me an hour, so I'm not too torn up about it.
HDR Encoding Guide for Premiere Pro
-
-
Great guide and YouTube channel @morphinapg ? as I also always aim for the best quality for my content I want to start with uploading 4KHDR in 2021.
I had a lot of problems with limited and full (I care if my blacks are crushed even if there are people out there who likes it) when I started uploading regularly in 2013 ? Now it feels like 2013 all over again ? even worse... So before I break my head again for fully understanding everything I go with the try and error approach.
As I play on a PC Monitor and don't have any HDR display (no really good monitor available yet) I cannot verify my files which makes it even harder.
So I got a PS5 (yeah they really exist and not only bots, influencers and scalpers got one ?)
So I did some testing for my upcoming walkthrough.
I'm using Magix Vegas but I think for the Output it doesn't matter that much.
So lets start (videos are still encoding on YT so 4K may or may not be available at some point, however YouTube decides to encode them or not)
First off I just wanted to see the quality of the internal PS5 4KHDR capture of the PS5.Unedit File PS5 Internal File ~40Mbps:
Display Spoiler
Video
ID : 1
Format : VP9
Codec ID : V_VP9
Duration : 5 min 18 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
Default : Yes
Forced : No
Color range : Limited
Color primaries : BT.2020
Transfer characteristics : PQ
Matrix coefficients : BT.2020 non-constant
External Content youtu.beContent embedded from external sources will not be displayed without your consent.Through the activation of external content, you agree that personal data may be transferred to third party platforms. We have provided more information on this in our privacy policy.Looks "limited"?
Unedit external 100Mbps capture:Display Spoiler
Video
ID : 1
Format : HEVC
Format/Info : High Efficiency Video Coding
Format profile : Main 10@L5.1@High
Codec ID : hev1
Codec ID/Info : High Efficiency Video Coding
Duration : 5 min 15 s
Bit rate : 74.2 Mb/s
Width : 3 840 pixels
Height : 2 160 pixels
Display aspect ratio : 16:9
Frame rate mode : Constant
Frame rate : 59.940 (59940/1000) FPS
Original frame rate : 59.940 (60000/1001) FPS
Color space : YUV
Chroma subsampling : 4:2:0
Bit depth : 10 bits
Bits/(Pixel*Frame) : 0.149
Stream size : 2.73 GiB (100%)
Language : English
Encoded date : UTC 2020-12-15 21:02:51
Tagged date : UTC 2020-12-15 21:02:51
Color range : Full
Color primaries : BT.2020
Transfer characteristics : PQ
Matrix coefficients : BT.2020 non-constant
mdhd_Duration : 315477
Codec configuration box : hvcC
External Content youtu.beContent embedded from external sources will not be displayed without your consent.Through the activation of external content, you agree that personal data may be transferred to third party platforms. We have provided more information on this in our privacy policy.I think this looks also ok but maybe a little bit too dark? Maybe I have to force the PS5 to limited. Or other Youtubes increased their Gamma ?
Magix Vegas specific:
So I went with my external capture and just tried to let the output file look identical to the unedited input file. When I choose HDR10 in Vegas I cannot use Voukoder which isn't an option in my Opinion. So I didn't choose HDR10 but instead switched the project to 32-bit floatingpoint (video levels), with the other option which is applied with HDR10 (32-bit floatingpoint (full range)) the video in the preview looks too dark.
Encoding:
I used the setting of the starting post. I couldn't get the x265 encode to work. It started but never rendered anything?!
So I went with NVENC (low 40Mbps just for testing purpose) and now I have a different problem (or lack of understanding).
What about the "Limited" Option? I know that correct should be limited (however my external record was full?! It seems I cannot really control that, maybe I should use a different recording software)
I tested both and even MediaInfo tells me full/limited the files on YouTube looks identical? I think YT converts them correctly no matter what I choose. I think now both are limited, didnt' redownload and test.
Why is with HDR there still limited/full? Thought this was only because of 0-255/16-235 and this doesn't apply to HDR which is 0-1024
Limited:Display Spoiler
Video
ID : 1
Format : HEVC
Format/Info : High Efficiency Video Coding
Format profile : Main 10@L5.1@Main
Codec ID : hev1
Codec ID/Info : High Efficiency Video Coding
Duration : 4 min 57 s
Bit rate : 41.2 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
Chroma subsampling : 4:2:0
Bit depth : 10 bits
Scan type : Progressive
Bits/(Pixel*Frame) : 0.083
Stream size : 1.43 GiB (99%)
Color range : Limited
Color primaries : BT.2020
Transfer characteristics : PQ
Matrix coefficients : BT.2020 non-constant
Codec configuration box : hvcC
External Content youtu.beContent embedded from external sources will not be displayed without your consent.Through the activation of external content, you agree that personal data may be transferred to third party platforms. We have provided more information on this in our privacy policy.Full:
Display Spoiler
Video
ID : 1
Format : HEVC
Format/Info : High Efficiency Video Coding
Format profile : Main 10@L5.1@Main
Codec ID : hev1
Codec ID/Info : High Efficiency Video Coding
Duration : 30 s 0 ms
Bit rate : 40.7 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
Chroma subsampling : 4:2:0
Bit depth : 10 bits
Scan type : Progressive
Bits/(Pixel*Frame) : 0.082
Stream size : 146 MiB (99%)
Color range : Full
Color primaries : BT.2020
Transfer characteristics : PQ
Matrix coefficients : BT.2020 non-constant
Codec configuration box : hvcC
External Content youtu.beContent embedded from external sources will not be displayed without your consent.Through the activation of external content, you agree that personal data may be transferred to third party platforms. We have provided more information on this in our privacy policy.And additional I think both files now look like the input. Again I can only see the SDR result and cannot really verify.
So my first question is would this workflow be ok (either lmited or full encode)? I cannot choose MaxCLL and MaxFALL as it isn't available with NVENC.
Second why is my footage a little bit too dark? Because of being a "full" source file, or are others set their game brighter. ?
Why does the internal capture of the PS5 look so "washed out"?
Any help how to verify my workflow and the output files would be appreciated. -
Hey Katana, nice to see you here ?
Okay, a lot to work with here haha
First of all, I'm not sure how Vegas works with HDR content as I haven't used the program in years. Based on your output, I'm guessing it likely is outputting in the correct format, the raw PQ/2020 output, which indeed looks "washed out" on an SDR monitor. If you had the ability to output to a monitor that could display that information properly in HDR mode, most likely it would look fine. HDR uses a different "gamma" and color gamut than SDR, so if a program interprets it as if it were SDR data, it looks wrong. That's fine in this case because that's exactly what we need for Voukoder to work properly with the footage. The problem with Premiere is that Premiere would "correct" the display to match the SDR gamma and colors, which meant all that additional HDR information was lost on output to Voukoder. Thankfully, based on your results, I would guess that's not happening with Vegas.
As for Limited/Full, since you're capturing internally on the PS5, I don't think this will matter, because the video files will be encoded with whichever one the PS5 was set to, and Vegas will almost certainly interpret these correctly. So when you output in Voukoder (yes, the output should be set to Limited) then the editor/voukoder correctly converts the input color range to the output. So if the input is Full, then Voukoder will be converting that full range to limited. If the input is limited, then most likely what's happening is the editor will still be interpreting this as Full range floating point RGB, and Voukoder will then correctly map that to Limited range. While you can use Full range, it's not how HDR was designed to be used so I wouldn't recommend it (there's also no reason to use it). As for what to set your PS5 to, it would depend on your TV and how your TV is calibrated. Some TVs work fine with automatic settings, whether on the tv, console or both, but some need to manually adjust this (even if they claim automatic works) and in those cases I recommend using Limited range because other devices will be using limited range and it will just make the TV settings match up correctly. That being said, forcing Limited Range on the PS5 will likely result in less rounding errors or banding in the final output, as values will line up perfectly with the 10bit Limited output, so it might be a good idea to use that.
EDIT: noticed you also have some kind of external capture as well. Assuming this capture device isn't HDMI 2.1, then most likely the PS5 is outputting in YUV422 for HDR, and the output of the PS5 will always be Limited in this mode, even if you have it set to full, and this is good because most external capture devices will expect a "legal range" (limited) signal from YUV outputs, not full range.
As for why your video looks darker on youtube, this is most likely youtube's automatic tonemapping. If you aren't using my HDR metadata tool to analyze frames selected from the full video for the MaxCLL and MaxFALL values, and I don't see that metadata in your MediaInfo outputs so I'd guess you're not, then youtube has to make assumptions about the HDR content of the video, and try to map that content into SDR without severe clipping or crushing of highlight information. I personally use a process to create my own LUT which totally controls the color grading and tonemapping process for the full video, but that's a pretty complicated process as well and if you're not familiar with color grading and LUT creation, it's better to determine the correct MaxCLL and MaxFALL values and let youtube handle those. It may still end up looking dimmer than what you'd expect because HDR in general tends to be brighter than SDR in many cases, and youtube will need to darken that to avoid looking overexposed, but as long as it's presentable I wouldn't worry too much about that.
-
- Official Post
Okay, premiere now supports this formats:
CodePrPixelFormat_RGB_444_12u_PQ_709 = MAKE_PIXEL_FORMAT_FOURCC('@', 'P', 'Q', '7'), // 12 bit integer (in 16 bit words) per component RGB with PQ curve, Rec.709 primaries PrPixelFormat_RGB_444_12u_PQ_P3 = MAKE_PIXEL_FORMAT_FOURCC('@', 'P', 'Q', 'P'), // 12 bit integer (in 16 bit words) per component RGB with PQ curve, P3 primaries PrPixelFormat_RGB_444_12u_PQ_2020 = MAKE_PIXEL_FORMAT_FOURCC('@', 'P', 'Q', '2'), // 12 bit integer (in 16 bit words) per component RGB with PQ curve, Rec.2020 primaries PrPixelFormat_RGB_444_10u_HLG = MAKE_PIXEL_FORMAT_FOURCC('@', 'H', 'L', '1'), // 10 bit integer per component RGB with HLG curve, Rec.2020 primaries PrPixelFormat_RGB_444_12u_HLG = MAKE_PIXEL_FORMAT_FOURCC('@', 'H', 'L', '2'), // 12 bit integer (in 16 bit words) per component RGB with HLG curve, Rec.2020 primaries
I'm just wondering they're all RGB. When dealing with bt2020/HDR it's not YUV anymore?
-
really appreciate for your help and finally I get asolution for HDR encoding!
I wonder can I make a video about your solution?
I will indicate the source
-
- Official Post
I guess this question goes to morphinapg
-
really appreciate for your help and finally I get asolution for HDR encoding!
I wonder can I make a video about your solution?
I will indicate the source
Sure!
-
-
CRF is far better than bitrate, if you care more about quality than file size. There are not 2 kinds of CRF. The strategy option is about what kind of encoding mode you want, and CRF is default. You can change it to ABR if you want to choose a bitrate instead.
Constant Quantizer, another option, is pretty much an outdated mode for x264/x265 and while it produces similar results to CRF, it creates wasted bits to do so. I believe CQP is what NVENC uses as its constant quality, but the number values are different and the bitrates created are typicall yhigher for the same quality with that.
-
CRF is far better than bitrate, if you care more about quality than file size. There are not 2 kinds of CRF. The strategy option is about what kind of encoding mode you want, and CRF is default. You can change it to ABR if you want to choose a bitrate instead.
Constant Quantizer, another option, is pretty much an outdated mode for x264/x265 and while it produces similar results to CRF, it creates wasted bits to do so. I believe CQP is what NVENC uses as its constant quality, but the number values are different and the bitrates created are typicall yhigher for the same quality with that.
so I should just set up a level and CRF min&max?
And shall I set the VBV? I don't quite understand the function of VBV
-
so I should just set up a level and CRF min&max?
And shall I set the VBV? I don't quite understand the function of VBV
Really don't bother with those other settings. Set a CRF level, and leave the other settings at default. 13 or 14 seems good for HDR to me.
I've sometimes seen VBV and other settings used in combination with Blu-ray specs, but there's another option that automatically applies anything necessary for UHD Blu-ray encodes, so just use that instead.
-
-
Hi, It is 2021 right now, I am using Premiere Pro 2021 and try to export HDR videos, BUT when I try to use NVENC's HEVC codec to encode in HDR as well following this guide, I found that my color space is NOT correct, the picture is too saturated.
First picture is what I can see in premiere pro, second is screenshot from the video i export HDR by Adobe Media Encoder, third is the result of voukoder.
I try to figure it out, but I still do not understand.
Please help me, thank you so much!
-
Did you use the preset I uploaded? Third picture looks like what you would get if you followed the guide but forgot to apply the preset. The encoder assumes the color space is ready for HDR, meaning it should look more like image #2 in the preview monitor in premiere after you apply my preset.
What you will see on the preview monitor is the entire 10,000 nit range compressed into the rec709 preview monitor, with color space and transfer function converted to correspond to the BT2020 and ST2084 spaces, which will make the image look dark, washed out, and lower contrast on the preview monitor before you export with voukoder.
Here's the preset again:https://www.voukoder.org/attachment/744…020-pp2020-zip/
Using the HDR editing mode in Premiere 2021 doesn't work with this process btw. Keep the project as rec709.
-
Okay, premiere now supports this formats:
CodePrPixelFormat_RGB_444_12u_PQ_709 = MAKE_PIXEL_FORMAT_FOURCC('@', 'P', 'Q', '7'), // 12 bit integer (in 16 bit words) per component RGB with PQ curve, Rec.709 primaries PrPixelFormat_RGB_444_12u_PQ_P3 = MAKE_PIXEL_FORMAT_FOURCC('@', 'P', 'Q', 'P'), // 12 bit integer (in 16 bit words) per component RGB with PQ curve, P3 primaries PrPixelFormat_RGB_444_12u_PQ_2020 = MAKE_PIXEL_FORMAT_FOURCC('@', 'P', 'Q', '2'), // 12 bit integer (in 16 bit words) per component RGB with PQ curve, Rec.2020 primaries PrPixelFormat_RGB_444_10u_HLG = MAKE_PIXEL_FORMAT_FOURCC('@', 'H', 'L', '1'), // 10 bit integer per component RGB with HLG curve, Rec.2020 primaries PrPixelFormat_RGB_444_12u_HLG = MAKE_PIXEL_FORMAT_FOURCC('@', 'H', 'L', '2'), // 12 bit integer (in 16 bit words) per component RGB with HLG curve, Rec.2020 primaries
I'm just wondering they're all RGB. When dealing with bt2020/HDR it's not YUV anymore?
For some reason I totally missed this post months ago ?
Will you be incorporating these formats into the Premiere connector?
Once encoded, HDR is usually stored as YCbCr yes, typically in 4:2:0, but it appears Premiere handles their processing in RGB.The main format people would probably use for HDR is the
PrPixelFormat_RGB_444_12u_PQ_2020
the first format would probably be pretty unlikely to be used, but all of the others could certainly be common enough in usage. So I'd probably provide options like:
PQ BT2020
PQ DCI-P3
HLG 10bit
HLG 12bit
in addition to the rec 709/601 options you currently have
If there's no performance difference between the 10bit and 12bit HLG modes, I'd just go with the higher of the two.
-
- Official Post
From what I've read these formats only work with effects, not with output plugins.
-
From what I've read these formats only work with effects, not with output plugins.
Oh, that's disappointing if true
-
- Official Post
Just noticed adobe released the 2022 SDK with a bunch of new pixel formats:
PrPixelFormat_YUV_420_MPEG4_FIELD_PICTURE_BIPLANAR_10u_as16u_709 = MAKE_PIXEL_FORMAT_FOURCC('p', '0', 'i', '0'),
PrPixelFormat_YUV_420_MPEG4_FRAME_PICTURE_BIPLANAR_10u_as16u_709 = MAKE_PIXEL_FORMAT_FOURCC('p', '0', '1', '0'),
PrPixelFormat_YUV_420_MPEG4_FIELD_PICTURE_BIPLANAR_10u_as16u_709_FullRange = MAKE_PIXEL_FORMAT_FOURCC('p', '0', 'i', 'f'),
PrPixelFormat_YUV_420_MPEG4_FRAME_PICTURE_BIPLANAR_10u_as16u_709_FullRange = MAKE_PIXEL_FORMAT_FOURCC('p', '0', '1', 'f'),
PrPixelFormat_YUV_420_MPEG4_FIELD_PICTURE_BIPLANAR_10u_as16u_2020 = MAKE_PIXEL_FORMAT_FOURCC('P', '0', 'i', '0'),
PrPixelFormat_YUV_420_MPEG4_FRAME_PICTURE_BIPLANAR_10u_as16u_2020 = MAKE_PIXEL_FORMAT_FOURCC('P', '0', '1', '0'),
PrPixelFormat_YUV_420_MPEG4_FIELD_PICTURE_BIPLANAR_10u_as16u_2020_FullRange = MAKE_PIXEL_FORMAT_FOURCC('P', '0', 'i', 'f'),
PrPixelFormat_YUV_420_MPEG4_FRAME_PICTURE_BIPLANAR_10u_as16u_2020_FullRange = MAKE_PIXEL_FORMAT_FOURCC('P', '0', '1', 'f'),
PrPixelFormat_YUV_420_MPEG4_FIELD_PICTURE_BIPLANAR_10u_as16u_2020_HDR = MAKE_PIXEL_FORMAT_FOURCC('P', 'O', 'i', '0'),
PrPixelFormat_YUV_420_MPEG4_FRAME_PICTURE_BIPLANAR_10u_as16u_2020_HDR = MAKE_PIXEL_FORMAT_FOURCC('P', 'O', '1', '0'),
PrPixelFormat_YUV_420_MPEG4_FIELD_PICTURE_BIPLANAR_10u_as16u_2020_HDR_FullRange = MAKE_PIXEL_FORMAT_FOURCC('P', 'O', 'i', 'f'),
PrPixelFormat_YUV_420_MPEG4_FRAME_PICTURE_BIPLANAR_10u_as16u_2020_HDR_FullRange = MAKE_PIXEL_FORMAT_FOURCC('P', 'O', '1', 'f'),
PrPixelFormat_YUV_420_MPEG4_FIELD_PICTURE_BIPLANAR_10u_as16u_2020_HDR_HLG = MAKE_PIXEL_FORMAT_FOURCC('P', 'h', 'l', '0'),
PrPixelFormat_YUV_420_MPEG4_FRAME_PICTURE_BIPLANAR_10u_as16u_2020_HDR_HLG = MAKE_PIXEL_FORMAT_FOURCC('P', 'H', 'L', '0'),
PrPixelFormat_YUV_420_MPEG4_FIELD_PICTURE_BIPLANAR_10u_as16u_2020_HDR_HLG_FullRange = MAKE_PIXEL_FORMAT_FOURCC('P', 'h', 'l', 'f'),
PrPixelFormat_YUV_420_MPEG4_FRAME_PICTURE_BIPLANAR_10u_as16u_2020_HDR_HLG_FullRange = MAKE_PIXEL_FORMAT_FOURCC('P', 'H', 'L', 'f'),
Although the renderer returned an error when I tried to use the HLG format.
-
That's a little hard to decipher. Normally I would associate fields with interlace, but I'm pretty sure UHD doesn't have any interlace formats so I'm not sure why those are there unless they refer to something else, and I don't know what biplanar means either. If you don't have any other information about these formats, I'd probably assume the ones that say FRAME and don't say FullRange are probably the best choices.
So what I'd probably do is, in the color space drop down in the connector, add:
ITU-R BT2020 (HDR PQ) - PrPixelFormat_YUV_420_MPEG4_FRAME_PICTURE_BIPLANAR_10u_as16u_2020_HDR
ITU-R BT2020 (HDR HLG) - PrPixelFormat_YUV_420_MPEG4_FRAME_PICTURE_BIPLANAR_10u_as16u_2020_HDR_HLG
-
- Official Post
I fully agree.
(Biplanar or semi-planar means the pixel data is stored in two planes - The first contains the Y data and the second contains the interleaved UV data).
-