diff options
| author | LukePulverenti <luke.pulverenti@gmail.com> | 2013-03-07 12:39:21 -0500 |
|---|---|---|
| committer | LukePulverenti <luke.pulverenti@gmail.com> | 2013-03-07 12:39:21 -0500 |
| commit | 211d24e66e717f6294840b4f91806a24c1fb2e78 (patch) | |
| tree | a7518dc8009af213745494cdbaa7f0896caabfd9 | |
| parent | 893093a64addacca81c9422e52025f92b829a050 (diff) | |
revised windows phone fix
| -rw-r--r-- | MediaBrowser.Api/Playback/BaseStreamingService.cs | 2 | ||||
| -rw-r--r-- | MediaBrowser.Api/Playback/Progressive/VideoService.cs | 21 |
2 files changed, 13 insertions, 10 deletions
diff --git a/MediaBrowser.Api/Playback/BaseStreamingService.cs b/MediaBrowser.Api/Playback/BaseStreamingService.cs index 796366181..fb5f56693 100644 --- a/MediaBrowser.Api/Playback/BaseStreamingService.cs +++ b/MediaBrowser.Api/Playback/BaseStreamingService.cs @@ -518,7 +518,7 @@ namespace MediaBrowser.Api.Playback ServerEntryPoint.Instance.OnTranscodeBeginning(outputPath, TranscodingJobType, process); - //Logger.Info(process.StartInfo.FileName + " " + process.StartInfo.Arguments); + Logger.Info(process.StartInfo.FileName + " " + process.StartInfo.Arguments); var logFilePath = Path.Combine(ApplicationPaths.LogDirectoryPath, "ffmpeg-" + Guid.NewGuid() + ".txt"); diff --git a/MediaBrowser.Api/Playback/Progressive/VideoService.cs b/MediaBrowser.Api/Playback/Progressive/VideoService.cs index e6fe18c92..7849e60ab 100644 --- a/MediaBrowser.Api/Playback/Progressive/VideoService.cs +++ b/MediaBrowser.Api/Playback/Progressive/VideoService.cs @@ -25,13 +25,13 @@ namespace MediaBrowser.Api.Playback.Progressive { } - + /// <summary> /// Class VideoService /// </summary> public class VideoService : BaseProgressiveStreamingService { - public VideoService(IServerApplicationPaths appPaths, IUserManager userManager, ILibraryManager libraryManager, IIsoManager isoManager) + public VideoService(IServerApplicationPaths appPaths, IUserManager userManager, ILibraryManager libraryManager, IIsoManager isoManager) : base(appPaths, userManager, libraryManager, isoManager) { } @@ -45,7 +45,7 @@ namespace MediaBrowser.Api.Playback.Progressive { return ProcessRequest(request); } - + /// <summary> /// Gets the command line arguments. /// </summary> @@ -72,7 +72,14 @@ namespace MediaBrowser.Api.Playback.Progressive } } - return string.Format("{0} {1} -i {2}{3} -threads 0 {4} {5}{6} {7} \"{8}\"", + var format = string.Empty; + + if (string.Equals("wmv2", videoCodec, StringComparison.OrdinalIgnoreCase)) + { + format = " -f asf "; + } + + return string.Format("{0} {1} -i {2}{3} -threads 0 {4} {5}{6} {7}{8} \"{9}\"", probeSize, GetFastSeekCommandLineParameter(state.Request), GetInputArgument(video, state.IsoMount), @@ -81,6 +88,7 @@ namespace MediaBrowser.Api.Playback.Progressive GetVideoArguments(state, videoCodec), graphicalSubtitleParam, GetAudioArguments(state), + format, outputPath ).Trim(); } @@ -124,11 +132,6 @@ namespace MediaBrowser.Api.Playback.Progressive args += " -bsf h264_mp4toannexb"; } - if (string.Equals("wmv2", videoCodec)) - { - args += " -f asf"; - } - return args; } |
