Browse Source

fix mpegts script loading (#2610)

pull/2611/head
Jason Dove 9 months ago committed by GitHub
parent
commit
5083e748ed
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 1
      CHANGELOG.md
  2. 11
      ErsatzTV.Core/FFmpeg/FFmpegLibraryProcessService.cs

1
CHANGELOG.md

@ -22,6 +22,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). @@ -22,6 +22,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
- This allows using something other than ffmpeg (e.g. streamlink) to concatenate segments back together when using MPEG-TS streaming mode
- Scripts live in config / scripts / mpegts
- Each script gets its own subfolder which contains an `mpegts.yml` definition and corresponding windows (powershell) and linux (bash) scripts
- The global MPEG-TS script can be configured in **Settings** > **FFmpeg** > **Default MPEG-TS Script**
### Fixed
- Fix HLS Direct playback with Jellyfin 10.11

11
ErsatzTV.Core/FFmpeg/FFmpegLibraryProcessService.cs

@ -849,10 +849,8 @@ public class FFmpegLibraryProcessService : IFFmpegProcessService @@ -849,10 +849,8 @@ public class FFmpegLibraryProcessService : IFFmpegProcessService
.GetValue<string>(ConfigElementKey.FFmpegDefaultMpegTsScript, cancellationToken)
.IfNoneAsync("Default");
List<MpegTsScript> allScripts = _mpegTsScriptService.GetScripts();
foreach (var script in allScripts.Where(s => string.Equals(
s.Name,
defaultScript,
StringComparison.OrdinalIgnoreCase)))
Option<MpegTsScript> maybeScript = Optional(allScripts.Find(s => s.Id == defaultScript));
foreach (var script in maybeScript)
{
Option<Command> maybeCommand = await _mpegTsScriptService.Execute(
script,
@ -865,6 +863,11 @@ public class FFmpegLibraryProcessService : IFFmpegProcessService @@ -865,6 +863,11 @@ public class FFmpegLibraryProcessService : IFFmpegProcessService
}
}
if (maybeScript.IsNone)
{
_logger.LogWarning("Unable to locate MPEG-TS Script in folder {Id}", defaultScript);
}
IPipelineBuilder pipelineBuilder = await _pipelineBuilderFactory.GetBuilder(
HardwareAccelerationMode.None,
Option<VideoInputFile>.None,

Loading…
Cancel
Save