The Free Software Media System - Server Backend & API
avoid transcoding to 3ch audio for HLS streaming
nyanmisakabc6ec08322a6
diff --git a/MediaBrowser.Controller/MediaEncoding/EncodingHelper.cs b/MediaBrowser.Controller/MediaEncoding/EncodingHelper.csindex 6667c1c3bc..17201551a0 100644--- a/MediaBrowser.Controller/MediaEncoding/EncodingHelper.cs+++ b/MediaBrowser.Controller/MediaEncoding/EncodingHelper.cs@@ -1722,6 +1722,16 @@ namespace MediaBrowser.Controller.MediaEncoding: transcoderChannelLimit.Value;}+ // Avoid transcoding to audio channels other than 1ch, 2ch, 6ch (5.1 layout) and 8ch (7.1 layout).+ // https://developer.apple.com/documentation/http_live_streaming/hls_authoring_specification_for_apple_devices+ if (isTranscodingAudio+ && resultChannels.HasValue+ && resultChannels.Value > 2+ && resultChannels.Value < 6)+ {+ resultChannels = 2;+ }+return resultChannels;}