- 编译安装nv-codec-headers
git clone https://git.videolan.org/git/ffmpeg/nv-codec-headers.git
cd nv-codec-headers
git checkout 106d84a2c1960d1ccac7fa2646f0adc52d2d4ff2 # for old driver < 415
sudo make install && cd –
- 编译安装yasm
从http://www.tortall.net/projects/yasm/releases/下载对应版本
tar -zxvf yasm-1.3.0.tar.gz
cd yasm
./configure
make && make install
- 编译安装ffmpeg
tar -ivxf ffmpeg-snapshot.tar.bz2
cd ffmpeg
PKG_CONFIG_PATH=/usr/local/lib/pkgconfig/ ./configure --enable-cuda --enable-cuvid --enable-nvenc --enable-nonfree --enable-libnpp --extra-cflags=-I/usr/local/cuda/include --extra-ldflags=-L/usr/local/cuda/lib64
make -j10
make install