Browse Source

more fixes

pull/2824/head
Jason Dove 6 months ago
parent
commit
9164f6a5c0
No known key found for this signature in database
  1. 4
      ErsatzTV.Application/Streaming/HlsSessionWorker.cs
  2. 2
      ErsatzTV.Core/FFmpeg/FFmpegProgress.cs
  3. 18
      ErsatzTV.FFmpeg/InputFile.cs

4
ErsatzTV.Application/Streaming/HlsSessionWorker.cs

@ -393,7 +393,8 @@ public class HlsSessionWorker : IHlsSessionWorker @@ -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 @@ -454,6 +455,7 @@ public class HlsSessionWorker : IHlsSessionWorker
{
HlsSessionState.SeekAndWorkAhead => HlsSessionState.SeekAndRealtime,
HlsSessionState.ZeroAndWorkAhead => HlsSessionState.ZeroAndRealtime,
HlsSessionState.SlugAndWorkAhead => HlsSessionState.SlugAndRealtime,
_ => _state
};

2
ErsatzTV.Core/FFmpeg/FFmpegProgress.cs

@ -39,7 +39,7 @@ public partial class FFmpegProgress @@ -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",

18
ErsatzTV.FFmpeg/InputFile.cs

@ -81,22 +81,8 @@ public record VideoInputFile( @@ -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<VideoStream> VideoStreams, WatermarkState DesiredState)

Loading…
Cancel
Save