diff options
| author | Claus Vium <cvium@users.noreply.github.com> | 2022-03-01 16:53:23 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-03-01 16:53:23 +0100 |
| commit | 6498a5bacaf4dc04170066fdaa841cd15da60b4f (patch) | |
| tree | 9bc3271e6b99e024502fd9c356133759726ce3f2 | |
| parent | f0c28019dc3deb128fa15d44db69b39b797e3554 (diff) | |
| parent | 4239f80c8101fca9b70dd9946ca38d659697a77f (diff) | |
Merge pull request #7387 from jellyfin/nvdec-threads
| -rw-r--r-- | MediaBrowser.Controller/MediaEncoding/EncodingHelper.cs | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/MediaBrowser.Controller/MediaEncoding/EncodingHelper.cs b/MediaBrowser.Controller/MediaEncoding/EncodingHelper.cs index 44589aa22..0e7a1d4cb 100644 --- a/MediaBrowser.Controller/MediaEncoding/EncodingHelper.cs +++ b/MediaBrowser.Controller/MediaEncoding/EncodingHelper.cs @@ -771,10 +771,6 @@ namespace MediaBrowser.Controller.MediaEncoding args.Append(GetCudaDeviceArgs(0, CudaAlias)) .Append(GetFilterHwDeviceArgs(CudaAlias)); - - // workaround for "No decoder surfaces left" error, - // but will increase vram usage. https://trac.ffmpeg.org/ticket/7562 - args.Append(" -extra_hw_frames 3"); } else if (string.Equals(optHwaccelType, "amf", StringComparison.OrdinalIgnoreCase)) { @@ -4431,7 +4427,8 @@ namespace MediaBrowser.Controller.MediaEncoding { if (options.EnableEnhancedNvdecDecoder && isCudaSupported && isCodecAvailable) { - return " -hwaccel cuda" + (outputHwSurface ? " -hwaccel_output_format cuda" : string.Empty) + (isAv1 ? " -c:v av1" : string.Empty); + // set -threads 1 to nvdec decoder explicitly since it doesn't implement threading support. + return " -hwaccel cuda" + (outputHwSurface ? " -hwaccel_output_format cuda" : string.Empty) + " -threads 1" + (isAv1 ? " -c:v av1" : string.Empty); } } |
