diff options
| author | Luke Pulverenti <luke.pulverenti@gmail.com> | 2013-11-01 11:59:42 -0400 |
|---|---|---|
| committer | Luke Pulverenti <luke.pulverenti@gmail.com> | 2013-11-01 11:59:42 -0400 |
| commit | c543fdea3a2c16b8bdb0b8b9b71e89a9b106b34c (patch) | |
| tree | 0de2f0896cff67c9c253eb4c9fe492839860f171 /MediaBrowser.Api/Playback/Hls/VideoHlsService.cs | |
| parent | 142d0e5f48fcbd6d93896ba59b4363fd6b112b4c (diff) | |
| parent | 407b64d0f90a0b6d145b264f198dcb7f33fee95f (diff) | |
Merge branch 'master' of https://github.com/tikuf/MediaBrowser
Conflicts:
MediaBrowser.Api/Playback/Hls/VideoHlsService.cs
MediaBrowser.Api/Playback/Progressive/VideoService.cs
Diffstat (limited to 'MediaBrowser.Api/Playback/Hls/VideoHlsService.cs')
| -rw-r--r-- | MediaBrowser.Api/Playback/Hls/VideoHlsService.cs | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/MediaBrowser.Api/Playback/Hls/VideoHlsService.cs b/MediaBrowser.Api/Playback/Hls/VideoHlsService.cs index 453039ba8..6b4ca6146 100644 --- a/MediaBrowser.Api/Playback/Hls/VideoHlsService.cs +++ b/MediaBrowser.Api/Playback/Hls/VideoHlsService.cs @@ -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,14 +88,20 @@ 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) { volParam = ",volume=2.000000"; } + + if (state.Request.AudioSampleRate.HasValue) + { + AudioSampleRate= state.Request.AudioSampleRate.Value + ":"; + } - args += string.Format(" -af \"adelay=1,aresample=async=1000{0}\"", volParam); + args += string.Format(" -af \"adelay=1,aresample={0}async=1000{1}\"",AudioSampleRate, volParam); return args; } |
