aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuke Pulverenti <luke.pulverenti@gmail.com>2013-04-03 23:42:11 -0400
committerLuke Pulverenti <luke.pulverenti@gmail.com>2013-04-03 23:42:11 -0400
commit5a3b5a58a53cc5e976c856817534ed79de0c1714 (patch)
tree16644eefa7e4aaf0980b1726137e456f679871de
parent8397b37827a50f770e4692952d345e851319dada (diff)
added mpeg4 as an available output codec
-rw-r--r--MediaBrowser.Api/Playback/BaseStreamingService.cs4
-rw-r--r--MediaBrowser.Api/Playback/Progressive/VideoService.cs6
-rw-r--r--MediaBrowser.Api/Playback/StreamRequest.cs2
-rw-r--r--MediaBrowser.Model/DTO/StreamOptions.cs5
4 files changed, 15 insertions, 2 deletions
diff --git a/MediaBrowser.Api/Playback/BaseStreamingService.cs b/MediaBrowser.Api/Playback/BaseStreamingService.cs
index cbb98f0fe..5ecff74f9 100644
--- a/MediaBrowser.Api/Playback/BaseStreamingService.cs
+++ b/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";
diff --git a/MediaBrowser.Api/Playback/Progressive/VideoService.cs b/MediaBrowser.Api/Playback/Progressive/VideoService.cs
index 14ad45419..6c9cc8903 100644
--- a/MediaBrowser.Api/Playback/Progressive/VideoService.cs
+++ b/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;
diff --git a/MediaBrowser.Api/Playback/StreamRequest.cs b/MediaBrowser.Api/Playback/StreamRequest.cs
index d4da11e3f..07f9d31e9 100644
--- a/MediaBrowser.Api/Playback/StreamRequest.cs
+++ b/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>
diff --git a/MediaBrowser.Model/DTO/StreamOptions.cs b/MediaBrowser.Model/DTO/StreamOptions.cs
index 79be9fb4b..edb88a18f 100644
--- a/MediaBrowser.Model/DTO/StreamOptions.cs
+++ b/MediaBrowser.Model/DTO/StreamOptions.cs
@@ -169,6 +169,11 @@
H264,
/// <summary>
+ /// The mpeg4
+ /// </summary>
+ Mpeg4,
+
+ /// <summary>
/// The theora
/// </summary>
Theora,