diff --git a/ErsatzTV.Core/FFmpeg/FFmpegLibraryProcessService.cs b/ErsatzTV.Core/FFmpeg/FFmpegLibraryProcessService.cs index f013a6a5a..f9c729b69 100644 --- a/ErsatzTV.Core/FFmpeg/FFmpegLibraryProcessService.cs +++ b/ErsatzTV.Core/FFmpeg/FFmpegLibraryProcessService.cs @@ -174,7 +174,7 @@ public class FFmpegLibraryProcessService : IFFmpegProcessService foreach (Subtitle subtitle in maybeSubtitle) { if (subtitle.SubtitleKind == SubtitleKind.Sidecar || subtitle is - { SubtitleKind: SubtitleKind.Embedded, IsImage: false, IsExtracted: true }) + { SubtitleKind: SubtitleKind.Embedded, IsImage: false, IsExtracted: true }) { // proxy to avoid dealing with escaping subtitle.Path = $"http://localhost:{Settings.StreamingPort}/media/subtitle/{subtitle.Id}"; @@ -287,20 +287,20 @@ public class FFmpegLibraryProcessService : IFFmpegProcessService outputFormat = OutputFormatKind.Hls; break; case StreamingMode.HttpLiveStreamingDirect: - { - // use mpeg-ts by default - outputFormat = OutputFormatKind.MpegTs; - - // override with setting if applicable - Option maybeOutputFormat = await _configElementRepository - .GetValue(ConfigElementKey.FFmpegHlsDirectOutputFormat, cancellationToken); - foreach (OutputFormatKind of in maybeOutputFormat) { - outputFormat = of; - } + // use mpeg-ts by default + outputFormat = OutputFormatKind.MpegTs; - break; - } + // override with setting if applicable + Option maybeOutputFormat = await _configElementRepository + .GetValue(ConfigElementKey.FFmpegHlsDirectOutputFormat, cancellationToken); + foreach (OutputFormatKind of in maybeOutputFormat) + { + outputFormat = of; + } + + break; + } } Option subtitleLanguage = Option.None; @@ -445,7 +445,7 @@ public class FFmpegLibraryProcessService : IFFmpegProcessService Option hlsInitTemplate = outputFormat switch { OutputFormatKind.HlsMp4 => $"{nowSeconds}_init.mp4", - _ => Option.None + _ => Option.None }; Option hlsSegmentOptions = Option.None; diff --git a/ErsatzTV.FFmpeg/Pipeline/QsvPipelineBuilder.cs b/ErsatzTV.FFmpeg/Pipeline/QsvPipelineBuilder.cs index 635a45ffc..0def75096 100644 --- a/ErsatzTV.FFmpeg/Pipeline/QsvPipelineBuilder.cs +++ b/ErsatzTV.FFmpeg/Pipeline/QsvPipelineBuilder.cs @@ -208,7 +208,7 @@ public class QsvPipelineBuilder : SoftwarePipelineBuilder // need to download for any sort of overlay (and always for setpts) if (currentState.FrameDataLocation == FrameDataLocation.Hardware) //&& - //(context.HasSubtitleOverlay || context.HasWatermark || context.HasGraphicsEngine)) + //(context.HasSubtitleOverlay || context.HasWatermark || context.HasGraphicsEngine)) { var hardwareDownload = new HardwareDownloadFilter(currentState); currentState = hardwareDownload.NextState(currentState); @@ -635,7 +635,7 @@ public class QsvPipelineBuilder : SoftwarePipelineBuilder DecoderHardwareAccelerationMode: HardwareAccelerationMode.None, EncoderHardwareAccelerationMode: HardwareAccelerationMode.None } && context is - { HasGraphicsEngine: false, HasWatermark: false, HasSubtitleOverlay: false, ShouldDeinterlace: false }; + { HasGraphicsEngine: false, HasWatermark: false, HasSubtitleOverlay: false, ShouldDeinterlace: false }; // auto_scale filter seems to muck up 10-bit software decode => hardware scale, so use software scale in that case useSoftwareFilter = useSoftwareFilter ||