对于硬件的编解码加速器,不同平台和系统有不同的实现,下面的表格是一个大概的描述: 开启硬件编解码的编译选项(也开启了 x264 不是必须): sudo ./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 --extra-cflags=-fPIC --enable-nonfree --enable-pic --enable-shared --enable-libx264 --enable-gpl --enable-postproc --prefix=/home/deyu/program/ffmpeg3
- 编译时遇到的问题:“ERROR: cuvid requested, but not all dependencies are satisfied: cuda/ffnvcodec”。解决办法是需要单独安装:https://git.videolan.org/git/ffmpeg/nv-codec-headers.git
- https://developer.nvidia.com/ffmpeg
- https://trac.ffmpeg.org/wiki/HWAccelIntro
- https://superuser.com/questions/1299064/error-cuvid-requested-but-not-all-dependencies-are-satisfied-cuda-ffnvcodec
- https://www.cnblogs.com/leisure_chn/p/10584910.html