Skip to content

Instantly share code, notes, and snippets.

@jjYBdx4IL
Last active March 3, 2018 20:11
Show Gist options
  • Save jjYBdx4IL/7caaaf8d78841bd212ce5930a4734762 to your computer and use it in GitHub Desktop.
Save jjYBdx4IL/7caaaf8d78841bd212ce5930a4734762 to your computer and use it in GitHub Desktop.
NVENC support in ffmpeg and missing nvEncodeAPI.h

nvEncodeAPI.h is nowadays hidden somewhere on nVidia's website and not quite as accessible as one would wish. However, due to its open license, that header file now is part of ffmpeg itself (nvenc.h in the libavcodec submodule). Just make sure you get some recent version of ffmpeg sources. I tried version 3.3.beta or something like that and it worked. Hopefully, most distributions will soon provide out-of-the-box NVENC support because of that.

apt-get build-dep ffmpeg
wget https://github.com/FFmpeg/FFmpeg/archive/master.zip
cd FFmpeg-master
./configure --enable-shared --enable-gpl --enable-libass --enable-libfreetype --enable-libx264 \
--enable-libx265 --enable-nvenc --enable-nonfree --enable-libfdk-aac --disable-static --disable-debug \
--prefix=/opt/obs-local --enable-cuda
make -j4
make install
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment