====== GPU Hardware Acceleration ====== There are different ways to access hardware encoders and decoders. Vendors usually have their own APIs (NVIDIA has CUDA, Intel has QSV, AMD has AMF) and operating systems may also have their own APIs that use whatever HW capabilities are available (Windows has DXVA and D3D11VA, Linux has VAAPI, VDPAU and V4L, macOS has VideoToolbox). By merely adding -c:v h264_qsv to your first command, you're trying to use the VAAPI hardware initialization with the QSV encoder, which won't work for obvious reasons. You either use -hwaccel qsv with -c:v h264_qsv or -hwaccel vaapi with -c:v h264_vaapi. ===== Intel ===== Intel HW Acceleration Notes: apt-get install i965-va-driver #add non-free non-free-firmware to debian apt config apt-get install i965-va-driver-shaders apt-get install intel-media-va-driver-non-free check at least one renderD device is available: ls -l /dev/dri check supported QSV/VA-API codecs: iHD driver indicates support for the QSV and VA-API interfaces. i965 driver indicates only support for the VA-API interface, which should only be used on pre-Broadwell platforms. sudo apt install vainfo sudo vainfo --display drm --device /dev/dri/renderD128 Check the OpenCL runtime status: ffmpeg -v verbose -init_hw_device vaapi=va:/dev/dri/renderD128 -init_hw_device opencl@va sudo apt install -y intel-opencl-icd This enables QSV or VA-API If you wish to use the second GPU on your system, change renderD128 to renderD129. apt-get install intel-microcode echo "options i915 enable_guc=2" >> /etc/modprobe.d/i915.conf sudo apt-get install intel-gpu-tools # show all supported hardware devices by ffmpeg version ffmpeg -v verbose -init_hw_device list apt-get install va-driver-all libva-drm2 mesa-va-drivers usermod -a -G render root usermod -a -G video root