Created
July 16, 2021 23:22
-
-
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
wow it indeed works pretty good
Thank you a lot, kind stranger
I googled for how to do this, and that led me here. Thanks for the solution, now my videos don't have washed out colors!
Really helpful! I've been struggling with this for 2 hours until I found your code. Thanks!
Does this work with all common HDR content? Like HDR10+, and Dolby Vision and I don’t know what else? But sounds good, will test it.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Thank you. This still helpful after 3 years.