Browse Source

fix nvenc playback when color metadata changes mid-stream

pull/2740/head
Jason Dove 7 months ago
parent
commit
f931b04a52
No known key found for this signature in database
  1. 4
      CHANGELOG.md
  2. 12
      ErsatzTV.FFmpeg/Pipeline/NvidiaPipelineBuilder.cs

4
CHANGELOG.md

@ -55,7 +55,9 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
- Automatically kill playback troubleshooting ffmpeg process if it hasn't completed after two minutes - Automatically kill playback troubleshooting ffmpeg process if it hasn't completed after two minutes
- Fix playback of certain BT.2020 content - Fix playback of certain BT.2020 content
- Use playlist item count when using a playlist as filler (instead of a fixed count of 1 for each playlist item) - Use playlist item count when using a playlist as filler (instead of a fixed count of 1 for each playlist item)
- NVIDIA: fix stream failure with certain content that should decode in hardware but falls back to software - NVIDIA:
- Fix stream failure with certain content that should decode in hardware but falls back to software
- Fix stream failure with content that changes color metadata mid-stream
- Fix stream failure when configured fallback filler collection is empty - Fix stream failure when configured fallback filler collection is empty
- Fix high CPU when errors are displayed; errors will now work ahead before throttling to realtime, similar to primary content - Fix high CPU when errors are displayed; errors will now work ahead before throttling to realtime, similar to primary content
- Fix startup error caused by duplicate smart collection names (and no longer allow duplicate smart collection names) - Fix startup error caused by duplicate smart collection names (and no longer allow duplicate smart collection names)

12
ErsatzTV.FFmpeg/Pipeline/NvidiaPipelineBuilder.cs

@ -364,6 +364,18 @@ public class NvidiaPipelineBuilder : SoftwarePipelineBuilder
desiredState.CroppedSize.IfNone(desiredState.PaddedSize))); desiredState.CroppedSize.IfNone(desiredState.PaddedSize)));
} }
// unknown color params can *change* during transcoding,
// which can cause ffmpeg to insert an autoscale filter that
// cannot accept hardware frames.
// this filter isn't actually needed (the encoder accepts the frames just fine) so disable it
if (ffmpegState.EncoderHardwareAccelerationMode is HardwareAccelerationMode.Nvenc &&
currentState.FrameDataLocation is FrameDataLocation.Hardware &&
videoStream.ColorParams.IsUnknown &&
(context.HasGraphicsEngine || context.HasSubtitleOverlay || context.HasWatermark))
{
pipelineSteps.Add(new NoAutoScaleOutputOption());
}
return new FilterChain( return new FilterChain(
videoInputFile.FilterSteps, videoInputFile.FilterSteps,
watermarkInputFile.Map(wm => wm.FilterSteps).IfNone([]), watermarkInputFile.Map(wm => wm.FilterSteps).IfNone([]),

Loading…
Cancel
Save