Adding NVENC to OBS-Studio via ffmpeg.

sudopluto

New Member
So I recently installed OBS on my desktop, and I was surprised to find that there was no NVENC option. After some quick googling, I found out that ffmpeg has had support for NVENC for a while now, and that other video software like the open-source Avidemux have recently added it. Installing OBS on Linux already requires the user to install ffmpeg, so maybe the devs can make another ppa w/ a version of ffmpeg that has NVENC enabled?
 

Lain

Forum Admin
Lain
Forum Moderator
Developer
Yea, I don't mind putting it in for people who compile it in to their FFmpeg build. I'll see about putting FFmpeg h264 encoders in, but it probably won't be next patch (0.11.0)
 

Osiris

Active Member
If you are comfortable with compiling your own build of ffmpeg and obs-studio, you can already use NVENC with the ffmpeg output option in OBS-mp.
 

sudopluto

New Member
@Osiris @Jim My current problem is that currently for an Ubuntu install, you ask users to install FFMPEG from a launchpad repo if they are on 14.04.X. If the OBS team can provide a similar repo that has builds of FFMPEG with NVENC enabled, it would add the NVENC support without changing the current install process.
 

Kithop

New Member
I managed to get a build of ffmpeg working with NVENC on my Xubuntu 15.10 system a while back, but yeah - no option in OBS to pick it from the list of encoders, even with 'custom' settings.

You have to grab the SDK from https://developer.nvidia.com/nvidia-video-codec-sdk - it required a specific video driver version as well that was one or two back from 'current' (aptitude seemed to figure it out, however and let me downgrade safely). Then compile ffmpeg from source with the --enable-nvenc option as per http://trac.ffmpeg.org/wiki/HWAccelIntro

I actually tried to get the equivalent Intel SDK installed and compiled with the same build, and it's *there* but not working on my end for some reason.. still have to dig into it, but when I run 'ffmpeg -encoders':

Code:
 V..... h264_qsv             H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10 (Intel Quick Sync Video acceleration) (codec h264)
V..... nvenc                NVIDIA NVENC h264 encoder (codec h264)
V..... nvenc_h264           NVIDIA NVENC h264 encoder (codec h264)
V..... nvenc_hevc           NVIDIA NVENC hevc encoder (codec hevc)

So it would be awesome if there were a way to do the following in the OBS Multiplatform builds for Linux:
  • Check 'ffmpeg -encoders' for the availability of those options above and expose them in the UI (obviously needs testing); I did a command line NVENC H.264 transcode of a 1080p movie at some ungodly ~400fps on my GTX 980 - this would be amazing for offloading streaming or even local recording.
  • Optionally, expose some way for us to change the default ffmpeg binary search path? We might have e.g. the one you guys ask for in /usr/bin/ffmpeg and then play around with custom compiles with these features (non-redistributable, it seems) in /usr/local/bin/ffmpeg - being able to toggle back and forth for testing would be awesome. (and maybe we can do this already and I'm just dumb?)
 
Top