aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.Api/Playback/BaseStreamingService.cs
diff options
context:
space:
mode:
authorVasily <just.one.man@yandex.ru>2019-10-03 18:50:39 +0300
committerVasily <just.one.man@yandex.ru>2019-10-14 13:22:15 +0300
commitc1f9107b8be9b3cbd26e15773998c7ac6598e7f9 (patch)
tree31bce422fe343e56c80e62ae159aaf6bb306ec73 /MediaBrowser.Api/Playback/BaseStreamingService.cs
parent6746f708f2c2f306ea04270b93cfed2e28eb36c9 (diff)
Add more logging
Trying to fix hls muxer plus ffmpeg 4.1+ combo Try to fix waiting for segment being ready This is needed because hls muxer in ffmpeg >= 4.1 creates the playlist only when it finishes transcoding. Also cleaned up logs a bit. Lower log level for "StartFfmpeg finished" to debug
Diffstat (limited to 'MediaBrowser.Api/Playback/BaseStreamingService.cs')
-rw-r--r--MediaBrowser.Api/Playback/BaseStreamingService.cs7
1 files changed, 6 insertions, 1 deletions
diff --git a/MediaBrowser.Api/Playback/BaseStreamingService.cs b/MediaBrowser.Api/Playback/BaseStreamingService.cs
index 8c4ccfa22c..700883c963 100644
--- a/MediaBrowser.Api/Playback/BaseStreamingService.cs
+++ b/MediaBrowser.Api/Playback/BaseStreamingService.cs
@@ -289,16 +289,20 @@ 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 waitFor = state.WaitForPath ?? outputPath;
+ Logger.LogDebug("Waiting for the creation of '{0}'", waitFor);
+ while (!File.Exists(waitFor) && !transcodingJob.HasExited)
{
await Task.Delay(100, cancellationTokenSource.Token).ConfigureAwait(false);
}
+ Logger.LogDebug("File '{0}' created or transcoding has finished", waitFor);
if (state.IsInputVideo && transcodingJob.Type == TranscodingJobType.Progressive && !transcodingJob.HasExited)
{
@@ -314,6 +318,7 @@ namespace MediaBrowser.Api.Playback
{
StartThrottler(state, transcodingJob);
}
+ Logger.LogDebug("StartFfMpeg() finished successfully");
return transcodingJob;
}