<!DOCTYPE html>
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
</head>
<body>
I am stuck how to configure QSV access to an enabled iGPU onboard
an Intel Core i7-6700K (Skylake). This is a legacy, rebuilt
workstation with additional, discrete Nvidia GeForce GTX 960 GPU on
a MSI-Z170-A Pro mobo. Any idea and code modification below?<br>
<br>
Details as follows:<br>
<br>
<font face="monospace">inxi -CGMSz<br>
System:<br>
Kernel: 6.10.5-1-default arch: x86_64 bits: 64<br>
Desktop: GNOME v: 46.3.1 Distro: openSUSE Tumbleweed-Slowroll
20240803<br>
Machine:<br>
Type: Desktop Mobo: MSI model: Z170-A PRO (MS-7971) v: 1.0<br>
serial: <superuser required> UEFI: American Megatrends
v: 1.K0<br>
date: 07/10/2018<br>
CPU:<br>
Info: quad core model: Intel Core i7-6700K bits: 64 type: MT MCP
cache:<br>
L2: 1024 KiB<br>
Speed (MHz): avg: 800 min/max: 800/4200 cores: 1: 800 2: 800 3:
800 4: 800<br>
5: 800 6: 800 7: 800 8: 800<br>
Graphics:<br>
Device-1: Intel HD Graphics 530 driver: i915 v: kernel<br>
Device-2: NVIDIA GM206 [GeForce GTX 960] driver: nvidia v:
550.100<br>
Display: wayland server: X.org v: 1.21.1.12 with: Xwayland v:
24.1.1<br>
compositor: gnome-shell driver: X: loaded: modesetting
unloaded: fbdev,vesa<br>
gpu: nvidia,nvidia-nvswitch resolution: 1920x1080~60Hz<br>
API: OpenGL v: 4.6.0 vendor: nvidia v: 550.100 renderer: NVIDIA
GeForce<br>
GTX 960/PCIe/SSE2<br>
API: Vulkan v: 1.3.290 drivers: N/A surfaces: xcb,xlib,wayland<br>
API: EGL Message: EGL data requires eglinfo. Check --recommends.<br>
<br>
<br>
lspci -k | grep -EA3 'VGA|3D|Display'<br>
00:02.0 Display controller: Intel Corporation HD Graphics 530 (rev
06)<br>
DeviceName: Onboard IGD<br>
Subsystem: Micro-Star International Co., Ltd. [MSI] Device
7971<br>
Kernel driver in use: i915<br>
--<br>
01:00.0 VGA compatible controller: NVIDIA Corporation GM206
[GeForce GTX 960] (rev a1)<br>
Subsystem: Micro-Star International Co., Ltd. [MSI] Device
3201<br>
Kernel driver in use: nvidia<br>
Kernel modules: nouveau, nvidia_drm, nvidia<br>
<br>
=====================================================================<br>
<br>
</font><font face="Courier New, Courier, monospace">Trying to test
QSV via FFmpeg benchmark similar like this Vulkan code<br>
ffmpeg -init_hw_device "vulkan=vk:0" -hwaccel vulkan
-hwaccel_output_format vulkan -i INPUT -f null - -benchmark<br>
<a class="moz-txt-link-freetext" href="https://trac.ffmpeg.org/wiki/HWAccelIntro#Vulkan">https://trac.ffmpeg.org/wiki/HWAccelIntro#Vulkan</a><br>
<br>
cause an output error which reports: "device type qsv needed".<br>
Intel Skylake with HD 530 graphics gen 9, should be capable to
decode and encode MPEG-2/H.264/H.265 according to<br>
<a class="moz-txt-link-freetext"
href="https://trac.ffmpeg.org/wiki/Hardware/QuickSync#HardwareSupport"
moz-do-not-send="true">https://trac.ffmpeg.org/wiki/Hardware/QuickSync#HardwareSupport</a><br>
</font><font face="Courier New, Courier, monospace"><br>
ffmpeg -hide_banner -hwaccel qsv -hwaccel_output_format qsv -i
h264_8bit_yuv420p.mp4 -f null - -benchmark<br>
</font><font face="monospace">[AVHWDeviceContext @ 0x557526873500]
Error creating a MFX session: -9.<br>
Device creation failed: -1313558101.<br>
[vist#0:0/h264 @ 0x55752685c6c0] [dec:h264_qsv @ 0x55752685b300]
No device available for decoder: device type qsv needed for codec
h264_qsv.<br>
[vist#0:0/h264 @ 0x55752685c6c0] [dec:h264_qsv @ 0x55752685b300]
Hardware device setup failed for decoder: Unknown error occurred<br>
[vost#0:0/wrapped_avframe @ 0x55752685a740] Error initializing a
simple filtergraph<br>
Error opening output file -.<br>
Error opening output files: Unknown error occurred<br>
bench: maxrss=67452KiB<br>
<br>
<br>
</font>I have tried to define and add a qsv device according to the
last section here<br>
<a class="moz-txt-link-freetext" href="https://trac.ffmpeg.org/wiki/Hardware/QuickSync#Transcode">https://trac.ffmpeg.org/wiki/Hardware/QuickSync#Transcode</a><br>
<p>
<code>-qsv_device</code> is an qsv customized option can be used
to specify a hardware device and avoid the default device
initialization failure when multiple devices usable (eg: an Intel
integrated GPU and an AMD/Nvidia discrete graphics card).
One example on Linux (more details please see <a class="ext-link"
href="https://trac.ffmpeg.org/ticket/7649"><span class="icon"></span>https://trac.ffmpeg.org/ticket/7649</a>)
<br>
</p>
<p><font face="Courier New, Courier, monospace">ffmpeg -hwaccel qsv
-qsv_device /dev/dri/renderD128 -c:v h264_qsv -i input.mp4 -c:v
h264_qsv output.mp4</font></p>
and also had a look at this answer<br>
<a class="moz-txt-link-freetext" href="https://stackoverflow.com/questions/44747381/i-cant-use-hw-encoder-of-qsv-by-ffmpeg#47145215">https://stackoverflow.com/questions/44747381/i-cant-use-hw-encoder-of-qsv-by-ffmpeg#47145215</a>
<br>
<br>
---------------------------------------------------<br>
<br>
Other HWA verification info:<br>
<br>
<font face="Courier New, Courier, monospace">vulkaninfo | egrep
'GPU|driver'<br>
VK_LUNARG_direct_driver_loading : extension revision 1<br>
GPU id = 0 (Intel(R) HD Graphics 530 (SKL GT2))<br>
GPU id = 1 (NVIDIA GeForce GTX 960)<br>
GPU id = 0 (Intel(R) HD Graphics 530 (SKL GT2))<br>
GPU id = 1 (NVIDIA GeForce GTX 960)<br>
GPU id : 0 (Intel(R) HD Graphics 530 (SKL GT2)):<br>
GPU id : 1 (NVIDIA GeForce GTX 960):<br>
GPU id : 0 (Intel(R) HD Graphics 530 (SKL GT2)):<br>
GPU id : 1 (NVIDIA GeForce GTX 960):<br>
GPU0:<br>
driverVersion = 24.1.5 (100667397)<br>
deviceType = PHYSICAL_DEVICE_TYPE_INTEGRATED_GPU<br>
driverUUID =
cc628f46-3d02-8624-0c8a-e98e0420c4f6<br>
driverID =
DRIVER_ID_INTEL_OPEN_SOURCE_MESA<br>
driverName = Intel
open-source Mesa driver<br>
driverInfo = Mesa
24.1.5<br>
VK_KHR_driver_properties : extension
revision 1<br>
GPU1:<br>
driverVersion = 550.100.0.0 (2308505600)<br>
deviceType = PHYSICAL_DEVICE_TYPE_DISCRETE_GPU<br>
driverUUID =
63390c76-60ef-5529-a6ac-99167eb42a9c<br>
driverID =
DRIVER_ID_NVIDIA_PROPRIETARY<br>
driverName = NVIDIA<br>
driverInfo = 550.100<br>
VK_KHR_driver_properties : extension
revision 1<br>
<br>
-----------<br>
<br>
Verifying VA-API<br>
<br>
vainfo<br>
Trying display: wayland<br>
libva info: VA-API version 1.22.0<br>
libva info: Trying to open /usr/lib64/dri/iHD_drv_video.so<br>
libva info: Found init function __vaDriverInit_1_21<br>
libva info: va_openDriver() returns 0<br>
vainfo: VA-API version: 1.22 (libva 2.22.0)<br>
vainfo: Driver version: Intel iHD driver for Intel(R) Gen Graphics
- 24.1.5 ()<br>
vainfo: Supported profile and entrypoints<br>
VAProfileNone : VAEntrypointVideoProc<br>
VAProfileNone : VAEntrypointStats<br>
VAProfileMPEG2Simple : VAEntrypointVLD<br>
VAProfileMPEG2Simple : VAEntrypointEncSlice<br>
VAProfileMPEG2Main : VAEntrypointVLD<br>
VAProfileMPEG2Main : VAEntrypointEncSlice<br>
VAProfileH264Main : VAEntrypointVLD<br>
VAProfileH264Main : VAEntrypointEncSlice<br>
VAProfileH264Main : VAEntrypointFEI<br>
VAProfileH264Main : VAEntrypointEncSliceLP<br>
VAProfileH264High : VAEntrypointVLD<br>
VAProfileH264High : VAEntrypointEncSlice<br>
VAProfileH264High : VAEntrypointFEI<br>
VAProfileH264High : VAEntrypointEncSliceLP<br>
VAProfileVC1Simple : VAEntrypointVLD<br>
VAProfileVC1Main : VAEntrypointVLD<br>
VAProfileVC1Advanced : VAEntrypointVLD<br>
VAProfileJPEGBaseline : VAEntrypointVLD<br>
VAProfileJPEGBaseline : VAEntrypointEncPicture<br>
VAProfileH264ConstrainedBaseline: VAEntrypointVLD<br>
VAProfileH264ConstrainedBaseline: VAEntrypointEncSlice<br>
VAProfileH264ConstrainedBaseline: VAEntrypointFEI<br>
VAProfileH264ConstrainedBaseline: VAEntrypointEncSliceLP<br>
VAProfileVP8Version0_3 : VAEntrypointVLD<br>
VAProfileVP8Version0_3 : VAEntrypointEncSlice<br>
VAProfileHEVCMain : VAEntrypointVLD<br>
VAProfileHEVCMain : VAEntrypointEncSlice<br>
VAProfileHEVCMain : VAEntrypointFEI<br>
<br>
-------<br>
<br>
Verifying VDPAU<br>
<br>
vdpauinfo | egrep 'Driver|GPU'<br>
Information string: NVIDIA VDPAU Driver Shared Library 550.100
Thu Jun 27 18:11:42 UTC 2024</font><br>
<br>
===========================================<br>
<p><br>
</p>
<p><br>
</p>
<pre class="wiki">
</pre>
<br>
<br>
<br>
<font face="monospace"> <br>
<br>
<br>
<br>
<br>
<br>
</font>
</body>
</html>