aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.Api/Playback/BaseStreamingService.cs
diff options
context:
space:
mode:
Diffstat (limited to 'MediaBrowser.Api/Playback/BaseStreamingService.cs')
-rw-r--r--MediaBrowser.Api/Playback/BaseStreamingService.cs12
1 files changed, 9 insertions, 3 deletions
diff --git a/MediaBrowser.Api/Playback/BaseStreamingService.cs b/MediaBrowser.Api/Playback/BaseStreamingService.cs
index 8c4ccfa22..833fcc54b 100644
--- a/MediaBrowser.Api/Playback/BaseStreamingService.cs
+++ b/MediaBrowser.Api/Playback/BaseStreamingService.cs
@@ -141,7 +141,7 @@ namespace MediaBrowser.Api.Playback
var filename = data.GetMD5().ToString("N", CultureInfo.InvariantCulture);
var ext = outputFileExtension.ToLowerInvariant();
- var folder = ServerConfigurationManager.ApplicationPaths.TranscodingTempPath;
+ var folder = ServerConfigurationManager.ApplicationPaths.TranscodePath;
if (EnableOutputInSubFolder)
{
@@ -289,17 +289,22 @@ namespace MediaBrowser.Api.Playback
throw;
}
+ Logger.LogDebug("Launched ffmpeg process");
state.TranscodingJob = transcodingJob;
// Important - don't await the log task or we won't be able to kill ffmpeg when the user stops playback
_ = new JobLogger(Logger).StartStreamingLog(state, process.StandardError.BaseStream, logStream);
// Wait for the file to exist before proceeeding
- while (!File.Exists(state.WaitForPath ?? outputPath) && !transcodingJob.HasExited)
+ var ffmpegTargetFile = state.WaitForPath ?? outputPath;
+ Logger.LogDebug("Waiting for the creation of {0}", ffmpegTargetFile);
+ while (!File.Exists(ffmpegTargetFile) && !transcodingJob.HasExited)
{
await Task.Delay(100, cancellationTokenSource.Token).ConfigureAwait(false);
}
+ Logger.LogDebug("File {0} created or transcoding has finished", ffmpegTargetFile);
+
if (state.IsInputVideo && transcodingJob.Type == TranscodingJobType.Progressive && !transcodingJob.HasExited)
{
await Task.Delay(1000, cancellationTokenSource.Token).ConfigureAwait(false);
@@ -314,6 +319,7 @@ namespace MediaBrowser.Api.Playback
{
StartThrottler(state, transcodingJob);
}
+ Logger.LogDebug("StartFfMpeg() finished successfully");
return transcodingJob;
}
@@ -582,7 +588,7 @@ namespace MediaBrowser.Api.Playback
/// <summary>
/// Parses query parameters as StreamOptions
- /// <summary>
+ /// </summary>
/// <param name="request">The stream request.</param>
private void ParseStreamOptions(StreamRequest request)
{