Browse Source

fix hls direct regression (#1242)

pull/1243/head
Jason Dove 2 years ago committed by GitHub
parent
commit
b8dcd26e3a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 41
      ErsatzTV.FFmpeg/Pipeline/SoftwarePipelineBuilder.cs
  2. 4
      ErsatzTV.Scanner/Core/Plex/PlexMovieLibraryScanner.cs

41
ErsatzTV.FFmpeg/Pipeline/SoftwarePipelineBuilder.cs

@ -99,19 +99,28 @@ public class SoftwarePipelineBuilder : PipelineBuilderBase
currentState = decoder.NextState(currentState); currentState = decoder.NextState(currentState);
} }
SetDeinterlace(videoInputFile, context, currentState); if (desiredState.VideoFormat != VideoFormat.Copy)
{
currentState = SetScale(videoInputFile, videoStream, desiredState, currentState); SetDeinterlace(videoInputFile, context, currentState);
currentState = SetPad(videoInputFile, videoStream, desiredState, currentState);
SetSubtitle(videoInputFile, subtitleInputFile, context, desiredState, fontsFolder, subtitleOverlayFilterSteps); currentState = SetScale(videoInputFile, videoStream, desiredState, currentState);
SetWatermark( currentState = SetPad(videoInputFile, videoStream, desiredState, currentState);
videoStream, SetSubtitle(
watermarkInputFile, videoInputFile,
context, subtitleInputFile,
ffmpegState, context,
desiredState, desiredState,
currentState, fontsFolder,
watermarkOverlayFilterSteps); subtitleOverlayFilterSteps);
SetWatermark(
videoStream,
watermarkInputFile,
context,
ffmpegState,
desiredState,
currentState,
watermarkOverlayFilterSteps);
}
// after everything else is done, apply the encoder // after everything else is done, apply the encoder
if (pipelineSteps.OfType<IEncoder>().All(e => e.Kind != StreamKind.Video)) if (pipelineSteps.OfType<IEncoder>().All(e => e.Kind != StreamKind.Video))
@ -123,6 +132,12 @@ public class SoftwarePipelineBuilder : PipelineBuilderBase
} }
} }
// after decoder/encoder, return hls direct
if (desiredState.VideoFormat == VideoFormat.Copy)
{
return FilterChain.Empty;
}
List<IPipelineFilterStep> pixelFormatFilterSteps = SetPixelFormat( List<IPipelineFilterStep> pixelFormatFilterSteps = SetPixelFormat(
videoStream, videoStream,
desiredState.PixelFormat, desiredState.PixelFormat,

4
ErsatzTV.Scanner/Core/Plex/PlexMovieLibraryScanner.cs

@ -99,7 +99,7 @@ public class PlexMovieLibraryScanner :
connectionParameters.Token); connectionParameters.Token);
// this shouldn't be called anymore // this shouldn't be called anymore
protected override async Task<Option<MovieMetadata>> GetFullMetadata( protected override Task<Option<MovieMetadata>> GetFullMetadata(
PlexConnectionParameters connectionParameters, PlexConnectionParameters connectionParameters,
PlexLibrary library, PlexLibrary library,
MediaItemScanResult<PlexMovie> result, MediaItemScanResult<PlexMovie> result,
@ -111,7 +111,7 @@ public class PlexMovieLibraryScanner :
throw new NotSupportedException("This shouldn't happen anymore"); throw new NotSupportedException("This shouldn't happen anymore");
} }
return None; return Task.FromResult<Option<MovieMetadata>>(None);
} }
// this shouldn't be called anymore // this shouldn't be called anymore

Loading…
Cancel
Save