HDR color space irregularities

  • I thought of another thing. If it's still overly dark, even with the new preset, it's possible my custom LUT isn't being loaded in the second lumetri filter, so check on that. I believe this SHOULD be embedded into the preset, but if it's not, then I can upload that separately.

    Basically what the preset does, is first it compresses the 0-10,000 nit HDR range into the 0-100nit SDR range, and then the second filter performs a transformation from rec709 gamma/color into smpte2084 gamma and rec2020 color. So without the second step, you basically get an image that's 1% the brightness of the original. Open up the second Lunetri effect and see if the LUT is active. Try checking the active checkbox above the LUT selection drop down. If checking that box does nothing, then the LUT is not embedded correctly and needs to be uploaded separately.

  • OK, sorry been busy a few days.
    Taking my original source files, using the new version of Voukoder, the new Premiere '20 presets from morphinapg... I am sorry to say...

    It looks like 100% success ;) The TV engages HDR mode. And for the first time, PRemiere & VOukoder are encoding HDR10 output that look ~exactly the same as (unedited) source files on an HDR monitor.

    So good job! I knew my money was well spent :)

    The only thing I'll say is I use MadVR for HDR->SDR on my non-HDR 4K PC monitor. Here, the Voukoder outputs are looking "greenish" compared to the source. Interestingly, though, as I said, this greenish hue seems to go away when playing back natively on HDR monitors. The original HDR source files do not show the green hue w/ HDR->SDR tone mapping.

    This is just a niggling complaint, but maybe worth your while IDK.

    (Also morphina, in PRemiere, your presets look very much better in the monitor in '20 version versus your '19 versions I was trying to use in '20.)

  • So they way I get the pixel data from premiere is okay?

    morphinapg Could you write down the settings (encoder, options, muxer, filter, etc) and a short description text so I could add this as preset? Or maybe even more than one.

  • So they way I get the pixel data from premiere is okay?

    morphinapg Could you write down the settings (encoder, options, muxer, filter, etc) and a short description text so I could add this as preset? Or maybe even more than one.

    Premiere's editing workflow is rec709. Even when you edit HDR natively, it saves that in a floating point rec709 pixel format, which Premiere's native encoder converts back to PQ/BT2020 when you select HDR encoding (floating point ensures no color or highlight loss on conversion). When using any other encoder, you're getting that rec709 output, clipped to the first 100 nits. Hence why I needed to create the effect preset to "pre-format" the pixel data as PQ/BT2020. The problem is, Premiere thinks it's seeing rec709, so yes, you absolutely must use rec709 output for my effects preset to work. If you select anything else, Premiere will think it needs to convert the colorspace, modifying those pre-formatted values I so carefully calculated.

    As for a Voukoder preset, the HDR process requires the premiere effects preset I uploaded earlier (or for your input video to be HDR without PQ/2020 flags) so it wouldn't be so simple as someone picking a preset in Voukoder. Their video needs to be sending the right color data to begin with or it will look completely wrong. That's why I wrote the guide I did. If they are sending the right color data to vukoder, then there is one preset you could create I suppose:

    For just generic HDR support, simply using setparams with:


    Will allow HEVC, VP9, H264, and ProRes (if not more) to output in some form of HDR (compatibility would depend on devices of course). HEVC is obviously preferred, so I would default to that with 10bit 4:2:0. You could create presets for both NVENC and x265, and for x265 I'd also enable "HDR Options" and "UHD Blu-ray conform" for the most ideal encoding efficiency. I personally use CRF13 with x265 with HDR content. I haven't experimented enough with NVENC to know what the equivalent would be there.

    For a more "perfectly compliant" HDR10 encode, the user would also need to include the actual metadata that describes the brightness of the content and mastering display, as I describe in my guide. As far as I know, that's only doable on x265 for now. But it becomes a much more complicated process if you don't already have numbers prepared for that. The guide explains that process involving a tool I created to measure the light output of individual frames. So I don't think it would be particularly useful to create a voukoder preset with predefined metadata. That should be something the user is inputting themselves.

  • Vouk any way to augment your setparams for HEVC NVENC to include MaxFALL and MaxCLL if user wants

  • MaxFALL, MaxCLL, and mastering display characteristics are not some universal flag that ffmpeg can pass to any encoder. They need to be specified by the encoders themselves.

    Like I said, you can do HDR without it, it's just not fully HDR10 compliant and may not tonemap as well since the display doesn't have any idea of how bright the content gets.

  • Vouk

    Set the Label from In Progress to Fixed
  • If the values are set correcly it should look something like this in mediainfo:


    Params used:

    -x265-params :colorprim=bt2020:transfer=smpte-st-2048:colormatrix=bt2020nc:master-display="G(13250,34500)B(7500,3000)R(34000,16000)WP(15635,16450)L(12000000,200)":max-cll=0,0


    You set those with x265. These particular flags are set before the encoder gets the data. The idea being (if they had worked) they could pass that data to any encoder that supported it. In particular, if it had worked, it would have been useful for NVENC.

  • ok will try that. can say the "usual" HDR workflow we have mentioned made Voukoder output a really weird looking output, and I know this was a P3D65 colorspace file. Although interestingly if you try to MediaInfo the file, you can not get a confirmation of that.