Przeglądaj źródła

Merge branch 'master' of https://github.com/MediaBrowser/MediaBrowser

Techywarrior 12 lat temu
rodzic
commit
54ac6c2d88

+ 4 - 0
MediaBrowser.Api/Playback/BaseStreamingService.cs

@@ -428,6 +428,8 @@ namespace MediaBrowser.Api.Playback
                 {
                     return "wmav2";
                 }
+
+                return codec.ToString().ToLower();
             }
 
             return "copy";
@@ -460,6 +462,8 @@ namespace MediaBrowser.Api.Playback
                 {
                     return "libtheora";
                 }
+
+                return codec.ToString().ToLower();
             }
 
             return "copy";

+ 5 - 1
MediaBrowser.Api/Playback/Progressive/VideoService.cs

@@ -250,7 +250,11 @@ namespace MediaBrowser.Api.Playback.Progressive
             {
                 args = "-preset superfast";
             }
-
+            else if (videoCodec.Equals("mpeg4", StringComparison.OrdinalIgnoreCase))
+            {
+                args = "-mbd rd -flags +mv4+aic -trellis 2 -cmp 2 -subcmp 2 -bf 2";
+            } 
+            
             if (request.VideoBitRate.HasValue)
             {
                 args += " -b:v " + request.VideoBitRate;

+ 1 - 1
MediaBrowser.Api/Playback/StreamRequest.cs

@@ -70,7 +70,7 @@ namespace MediaBrowser.Api.Playback
         /// Gets or sets the video codec.
         /// </summary>
         /// <value>The video codec.</value>
-        [ApiMember(Name = "VideoCodec", Description = "Optional. Specify a video codec to encode to, e.g. h264. If omitted the server will auto-select using the url's extension. Options: h264, theora, vpx, wmv.", IsRequired = false, DataType = "string", ParameterType = "query", Verb = "GET")]
+        [ApiMember(Name = "VideoCodec", Description = "Optional. Specify a video codec to encode to, e.g. h264. If omitted the server will auto-select using the url's extension. Options: h264, mpeg4, theora, vpx, wmv.", IsRequired = false, DataType = "string", ParameterType = "query", Verb = "GET")]
         public VideoCodecs? VideoCodec { get; set; }
 
         /// <summary>

+ 5 - 0
MediaBrowser.Model/DTO/StreamOptions.cs

@@ -168,6 +168,11 @@
         /// </summary>
         H264,
 
+        /// <summary>
+        /// The mpeg4
+        /// </summary>
+        Mpeg4,
+
         /// <summary>
         /// The theora
         /// </summary>