diff options
| author | Luke Pulverenti <luke.pulverenti@gmail.com> | 2014-12-26 12:45:06 -0500 |
|---|---|---|
| committer | Luke Pulverenti <luke.pulverenti@gmail.com> | 2014-12-26 12:45:06 -0500 |
| commit | 0ec3d217e71ea20a9e377e479db88c4d4cd39baf (patch) | |
| tree | 74e565a797d48cd91c465f31cf8faef2be8bec7c /MediaBrowser.Api/Playback/Progressive/VideoService.cs | |
| parent | 36577ac42ea9a38a155ca7cd0d17d2d43563a27f (diff) | |
sync updates
Diffstat (limited to 'MediaBrowser.Api/Playback/Progressive/VideoService.cs')
| -rw-r--r-- | MediaBrowser.Api/Playback/Progressive/VideoService.cs | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/MediaBrowser.Api/Playback/Progressive/VideoService.cs b/MediaBrowser.Api/Playback/Progressive/VideoService.cs index fb2d30732..5ef72a495 100644 --- a/MediaBrowser.Api/Playback/Progressive/VideoService.cs +++ b/MediaBrowser.Api/Playback/Progressive/VideoService.cs @@ -124,7 +124,7 @@ namespace MediaBrowser.Api.Playback.Progressive /// <returns>System.String.</returns> private string GetVideoArguments(StreamState state, string codec) { - var args = "-vcodec " + codec; + var args = "-codec:v:0 " + codec; if (state.EnableMpegtsM2TsMode) { @@ -134,7 +134,9 @@ namespace MediaBrowser.Api.Playback.Progressive // See if we can save come cpu cycles by avoiding encoding if (codec.Equals("copy", StringComparison.OrdinalIgnoreCase)) { - return state.VideoStream != null && IsH264(state.VideoStream) ? args + " -bsf:v h264_mp4toannexb" : args; + return state.VideoStream != null && IsH264(state.VideoStream) && string.Equals(state.OutputContainer, "ts", StringComparison.OrdinalIgnoreCase) ? + args + " -bsf:v h264_mp4toannexb" : + args; } var keyFrameArg = string.Format(" -force_key_frames expr:gte(t,n_forced*{0})", @@ -182,13 +184,13 @@ namespace MediaBrowser.Api.Playback.Progressive // Get the output codec name var codec = state.OutputAudioCodec; + var args = "-codec:a:0 " + codec; + if (codec.Equals("copy", StringComparison.OrdinalIgnoreCase)) { - return "-acodec copy"; + return args; } - var args = "-acodec " + codec; - // Add the number of audio channels var channels = state.OutputAudioChannels; |
