fix opus transcoding
This commit is contained in:
parent
62023e986a
commit
0aecb6e296
|
@ -73,10 +73,14 @@ namespace MediaBrowser.Api.Playback.Progressive
|
|||
audioTranscodeParams.Add("-ac " + state.OutputAudioChannels.Value.ToString(UsCulture));
|
||||
}
|
||||
|
||||
// opus will fail on 44100
|
||||
if (!string.Equals(state.OutputAudioCodec, "opus", global::System.StringComparison.OrdinalIgnoreCase))
|
||||
{
|
||||
if (state.OutputAudioSampleRate.HasValue)
|
||||
{
|
||||
audioTranscodeParams.Add("-ar " + state.OutputAudioSampleRate.Value.ToString(UsCulture));
|
||||
}
|
||||
}
|
||||
|
||||
const string vn = " -vn";
|
||||
|
||||
|
|
|
@ -35,10 +35,14 @@ namespace MediaBrowser.MediaEncoding.Encoder
|
|||
audioTranscodeParams.Add("-ac " + state.OutputAudioChannels.Value.ToString(UsCulture));
|
||||
}
|
||||
|
||||
// opus will fail on 44100
|
||||
if (!string.Equals(state.OutputAudioCodec, "opus", StringComparison.OrdinalIgnoreCase))
|
||||
{
|
||||
if (state.OutputAudioSampleRate.HasValue)
|
||||
{
|
||||
audioTranscodeParams.Add("-ar " + state.OutputAudioSampleRate.Value.ToString(UsCulture));
|
||||
}
|
||||
}
|
||||
|
||||
const string vn = " -vn";
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user