|
|
|
@ -211,19 +211,8 @@ public class DynamicHlsHelper
|
|
|
|
|
var sdrVideoUrl = ReplaceProfile(playlistUrl, "hevc", string.Join(',', requestedVideoProfiles), "main");
|
|
|
|
|
sdrVideoUrl += "&AllowVideoStreamCopy=false";
|
|
|
|
|
|
|
|
|
|
var sdrOutputVideoBitrate = _encodingHelper.GetVideoBitrateParamValue(state.VideoRequest, state.VideoStream, state.OutputVideoCodec);
|
|
|
|
|
var sdrOutputAudioBitrate = 0;
|
|
|
|
|
if (EncodingHelper.LosslessAudioCodecs.Contains(state.VideoRequest.AudioCodec, StringComparison.OrdinalIgnoreCase))
|
|
|
|
|
{
|
|
|
|
|
sdrOutputAudioBitrate = state.AudioStream.BitRate ?? 0;
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
sdrOutputAudioBitrate = _encodingHelper.GetAudioBitrateParam(state.VideoRequest, state.AudioStream, state.OutputAudioChannels) ?? 0;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
var sdrTotalBitrate = sdrOutputAudioBitrate + sdrOutputVideoBitrate;
|
|
|
|
|
AppendPlaylist(builder, state, sdrVideoUrl, sdrTotalBitrate, subtitleGroup);
|
|
|
|
|
// HACK: Use the same bitrate so that the client can choose by other attributes, such as color range.
|
|
|
|
|
AppendPlaylist(builder, state, sdrVideoUrl, totalBitrate, subtitleGroup);
|
|
|
|
|
|
|
|
|
|
// Restore the video codec
|
|
|
|
|
state.OutputVideoCodec = "copy";
|
|
|
|
|