Tutorial · Python · ~10 min
Convert SDR to HDR: The Complete Guide
Everything between 'my video looks flat' and 'the master is HDR-ready' — tone mapping, bit depth, presets, and a pipeline that scales.
Why this matters
SDR masters cap at 100 nits and BT.709 color. An HDR grade targets 1,000+ nits and BT.2020 — more dynamic range, richer color, and a noticeably better picture on modern screens.
Inverse tone mapping estimates the high-dynamic-range signal the SDR master lost, then rebuilds it: luminance lifting, color remapping, and detail recovery.
How it works
Pick a preset (cinema for drama, documentary for speech, sports for high contrast), point the API at your SDR file, and poll the job.
Submit a job with an input URL (S3, GCS or HTTPS), poll the job URL, and download the rendered output. No GPU, no queues, no ffmpeg builds to babysit.
Code
import requests, time
API = "https://api.mlslabs.io/v1/sdr2hdr/jobs"
headers = {"X-API-Key": "YOUR_API_KEY"}
payload = {"input": "s3://bucket/video.mp4", "preset": "cinema"}
resp = requests.post(API, json=payload, headers=headers)
job = resp.json()
while job["status"] not in ("succeeded", "failed"):
time.sleep(3)
job = requests.get(job["url"], headers=headers).json()
print("Output:", job["output_url"])Pro tips
- Always start from the cleanest master — denoise before remastering, never after.
- Preview one scene with the cinema preset and one with sports before committing a whole episode.
- Keep the SDR original; HDR is an additional deliverable, not a replacement.
Pricing note
Usage is metered per minute of media processed; the first tier is free each month. Volume discounts kick in automatically.
FAQ
Common questions
Is converting SDR to HDR the same as color grading?
No. Grading is an artistic pass; inverse tone mapping is a content-aware reconstruction of missing dynamic range. You can grade after conversion.
Will it work with 8-bit H.264 sources?
Yes — 8-bit SDR is the most common input. The API upscales bit depth to 10-bit HDR as part of the job.
What output formats are supported?
HDR10 MP4/MOV (10-bit HEVC) and ProRes with HDR metadata. Dolby Vision mastering is available on request.