From 9164f6a5c0109e2e2ba7e98840e2cbfe8fbd2f9e Mon Sep 17 00:00:00 2001 From: Jason Dove <1695733+jasongdove@users.noreply.github.com> Date: Sun, 15 Feb 2026 09:45:11 -0600 Subject: [PATCH] more fixes --- .../Streaming/HlsSessionWorker.cs | 4 +++- ErsatzTV.Core/FFmpeg/FFmpegProgress.cs | 2 +- ErsatzTV.FFmpeg/InputFile.cs | 18 ++---------------- 3 files changed, 6 insertions(+), 18 deletions(-) diff --git a/ErsatzTV.Application/Streaming/HlsSessionWorker.cs b/ErsatzTV.Application/Streaming/HlsSessionWorker.cs index 16cbc4494..8a983323a 100644 --- a/ErsatzTV.Application/Streaming/HlsSessionWorker.cs +++ b/ErsatzTV.Application/Streaming/HlsSessionWorker.cs @@ -393,7 +393,8 @@ public class HlsSessionWorker : IHlsSessionWorker HlsSessionState.SlugAndRealtime => HlsSessionState.ZeroAndRealtime, // after completing the item, insert a slug - _ when isComplete && _slugSeconds.IsSome => HlsSessionState.SlugAndWorkAhead, + HlsSessionState.ZeroAndWorkAhead or HlsSessionState.SeekAndWorkAhead when isComplete && _slugSeconds.IsSome => HlsSessionState.SlugAndWorkAhead, + HlsSessionState.ZeroAndRealtime or HlsSessionState.SeekAndRealtime when isComplete && _slugSeconds.IsSome => HlsSessionState.SlugAndRealtime, // after seeking and completing the item, start at zero HlsSessionState.SeekAndWorkAhead => HlsSessionState.ZeroAndWorkAhead, @@ -454,6 +455,7 @@ public class HlsSessionWorker : IHlsSessionWorker { HlsSessionState.SeekAndWorkAhead => HlsSessionState.SeekAndRealtime, HlsSessionState.ZeroAndWorkAhead => HlsSessionState.ZeroAndRealtime, + HlsSessionState.SlugAndWorkAhead => HlsSessionState.SlugAndRealtime, _ => _state }; diff --git a/ErsatzTV.Core/FFmpeg/FFmpegProgress.cs b/ErsatzTV.Core/FFmpeg/FFmpegProgress.cs index 3b4665820..b2def683c 100644 --- a/ErsatzTV.Core/FFmpeg/FFmpegProgress.cs +++ b/ErsatzTV.Core/FFmpeg/FFmpegProgress.cs @@ -39,7 +39,7 @@ public partial class FFmpegProgress speed); } } - else if (speed < 1.0) + else if (speed < 0.99) { logger.LogWarning( "Media item {MediaItemId} on channel {Channel} transcoded at {Speed}x (throttled) which may not be fast enough to support playback", diff --git a/ErsatzTV.FFmpeg/InputFile.cs b/ErsatzTV.FFmpeg/InputFile.cs index 51622e60c..0741a37f5 100644 --- a/ErsatzTV.FFmpeg/InputFile.cs +++ b/ErsatzTV.FFmpeg/InputFile.cs @@ -81,22 +81,8 @@ public record VideoInputFile( public record LavfiInputFile : VideoInputFile { - public LavfiInputFile(string Parameters, VideoStream VideoStream) : base(Parameters, [VideoStream]) - { - this.Parameters = Parameters; - this.VideoStream = VideoStream; - - InputOptions.Add(new LavfiInputOption()); - } - - public string Parameters { get; init; } - public VideoStream VideoStream { get; init; } - - public void Deconstruct(out string parameters, out VideoStream videoStream) - { - parameters = Parameters; - videoStream = VideoStream; - } + public LavfiInputFile(string parameters, VideoStream videoStream) : base(parameters, [videoStream]) + => InputOptions.Add(new LavfiInputOption()); } public record WatermarkInputFile(string Path, IList VideoStreams, WatermarkState DesiredState)