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:


    Looks "limited"?



    Unedit external 100Mbps capture:

    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:


    Full:

    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.

    Edited 4 times, last by Katana ().

  • 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.

  • Okay, premiere now supports this formats:


    Code
    PrPixelFormat_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?

    Help to improve this plugin and support me on patreon or paypal. Thank you.

  • 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

  • When I choose NVENC it seems easy cuz I can directly set up the bite rate

    But when I choose X265, I have to set CRF, but there are 2 kinds of CRF, how to deal with them?

  • 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.