|
|
@ -782,9 +782,19 @@ namespace MediaBrowser.Api.Playback.Hls
|
|
|
|
|
|
|
|
|
|
|
|
protected override string GetAudioArguments(StreamState state)
|
|
|
|
protected override string GetAudioArguments(StreamState state)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
|
|
|
|
var codec = GetAudioEncoder(state.Request);
|
|
|
|
|
|
|
|
|
|
|
|
if (!state.IsOutputVideo)
|
|
|
|
if (!state.IsOutputVideo)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
|
|
|
|
if (string.Equals(codec, "copy", StringComparison.OrdinalIgnoreCase))
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
return "-acodec copy";
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
var audioTranscodeParams = new List<string>();
|
|
|
|
var audioTranscodeParams = new List<string>();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
audioTranscodeParams.Add("-acodec " + codec);
|
|
|
|
|
|
|
|
|
|
|
|
if (state.OutputAudioBitrate.HasValue)
|
|
|
|
if (state.OutputAudioBitrate.HasValue)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
audioTranscodeParams.Add("-ab " + state.OutputAudioBitrate.Value.ToString(UsCulture));
|
|
|
|
audioTranscodeParams.Add("-ab " + state.OutputAudioBitrate.Value.ToString(UsCulture));
|
|
|
@ -804,8 +814,6 @@ namespace MediaBrowser.Api.Playback.Hls
|
|
|
|
return string.Join(" ", audioTranscodeParams.ToArray());
|
|
|
|
return string.Join(" ", audioTranscodeParams.ToArray());
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
var codec = GetAudioEncoder(state.Request);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (string.Equals(codec, "copy", StringComparison.OrdinalIgnoreCase))
|
|
|
|
if (string.Equals(codec, "copy", StringComparison.OrdinalIgnoreCase))
|
|
|
|
{
|
|
|
|
{
|
|
|
|
return "-codec:a:0 copy";
|
|
|
|
return "-codec:a:0 copy";
|
|
|
|