Resurrecting this because I finally got around to trying it: unfortunately, this didn’t work well for me. I get a lot more opportunity to tweak the color palette, but I haven’t gotten one that turns out quite right yet, which makes me think this approach would need about as much tweaking as manually figuring out the parameters to copy over HDR metadata.
Additionally, Tone-mapping requires using zscale
to make the inputs linear, which requires compiling with --enable-libzimg
, which Arch linux and most docker containers I’ve found don’t do. I managed to create a docker container that installs ffmpeg-full
from the AUR, but that was a whole complicated affair, unfortunately, and takes forever.
This looks more like what I was looking for at the time: https://codecalamity.com/encoding-uhd-4k-hdr10-videos-with-ffmpeg/
I’ve written a little Python script wrapping the advice here and it seems to be working very well (though I haven’t tried it on any non-HDR and non-x265 content…)