mirror of
https://github.com/jellyfin/jellyfin.git
synced 2025-04-24 05:57:20 -04:00
Take channels into account when calculating fallback audio bitrate
This commit is contained in:
parent
2b4bf81575
commit
9908dad045
1 changed files with 3 additions and 3 deletions
|
@ -2101,7 +2101,7 @@ namespace MediaBrowser.Controller.MediaEncoding
|
|||
if (audioBitRate.HasValue && (string.Equals(audioCodec, "flac", StringComparison.OrdinalIgnoreCase)
|
||||
|| string.Equals(audioCodec, "alac", StringComparison.OrdinalIgnoreCase)))
|
||||
{
|
||||
if ((audioStream.Channels ?? 0) >= 6)
|
||||
if (inputChannels >= 6)
|
||||
{
|
||||
return Math.Min(3584000, audioBitRate.Value);
|
||||
}
|
||||
|
@ -2110,9 +2110,9 @@ namespace MediaBrowser.Controller.MediaEncoding
|
|||
}
|
||||
|
||||
// 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
|
||||
return 128000;
|
||||
return 128000 * (outputAudioChannels ?? audioStream.Channels ?? 1);
|
||||
}
|
||||
|
||||
public string GetAudioFilterParam(EncodingJobInfo state, EncodingOptions encodingOptions)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue