zscale to linear light, tonemap=hable, then zscale back to BT.709 turns 10-bit HDR10 into 8-bit SDR; the pixel format alone leaves it washed out. No zscale in your build? ReelSDK runs it for $0.02 per compute minute, under half a cent here.

Convert HDR to SDR with ffmpeg

HDR10 stores light on the PQ curve, often mastered for a 1000-nit peak, while SDR screens expect about 100 nits. ReelSDK's engine runs the chain unchanged, and on our clip hable came out about 14% darker than the SDR original, mobius 18% brighter.

GuidesUpdated

tonemap
ffmpeg -i hdr10-plaza.mp4 -vf "zscale=t=linear:npl=100,format=gbrpf32le,zscale=p=bt709,tonemap=tonemap=hable:desat=0,zscale=t=bt709:m=bt709:r=tv,format=yuv420p" \
  -c:v libx264 -crf 20 -c:a copy sdr.mp4

zscale turns the PQ values into linear light, tonemap squeezes them into the SDR range, and zscale writes BT.709 again. The output is 8-bit yuv420p tagged BT.709 for matrix, transfer and primaries, which is what an SDR player expects.

Variations

The other commands you will need

  1. Check whether a video is HDR

    Look at the transfer. smpte2084 is PQ, used by HDR10; arib-std-b67 is HLG; bt709 is SDR. Our input printed yuv420p10le,tv,bt2020nc,smpte2084,bt2020.

    check
    ffprobe -v error -select_streams v:0 \
      -show_entries stream=pix_fmt,color_range,color_space,color_transfer,color_primaries \
      -of csv=p=0 hdr10-plaza.mp4
  2. Try a different tone map curve

    Swap hable for mobius in the chain. On our clip, mobius came out brighter and hable darker than the SDR original.

    mobius
    ffmpeg -i hdr10-plaza.mp4 -vf "zscale=t=linear:npl=100,format=gbrpf32le,zscale=p=bt709,tonemap=tonemap=mobius,zscale=t=bt709:m=bt709:r=tv,format=yuv420p" \
      -c:v libx264 -crf 20 -c:a copy sdr-mobius.mp4

The flags

The filters in the chain

The filters in the chain
FilterWhat it doesStage
zscale=t=linear:npl=100Decodes the PQ curve to linear light; npl sets the nominal peak luminanceLinearize
format=gbrpf32leSwitches to float RGB, which tonemap needsLinearize
zscale=p=bt709Converts the BT.2020 primaries to BT.709Gamut
tonemap=tonemap=hableCompresses the light range to SDR; hable keeps detail and darkens slightlyTone map
desat=0Turns off the fade of super-bright colors to white; the default is 2.0Tone map
zscale=t=bt709:m=bt709:r=tvApplies the BT.709 curve and matrix in limited rangeOutput
format=yuv420pBack to 8-bit 4:2:0 for libx264 and playersOutput

Sources: ffmpeg filters: tonemap, ffmpeg filters: zscale, checked November 2026.

Why changing the pixel format isn't enough

-pix_fmt yuv420p or format=yuv420p drops the extra bits and nothing else. The values are still PQ, and our output was still tagged smpte2084 and bt2020: an 8-bit HDR file, not an SDR one. Shown as SDR, it looks like the left half of the picture, flat and grey. Its average luma was close to the tone mapped file's, so the problem is the curve, not the brightness.

The ffmpeg documentation spells out what tonemap needs: floating point input in linear light, and another filter such as zscale around it. That is why the chain has six steps.

Hable or mobius

There's no single correct tone map. The documentation says hable preserves dark and bright detail at the cost of slightly darkening everything, while mobius keeps contrast and colors for in-range material. Measured as average luma, hable came out about 14% darker than the SDR original we built the HDR clip from, and mobius about 18% brighter.

Run both on a few seconds of your footage and keep the one that looks right. To cut a short test clip first, see how to trim a video with ffmpeg.

Size and codecs

The chain only changes the picture; pick the codec as usual. Our HDR10 input was HEVC Main 10. For an SDR HEVC copy, see H.265 with ffmpeg, and for the quality setting, the CRF guide.

Without installing ffmpeg

The same command as one API call

Send the same args to POST /v1/ffmpeg with the video's URL in inputs; zscale and tonemap are in the engine's build. Each job runs ffmpeg 8.1 on a fresh machine at $0.02 per compute minute, billed per second; this one finished in about 14 seconds and cost under half a cent.

terminalTry it
curl "https://api.reelsdk.com/v1/ffmpeg?wait=60" \
  -H "Authorization: Bearer $REELSDK_KEY" \
  --json '{
    "inputs": {
      "hdr10-plaza.mp4": "https://api.reelsdk.com/f/lib/in/guides/hdr10-plaza.mp4"
    },
    "args": [
      "-i", "hdr10-plaza.mp4", "-vf",
      "zscale=t=linear:npl=100,format=gbrpf32le,zscale=p=bt709,tonemap=tonemap=hable:desat=0,zscale=t=bt709:m=bt709:r=tv,format=yuv420p",
      "-c:v", "libx264", "-crf", "20", "-c:a", "copy", "sdr.mp4"
    ],
    "outputs": ["sdr.mp4"]
  }'
ReelSDK video API: Two frames of Plaza de España in Seville side by side: flat and grey on the left, natural blue sky and warm brick on the right
The same HDR10 frame two ways. Left: only the pixel format changed, then shown as SDR. Right: the zscale and tonemap chain from the API call.Input: hdr10-plaza.mp4sdr.mp4

FAQ

Questions, answered

How do I convert HDR to SDR with ffmpeg?

Decode to linear light with zscale, tone map, and convert back to BT.709: -vf "zscale=t=linear:npl=100,format=gbrpf32le,zscale=p=bt709,tonemap=tonemap=hable:desat=0,zscale=t=bt709:m=bt709:r=tv,format=yuv420p".

Why does my HDR video look washed out after converting?

The pixel values are still PQ but are being shown as SDR. A pixel-format change alone keeps the PQ curve: our test file stayed tagged smpte2084. Tone map it with zscale and tonemap instead.

Which tonemap algorithm should I use in ffmpeg?

hable keeps detail and darkens slightly; mobius keeps in-range colors and contrast. On our clip, hable came out darker and mobius brighter than the SDR original, so test both.

Can I convert HDR to SDR with an API?

Yes. The engine's ffmpeg build has zscale and tonemap; send the chain to POST https://api.reelsdk.com/v1/ffmpeg. It runs ffmpeg 8.1 on a fresh machine per job for $0.02 per compute minute, billed per second, and failed jobs are free.

Ready to build?

Ship video from your app today

Your first $0.50 is free, and one key covers every endpoint.

Moonlit lake with a lit cabin under the mountains