I don't believe HDR video encoding is currently supported natively by ffmpeg. Mainstream support for HDR comes way of the Rec. 2020 color space, so you could do your own color grading to produce HDR effects, but (well, depending on your source), keeping HDR intact isn't going to happen (like for commercial blu-rays, all "rips", including ones that say they offer HDR, are using the encoder's own adjustments).