Search Documentation
Search across all documentation pages
HDR

HDR

Transcodely supports High Dynamic Range (HDR) video processing at the variant level. Each video variant can independently control how HDR content is handled — you can preserve HDR on high-resolution variants while tone mapping to SDR for lower resolutions in the same ABR ladder.

HDR is configured via the hdr object on a VideoVariant.

HDR processing adds a 1.40x feature multiplier to the variant cost. See Pricing for details.


The HDRConfig object

AttributeTypeRequiredDescription
formatenumNoTarget HDR format. One of: hdr10, hdr10_plus, hlg, dolby_vision_5, dolby_vision_8. Required when mode is passthrough or force.
modeenumYesHDR processing mode. One of: passthrough, tonemap, force. See Processing modes.
tone_mappingenumNoTone mapping algorithm. One of: reinhard, hable, bt2390, mobius. Required when mode is tonemap. See Tone mapping.
target_peak_nitsintegerNoTarget peak brightness in nits (100—10000). Used with tonemap mode to set the SDR target brightness. Default: 100.
master_displaystringNoSMPTE ST 2086 mastering display metadata. Format: "G(x,y)B(x,y)R(x,y)WP(x,y)L(max,min)". Used with force mode. Max 256 characters.
content_light_levelstringNoContent light level metadata. Format: "MaxCLL,MaxFALL" (e.g., "1000,400"). Used with force mode. Max 64 characters.
rpu_urlstringNoURL to a Dolby Vision RPU (Reference Processing Unit) file. Required for dolby_vision_5 and dolby_vision_8 formats when using force mode. Supported schemes: gs://, s3://, https://. Max 2048 characters.
{
  "hdr": {
    "format": "hdr10",
    "mode": "passthrough"
  }
}

HDR formats

FormatAPI ValueBit DepthDescription
HDR10hdr1010-bitOpen standard. Static metadata (ST 2086). Most widely supported HDR format.
HDR10+hdr10_plus10-bitSamsung’s extension of HDR10. Dynamic metadata per scene for better optimization.
HLGhlg10-bitHybrid Log-Gamma. Backwards compatible with SDR displays. Used in broadcast (BBC, NHK). No metadata required.
Dolby Vision Profile 5dolby_vision_510-bitCross-compatible profile. Uses RPU for dynamic metadata. No base layer compatibility.
Dolby Vision Profile 8dolby_vision_810-bitHDR10-compatible profile. Falls back to HDR10 on non-Dolby devices. Most common for streaming.

Processing modes

Each HDR configuration requires a mode that determines how Transcodely handles HDR content.

ModeAPI ValueDescription
PassthroughpassthroughPreserve the source HDR format and metadata without modification. The output retains the same HDR format as the input. Requires format to specify the expected HDR type.
Tone maptonemapConvert HDR content to SDR. Reduces the dynamic range while preserving as much visual detail as possible. Use this for creating SDR variants from HDR sources. Requires tone_mapping algorithm.
ForceforceApply HDR metadata to the output regardless of the source. Use this to add HDR10 metadata to 10-bit content or inject Dolby Vision RPU data. Requires format and appropriate metadata fields.

Tone mapping

When converting HDR to SDR (mode: "tonemap"), choose a tone mapping algorithm:

AlgorithmAPI ValueCharacteristics
ReinhardreinhardSimple global operator. Preserves overall brightness relationships. Good for general content. Can appear slightly washed out on highly saturated scenes.
HablehableFilmic tone curve (also called “Uncharted 2”). Produces cinematic results with rich contrast. Good for film and drama content.
BT.2390bt2390ITU-R BT.2390 reference tone mapping. Industry standard. Best balance of quality and predictability. Recommended for most use cases.
MobiusmobiusSmooth tone curve that preserves detail in both highlights and shadows. Good for content with extreme brightness differences.

target_peak_nits controls the target brightness for tone mapping. Default is 100 nits (standard SDR). Increase for displays that support brighter SDR output.


Static metadata

For force mode with HDR10, you can inject static mastering display metadata.

master_display — SMPTE ST 2086 mastering display color volume. Format:

G(x,y)B(x,y)R(x,y)WP(x,y)L(max,min)

Where x,y are chromaticity coordinates (0—50000 range, representing 0.0—1.0 scaled by 50000) and L is luminance in cd/m².

Example for a DCI-P3 D65 mastering display with 1000 nit peak:

G(13250,34500)B(7500,3000)R(34000,16000)WP(15635,16450)L(10000000,50)

content_light_level — Maximum content light level. Format:

MaxCLL,MaxFALL

Where MaxCLL is maximum content light level and MaxFALL is maximum frame-average light level, both in cd/m².

Example: "1000,400" means peak brightness of 1000 nits, average of 400 nits.


Dolby Vision

Dolby Vision uses dynamic metadata stored in an RPU (Reference Processing Unit) file to optimize the picture on a scene-by-scene or frame-by-frame basis.

Profile 5 (dolby_vision_5): Standalone profile with no backwards compatibility. Only plays on Dolby Vision capable devices.

Profile 8 (dolby_vision_8): HDR10-compatible profile. Includes a base layer that falls back to HDR10 on non-Dolby devices. Recommended for maximum compatibility.

To use Dolby Vision, provide the RPU file via rpu_url:

{
  "hdr": {
    "format": "dolby_vision_8",
    "mode": "force",
    "rpu_url": "gs://my-bucket/rpu/movie_dv_rpu.bin"
  }
}

Codec compatibility

Not all codecs support HDR encoding:

CodecHDR SupportNotes
H.264NoH.264 does not support HDR metadata or 10-bit in most playback scenarios.
H.265YesFull HDR support. Use main10 profile for 10-bit. Most common codec for HDR.
VP9YesHDR support via profile 2 (10-bit 4:2:0). Supported in Chrome and Android.
AV1YesNative HDR support with excellent compression. Growing device support.

If you request HDR on an H.264 variant, the API will return a validation error.


Examples

HDR10 passthrough

Preserve the original HDR10 metadata on a 4K H.265 variant.

{
  "codec": "h265",
  "resolution": "2160p",
  "quality": "premium",
  "h265": {
    "profile": "main10"
  },
  "hdr": {
    "format": "hdr10",
    "mode": "passthrough"
  }
}

HDR to SDR tone mapping

Convert HDR content to SDR using the BT.2390 algorithm for a 1080p variant.

{
  "codec": "h265",
  "resolution": "1080p",
  "quality": "standard",
  "hdr": {
    "mode": "tonemap",
    "tone_mapping": "bt2390",
    "target_peak_nits": 100
  }
}

Force HDR10 with metadata

Inject HDR10 static metadata onto a 10-bit encode, specifying both mastering display and content light level.

{
  "codec": "h265",
  "resolution": "2160p",
  "quality": "premium",
  "h265": {
    "profile": "main10"
  },
  "hdr": {
    "format": "hdr10",
    "mode": "force",
    "master_display": "G(13250,34500)B(7500,3000)R(34000,16000)WP(15635,16450)L(10000000,50)",
    "content_light_level": "1000,400"
  }
}

Dolby Vision Profile 8 with RPU

Apply Dolby Vision Profile 8 dynamic metadata using an external RPU file. Falls back to HDR10 on non-Dolby devices.

{
  "codec": "h265",
  "resolution": "2160p",
  "quality": "premium",
  "h265": {
    "profile": "main10"
  },
  "hdr": {
    "format": "dolby_vision_8",
    "mode": "force",
    "rpu_url": "gs://my-bucket/rpu/movie_dv_rpu.bin"
  }
}

ABR ladder with mixed HDR/SDR

Create an adaptive bitrate ladder where the 4K variant preserves HDR and lower resolutions are tone mapped to SDR.

[
  {
    "codec": "h265",
    "resolution": "2160p",
    "quality": "premium",
    "h265": { "profile": "main10" },
    "hdr": { "format": "hdr10", "mode": "passthrough" }
  },
  {
    "codec": "h265",
    "resolution": "1080p",
    "quality": "standard",
    "hdr": { "mode": "tonemap", "tone_mapping": "bt2390" }
  },
  {
    "codec": "h265",
    "resolution": "720p",
    "quality": "economy",
    "hdr": { "mode": "tonemap", "tone_mapping": "bt2390" }
  }
]