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 @@ -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<IEncoder>().All(e => e.Kind != StreamKind.Video))
@ -123,6 +132,12 @@ public class SoftwarePipelineBuilder : PipelineBuilderBase @@ -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(
videoStream,
desiredState.PixelFormat,

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

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

Loading…
Cancel
Save