Tool

Fix Washed-Out HDR Screenshots and Thumbnails

When you grab a single frame from HDR video shot on a phone or camera, the colors sometimes come out hazy and dull. The video is stored with HDR values, but the captured image is displayed as SDR. Paste the ffprobe output and the tool tells PQ, HLG and Dolby Vision apart and builds a capture command with tone mapping.

① Run ffprobe on your video

ffprobe (reads only the first frame)

ffprobe -v error -select_streams v:0 -read_intervals "%+#1" -show_streams -show_frames -of json "input.mkv"
Examples (to show the format):

Pasted text is not sent to a server; it is processed only inside this browser. The example outputs are fake values that show the format.

Why do the colors look washed out?

HDR video is stored with a transfer function such as PQ (smpte2084) or HLG (arib-std-b67) and the BT.2020 color gamut. If you put those values into an SDR (BT.709) image as they are, the picture looks hazy and low in saturation. The fix is to run it through tone mapping, which folds the brightness range down to fit SDR. The principle is covered in HDR to SDR Tone Mapping: zscale and tonemap and Common Mistakes: Why Colors Look Washed Out.

How is the command put together?

  1. zscale=t=linear:npl=100: reads the input’s transfer function (PQ or HLG) and converts it to linear brightness. If the input tags are empty, it states them directly with tin·pin·min (added when you set the input manually in ③).
  2. format=gbrpf32le,zscale=p=bt709: converts to floating-point RGB and moves the color gamut to BT.709.
  3. tonemap=tonemap=hable:desat=0: the step that folds the brightness range down to SDR. This is where you choose the curve (operator).
  4. zscale=t=bt709:m=bt709:r=tv,format=yuv420p: finishes in BT.709 SDR. This filter chain is the same as the video conversion command in lesson 14-5, followed by -frames:v 1 to save just one frame.

How do I choose an operator?

The lesson describes hable, mobius and reinhard as differences of taste in how they compress highlights, and it suggests that if bright areas blow out to white, you try another curve such as mobius on a short segment. This site has not measured the output images or speed of each operator. So it does not say ‘this curve is better’; instead it also gives you a command that captures the same frame with all three curves. Open the three images side by side, compare the highlights and the overall brightness by eye, and pick the curve you like. To compare two images by overlaying them, you can use the A/B compare slider.

clip, linear and gamma are other operators offered by the same tonemap filter. They are included so you can pick them for comparison, but they are not recommended values.

How to use it

  1. Run the ffprobe command above on your video and paste the output. If the result is PQ or HLG, the command appears.
  2. Enter the capture time and the file name, and first capture one frame with each curve using the ‘three curves side by side’ command and compare them.
  3. Once you have picked a curve, use the same command for every frame you need. For a thumbnail, save it as .jpg.
  4. If the colors still look off, the cause may be a range/matrix mismatch rather than HDR. Continue with the range and matrix mismatch diagnoser.
  5. If you are unsure which kind of HDR you have, look at it in detail with the HDR10, HLG and Dolby Vision identifier.

Limitations worth knowing

  • We have not run these commands ourselves on this site to verify them. The filter chain is the one from lesson 14-5, and results can differ depending on the input file and the FFmpeg build. Try a short segment first.
  • You need an FFmpeg build that includes the zscale filter. If your build lacks it, you get an error along the lines of ‘No such filter’. You can check with the FFmpeg build capability checker.
  • The tool does not build a command for Dolby Vision profile 5. This chain is known to assume an HDR10 (PQ) base layer. For other profiles too, only the base layer is converted and the RPU is not used, so the colors can differ from a Dolby Vision TV.
  • The same chain shape is used for HLG input, but this site has not checked how each curve behaves on HLG.
  • Automatic tone mapping is not a way to reproduce colors accurately. For work that needs accurate color, the lesson explains that grading a separate SDR version in an editor is in principle the better approach.
  • Your input is not sent to a server; it is processed only inside the browser. The ffprobe command is set to read only the first frame, so even a large file finishes quickly.