aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuke Pulverenti <luke.pulverenti@gmail.com>2013-09-02 16:19:11 -0400
committerLuke Pulverenti <luke.pulverenti@gmail.com>2013-09-02 16:19:11 -0400
commitc3fa40715c938301be129502982484e7cf47836c (patch)
tree44fc2cec565f3fbc9ef73d5d259b2ed2c18f2025
parent6a403d0263b4c171544a5b86c5ea257a4bf30189 (diff)
hls changes
-rw-r--r--MediaBrowser.Api/Playback/Hls/BaseHlsService.cs4
-rw-r--r--MediaBrowser.Api/Playback/Hls/VideoHlsService.cs4
-rw-r--r--MediaBrowser.Api/Playback/Progressive/VideoService.cs4
3 files changed, 6 insertions, 6 deletions
diff --git a/MediaBrowser.Api/Playback/Hls/BaseHlsService.cs b/MediaBrowser.Api/Playback/Hls/BaseHlsService.cs
index 419eeacf2a..46470bbac2 100644
--- a/MediaBrowser.Api/Playback/Hls/BaseHlsService.cs
+++ b/MediaBrowser.Api/Playback/Hls/BaseHlsService.cs
@@ -230,7 +230,7 @@ namespace MediaBrowser.Api.Playback.Hls
{
var probeSize = GetProbeSizeArgument(state.Item);
- var args = string.Format("{0} {1} {2} -i {3}{4} -threads 0 {5} {6} {7} -hls_time 10 -start_number 0 -hls_list_size 1440 \"{8}\"",
+ var args = string.Format("{0} {1} {2} -i {3}{4} -threads 0 {5} {6} -sc_threshold 0 {7} -hls_time 10 -start_number 0 -hls_list_size 1440 \"{8}\"",
probeSize,
GetUserAgentParam(state.Item),
GetFastSeekCommandLineParameter(state.Request),
@@ -246,7 +246,7 @@ namespace MediaBrowser.Api.Playback.Hls
{
var lowBitratePath = Path.Combine(Path.GetDirectoryName(outputPath), Path.GetFileNameWithoutExtension(outputPath) + "-low.m3u8");
- var lowBitrateParams = string.Format(" -threads 0 -vn -codec:a:{1} aac -strict experimental -ac 2 -ab 64000 -hls_time 10 -start_number 0 -hls_list_size 1440 \"{0}\"",
+ var lowBitrateParams = string.Format(" -threads 0 -vn -codec:a:{1} libmp3lame -ac 2 -ab 32000 -hls_time 10 -start_number 0 -hls_list_size 1440 \"{0}\"",
lowBitratePath,
state.AudioStream.Index);
diff --git a/MediaBrowser.Api/Playback/Hls/VideoHlsService.cs b/MediaBrowser.Api/Playback/Hls/VideoHlsService.cs
index 7dd98fc899..e541ae0fb7 100644
--- a/MediaBrowser.Api/Playback/Hls/VideoHlsService.cs
+++ b/MediaBrowser.Api/Playback/Hls/VideoHlsService.cs
@@ -180,7 +180,7 @@ namespace MediaBrowser.Api.Playback.Hls
return IsH264(state.VideoStream) ? "-codec:v:0 copy -bsf h264_mp4toannexb" : "-codec:v:0 copy";
}
- const string keyFrameArg = " -force_key_frames expr:if(isnan(prev_forced_t),gte(t,1),gte(t,prev_forced_t+5))";
+ const string keyFrameArg = " -force_key_frames expr:if(isnan(prev_forced_t),gte(t,.1),gte(t,prev_forced_t+5))";
var args = "-codec:v:0 " + codec + " -preset superfast" + keyFrameArg;
@@ -188,7 +188,7 @@ namespace MediaBrowser.Api.Playback.Hls
if (bitrate.HasValue)
{
- args += string.Format(" -b:v {0} -maxrate {0} -minrate {0} -bufsize ({0}/10)", bitrate.Value.ToString(UsCulture));
+ args += string.Format(" -b:v {0} -maxrate {0} -minrate {0} -bufsize ({0}/11)", bitrate.Value.ToString(UsCulture));
}
// Add resolution params, if specified
diff --git a/MediaBrowser.Api/Playback/Progressive/VideoService.cs b/MediaBrowser.Api/Playback/Progressive/VideoService.cs
index 2ccbfa04ee..18eb473f2a 100644
--- a/MediaBrowser.Api/Playback/Progressive/VideoService.cs
+++ b/MediaBrowser.Api/Playback/Progressive/VideoService.cs
@@ -144,7 +144,7 @@ namespace MediaBrowser.Api.Playback.Progressive
return state.VideoStream != null && IsH264(state.VideoStream) ? args + " -bsf h264_mp4toannexb" : args;
}
- const string keyFrameArg = " -force_key_frames expr:if(isnan(prev_forced_t),gte(t,1),gte(t,prev_forced_t+5))";
+ const string keyFrameArg = " -force_key_frames expr:if(isnan(prev_forced_t),gte(t,.1),gte(t,prev_forced_t+5))";
args += keyFrameArg;
@@ -285,7 +285,7 @@ namespace MediaBrowser.Api.Playback.Progressive
if (bitrate.HasValue)
{
- args += " -b:v " + bitrate.Value.ToString(UsCulture);
+ args += string.Format(" -b:v {0} -maxrate {0} -minrate {0} -bufsize ({0}/11)", bitrate.Value.ToString(UsCulture));
}
return args.Trim();