Fix audio codec not being used in UniversalAudio (#9192)

This commit is contained in:
James Harvey 2023-02-02 13:54:05 +00:00 committed by GitHub
parent 9eaad18c2c
commit 29c1f54b57
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -5762,6 +5762,11 @@ namespace MediaBrowser.Controller.MediaEncoding
audioTranscodeParams.Add("-ac " + state.OutputAudioChannels.Value.ToString(CultureInfo.InvariantCulture));
}
if (!string.IsNullOrEmpty(state.OutputAudioCodec))
{
audioTranscodeParams.Add("-acodec " + GetAudioEncoder(state));
}
if (!string.Equals(state.OutputAudioCodec, "opus", StringComparison.OrdinalIgnoreCase))
{
// opus only supports specific sampling rates