Skip to content

Instantly share code, notes, and snippets.

@goyuix
Created July 16, 2021 23:22
Show Gist options
  • Save goyuix/033d35846b05733d77f568b754e7c3ea to your computer and use it in GitHub Desktop.
Save goyuix/033d35846b05733d77f568b754e7c3ea to your computer and use it in GitHub Desktop.
How to use FFMPEG to convert HDR video to SDR (standard dynamic range) while (mostly) retaining the same depth and intensity of colors, without washed-out colors, as the original HDR10+ video.
ffmpeg -i video-input.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 libx265 -crf 22 -preset medium -tune fastdecode video-output.mp4
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment