Correct VIDEO-RANGE field for HLG content

Signed-off-by: nyanmisaka <nst799610810@gmail.com>
pull/10968/head
nyanmisaka 12 months ago
parent 34a89fdefd
commit 5cc451992b

@ -325,6 +325,7 @@ public class DynamicHlsHelper
if (state.VideoStream is not null && state.VideoStream.VideoRange != VideoRange.Unknown) if (state.VideoStream is not null && state.VideoStream.VideoRange != VideoRange.Unknown)
{ {
var videoRange = state.VideoStream.VideoRange; var videoRange = state.VideoStream.VideoRange;
var videoRangeType = state.VideoStream.VideoRangeType;
if (EncodingHelper.IsCopyCodec(state.OutputVideoCodec)) if (EncodingHelper.IsCopyCodec(state.OutputVideoCodec))
{ {
if (videoRange == VideoRange.SDR) if (videoRange == VideoRange.SDR)
@ -333,10 +334,17 @@ public class DynamicHlsHelper
} }
if (videoRange == VideoRange.HDR) if (videoRange == VideoRange.HDR)
{
if (videoRangeType == VideoRangeType.HLG)
{
builder.Append(",VIDEO-RANGE=HLG");
}
else
{ {
builder.Append(",VIDEO-RANGE=PQ"); builder.Append(",VIDEO-RANGE=PQ");
} }
} }
}
else else
{ {
// Currently we only encode to SDR. // Currently we only encode to SDR.

Loading…
Cancel
Save