Search Documentation
Search across all documentation pages
Video Variants

The VideoVariant object

A video variant defines a single video encode rendition within an output. Each output can contain up to 20 variants — for progressive formats this is typically one variant, while streaming formats (HLS, DASH, adaptive) use multiple variants to create an ABR (Adaptive Bitrate) ladder.

Variants are passed in the video array of an Output Specification.


Common fields

FieldTypeRequiredDescription
codecenumYesVideo codec. One of: h264, h265, vp9, av1.
resolutionenumNoTarget resolution. One of: 480p, 720p, 1080p, 1440p, 2160p, 4320p. Mutually exclusive with width/height.
qualityenumNoQuality tier. One of: economy, standard, premium. Controls CRF and encoder preset defaults.
framerateintegerNoTarget frame rate (0—240). 0 or omitted keeps the original frame rate.
widthintegerNoCustom width in pixels (128—7680). Use with height for non-standard resolutions. Mutually exclusive with resolution.
heightintegerNoCustom height in pixels (128—4320). Use with width for non-standard resolutions. Mutually exclusive with resolution.
bitrateintegerNoTarget bitrate in kbps (100—240000). When set, overrides quality-tier CRF with a bitrate target.
h264objectNoH.264-specific options. Only valid when codec is h264. See H264Options.
h265objectNoH.265-specific options. Only valid when codec is h265. See H265Options.
vp9objectNoVP9-specific options. Only valid when codec is vp9. See VP9Options.
av1objectNoAV1-specific options. Only valid when codec is av1. See AV1Options.
hdrobjectNoHDR processing configuration. See HDR Configuration.
{
  "codec": "h264",
  "resolution": "1080p",
  "quality": "standard"
}
{
  "codec": "h265",
  "width": 2560,
  "height": 1440,
  "framerate": 60,
  "quality": "premium",
  "h265": {
    "profile": "main10",
    "preset": "slow",
    "crf": 20,
    "tune": "grain"
  },
  "hdr": {
    "mode": "passthrough",
    "format": "hdr10"
  }
}

H264 Options

Pass the h264 object on a variant to override x264 encoder defaults. All fields are optional — Transcodely selects optimal defaults based on the quality tier.

For a comprehensive guide to H.264 encoding concepts, see the H.264 Encoding Guide.

Attributes

AttributeTypeDefaultDescription
presetstringVaries by tierEncoder speed preset. One of: ultrafast, superfast, veryfast, faster, fast, medium, slow, slower.
tunestringnullContent tuning. One of: film, animation, grain, stillimage, fastdecode.
profilestringhighH.264 profile. One of: baseline, main, high.
levelstringAutoH.264 level. One of: 3.0, 3.1, 4.0, 4.1, 4.2, 5.0, 5.1, 5.2.
crfintegerVaries by tierConstant Rate Factor (0—51, recommended 15—35). Lower values = higher quality, larger files.
bitrateintegernullTarget bitrate in kbps (100—240000). Switches from CRF to bitrate mode.
maxrateintegernullMaximum bitrate in kbps (100—240000). Used with bitrate for VBV buffering.
bufsizeintegernullVBV buffer size in kbps (100—480000). Controls bitrate variability.
keyintintegerAutoMaximum keyframe interval in frames (1—600).
min_keyintintegerAutoMinimum keyframe interval in frames (1—60).
bframesintegerAutoMaximum consecutive B-frames (0—16).
refintegerAutoNumber of reference frames (1—16). More = better compression, slower encoding.
rc_lookaheadintegerAutoRate control lookahead in frames (0—250). Higher values improve bitrate distribution.
aq_modeintegerAutoAdaptive quantization mode (0—3). 0 = disabled, 1 = variance AQ, 2 = auto-variance, 3 = auto-variance with bias.
aq_strengthnumberAutoAdaptive quantization strength (0.0—3.0).
psy_rdstringAutoPsychovisual rate-distortion optimization. Format: "strength:trellis" (e.g., "1.0:0.15").
deblockstringAutoDeblocking filter strength. Format: "alpha:beta" (e.g., "-1:-1"). Range: -6 to 6 for each.

Defaults by quality tier

Quality TierPresetCRFProfile
economyveryfast26high
standardmedium23high
premiumslow20high
{
  "codec": "h264",
  "resolution": "1080p",
  "quality": "premium",
  "h264": {
    "preset": "slow",
    "tune": "film",
    "profile": "high",
    "level": "4.1",
    "crf": 18,
    "bframes": 5,
    "ref": 6,
    "rc_lookahead": 60,
    "aq_mode": 2,
    "aq_strength": 1.2
  }
}

H265 Options

Pass the h265 object on a variant to override x265 encoder defaults. The field set is similar to H264Options but with key differences in supported profiles, levels, and tune values.

For a comprehensive guide, see the H.265 Encoding Guide.

Attributes

AttributeTypeDefaultDescription
presetstringVaries by tierSame presets as H.264: ultrafast through slower.
tunestringnullContent tuning. One of: grain, fastdecode. (More restrictive than H.264.)
profilestringmainH.265 profile. One of: main, main10, main-still-picture.
levelstringAutoH.265 level. One of: 3.0, 3.1, 4.0, 4.1, 5.0, 5.1, 5.2, 6.0, 6.1, 6.2. (Includes 6.x for 8K.)
crfintegerVaries by tierConstant Rate Factor (0—51, recommended 18—35). Note: CRF values are not directly comparable to H.264.
bitrateintegernullTarget bitrate in kbps (100—240000).
maxrateintegernullMaximum bitrate in kbps (100—240000).
bufsizeintegernullVBV buffer size in kbps (100—480000).
keyintintegerAutoMaximum keyframe interval in frames (1—600).
min_keyintintegerAutoMinimum keyframe interval in frames (1—60).
bframesintegerAutoMaximum consecutive B-frames (0—16).
refintegerAutoNumber of reference frames (1—16).
rc_lookaheadintegerAutoRate control lookahead in frames (0—250).
aq_modeintegerAutoAdaptive quantization mode (0—3).
aq_strengthnumberAutoAdaptive quantization strength (0.0—3.0).
psy_rdstringAutoPsychovisual rate-distortion. Format: "strength:trellis".

Key differences from H.264: CRF ranges differ (18—35 recommended), only grain and fastdecode tunes are available, main10 profile enables 10-bit encoding for HDR, and levels up to 6.2 support 8K resolution.

Defaults by quality tier

Quality TierPresetCRFProfile
economyveryfast28main
standardmedium24main
premiumslow20main10
{
  "codec": "h265",
  "resolution": "2160p",
  "quality": "premium",
  "h265": {
    "profile": "main10",
    "preset": "slow",
    "crf": 20,
    "tune": "grain",
    "level": "5.1"
  }
}

VP9 Options

Pass the vp9 object on a variant to configure VP9-specific encoding parameters. VP9 uses a different parameter model than x264/x265 — it uses speed instead of preset and quality mode instead of tune.

For a comprehensive guide, see the VP9 Encoding Guide.

Attributes

AttributeTypeDefaultDescription
profileinteger0VP9 profile (0—3). 0 = 8-bit 4:2:0, 1 = 8-bit 4:2:2/4:4:4, 2 = 10/12-bit 4:2:0, 3 = 10/12-bit 4:2:2/4:4:4.
qualitystringgoodEncoding quality mode. One of: good, best, realtime.
crfintegerVaries by tierConstant quality level (0—63, recommended 15—50). Lower = higher quality.
speedintegerVaries by tierCPU effort (0—8). 0 = slowest/best quality, 8 = fastest. Analogous to H.264 presets.
bitrateintegernullTarget bitrate in kbps (100—150000).
min_bitrateintegernullMinimum bitrate in kbps (100—150000).
max_bitrateintegernullMaximum bitrate in kbps (100—150000).
keyintintegerAutoMaximum keyframe interval in frames (1—600).
tile_columnsintegerAutoLog2 of tile columns (0—6). Enables parallel encoding. Higher = faster but slightly lower quality.
tile_rowsintegerAutoLog2 of tile rows (0—2).
{
  "codec": "vp9",
  "resolution": "1080p",
  "quality": "standard",
  "vp9": {
    "profile": 0,
    "quality": "good",
    "crf": 31,
    "speed": 2,
    "tile_columns": 2
  }
}

AV1 Options

Pass the av1 object on a variant to configure AV1-specific encoding parameters. AV1 offers the best compression efficiency but is slower to encode. It supports unique features like film grain synthesis and loop restoration filters.

For a comprehensive guide, see the AV1 Encoding Guide.

Attributes

AttributeTypeDefaultDescription
presetintegerVaries by tierEncoder speed preset (0—13, recommended 3—12). 0 = slowest/best, 13 = fastest.
tuneinteger0Tuning mode. 0 = visual quality (VQ), 1 = PSNR.
crfintegerVaries by tierConstant quality level (0—63, recommended 20—55). Lower = higher quality.
bitrateintegernullTarget bitrate in kbps (100—100000).
max_bitrateintegernullMaximum bitrate in kbps (100—100000).
keyintintegerAutoMaximum keyframe interval in frames (1—600).
tile_columnsintegerAutoNumber of tile columns (0—4). Enables parallel encoding.
tile_rowsintegerAutoNumber of tile rows (0—4).
film_graininteger0Film grain synthesis level (0—50). Adds artificial grain in the decoder, allowing the encoder to denoise for better compression. Ideal for grainy source material.
enable_dlfbooleannullEnable deblocking loop filter.
enable_cdefbooleannullEnable Constrained Directional Enhancement Filter. Reduces ringing artifacts.
enable_restorationbooleannullEnable loop restoration filter. Improves quality of decoded frames at some CPU cost.
{
  "codec": "av1",
  "resolution": "2160p",
  "quality": "premium",
  "av1": {
    "preset": 4,
    "crf": 25,
    "film_grain": 8,
    "enable_cdef": true,
    "enable_restoration": true,
    "tile_columns": 2,
    "tile_rows": 1
  }
}

HDR Configuration

HDR processing is configured at the variant level via the hdr object. This allows each variant in an ABR ladder to have independent HDR processing — for example, keeping HDR on 4K variants while tone mapping to SDR for lower resolutions.

For full documentation of all HDR options, see HDR.

Attributes

FieldTypeDescription
formatenumHDR format. One of: hdr10, hdr10_plus, hlg, dolby_vision_5, dolby_vision_8.
modeenumProcessing mode. One of: passthrough, tonemap, force.
tone_mappingenumTone mapping algorithm (when mode is tonemap). One of: reinhard, hable, bt2390, mobius.
{
  "codec": "h265",
  "resolution": "2160p",
  "quality": "premium",
  "h265": {
    "profile": "main10"
  },
  "hdr": {
    "format": "hdr10",
    "mode": "passthrough"
  }
}

ABR ladder with HDR

This example shows HDR passthrough on the 4K variant with tone mapping to SDR on lower resolutions:

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