NVEnc icon indicating copy to clipboard operation
NVEnc copied to clipboard

SDR2HDR

Open quamt opened this issue 2 years ago • 1 comments

This is more of a question than an issue.

I would like to understand, when I try to convert an SDR2HDR would these commands be the correct ones?

--colormatrix bt2020nc --colorprim bt2020 --transfer smpte2084 --max-cll 1000,300

I noticed that MPC-HC for example plays the file as HDR content but in MediaInfo I can't seem to find any info that it is HDR.

Video
ID                          : 1
Format                      : HEVC
Format/Info                 : High Efficiency Video Coding
Format profile              : Main 10@L5@Main
Codec ID                    : V_MPEGH/ISO/HEVC
Width                       : 3 840 pixels
Height                      : 2 160 pixels
Display aspect ratio        : 16:9
Frame rate mode             : Constant
Frame rate                  : 23.976 (24000/1001) FPS
Color space                 : YUV
Chroma subsampling          : 4:2:0
Bit depth                   : 10 bits
Default                     : Yes
Forced                      : No
Color range                 : Limited
Color primaries             : BT.2020
Transfer characteristics    : PQ
Matrix coefficients         : BT.2020 non-constant
Maximum Content Light Level : 1000 cd/m2
Maximum Frame-Average Light : 300 cd/m2

Or is it the Transfer characteristics : PQ, Since I am using --transfer smpte2084

SMPTE ST 2084 is a transfer function that allows for HDR display by replacing the gamma curve used in SDR

quamt avatar Aug 04 '22 11:08 quamt

Nearly forgotten. I guess to make this work I might need to use--vpp-colorspace to convert / transfer colorspace or it may look strange

quamt avatar Aug 05 '22 23:08 quamt

Your command --colormatrix bt2020nc --colorprim bt2020 --transfer smpte2084 --max-cll 1000,300 only sets the metadata in the file, tagging it as a HDR, it doesn't actually convert the video to HDR. Setting the metadata to HDR when the video is actually only SDR will cause most HDR compatible players to not render the video correctly.

There is no one HDR standard and is a lot more complex than SDR which is why HDR contains metadata. Converting SDR to HDR is not simple and requires the use of professional software and a special mastering monitor. HDR requires a lot of data that simply doesn't exist in the original SDR video and has to be artificially created.

In my opinion it is better to leave it in SDR as artificial HDR often looks worse than the original SDR version.

holmy88 avatar Aug 10 '22 12:08 holmy88

Ok understand. I was under the impression that the --vpp-colorspace transfer=bt709:smpte2084 would enable this, depending on the player that plays the file. But in this case I would need something like Davinci to convert SDR to HDR.

quamt avatar Aug 11 '22 01:08 quamt