obs-ffmpeg: Set P3-D65 metadata for HDR

Want to avoid receiver gamut remapping from Rec. 2100 to P3.

Fix min luminance appearing as NaN by switching from 0/0 to 0/1.

Also set max luminance for HLG because why not.
This commit is contained in:
jpark37
2022-04-17 12:16:23 -07:00
committed by Jim
parent 3eb85c548f
commit 2e8ea0acdc
3 changed files with 24 additions and 2 deletions

View File

@@ -163,7 +163,8 @@ static void add_video_encoder_params(struct ffmpeg_muxer *stream,
: AVCOL_RANGE_MPEG;
const int max_luminance =
(trc == AVCOL_TRC_SMPTE2084)
((trc == AVCOL_TRC_SMPTE2084) ||
(trc == AVCOL_TRC_ARIB_STD_B67))
? (int)obs_get_video_hdr_nominal_peak_level()
: 0;