Skip to content
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 forcing a different HDR format on lower resolutions in the same ABR ladder.

HDR is configured via the hdr object on a VideoVariant.

passthrough, force and tonemap are all available. HDR-to-SDR tone mapping runs on worker 1.31.0 and later. It converts an HDR10, HDR10+ or HLG (hybrid log-gamma) source to BT.709 SDR (standard dynamic range) in any video codec. See Tone mapping.

Dolby Vision is not available. An output carrying hdr.format: dolby_vision_5 or dolby_vision_8 is rejected at job creation with error code parameter_unsupported on outputs[i].video[j].hdr.format (“Dolby Vision output is not produced yet”), in every mode. The worker does not write Dolby Vision metadata yet. A rejected request creates no job, so nothing is quoted or billed. The Dolby Vision reference below is documented for forward compatibility.

HDR10+ is encoded as static HDR10. hdr10_plus is accepted, but the worker does not generate HDR10+ dynamic (per-scene) metadata yet. The output is a valid HDR10 stream and players treat it as HDR10. It is priced the same as hdr10, so nothing is charged for the missing half.

HDR pricing depends on the mode and format. passthrough and force add no HDR surcharge for HDR10, HDR10+ and HLG (1.0x). tonemap adds a 1.5x feature multiplier, billed as quoted when the output completes. A tone-map job that fails bills nothing. Dolby Vision would add 2.0x, but it cannot be purchased today because it is rejected at job creation. See Pricing for details.


The HDRConfig object

AttributeTypeRequiredDescription
formatenumNoTarget HDR format. One of: hdr10, hdr10_plus, hlg, dolby_vision_5 and dolby_vision_8 (both rejected at job creation). Required when mode is passthrough or force. In tonemap mode it names the HDR format of the source, not the output.
modeenumYesHDR processing mode. One of: passthrough, tonemap, force. See Processing modes.
tone_mappingenumNoTone mapping algorithm. One of: reinhard, hable, bt2390, mobius. Only valid when mode is tonemap. Defaults to bt2390, which is approximated with hable. See Tone mapping.
target_peak_nitsintegerNoTarget peak brightness in nits (100—10000). Applies to HDR output only. Refused with parameter_forbidden in tonemap mode, whose SDR target has a fixed peak. Accepted in passthrough and force modes, where the encoder does not currently read it.
master_displaystringNoSMPTE ST 2086 mastering display metadata. Format: "G(x,y)B(x,y)R(x,y)WP(x,y)L(max,min)". Valid with passthrough or force mode; forbidden in tonemap mode, which discards HDR metadata. Max 256 characters.
content_light_levelstringNoContent light level metadata. Format: "MaxCLL,MaxFALL" (e.g., "1000,400"). Valid with passthrough or force mode; forbidden in tonemap mode, which discards HDR metadata. Max 64 characters.
rpu_urlstringNoURL to a Dolby Vision RPU (Reference Processing Unit) file. Only valid for dolby_vision_5 and dolby_vision_8 formats, which are not available, so no request can use it today. 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 with dynamic per-scene metadata. Encoded as static HDR10 today: the dynamic metadata is not generated yet.
HLGhlg10-bitHybrid Log-Gamma. Backwards compatible with SDR displays. Used in broadcast (BBC, NHK). No metadata required.
Dolby Vision Profile 5dolby_vision_510-bitNot available — rejected at job creation. Single-layer profile with no HDR10 fallback. Uses RPU for dynamic metadata.
Dolby Vision Profile 8dolby_vision_810-bitNot available — rejected at job creation. HDR10-compatible profile. Falls back to HDR10 on non-Dolby devices.

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 an HDR source to BT.709 SDR, reducing the dynamic range while preserving as much visual detail as possible. Works into every video codec. Requires an HDR source. See Tone mapping.
ForceforceApply HDR metadata to the output regardless of the source. Use this to add HDR10 metadata to 10-bit content or, once Dolby Vision returns, inject its RPU data. Requires format and appropriate metadata fields.

HDR sources without an hdr block

A variant with no hdr block asks for no HDR handling. What an HDR source (a PQ or HLG transfer on 10-bit or deeper media, which is every iPhone recording) then becomes depends on the output’s bit depth:

  • 8-bit outputs are tone-mapped by default. H.264 pins an 8-bit pixel format in CRF and in bitrate mode alike, so an HDR source into H.264 MP4 or HLS is converted to BT.709 SDR on its own, exactly as mode: tonemap with the default algorithm would do. Before worker 1.36.0 such a variant got no conversion at all and came out washed out, and a bitrate-mode H.264 output of a 10-bit source failed outright; both now encode correctly.
  • 10-bit-capable outputs keep the source’s HDR. H.265, VP9 and AV1 pin no pixel format when there is no hdr block, so they keep the source’s 10-bit format and its HLG or PQ signaling and are delivered as HDR, as before. Ask for mode: tonemap to get SDR from them.

The default conversion is not billed: the 1.5x tonemap multiplier applies only to a variant that carries an hdr block with mode: tonemap, quoted at creation. A variant that does carry an hdr block keeps it: passthrough and force stay HDR, and an explicit tonemap keeps its own algorithm. 8-bit media wearing HDR tags is not HDR and is re-tagged BT.709 instead.

A content-aware output that gets the default conversion is not refused (the source is unknown at creation): it encodes, but skips the CRF search for the same reason an explicit tone map cannot be combined with it. A per_title output then ships the static ladder and bills 1.0x; an auto_abr output renders its whole ceiling at the static CRFs and bills 1.0x, within the estimate.


Tone mapping

mode: tonemap converts an HDR source to SDR. The output is:

  • BT.709 primaries, transfer and matrix, limited range, with no HDR metadata;
  • 8-bit on H.264, VP9, AV1 and H.265 main, and 10-bit only when the variant chooses H.265 main10;
  • in any codec, because the output is SDR. HDR10 into H.264 MP4 is accepted.

format names the source here (hdr10, hdr10_plus or hlg). The worker reads the source’s actual transfer from the probe and uses that. A tone-map job on an SDR source is accepted at create and then fails at probe with error code input_not_hdr, before any encode starts.

The worker verifies its own output: a tone-mapped file that still signals HDR fails with output_mismatch rather than shipping an HDR stream on an SDR bill.

Dolby Vision sources. A Dolby Vision profile 8 source can be tone mapped: request it as format: hdr10, and its HDR10 base layer is used while the Dolby Vision metadata is ignored. A profile 5 source has no such base layer and comes out with wrong colors, so it is not supported for tone mapping. Nothing detects it, so do not send one.

Tone mapping cannot be combined with content-aware encoding: an output with any tonemap rendition and a content_aware block is refused with parameter_forbidden.

Choose a tone mapping algorithm with tone_mapping:

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. The default. Approximated with hable: the worker’s CPU tone-mapping filter has no BT.2390 curve, so bt2390 and an unset tone_mapping are encoded with the hable operator, the closest available highlight roll-off.
MobiusmobiusSmooth tone curve that preserves detail in both highlights and shadows. Good for content with extreme brightness differences.

target_peak_nits is refused in tonemap mode with parameter_forbidden: the SDR output has a fixed peak.


Static metadata

With passthrough or force mode you can inject static mastering display metadata (most commonly for HDR10). This metadata is forbidden in tonemap mode, which discards HDR.

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(max,min) is peak and minimum luminance in units of 0.0001 cd/m² — the HEVC mastering-display-colour-volume SEI / x265 --master-display convention, not raw cd/m². So a 1000 cd/m² (1000-nit) peak is encoded as L(10000000,...), since 10000000 × 0.0001 = 1000.

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

Not available. hdr.format: dolby_vision_5 and dolby_vision_8 are rejected at job creation with parameter_unsupported (“Dolby Vision output is not produced yet”), in every mode including tonemap. Nothing is quoted or billed for a rejected request. This section documents the formats as they will behave once they return. Use hdr10 or hlg today. To tone map a Dolby Vision profile 8 source to SDR, see Tone mapping.

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.

Once available, you would provide the RPU file via rpu_url. This request is rejected today:

{
  "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. It is a valid target for tonemap, whose output is SDR.
H.265YesFull HDR support. Use main10 profile for 10-bit. Most common codec for HDR.
VP9NoThe API does not support HDR output on VP9, even though VP9 profile 2 supports HDR in the wild. It is a valid target for tonemap, whose output is SDR.
AV1HLG onlyHDR support is limited to the hlg format. HDR10 and HDR10+ require H.265. Dolby Vision is not available.

If you request HDR output on a codec that doesn’t support it — such as passthrough or force on an H.264 or VP9 variant, or a non-HLG format on AV1 — the API returns a validation error. tonemap is not subject to this table, because its output is SDR.


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 an HDR10 source to an 8-bit BT.709 SDR H.264 rendition.

{
  "codec": "h264",
  "resolution": "1080p",
  "quality": "standard",
  "hdr": {
    "format": "hdr10",
    "mode": "tonemap",
    "tone_mapping": "hable"
  }
}

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 (not currently available)

This shape is rejected at job creation — hdr.format: dolby_vision_8 returns parameter_unsupported. Shown for forward compatibility; do not send this request today.

{
  "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. The tone mapping multiplier is computed per output, so one tonemap rung prices the whole output at 1.5x.

[
  {
    "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" }
  }
]

Run this against your own file

A free account runs standard-quality encodes up to 2 minutes, one at a time (a longer upload is shortened to its first 2 minutes), so the Quickstart runs with nothing set up but an API key.