mirror of
https://github.com/jellyfin/jellyfin.git
synced 2025-12-22 08:45:23 +03:00
Merge pull request #4860 from nyanmisaka/3ch-transcode-hls
Avoid transcoding to 3ch audio for HLS streaming
(cherry picked from commit 2913e2604c)
Signed-off-by: Joshua M. Boniface <joshua@boniface.me>
This commit is contained in:
committed by
Joshua M. Boniface
parent
f72f27ff45
commit
03c8216946
@@ -1722,6 +1722,16 @@ namespace MediaBrowser.Controller.MediaEncoding
|
|||||||
: transcoderChannelLimit.Value;
|
: 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
|
||||||
|
&& state.TranscodingType != TranscodingJobType.Progressive
|
||||||
|
&& resultChannels.HasValue
|
||||||
|
&& (resultChannels.Value > 2 && resultChannels.Value < 6 || resultChannels.Value == 7))
|
||||||
|
{
|
||||||
|
resultChannels = 2;
|
||||||
|
}
|
||||||
|
|
||||||
return resultChannels;
|
return resultChannels;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user