编译支持QSV 显卡硬件加速的FFMPEG
Build FFmpeg QSV · Intel-Media-SDK/MediaSDK Wiki
update:2021-9-30
Install all required common packages:
You can get it in two ways:
Build from sources:
Intel Media Driver for VAAPI (aka iHD) (gmmlib and LibVA required)
Intel Media SDK
do not forget to export environment variables:
export LIBVA_DRIVERS_PATH=/path/to/iHD_driver
export LIBVA_DRIVER_NAME=iHD
export LD_LIBRARY_PATH=/path/to/msdk/lib
export PKG_CONFIG_PATH=/path/to/msdk/lib/pkgconfig
Starting from Ubuntu 19.04 Intel media stack components are available for installation via apt-get (see: Intel media stack on Ubuntu).
sudo apt-get install libva-dev libmfx-dev intel-media-va-driver-non-free
export LIBVA_DRIVER_NAME=iHD
For build ffplay (as part of ffmpeg) you also need to install additional dependencies:
sudo apt-get install libsdl2-dev
Build FFmpeg
Get ffmpeg sources
git clone https://github.com/ffmpeg/ffmpeg
cd ffmpeg
Configure and build FFmpeg install
Configure ffmpeg for use with vaapi and MediaSDK. Main key is --enable-libmfx
./configure --arch=x86_64 --disable-yasm --enable-vaapi --enable-libmfx
make
If you need a debug version of ffmpeg you can try
./configure --arch=x86_64 --disable-yasm --enable-vaapi --enable-libmfx \
--enable-debug=3 --disable-stripping --extra-cflags=-gstabs+ \
--disable-optimizations
make
Referenced from:https://github.com/Intel-Media-SDK/MediaSDK/wiki/Build-FFmpeg-QSV
本文链接地址:https://const.net.cn/483.html