Advertisement
corrosiontears

How to Enable Nvidia NVENC for OBS in Linux

May 9th, 2017
583
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 2.81 KB | None | 0 0
  1. OBS on Linux supports using the Nvidia NVENC for H.264 encoding. To get this working, one must compile ffmpeg wtih nvenc support. Check it out!
  2.  
  3. Requirements:
  4.  
  5. nvidia proprietary driver installed
  6.  
  7. Step 1:
  8.  
  9. Download and extract Nvidia nvenc sdk from: https://developer.nvidia.com/nvidia-video-codec-sdk
  10.  
  11. From that download, copy the file
  12. /Video_Codec_SDK_7.0.1/Samples/nvEncoder/NvEncoder.h
  13. to
  14. /usr/local/include
  15.  
  16. Step 2:
  17.  
  18. Download and extract the Nvidia cuda sdk from: https://developer.nvidia.com/cuda-downloads
  19.  
  20. Copy
  21. cuda.h
  22. to
  23. /usr/local/include
  24.  
  25. Step 3:
  26.  
  27. Grab the latest ffmpeg and configure with:
  28.  
  29. --enable-nonfree --enable-nvenc
  30. Compiling and installing ffmpeg may vary wildly by distro, or you may have your own preferred way to compile and build ffmpeg.
  31.  
  32. Debian Example
  33.  
  34. Below are debian specific using the latest nvidia driver from nvidia.com with steps which will result in a .deb file installed and ffmpeg executable at /usr/local/bin/ffmpeg
  35.  
  36.  sudo apt build-dep ffmpeg  sudo apt install yasm nasm                  build-essential automake autoconf                  libtool pkg-config libcurl4-openssl-dev                  intltool libxml2-dev libgtk2.0-dev                  libnotify-dev libglib2.0-dev libevent-dev                  checkinstall libavcodec-extra57
  37.  git clone git://git.videolan.org/ffmpeg.git
  38.  cd ffmpeg
  39.  ./configure --prefix=/usr/local --extra-version=1+b3 --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --cc=cc --cxx=g++ --enable-gpl --enable-shared --disable-stripping --disable-decoder=libopenjpeg --disable-decoder=libschroedinger --enable-avresample --enable-avisynth --enable-gnutls --enable-ladspa --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libebur128 --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libmodplug --enable-libmp3lame --enable-libopenjpeg --enable-libopus --enable-libpulse --enable-librubberband --enable-librtmp --enable-libschroedinger --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxvid --enable-libzvbi --enable-openal --enable-opengl --enable-x11grab --enable-libdc1394 --enable-libiec61883 --enable-libzmq --enable-frei0r --enable-chromaprint --enable-libopencv --enable-libx264 --enable-pic --enable-nonfree --enable-nvenc
  40.  make -j4
  41.  sudo checkinstall
  42.  
  43.  
  44.  
  45.  
  46. ###
  47. ### Backup da página : http://www.linuxnews.pro/how-to-enable-nvidia-nvenc-for-obs-in-linux/
  48. ### A página acima encontra-se offline, só acessível pelo cache da Google. Fiz esse backup para caso o site esteja desativado, não se perder a dica.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement