Media (Intel® Video Processing Library, Intel Media SDK)
Access community support with transcoding, decoding, and encoding in applications using media tools like Intel® oneAPI Video Processing Library and Intel® Media SDK
Announcements
The Intel Media SDK project is no longer active. For continued support and access to new features, Intel Media SDK users are encouraged to read the transition guide on upgrading from Intel® Media SDK to Intel® Video Processing Library (VPL), and to move to VPL as soon as possible.
For more information, see the VPL website.

ffmpeg 6 using qsv on ARC380

s7mon
Novice
6,913 Views
Hi, i have recently got a ARC for video encoding to AV1. I got it working so far and using VAAPI encoding works fine. It is not the main GPU on the system so i need to set the QSV device manually (works also for VAAPI) When i try to use QSV it fails on ffmpeg -loglevel verbose -i test.mp4 -qsv_device /dev/dri/renderD129 -c:v h264_qsv -global_quality 18 -rdo 1 -preset:v slow -y output.mp4 with output [AVHWDeviceContext @ 0x559be3d16d00] libva: VA-API version 1.19.0 [AVHWDeviceContext @ 0x559be3d16d00] libva: User requested driver 'iHD' [AVHWDeviceContext @ 0x559be3d16d00] libva: Trying to open /usr/lib64/va/drivers/iHD_drv_video.so [AVHWDeviceContext @ 0x559be3d16d00] libva: Found init function __vaDriverInit_1_19 [AVHWDeviceContext @ 0x559be3d16d00] libva: va_openDriver() returns 0 [AVHWDeviceContext @ 0x559be3d16d00] Initialised VAAPI connection: version 1.19 [AVHWDeviceContext @ 0x559be3d16d00] VAAPI driver: Intel iHD driver for Intel(R) Gen Graphics - 23.3.2 (). [AVHWDeviceContext @ 0x559be3d16d00] Driver not found in known nonstandard list, using standard behaviour. [AVHWDeviceContext @ 0x559be3d16800] Use Intel(R) oneVPL to create MFX session, API version is 2.9, the required implementation version is 1.3 [AVHWDeviceContext @ 0x559be3d16800] Error adding a MFX configurationVendorID property: -9. Device creation failed: -1313558101. Failed to set value '/dev/dri/renderD129' for option 'qsv_device': Unknown error occurred I can run oneVPL sample decode, clinfo looks good as well. Do i have an error in how i prepare the command for hardware use?
0 Kudos
1 Solution
s7mon
Novice
6,238 Views

using this commit lavu/hwcontext_qsv: use mfxImplDescription instead of mfxExtendedDevi…  
i was able to use qsv and have the session created and convert to mp4 or av1 using the commands above.

 

I assume it will be merged to mainline somehow and therefore see it fixed.

Thanks for the support

s7mon

View solution in original post

0 Kudos
10 Replies
s7mon
Novice
6,902 Views

Sorry not sure why formating was broken - seems my regular browser (firefox) does not work well here.

 

Hi, i have recently got a ARC for video encoding to AV1.

I got it working so far and using VAAPI encoding works fine.

It is not the main GPU on the system so i need to set the QSV device manuall  (works also for VAAPI).

When i try to use QSV it fails on this command

 

ffmpeg -loglevel verbose -i test.mp4 -qsv_device /dev/dri/renderD129 -c:v h264_qsv -global_quality 18 -rdo 1 -preset:v slow -y output.mp4

with output [AVHWDeviceContext @ 0x559be3d16d00] libva: VA-API version 1.19.0
[AVHWDeviceContext @ 0x559be3d16d00] libva: User requested driver 'iHD'
[AVHWDeviceContext @ 0x559be3d16d00] libva: Trying to open /usr/lib64/va/drivers/iHD_drv_video.so
[AVHWDeviceContext @ 0x559be3d16d00] libva: Found init function __vaDriverInit_1_19
[AVHWDeviceContext @ 0x559be3d16d00] libva: va_openDriver() returns 0
[AVHWDeviceContext @ 0x559be3d16d00] Initialised VAAPI connection: version 1.19
[AVHWDeviceContext @ 0x559be3d16d00] VAAPI driver: Intel iHD driver for Intel(R) Gen Graphics - 23.3.2 ().
[AVHWDeviceContext @ 0x559be3d16d00] Driver not found in known nonstandard list, using standard behaviour.
[AVHWDeviceContext @ 0x559be3d16800] Use Intel(R) oneVPL to create MFX session, API version is 2.9, the required implementation version is 1.3
[AVHWDeviceContext @ 0x559be3d16800] Error adding a MFX configurationVendorID property: -9.
Device creation failed: -1313558101.
Failed to set value '/dev/dri/renderD129' for option 'qsv_device': Unknown error occurred

(full log attached)

 

I can run oneVPL sample decode and clinfo looks good as well. Do i have an error in how i prepare the command for hardware use?

0 Kudos
s7mon
Novice
6,798 Views

Adding versions of drivers etc. as well as some dmesg excerpt (which to my understanding schows that GuC and HuC firmware loaded ok)

 

oneVPL-intel-gpu 23.3.2
libva-intel-media-driver 23.3.2
intel-mediasdk 23.2.2
intel-graphics-system-controller 0.8.9
intel-graphics-compiler 1.0.14062.11
intel-compute-runtime 23.22.26516.18

mesa 23.1.6
libva-intel-driver 2.4.1-r4
libva-intel-media-driver 23.3.2

oneVPL-intel-gpu 23.3.2
oneVPL 2023.3.1


dmesg:

1.106798] i915 0000:32:00.0: [drm] Using a reduced BAR size of 256MiB. Consider enabling 'Resizable BAR' or similar, if available in the BIOS.
[ 1.124122] i915 0000:32:00.0: [drm] Finished loading DMC firmware i915/dg2_dmc_ver2_08.bin (v2.8)
[ 1.128748] i915 0000:32:00.0: [drm] GT0: GuC firmware i915/dg2_guc_70.bin version 70.8.0
[ 1.128760] i915 0000:32:00.0: [drm] GT0: HuC firmware i915/dg2_huc_gsc.bin version 7.10.3
[ 1.140655] i915 0000:32:00.0: [drm] GT0: GUC: submission enabled
[ 1.140664] i915 0000:32:00.0: [drm] GT0: GUC: SLPC enabled
[ 1.140916] i915 0000:32:00.0: [drm] GT0: GUC: RC enabled
[ 1.166421] [drm] Initialized i915 1.6.0 20201103 for 0000:32:00.0 on minor 1
[ 1.167407] i915 0000:32:00.0: [drm] Cannot find any crtc or sizes
[ 1.167696] i915 0000:32:00.0: [drm] Cannot find any crtc or sizes
[ 1.167717] i915 0000:32:00.0: [drm] Cannot find any crtc or sizes
[ 1.587615] i915 0000:32:00.0: [drm] GT0: HuC: authenticated for all workloads

0 Kudos
ThasneemV_Intel
Moderator
6,755 Views

Hi,


Thanks for posting in Intel Communities.


Thank you for sharing the details. To assist you better, could you please provide the overall system requirements( OS,Processor,Graphics card if any etc.) details.


Regards,

Thasneem Vazim


0 Kudos
s7mon
Novice
6,745 Views

Sure.
OS: Linux (Gentoo stable with selected unstable packages (see above)).
Kernel: 6.5

Mainboard MSI MEG X570 ACE

CPU: AMD Ryzen 7 3700X

GPU1: Radeon RX  5700

GPU2: Intel Arc 380

Memory 32 GB 

 

If you need any more details let me know which.

0 Kudos
ThasneemV_Intel
Moderator
6,627 Views

Hi,

 

Thanks for providing the information.

 

We are checking on this internally. We will get back to you soon with an update.

 

Regards,

Thasneem Vazim

 

 

0 Kudos
ThasneemV_Intel
Moderator
6,449 Views

Hi,

 

We have escalated your issue to the development team, and they require the following details for further analysis:

a) The reason for explicitly setting to qsv_device renderD129.

b) Confirmation on whether this device is supported by ffmpeg or not.

 

Regards,

Thasneem Vazim


0 Kudos
s7mon
Novice
6,442 Views

Sure

 

a) i am setting the device directly as it is currently not the default graphics card in that system.

b)  I use the same approach with VAAPI (instead of QSV) to select the device which works.
It is also documented here at the end of the transcoding section
trac.ffmpeg.org/wiki/Hardware/QuickSync 
trac.ffmpeg.org/ticket/7649 

 

best regards

s7mon

0 Kudos
ThasneemV_Intel
Moderator
6,270 Views

Hi,


Thank you for providing the details. We have conveyed this information to the development team and will reach out to you once we receive their feedback.


Regards,

Thasneem Vazim


0 Kudos
s7mon
Novice
6,239 Views

using this commit lavu/hwcontext_qsv: use mfxImplDescription instead of mfxExtendedDevi…  
i was able to use qsv and have the session created and convert to mp4 or av1 using the commands above.

 

I assume it will be merged to mainline somehow and therefore see it fixed.

Thanks for the support

s7mon

0 Kudos
ThasneemV_Intel
Moderator
6,210 Views

Hi,

 

Glad to know that your issue is resolved. Thanks for sharing it with the community. If you need any additional information, please post a new question as this thread will no longer be monitored by Intel.

 

Regards,

Thasneem Vazim


0 Kudos
Reply