mirror of
https://github.com/jellyfin/jellyfin.git
synced 2025-07-09 03:04:24 -04:00
Take channels into account when calculating fallback audio bitrate
This commit is contained in:
parent
2b4bf81575
commit
9908dad045
@ -2101,7 +2101,7 @@ namespace MediaBrowser.Controller.MediaEncoding
|
|||||||
if (audioBitRate.HasValue && (string.Equals(audioCodec, "flac", StringComparison.OrdinalIgnoreCase)
|
if (audioBitRate.HasValue && (string.Equals(audioCodec, "flac", StringComparison.OrdinalIgnoreCase)
|
||||||
|| string.Equals(audioCodec, "alac", StringComparison.OrdinalIgnoreCase)))
|
|| string.Equals(audioCodec, "alac", StringComparison.OrdinalIgnoreCase)))
|
||||||
{
|
{
|
||||||
if ((audioStream.Channels ?? 0) >= 6)
|
if (inputChannels >= 6)
|
||||||
{
|
{
|
||||||
return Math.Min(3584000, audioBitRate.Value);
|
return Math.Min(3584000, audioBitRate.Value);
|
||||||
}
|
}
|
||||||
@ -2110,9 +2110,9 @@ namespace MediaBrowser.Controller.MediaEncoding
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Empty bitrate area is not allow on iOS
|
// Empty bitrate area is not allow on iOS
|
||||||
// Default audio bitrate to 128K if it is not being requested
|
// Default audio bitrate to 128K per channel if it is not being requested
|
||||||
// https://ffmpeg.org/ffmpeg-codecs.html#toc-Codec-Options
|
// https://ffmpeg.org/ffmpeg-codecs.html#toc-Codec-Options
|
||||||
return 128000;
|
return 128000 * (outputAudioChannels ?? audioStream.Channels ?? 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
public string GetAudioFilterParam(EncodingJobInfo state, EncodingOptions encodingOptions)
|
public string GetAudioFilterParam(EncodingJobInfo state, EncodingOptions encodingOptions)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user