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. 17
      ErsatzTV.FFmpeg/Pipeline/SoftwarePipelineBuilder.cs
  2. 4
      ErsatzTV.Scanner/Core/Plex/PlexMovieLibraryScanner.cs

17
ErsatzTV.FFmpeg/Pipeline/SoftwarePipelineBuilder.cs

@ -99,11 +99,19 @@ public class SoftwarePipelineBuilder : PipelineBuilderBase
currentState = decoder.NextState(currentState); currentState = decoder.NextState(currentState);
} }
if (desiredState.VideoFormat != VideoFormat.Copy)
{
SetDeinterlace(videoInputFile, context, currentState); SetDeinterlace(videoInputFile, context, currentState);
currentState = SetScale(videoInputFile, videoStream, desiredState, currentState); currentState = SetScale(videoInputFile, videoStream, desiredState, currentState);
currentState = SetPad(videoInputFile, videoStream, desiredState, currentState); currentState = SetPad(videoInputFile, videoStream, desiredState, currentState);
SetSubtitle(videoInputFile, subtitleInputFile, context, desiredState, fontsFolder, subtitleOverlayFilterSteps); SetSubtitle(
videoInputFile,
subtitleInputFile,
context,
desiredState,
fontsFolder,
subtitleOverlayFilterSteps);
SetWatermark( SetWatermark(
videoStream, videoStream,
watermarkInputFile, watermarkInputFile,
@ -112,6 +120,7 @@ public class SoftwarePipelineBuilder : PipelineBuilderBase
desiredState, desiredState,
currentState, currentState,
watermarkOverlayFilterSteps); 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