Skip to content

Instantly share code, notes, and snippets.

@bvibber
Created June 19, 2022 14:14
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bvibber/4d71835c0b32cc29f26473598616c830 to your computer and use it in GitHub Desktop.
Save bvibber/4d71835c0b32cc29f26473598616c830 to your computer and use it in GitHub Desktop.
@rem Tone-map HDR game captures to SDR suitable for further processing or posting.
@rem Input file: something.mp4 (HEVC HDR 10-bit BT2020)
@rem Output file: something-sdr.mp4 (H.264 SDR 8-bit BT709)
ffmpeg -i "%~f1" ^
-vf "zscale=t=linear:p=bt709,tonemap=hable,zscale=t=bt709:m=bt709:r=tv,format=yuv420p" ^
-crf 12 ^
-y "%~n1-sdr.mp4"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment