安装编译依赖
sudo apt install build-essential libclang-11-dev clang-11 clang-format-9 libssl-dev
更新包管理
sudo apt update
安装编译依赖
sudo apt install git libgtk2.0-dev pkg-config python3-scipy
下载硬解码头文件
git clone https://git.videolan.org/git/ffmpeg/nv-codec-headers.git
cd nv-codec-headers/
安装硬解码头文件
sudo make install && cd -
安装ffplay 依赖
sudo apt install libsdl2-dev
预编译
./configure --extra-cflags=-I/usr/local/cuda/include --extra-ldflags=-L/usr/local/cuda/lib64 --extra-cflags="-I/usr/local/include" --extra-ldflags="-L/usr/local/lib" --extra-libs="-lpthread -lm -latomic" --enable-gmp --enable-gpl --enable-libaom --enable-libass --enable-libfreetype --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopus --enable-librtmp --enable-libsnappy --enable-libsoxr --enable-libssh --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --enable-nonfree --enable-version3 --enable-pthreads --enable-openssl --prefix=/usr/local/ffmpeg --enable-static --enable-shared --enable-ffplay --enable-cuda-nvcc --enable-libnpp
编译
make -j4
安装编译生成文件
sudo make install