diff --git a/ErsatzTV.FFmpeg/Pipeline/SoftwarePipelineBuilder.cs b/ErsatzTV.FFmpeg/Pipeline/SoftwarePipelineBuilder.cs index 8fb88b3f..5cee203a 100644 --- a/ErsatzTV.FFmpeg/Pipeline/SoftwarePipelineBuilder.cs +++ b/ErsatzTV.FFmpeg/Pipeline/SoftwarePipelineBuilder.cs @@ -99,19 +99,28 @@ public class SoftwarePipelineBuilder : PipelineBuilderBase currentState = decoder.NextState(currentState); } - SetDeinterlace(videoInputFile, context, currentState); - - currentState = SetScale(videoInputFile, videoStream, desiredState, currentState); - currentState = SetPad(videoInputFile, videoStream, desiredState, currentState); - SetSubtitle(videoInputFile, subtitleInputFile, context, desiredState, fontsFolder, subtitleOverlayFilterSteps); - SetWatermark( - videoStream, - watermarkInputFile, - context, - ffmpegState, - desiredState, - currentState, - watermarkOverlayFilterSteps); + if (desiredState.VideoFormat != VideoFormat.Copy) + { + SetDeinterlace(videoInputFile, context, currentState); + + currentState = SetScale(videoInputFile, videoStream, desiredState, currentState); + currentState = SetPad(videoInputFile, videoStream, desiredState, currentState); + SetSubtitle( + videoInputFile, + subtitleInputFile, + context, + desiredState, + fontsFolder, + subtitleOverlayFilterSteps); + SetWatermark( + videoStream, + watermarkInputFile, + context, + ffmpegState, + desiredState, + currentState, + watermarkOverlayFilterSteps); + } // after everything else is done, apply the encoder if (pipelineSteps.OfType().All(e => e.Kind != StreamKind.Video)) @@ -122,6 +131,12 @@ public class SoftwarePipelineBuilder : PipelineBuilderBase videoInputFile.FilterSteps.Add(encoder); } } + + // after decoder/encoder, return hls direct + if (desiredState.VideoFormat == VideoFormat.Copy) + { + return FilterChain.Empty; + } List pixelFormatFilterSteps = SetPixelFormat( videoStream, diff --git a/ErsatzTV.Scanner/Core/Plex/PlexMovieLibraryScanner.cs b/ErsatzTV.Scanner/Core/Plex/PlexMovieLibraryScanner.cs index ef1ce9d6..7a36af0b 100644 --- a/ErsatzTV.Scanner/Core/Plex/PlexMovieLibraryScanner.cs +++ b/ErsatzTV.Scanner/Core/Plex/PlexMovieLibraryScanner.cs @@ -99,7 +99,7 @@ public class PlexMovieLibraryScanner : connectionParameters.Token); // this shouldn't be called anymore - protected override async Task> GetFullMetadata( + protected override Task> GetFullMetadata( PlexConnectionParameters connectionParameters, PlexLibrary library, MediaItemScanResult result, @@ -111,7 +111,7 @@ public class PlexMovieLibraryScanner : throw new NotSupportedException("This shouldn't happen anymore"); } - return None; + return Task.FromResult>(None); } // this shouldn't be called anymore