# Introduction

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.



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 Configuration

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 Configuration

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

# VP9 Video Configuration

PresetSDRHLG
colorConfig.colorPrimariesBT709BT2020
colorConfig.colorTransferBT709ARIB\_STD\_B67
colorConfig.colorSpaceBT709BT2020\_NCL
colorConfig.copyColorTransferFlagfalsefalse
colorConfig.copyColorPrimariesFlagfalsefalse
colorConfig.copyChromaLocationFlagfalsefalse
colorConfig.copyColorSpaceFlagfalsefalse
colorConfig.copyColorRangeFlagfalsefalse

# Input color

In the background, the encoder decides which conversion to apply based only on the input type and the output configuration. If there is no `dynamicRangeFormat` specifically set in the video configuration, the encoder will keep the output color space the same as found in the input.

The input color configuration can be specified in the API, and if not specified will be 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