mirror of
https://github.com/jellyfin/jellyfin.git
synced 2025-12-18 06:53:07 +03:00
update live tv hls
This commit is contained in:
@@ -609,26 +609,13 @@ namespace MediaBrowser.Model.Dlna
|
||||
defaultBitrate = StringHelper.EqualsIgnoreCase(targetAudioCodec, "ac3") ? 192000 : 128000;
|
||||
}
|
||||
|
||||
if (targetAudioChannels.HasValue)
|
||||
if (StringHelper.EqualsIgnoreCase(subProtocol, "hls"))
|
||||
{
|
||||
if (targetAudioChannels.Value >= 5 && (maxTotalBitrate ?? 0) >= 1200000)
|
||||
{
|
||||
if (StringHelper.EqualsIgnoreCase(targetAudioCodec, "ac3"))
|
||||
{
|
||||
if (StringHelper.EqualsIgnoreCase(subProtocol, "hls"))
|
||||
{
|
||||
defaultBitrate = Math.Max(384000, defaultBitrate);
|
||||
}
|
||||
else
|
||||
{
|
||||
defaultBitrate = Math.Max(448000, defaultBitrate);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
defaultBitrate = Math.Max(320000, defaultBitrate);
|
||||
}
|
||||
}
|
||||
defaultBitrate = Math.Min(384000, defaultBitrate);
|
||||
}
|
||||
else
|
||||
{
|
||||
defaultBitrate = Math.Min(448000, defaultBitrate);
|
||||
}
|
||||
|
||||
int encoderAudioBitrateLimit = int.MaxValue;
|
||||
@@ -647,6 +634,14 @@ namespace MediaBrowser.Model.Dlna
|
||||
}
|
||||
}
|
||||
|
||||
if (maxTotalBitrate.HasValue)
|
||||
{
|
||||
if (maxTotalBitrate.Value < 640000)
|
||||
{
|
||||
defaultBitrate = Math.Min(128000, defaultBitrate);
|
||||
}
|
||||
}
|
||||
|
||||
return Math.Min(defaultBitrate, encoderAudioBitrateLimit);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user