Conflicts:
	MediaBrowser.Api/Playback/Hls/VideoHlsService.cs
	MediaBrowser.Api/Playback/Progressive/VideoService.cs
pull/702/head
Luke Pulverenti 11 years ago
commit c543fdea3a

@ -1,4 +1,4 @@
using MediaBrowser.Common.IO;
using MediaBrowser.Common.IO;
using MediaBrowser.Common.MediaInfo;
using MediaBrowser.Controller;
using MediaBrowser.Controller.Dto;
@ -80,11 +80,6 @@ namespace MediaBrowser.Api.Playback.Hls
args += " -ac " + channels.Value;
}
if (state.Request.AudioSampleRate.HasValue)
{
args += " -ar " + state.Request.AudioSampleRate.Value;
}
var bitrate = GetAudioBitrateParam(state);
if (bitrate.HasValue)
@ -93,6 +88,7 @@ namespace MediaBrowser.Api.Playback.Hls
}
var volParam = string.Empty;
var AudioSampleRate = string.Empty;
// Boost volume to 200% when downsampling from 6ch to 2ch
if (channels.HasValue && channels.Value <= 2 && state.AudioStream.Channels.HasValue && state.AudioStream.Channels.Value > 5)
@ -100,7 +96,12 @@ namespace MediaBrowser.Api.Playback.Hls
volParam = ",volume=2.000000";
}
args += string.Format(" -af \"adelay=1,aresample=async=1000{0}\"", volParam);
if (state.Request.AudioSampleRate.HasValue)
{
AudioSampleRate= state.Request.AudioSampleRate.Value + ":";
}
args += string.Format(" -af \"adelay=1,aresample={0}async=1000{1}\"",AudioSampleRate, volParam);
return args;
}

@ -1,4 +1,4 @@
using MediaBrowser.Common.IO;
using MediaBrowser.Common.IO;
using MediaBrowser.Common.MediaInfo;
using MediaBrowser.Controller;
using MediaBrowser.Controller.Drawing;
@ -220,11 +220,6 @@ namespace MediaBrowser.Api.Playback.Progressive
args += " -ac " + channels.Value;
}
if (request.AudioSampleRate.HasValue)
{
args += " -ar " + request.AudioSampleRate.Value;
}
var bitrate = GetAudioBitrateParam(state);
if (bitrate.HasValue)
@ -232,18 +227,24 @@ namespace MediaBrowser.Api.Playback.Progressive
args += " -ab " + bitrate.Value.ToString(UsCulture);
}
var volParam = string.Empty;
var volParam = string.Empty;
var AudioSampleRate = string.Empty;
// Boost volume to 200% when downsampling from 6ch to 2ch
if (channels.HasValue && channels.Value <= 2 && state.AudioStream.Channels.HasValue && state.AudioStream.Channels.Value > 5)
{
volParam = ",volume=2.000000";
}
// Boost volume to 200% when downsampling from 6ch to 2ch
if (channels.HasValue && channels.Value <= 2 && state.AudioStream.Channels.HasValue && state.AudioStream.Channels.Value > 5)
{
volParam = ",volume=2.000000";
}
args += string.Format(" -af \"aresample=async=1000{0}\"", volParam);
if (state.Request.AudioSampleRate.HasValue)
{
AudioSampleRate= state.Request.AudioSampleRate.Value + ":";
}
return args;
}
args += string.Format(" -af \"aresample={0}async=1000{1}\"",AudioSampleRate, volParam);
return args;
}
/// <summary>
/// Gets the video bitrate to specify on the command line

@ -1,4 +1,4 @@
using MediaBrowser.Common.Configuration;
using MediaBrowser.Common.Configuration;
using MediaBrowser.Common.IO;
using MediaBrowser.Common.MediaInfo;
using MediaBrowser.Controller.IO;
@ -602,6 +602,8 @@ namespace MediaBrowser.Server.Implementations.MediaEncoder
return "-sub_charenc windows-1251";
case "vie":
return "-sub_charenc windows-1258";
case "kor":
return "-sub_charenc cp949";
default:
return "-sub_charenc windows-1252";
}

Loading…
Cancel
Save