aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.Api
diff options
context:
space:
mode:
Diffstat (limited to 'MediaBrowser.Api')
-rw-r--r--MediaBrowser.Api/ApiEntryPoint.cs2
-rw-r--r--MediaBrowser.Api/Playback/Hls/DynamicHlsService.cs11
-rw-r--r--MediaBrowser.Api/Playback/TranscodingThrottler.cs13
3 files changed, 17 insertions, 9 deletions
diff --git a/MediaBrowser.Api/ApiEntryPoint.cs b/MediaBrowser.Api/ApiEntryPoint.cs
index db3dbf048..68087309b 100644
--- a/MediaBrowser.Api/ApiEntryPoint.cs
+++ b/MediaBrowser.Api/ApiEntryPoint.cs
@@ -340,7 +340,7 @@ namespace MediaBrowser.Api
// We can really reduce the timeout for apps that are using the newer api
if (!string.IsNullOrWhiteSpace(job.PlaySessionId))
{
- timerDuration = 60000;
+ timerDuration = 120000;
}
}
diff --git a/MediaBrowser.Api/Playback/Hls/DynamicHlsService.cs b/MediaBrowser.Api/Playback/Hls/DynamicHlsService.cs
index 6ca5c57f3..41d26417d 100644
--- a/MediaBrowser.Api/Playback/Hls/DynamicHlsService.cs
+++ b/MediaBrowser.Api/Playback/Hls/DynamicHlsService.cs
@@ -879,7 +879,7 @@ namespace MediaBrowser.Api.Playback.Hls
if (!EnableSplitTranscoding(state))
{
- args += " -copyts";
+ //args += " -copyts";
}
return args;
@@ -910,11 +910,11 @@ namespace MediaBrowser.Api.Playback.Hls
//toTimeParam = " -to " + MediaEncoder.GetTimeParameter(endTime);
toTimeParam = " -t " + MediaEncoder.GetTimeParameter(TimeSpan.FromSeconds(durationSeconds).Ticks);
}
+ }
- if (state.IsOutputVideo && !string.Equals(state.OutputVideoCodec, "copy", StringComparison.OrdinalIgnoreCase) && (state.Request.StartTimeTicks ?? 0) > 0)
- {
- timestampOffsetParam = " -output_ts_offset " + MediaEncoder.GetTimeParameter(state.Request.StartTimeTicks ?? 0).ToString(CultureInfo.InvariantCulture);
- }
+ if (state.IsOutputVideo && !string.Equals(state.OutputVideoCodec, "copy", StringComparison.OrdinalIgnoreCase) && (state.Request.StartTimeTicks ?? 0) > 0)
+ {
+ timestampOffsetParam = " -output_ts_offset " + MediaEncoder.GetTimeParameter(state.Request.StartTimeTicks ?? 0).ToString(CultureInfo.InvariantCulture);
}
var mapArgs = state.IsOutputVideo ? GetMapArgs(state) : string.Empty;
@@ -959,6 +959,7 @@ namespace MediaBrowser.Api.Playback.Hls
private bool EnableSplitTranscoding(StreamState state)
{
+ return false;
if (string.Equals(Request.QueryString["EnableSplitTranscoding"], "false", StringComparison.OrdinalIgnoreCase))
{
return false;
diff --git a/MediaBrowser.Api/Playback/TranscodingThrottler.cs b/MediaBrowser.Api/Playback/TranscodingThrottler.cs
index fec3dda86..f94d5d837 100644
--- a/MediaBrowser.Api/Playback/TranscodingThrottler.cs
+++ b/MediaBrowser.Api/Playback/TranscodingThrottler.cs
@@ -42,7 +42,14 @@ namespace MediaBrowser.Api.Playback
var options = GetOptions();
- if (options.EnableThrottling && IsThrottleAllowed(_job, options.ThrottleThresholdInSeconds))
+ var threshold = options.ThrottleThresholdInSeconds;
+
+ if (!options.EnableThrottling)
+ {
+ threshold *= 2;
+ }
+
+ if (IsThrottleAllowed(_job, threshold))
{
PauseTranscoding();
}
@@ -56,7 +63,7 @@ namespace MediaBrowser.Api.Playback
{
if (!_isPaused)
{
- _logger.Debug("Sending pause command to ffmpeg");
+ //_logger.Debug("Sending pause command to ffmpeg");
try
{
@@ -74,7 +81,7 @@ namespace MediaBrowser.Api.Playback
{
if (_isPaused)
{
- _logger.Debug("Sending unpause command to ffmpeg");
+ //_logger.Debug("Sending unpause command to ffmpeg");
try
{