mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-08-04 15:28:23 +00:00
Backport pull request #13127 from jellyfin/release-10.10.z
Fallback to lossy audio codec for bitrate limit
Original-merge: 65f722f23c
Merged-by: crobibero <cody@robibe.ro>
Backported-by: Bond_009 <bond.009@outlook.com>
This commit is contained in:
parent
51207edf44
commit
39cd3dcbd1
1 changed files with 5 additions and 0 deletions
|
|
@ -235,6 +235,11 @@ public static class StreamingHelpers
|
|||
state.VideoRequest.MaxHeight = resolution.MaxHeight;
|
||||
}
|
||||
}
|
||||
|
||||
if (!EncodingHelper.IsCopyCodec(state.OutputAudioCodec) && string.Equals(state.AudioStream.Codec, state.OutputAudioCodec, StringComparison.OrdinalIgnoreCase) && state.OutputAudioBitrate.HasValue)
|
||||
{
|
||||
state.OutputAudioCodec = state.SupportedAudioCodecs.Where(c => !EncodingHelper.LosslessAudioCodecs.Contains(c)).FirstOrDefault(mediaEncoder.CanEncodeToAudioCodec);
|
||||
}
|
||||
}
|
||||
|
||||
var ext = string.IsNullOrWhiteSpace(state.OutputContainer)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue