Is there a reason for the lower and upper limits for Max and Min Luminance in the Side Data tab?

  • I've been doing some tests, considering the possibility of moving to NVENC for the projects I previously reserved for x265, since I was assuming that x265 had better compressibility at the same file sizes, even though it was slower due to it being on the CPU, but some tests I've been doing seem to suggest that may not necessarily be true, but I need to do more tests to confirm that.

    Anyway, one of these tests would involve HDR content, and in order to do that I am using setparams to set color space values. For my tests that's enough for now, but if I ended up using this workflow for my full projects, I'd need to make use of the "Mastering Display" and "Content Light Level" sections of the Side Data tab, as NVENC doesn't have its own sections for those settings like x265 does.

    However, I noticed Maximum Luminance was limited to 4000 nits. While I of course do not have a display greater than 4000 nits, much of what I work with is video game content which can regularly exceed that. The problem is, if MaxMDL is considerably lower than the MaxCLL, many TVs will assume anything above MaxMDL should be clipped, and so it will use tonemapping curves that aren't the most optimal for the content. The HDR10 spec allows for content up to the 10,000 nit level, and MaxMDL should be allowed to be set that high as well.

    Similarly, MinMDL seems to have a minimum of 0.001, whereas I am using an OLED that has absolute perfect blacks, so I'd prefer to set this to exactly 0, since most of my content does indeed make use of perfect blacks.

    So are these limitations put in place by something in ffmpeg, or were these just values you placed here based on some other information perhaps? If these could be expanded to allow the full range of 0 through 10,000, that would probably be better. Min Luminance doesn't need to go that high of course, but if you have a screen with a 1000:1 native contrast ratio and 1000 nits, then its minimum black level would be 1 nit, which isn't unrealistic, so I'd probably place the upper limit for that maybe at 5. Although I don't think many TVs actually do anything with the MinMDL setting, but it would just be better to have a wider range of possible values if possible.

    • Offizieller Beitrag

    Currently it is set to:

    I guess I have taken these values from what was possible to enter in Adobe Premiere at that time because I didn't have any proper values.

    Can you adjust these values to a good config?

  • Yeah, Premiere's encoders annoyed me with that too now that you mention it lol

    Found the spec that defines these values:

    mastering-display-color-volume-metadata-supporting-high-luminanc.pdf

    Here's the relevant part:

    Zitat

    5.6 Maximum Display Mastering Luminance The nominal maximum display luminance of the mastering display, as configured for the mastering process, shall be represented in candelas per square meter (cd/m2). The value shall be a multiple of 1 candela per square meter.

    A value in the range [5, 10000] shall indicate the nominal maximum display luminance.

    5.7 Minimum Display Mastering Luminance The nominal minimum display luminance of the mastering display, as configured for the mastering process, shall be represented in candelas per square meter (cd/m2). The value shall be a multiple of 0.0001 candelas per square meter.

    A value in the range [0.0001, 5.0000] shall indicate the nominal minimum display luminance.

    Personally, I would allow a MinMDL of 0. The paper does say out of scope values can be used, and gives some examples.

    So I would say 5-10000 for Maximum, and 0.0000-5.0000 for minimum are reasonable values that I wouldn't expect anybody to want to go outside of. Honestly I wouldn't expect anybody to go below 100 for maximum either, but it's allowed in the spec so it might as well be allowed in the settings here.

    Although technically, for out of scope reasons you could just allow 0-10000 for both, and maybe just note the nominal range in the tool tip.