support 5.1 aac
This commit is contained in:
parent
212e696f7e
commit
bd85132702
|
@ -426,11 +426,6 @@ namespace MediaBrowser.Api.Playback
|
||||||
{
|
{
|
||||||
if (audioStream.Channels > 2 && request.AudioCodec.HasValue)
|
if (audioStream.Channels > 2 && request.AudioCodec.HasValue)
|
||||||
{
|
{
|
||||||
if (request.AudioCodec.Value == AudioCodecs.Aac)
|
|
||||||
{
|
|
||||||
// libvo_aacenc currently only supports two channel output
|
|
||||||
return 2;
|
|
||||||
}
|
|
||||||
if (request.AudioCodec.Value == AudioCodecs.Wma)
|
if (request.AudioCodec.Value == AudioCodecs.Wma)
|
||||||
{
|
{
|
||||||
// wmav2 currently only supports two channel output
|
// wmav2 currently only supports two channel output
|
||||||
|
|
|
@ -93,6 +93,11 @@ namespace MediaBrowser.Api.Playback.Hls
|
||||||
|
|
||||||
var args = "-codec:a " + codec;
|
var args = "-codec:a " + codec;
|
||||||
|
|
||||||
|
if (string.Equals(codec, "aac", StringComparison.OrdinalIgnoreCase))
|
||||||
|
{
|
||||||
|
args += " -strict experimental";
|
||||||
|
}
|
||||||
|
|
||||||
var channels = GetNumAudioChannelsParam(state.Request, state.AudioStream);
|
var channels = GetNumAudioChannelsParam(state.Request, state.AudioStream);
|
||||||
|
|
||||||
if (channels.HasValue)
|
if (channels.HasValue)
|
||||||
|
|
|
@ -98,6 +98,11 @@ namespace MediaBrowser.Api.Playback.Hls
|
||||||
|
|
||||||
if (state.AudioStream != null)
|
if (state.AudioStream != null)
|
||||||
{
|
{
|
||||||
|
if (string.Equals(codec, "aac", StringComparison.OrdinalIgnoreCase))
|
||||||
|
{
|
||||||
|
args += " -strict experimental";
|
||||||
|
}
|
||||||
|
|
||||||
var channels = GetNumAudioChannelsParam(state.Request, state.AudioStream);
|
var channels = GetNumAudioChannelsParam(state.Request, state.AudioStream);
|
||||||
|
|
||||||
if (channels.HasValue)
|
if (channels.HasValue)
|
||||||
|
|
|
@ -3,7 +3,9 @@ using MediaBrowser.Common.MediaInfo;
|
||||||
using MediaBrowser.Controller;
|
using MediaBrowser.Controller;
|
||||||
using MediaBrowser.Controller.Library;
|
using MediaBrowser.Controller.Library;
|
||||||
using ServiceStack.ServiceHost;
|
using ServiceStack.ServiceHost;
|
||||||
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
using System.IO;
|
||||||
|
|
||||||
namespace MediaBrowser.Api.Playback.Progressive
|
namespace MediaBrowser.Api.Playback.Progressive
|
||||||
{
|
{
|
||||||
|
@ -84,6 +86,11 @@ namespace MediaBrowser.Api.Playback.Progressive
|
||||||
|
|
||||||
var audioTranscodeParams = new List<string>();
|
var audioTranscodeParams = new List<string>();
|
||||||
|
|
||||||
|
if (string.Equals(Path.GetExtension(outputPath), ".aac", StringComparison.OrdinalIgnoreCase))
|
||||||
|
{
|
||||||
|
audioTranscodeParams.Add("-strict experimental");
|
||||||
|
}
|
||||||
|
|
||||||
if (request.AudioBitRate.HasValue)
|
if (request.AudioBitRate.HasValue)
|
||||||
{
|
{
|
||||||
audioTranscodeParams.Add("-ab " + request.AudioBitRate.Value);
|
audioTranscodeParams.Add("-ab " + request.AudioBitRate.Value);
|
||||||
|
|
|
@ -217,6 +217,11 @@ namespace MediaBrowser.Api.Playback.Progressive
|
||||||
|
|
||||||
var args = "-acodec " + codec;
|
var args = "-acodec " + codec;
|
||||||
|
|
||||||
|
if (string.Equals(codec, "aac", StringComparison.OrdinalIgnoreCase))
|
||||||
|
{
|
||||||
|
args += " -strict experimental";
|
||||||
|
}
|
||||||
|
|
||||||
// Add the number of audio channels
|
// Add the number of audio channels
|
||||||
var channels = GetNumAudioChannelsParam(request, state.AudioStream);
|
var channels = GetNumAudioChannelsParam(request, state.AudioStream);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user