obs-studio icon indicating copy to clipboard operation
obs-studio copied to clipboard

obs-ffmpeg: Add native non-texture NVENC encoder

Open derrod opened this issue 1 year ago • 6 comments

Description

Replaces the FFmpeg fallback in the "new" NVENC encoder with a native non-texture encoder.

Also adds support for the non-texture encoder on Linux.

Superseedes/Closes #8794

Motivation and Context

The FFmpeg fallback sucks I hate it.

How Has This Been Tested?

Tested H.264 encoder on my 4090 with the latest driver on Windows and Linux.

Types of changes

  • New feature (non-breaking change which adds functionality)

Checklist:

  • [x] My code has been run through clang-format.
  • [x] I have read the contributing document.
  • [x] My code is not on the master branch.
  • [x] The code has been tested.
  • [x] All commit messages are properly formatted and commits squashed where appropriate.
  • [x] I have included updates to all appropriate documentation.

derrod avatar Jan 21 '24 05:01 derrod

Added another commit to add support for Linux using the new non-texture encoder.

Tested on openSUSE Tumbleweed with NVIDIA 545.0 drivers.

derrod avatar Jan 22 '24 00:01 derrod

Updated to use a CUDA array, this variant does not have Linux support right now as I need time to re-test that.

derrod avatar Jan 25 '24 22:01 derrod

Linux support is back, now based on the changes I made to the texture encoder, hopefully it works.

derrod avatar Jan 26 '24 08:01 derrod

Looks good on my linux machine with a 1070 for hevc and h264

kkartaltepe avatar Jan 28 '24 23:01 kkartaltepe

Updated to loosen the NVENC SDK version requirement to allow 12.0 and 12.1 as either version will work fine (no changes that affect OBS) and even some rolling release distros cough openSUSE cough do not seem to ship the latest headers for some reason.

derrod avatar Feb 08 '24 05:02 derrod

Working very well in over a week worth of almost constant testing of 1 or more sessions.

System:

  • Ubuntu 22.04
  • NVIDIA 535.104.05
  • Latest nv-codec-headers from ffmpeg github
  • NVIDIA RTX 4000 Ada SFF

Tested this non-texture version and the texture version.

tt2468 avatar Feb 11 '24 05:02 tt2468