[object Object] Icon

Encoding
Learn how to create, start, manage and modify Encodings

[object Object] Icon

Player
Learn how to create, start, manage and modify Players

[object Object] Icon

Analytics
Learn how to create, start, manage and modify Analyticss

Docs Home
User shortcuts for search
Focus by pressing f
Hide results by pressing Esc
Navigate via   keys

Fri May 20 2022

Dynamic Range Format presets

IntroductionLink Icon

When transcoding your HDR content, or converting content between different HDR formats or to SDR, you need to get the codec configuration settings that conrol the output color settings just right to ensure that the operation is performed correctly and that you have a valid output file.

To simplify this process, with encoder v2.98.0 and above, we expose a dynamicRangeFormat enum property with a range of possible values for common dynamic range formats.

1H265VideoConfiguration h265VideoConfiguration = new H265VideoConfiguration();
2h265VideoConfiguration.setHeight(OUTPUT_HEIGHT);
3h265VideoConfiguration.setBitrate(OUTPUT_BITRATE)
4h265VideoConfiguration.setDynamicRangeFormat(H265DynamicRangeFormat.HDR10);

The value selected sets a number of the relevant individual properties on the codec configuration. The tables below show those properties and assigned values, for each supported codec configuration.

You may still overwrite any of the individual settings if necessary.

H265 Video ConfigurationLink Icon

PresetSDRHLGHDR10DOLBY_VISION
profile^mainmain10main10main10
pixelFormatYUV420PYUV420P10LEYUV420P10LEYUV420P10LE
hdr-truetrue-
enableHrdSignaling---true
colorConfig.colorPrimariesBT709BT2020BT2020UNSPECIFIED
colorConfig.colorTransferBT709ARIB_STD_B67SMPTE2084UNSPECIFIED
colorConfig.colorSpaceBT709BT2020_NCLBT2020_NCLUNSPECIFIED
colorConfig.colorRange---JPEG
colorConfig.copyColorTransferFlagfalsefalsefalsefalse
colorConfig.copyColorPrimariesFlagfalsefalsefalsefalse
colorConfig.copyChromaLocationFlagfalsefalsefalsefalse
colorConfig.copyColorSpaceFlagfalsefalsefalsefalse
colorConfig.copyColorRangeFlagfalsefalsefalsefalse
masterDisplay*--G(8500,39850) B(6550,2300) R(35400,14600) WP(15635,16450) L(10000000,1)G(13250,34500) B(7500,3000) R(34000,16000) WP(15635,16450) L(10000000,1)

* whitespaces and carriage return in the table are for readibility. The actual string used in the APIs does not contain any whitespace ^ the profile set by the PresetConfiguration will be overwritten as needed


H264 Video ConfigurationLink Icon

PresetSDR
profilemain
colorConfig.colorPrimariesBT709
colorConfig.colorTransferBT709
colorConfig.colorSpaceBT709
colorConfig.copyColorTransferFlagfalse
colorConfig.copyColorPrimariesFlagfalse
colorConfig.copyChromaLocationFlagfalse
colorConfig.copyColorSpaceFlagfalse
colorConfig.copyColorRangeFlagfalse

VP9 Video ConfigurationLink Icon

PresetSDRHLG
colorConfig.colorPrimariesBT709BT2020
colorConfig.colorTransferBT709ARIB_STD_B67
colorConfig.colorSpaceBT709BT2020_NCL
colorConfig.copyColorTransferFlagfalsefalse
colorConfig.copyColorPrimariesFlagfalsefalse
colorConfig.copyChromaLocationFlagfalsefalse
colorConfig.copyColorSpaceFlagfalsefalse
colorConfig.copyColorRangeFlagfalsefalse

Input colorLink Icon

In the background, the encoder decides which conversion to apply only based on the input type and the output configuration. If there is no dynamic range format set in the video configuration, the encoder doesn’t change the color configurations but keeps the input settings.

The input color configuration can be specified from the API or deduced during the internal decoding process. If the input color is not specified and the encoder fails to properly deduce the input color configuration, it will be assumed that the colorspace is:

  • BT470BG if the input resolution is SD
  • BT709 for input resolution of HD (720p) or above
  • BT2020 for input resolutions of 4K or above

Give us feedback