commit
126976a38e
|
@ -373,15 +373,15 @@ namespace MediaBrowser.MediaEncoding.Encoder
|
|||
|
||||
if (request.MaxAudioChannels.HasValue)
|
||||
{
|
||||
if (inputChannels.HasValue)
|
||||
{
|
||||
return Math.Min(request.MaxAudioChannels.Value, inputChannels.Value);
|
||||
}
|
||||
|
||||
var channelLimit = codec.IndexOf("mp3", StringComparison.OrdinalIgnoreCase) != -1
|
||||
? 2
|
||||
: 6;
|
||||
|
||||
if (inputChannels.HasValue)
|
||||
{
|
||||
channelLimit = Math.Min(channelLimit, inputChannels.Value);
|
||||
}
|
||||
|
||||
// If we don't have any media info then limit it to 5 to prevent encoding errors due to asking for too many channels
|
||||
return Math.Min(request.MaxAudioChannels.Value, channelLimit);
|
||||
}
|
||||
|
@ -436,16 +436,11 @@ namespace MediaBrowser.MediaEncoding.Encoder
|
|||
}
|
||||
|
||||
// h264
|
||||
if (isHls)
|
||||
{
|
||||
return string.Format(" -b:v {0} -maxrate {0} -bufsize {1}",
|
||||
bitrate.Value.ToString(UsCulture),
|
||||
(bitrate.Value * 2).ToString(UsCulture));
|
||||
}
|
||||
|
||||
return string.Format(" -b:v {0}", bitrate.Value.ToString(UsCulture));
|
||||
}
|
||||
|
||||
return string.Empty;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user