- 編譯安裝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/下載對應(yīng)版本
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