It's a tough one. Especially with HDR. When we master for HDR we use a hardware/software combination that starts at $60k for just the basics, and that doesn't include a calibrated monitor (~$30-50k). A simplified ffmpeg encode might look something like:
ffmpeg -i INPUTFILE ffmpeg -i -c:v libx265 -pix_fmt yuv420p10le -preset veryslow -x265-params bitrate=
BITRATE:vbv-maxrate=
MAXRATE:vbv-bufsize=
BUFSIZE:range=limited:
colorprim=bt2020:transfer=smpte2084:colormatrix=bt2020nc:master-display='G(Xg,Yg)B(Xb,Yb)R(Xr,Yr)WP(Xw,Yw)L(Lmax,Lmin)':max-cll='CLL,FALL' OUTPUTFILE
The stuff in
RED describes typical encoding bitrate stuff, the stuff in
GREEN tells the display that this is wide gamut color that is graded in HDR (i.e. tells the display to "turn on" HDR mode - this is what lights up the icon on your HDR TV, if it has one), the stuff in
FUSCHIA is the calibration of your monitor so that the display can properly adapt if it can't reach the full capabilities of the monitor the program was graded on (this is typical as a professional post house will have the highest capabilities - greater than almost all consumer displays, but the consumer display can adapt given that it knows what the colorist was looking at) and the
THIS COLOR WHATEVER IT IS at the end is a measurement of the actual content itself when you are finished grading that warns the display how bright the picture will actually get so it can scale accordingly and prevent clipping.
Some software will take care of this for you, but I have yet to find any consumer-friendly encoder that does it correctly or completely. FFMPEG isn't that difficult if you aren't afraid of the terminal and is very efficient (many of the GUI products are just FFMPEG with limited access to features under the hood anyway, like Handbrake).
I find it really interesting that the
Mavic 2 Pro chose to shoot in HLG HDR. This makes sense in that HLG (Hybrid-Log-Gamma) is just SDR with extended dynamic range so that if you play HLG content on a non-HDR display it will look ok, whereas if you play HDR-10 (PQ) HDR on a non HDR display it will look very flat and desaturated, much as DLog-M does before you grade it (its the same idea, use a log gamma curve to record and preserve extra dynamic range you can't with typical broadcast gamma). While many HDR displays support HLG (when I play my
M2P HLG footage direct on my TV it shows the HLG icon and displays correctly) there is little to no HLG commercial content in the US (HLG was created by BBC and NHK) most US commercial content is either HDR-10 (as in the ffmpeg example above) or DolbyVision (requiring a proprietary licensed system to create).
Regardless, my point is that creating HDR requires careful setup of every step in the workflow to maintain the colorspace and wide color gamut. I see so many examples of "HDR" content that, even though they say they are HDR, the content only uses the dynamic range of standard dynamic range because at some point in their pipeline the system converted the content, mapping the tonality to standard broadcast colorspace in the middle while the input file and output settings were set to HDR.