Graphics
Intel® graphics drivers and software, compatibility, troubleshooting, performance, and optimization
22668 Discussions

Reuired Linux runtime packages for FFmpeg QSV and VAAPI video encoding?

terje
Beginner
1,961 Views

Hello,

 

I have already QSV and VAAPI  video encoding working and built for FFmpeg and Cinelerra-GG.

I have most if not all libvpl and libva packages installed on SUSE Linux. What I wonder are which of these packages are needed just for Runtime encoding ? That is which can be deleted beyond the    -devel packages?

 

System, hardware and drivers:

inxi -CGS
System:
Host: localhost.localdomain Kernel: 6.6.71-1-longterm arch: x86_64 bits: 64
Console: pty pts/0 Distro: openSUSE Tumbleweed-Slowroll 20250101
CPU:
Info: 12-core (8-mt/4-st) model: 12th Gen Intel Core i7-12700KF bits: 64
type: MST AMCP cache: L2: 12 MiB
Speed (MHz): avg: 800 min/max: 800/4900:5000:3800 cores: 1: 800 2: 800
3: 800 4: 800 5: 800 6: 800 7: 800 8: 800 9: 800 10: 800 11: 800 12: 800
13: 800 14: 800 15: 800 16: 800 17: 800 18: 800 19: 800 20: 800
Graphics:
Device-1: Intel DG2 [Arc A750] driver: i915 v: kernel
Device-2: Microdia Camera driver: snd-usb-audio,uvcvideo type: USB
Display: unspecified server: X.org v: 1.21.1.15 with: Xwayland v: 24.1.4
driver: X: loaded: modesetting unloaded: vesa dri: iris gpu: i915
resolution: 2560x1440~60Hz
API: EGL v: 1.5 drivers: iris,swrast platforms: gbm,x11,surfaceless,device
API: OpenGL v: 4.6 compat-v: 4.5 vendor: intel mesa v: 24.3.3
renderer: Mesa Intel Arc A750 Graphics (DG2)
API: Vulkan v: 1.4.304 drivers: N/A surfaces: xcb,xlib
Info: Tools: api: clinfo, eglinfo, glxinfo, vulkaninfo gpu: gputop,
intel_gpu_top, lsgpu x11: xprop,xrandr

 

Installed packages:

zypper se -i vpl
Loading repository data...
Reading installed packages...

S | Name | Summary | Type
---+---------------------+---------------------------------------------+--------
i | liblavplay-2_2-0 | MJPEG Video Capture and Processing Tools | package
i+ | libvpl | oneAPI Video Processing Library (oneVPL) -> | package
i+ | libvpl-devel | Development files for oneAPI Video Proces-> | package
i+ | libvpl-tools | Intel Video Processing Library (Intel VPL-> | package
i+ | libvpl-tools-devel | Development files for libvpl-tools | package
i | libvpl2 | oneAPI Video Processing Library (oneVPL) -> | package
i+ | libvpl_wayland1_0_0 | Runtime library for libvpl-tools | package


zypper se -i libva
Loading repository data...
Reading installed packages...

S | Name | Summary | Type
---+------------------------+----------------------------------------------------------+--------
i+ | libva-devel | Development files for the Video Acceleration API | package
i | libva-drm2 | DRM backend for the Video Acceleration API | package
i | libva-drm2-32bit | DRM backend for the Video Acceleration API | package
i | libva-gl-devel | Development files for the Video Acceleration API | package
i | libva-glx2 | GLX backend for the Video Acceleration API | package
i+ | libva-utils | A collection of utilities and examples to exercise VA--> | package
i | libva-wayland2 | Wayland backend for the Video Acceleration API | package
i | libva-x11-2 | X11 backend for the Video Acceleration API | package
i | libva-x11-2-32bit | X11 backend for the Video Acceleration API | package
i | libva2 | Video Acceleration API | package
i | libva2-32bit | Video Acceleration API | package
i+ | libvapoursynth-70 | A video processing framework | package
i | libvapoursynth-script0 | Library for interfacing Python with VapourSynth | package
i | Mesa-libva | Mesa VA-API implementation | package

 

 

 

 

 

 

 

 

 

0 Kudos
10 Replies
Mike_Intel
Moderator
1,913 Views

Hello terje,


Thank you for posting in Intel community Forum.


For me to further check this, please help provide the following details:


  1. Can you further elaborate your inquiry?
  2. Are you having issues with your current set up during encoding?
  3. Can you share some videos or screenshots?


If you have questions, please let us know. Thank you.


Best regards,

Michael L.

Intel Customer Support Technician



0 Kudos
terje
Beginner
1,877 Views

Hello Mike,

 

In addition to the packages installed on AlderLake/DG2 above, the following Intel firmware and drivers are installed:

S | Name | Summary | Type
---+-----------------------+-------------------------------------------------------------------------+--------
i+ | intel-gpu-tools | Collection of tools for development and testing of the Intel DRM driver | package
i | intel-media-driver | Intel Media Driver for VAAPI | package
i+ | intel-opencl | Intel Graphics Compute Runtime for OpenCL | package
i | intel-vaapi-driver | Intel Driver for Video Acceleration (VA) API for Linux | package
i | kernel-firmware-intel | Kernel firmware files for Intel-platform device drivers | package
i | libdrm_intel1 | Userspace interface for Kernel DRM services for Intel chips | package
i+ | libvulkan_intel | Mesa vulkan driver for Intel GPU | package
i+ | ucode-intel | Microcode Updates for Intel x86/x86-64 CPUs | package

 

1. I have have ffmpeg enabled with libvpl- and vaapi that works for vaapi and qsv video encoding.

 

But I think it is unclear what is really the required Intel firmware, GPU drivers and runtime packages to install for FFmpeg QSV and VA-API video encoding/transcoding  (other may be required for developement environment).

1.1 which are required for VA-API?

1.2  which are required for QSV?

1.3 Is there some overlap/interaction between VA-API and QSV drivers and between respective RT packages?

 

A sample extract from ffmpeg QSV transcoding output with libva info: VA-API version 1.22.0 !?

libva info: VA-API version 1.22.0
libva info: Trying to open /usr/lib64/dri/iHD_drv_video.so
libva info: Found init function __vaDriverInit_1_22
libva info: va_openDriver() returns 0
libva info: VA-API version 1.22.0
libva info: Trying to open /usr/lib64/dri/iHD_drv_video.so
libva info: Found init function __vaDriverInit_1_22
libva info: va_openDriver() returns 0

 

Full ffmpeg output:

ffmpeg -hide_banner -qsv_device /dev/dri/renderD128 -i hdv09_04.m2t -pix_fmt nv12 -c:v av1_qsv hdv09_04_av1_qsv_format_nv12.mp4
libva info: VA-API version 1.22.0
libva info: Trying to open /usr/lib64/dri/iHD_drv_video.so
libva info: Found init function __vaDriverInit_1_22
libva info: va_openDriver() returns 0
libva info: VA-API version 1.22.0
libva info: Trying to open /usr/lib64/dri/iHD_drv_video.so
libva info: Found init function __vaDriverInit_1_22
libva info: va_openDriver() returns 0
[mpeg2video @ 0x55c3f1eb6d00] Invalid frame dimensions 0x0.
Last message repeated 3 times
[mpegts @ 0x55c3f1d53e00] PES packet size mismatch
[mpegts @ 0x55c3f1d53e00] Packet corrupt (stream = 1, dts = 258142320).
[mpegts @ 0x55c3f1d53e00] Could not find codec parameters for stream 2 (Unknown: none ([160][0][0][0] / 0x00A0)): unknown codec
Consider increasing the value for the 'analyzeduration' (0) and 'probesize' (5000000) options
[mpegts @ 0x55c3f1d53e00] Could not find codec parameters for stream 3 (Unknown: none ([161][0][0][0] / 0x00A1)): unknown codec
Consider increasing the value for the 'analyzeduration' (0) and 'probesize' (5000000) options
Input #0, mpegts, from 'hdv09_04.m2t':
Duration: 00:03:59.06, start: 2629.496000, bitrate: 26110 kb/s
Program 100
Stream #0:0[0x810]: Video: mpeg2video (Main) ([2][0][0][0] / 0x0002), yuv420p(tv, bt709, top first), 1440x1080 [SAR 4:3 DAR 16:9], 25000 kb/s, 25 fps, 25 tbr, 90k tbn
Side data:
cpb: bitrate max/min/avg: 25000000/0/0 buffer size: 7340032 vbv_delay: N/A
Stream #0:1[0x814]: Audio: mp2 (mp3float) ([3][0][0][0] / 0x0003), 48000 Hz, stereo, fltp, 384 kb/s
Stream #0:2[0x815]: Unknown: none ([160][0][0][0] / 0x00A0)
Stream #0:3[0x811]: Unknown: none ([161][0][0][0] / 0x00A1)
Stream mapping:
Stream #0:0 -> #0:0 (mpeg2video (native) -> av1 (av1_qsv))
Stream #0:1 -> #0:1 (mp2 (native) -> aac (native))
Press [q] to stop, [?] for help
[av1_qsv @ 0x55c3f1e76600] Using the constant quantization parameter (CQP) by default. Please use the global_quality option and other options for a quality-based mode or the b option and other options for a bitrate-based mode if the default is not the desired choice.
Output #0, mp4, to 'hdv09_04_av1_qsv_format_nv12.mp4':
Metadata:
encoder : Lavf61.7.100
Stream #0:0: Video: av1 (av01 / 0x31307661), nv12(tv, bt709, top coded first (swapped)), 1440x1080 [SAR 4:3 DAR 16:9], q=2-31, 25 fps, 12800 tbn
Metadata:
encoder : Lavc61.19.100 av1_qsv
Stream #0:1: Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 128 kb/s
Metadata:
encoder : Lavc61.19.100 aac
[mpegts @ 0x55c3f1d53e00] PES packet size mismatch0:03:54.96 bitrate=1678.0kbits/s speed=24.7x
[mpegts @ 0x55c3f1d53e00] Packet corrupt (stream = 1, dts = 258142320).
[mpeg2video @ 0x55c3f1e65480] ac-tex damaged at 10 61
[mpeg2video @ 0x55c3f1e65480] Warning MVs not available
[mpeg2video @ 0x55c3f1e65480] concealing 630 DC, 630 AC, 630 MV errors in P frame
[vist#0:0/mpeg2video @ 0x55c3f1ebdfc0] [dec:mpeg2video @ 0x55c3f1ea3f40] corrupt decoded frame
[out#0/mp4 @ 0x55c3f1d4d4c0] video:45168KiB audio:3774KiB subtitle:0KiB other streams:0KiB global headers:0KiB muxing overhead: 0.247097%
frame= 5963 fps=617 q=-0.0 Lsize= 49063KiB time=00:03:58.77 bitrate=1683.3kbits/s speed=24.7x
[aac @ 0x55c3f1dfac40] Qavg: 488.890



















 

0 Kudos
Mike_Intel
Moderator
1,865 Views

Hello terje,


Thank you for the update.


Upon further checking, the supported OS for Arc Graphics are just the following:


  • Windows® 10 64-bit 20H2 or newer
  • Windows 11* 64-bit
  • Ubuntu* 22.10


You can find that information here:


https://www.intel.com/content/www/us/en/support/articles/000091128/graphics/intel-arc-dedicated-graphics-family.html


If you have questions, please let us know. Thank you.


Best regards,

Michael L.

Intel Customer Support Technician


0 Kudos
terje
Beginner
1,848 Views

Hello Mike,

 

Thank you for replying.

However, my questions were meant to be user oriented and more or less regardless of Linux distributions, GPU setup or developement. Beside AlderLake/DG2 I have also SkyLake and KabyLake platforms.

 

So to repeat the main questions:

 

>> 1. Can you further elaborate your inquiry?


> 1. I have have ffmpeg enabled with libvpl- and vaapi that works for vaapi and qsv video encoding.

> But I think it is unclear what is really the required Intel firmware, GPU drivers and runtime packages to > > install for FFmpeg QSV and VA-API video encoding/transcoding (other may be required for developement > environment).

> 1.1 which are required for VA-API?

> 1.2 which are required for QSV?

> 1.3 Is there some overlap/interaction between VA-API and QSV drivers and between respective RT packages?

 

I have gone through most of the related Intel docs. I think somewhere there were also refered to document regarding the relationship between VAAPI and QSV, but without active url I have yet to find it, if it exists (compare with my the last question 1.3 above).

 

Terje J. H

 

0 Kudos
Mike_Intel
Moderator
1,830 Views

Hello terje,


Thank you for the update.


Since the OS is not yet validated, there is a possibility that there is no test yet being done.

That is why it is hard to provide information or to answer your questions without test or validation yet.


Regarding that document, can you attach it here so that I can further check on that?


If you have questions, please let us know. Thank you.


Best regards,

Michael L.

Intel Customer Support Technician


0 Kudos
terje
Beginner
1,800 Views

Hello Mike,

 

Here is a good overview over the OSV media stack components for different Linux distributions, Ubuntu, SUSE, Redhat and Debian

https://github.com/intel/media-driver/wiki

 

Can you try to check how VAAPI fit in here, and even better if a similar overview table exists or can be supplemented for VAAPI ?

 

Thanks

Terje J. Hanssen

 

0 Kudos
terje
Beginner
1,799 Views

Hello Mike,

 

Here is a good overview over the OSV media stack components for different Linux distributions, Ubuntu, SUSE, Redhat and Debian

https://github.com/intel/media-driver/wiki

 

Can you try to check how VAAPI fit in here, and even better if a similar overview table exists or can be supplemented for VAAPI ?

 

Thanks

Terje J. Hanssen

 

0 Kudos
Mike_Intel
Moderator
1,761 Views

Hello terje,

 

Thank you for the update.

 

As much as I want to further check this, since it is not validated, it may or it may not work.

They best way to check this is ask the OS if they have their own validation from their side and check if your questions will work.

 

If you have questions, please let us know. Thank you.

 

Best regards,

Michael L.

Intel Customer Support Technician


0 Kudos
terje
Beginner
1,749 Views

Hi Mike,

 

OK, then I continue here using Ubuntu on KabyLake (Dell XPS-13-9370) instead based on this ffmpeg sample code

https://trac.ffmpeg.org/wiki/Hardware/QuickSync#Transcode

-qsv_device 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 ​https://trac.ffmpeg.org/ticket/7649)

ffmpeg -hwaccel qsv -qsv_device /dev/dri/renderD128 -c:v h264_qsv -i input.mp4 -c:v h264_qsv output.mp4

but get

Unrecognized option 'qsv_device'.
Error splitting the argument list: Option not found

 

ffmpeg -hwaccel qsv -qsv_device /dev/dri/renderD128 -c:v h264_qsv -i hdv09_04.m2t -c:v h264_qsv hdv09_04_h264_qsv.mp4
ffmpeg version n4.3.1 Copyright (c) 2000-2020 the FFmpeg developers
built with gcc 7 (Ubuntu 7.5.0-3ubuntu1~18.04)
configuration: --prefix= --prefix=/usr --disable-debug --disable-doc --disable-static --enable-cuda --enable-cuda-sdk --enable-cuvid --enable-libdrm --enable-ffplay --enable-gnutls --enable-gpl --enable-libass --enable-libfdk-aac --enable-libfontconfig --enable-libfreetype --enable-libmp3lame --enable-libnpp --enable-libopencore_amrnb --enable-libopencore_amrwb --enable-libopus --enable-libpulse --enable-sdl2 --enable-libspeex --enable-libtheora --enable-libtwolame --enable-libv4l2 --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libx265 --enable-libxcb --enable-libxvid --enable-nonfree --enable-nvenc --enable-omx --enable-openal --enable-opencl --enable-runtime-cpudetect --enable-shared --enable-vaapi --enable-vdpau --enable-version3 --enable-xlib
libavutil 56. 51.100 / 56. 51.100
libavcodec 58. 91.100 / 58. 91.100
libavformat 58. 45.100 / 58. 45.100
libavdevice 58. 10.100 / 58. 10.100
libavfilter 7. 85.100 / 7. 85.100
libswscale 5. 7.100 / 5. 7.100
libswresample 3. 7.100 / 3. 7.100
libpostproc 55. 7.100 / 55. 7.100
Unrecognized option 'qsv_device'.
Error splitting the argument list: Option not found

 

ls /dev/dri
by-path card1 renderD128

 

vainfo
libva info: VA-API version 1.20.0
libva info: Trying to open /usr/lib/x86_64-linux-gnu/dri/iHD_drv_video.so
libva info: Found init function __vaDriverInit_1_20
libva info: va_openDriver() returns 0
vainfo: VA-API version: 1.20 (libva 2.12.0)
vainfo: Driver version: Intel iHD driver for Intel(R) Gen Graphics - 24.1.0 ()
vainfo: Supported profile and entrypoints
VAProfileNone : VAEntrypointVideoProc
VAProfileNone : VAEntrypointStats
VAProfileMPEG2Simple : VAEntrypointVLD
VAProfileMPEG2Simple : VAEntrypointEncSlice
VAProfileMPEG2Main : VAEntrypointVLD
VAProfileMPEG2Main : VAEntrypointEncSlice
VAProfileH264Main : VAEntrypointVLD
VAProfileH264Main : VAEntrypointEncSlice
VAProfileH264Main : VAEntrypointFEI
VAProfileH264Main : VAEntrypointEncSliceLP
VAProfileH264High : VAEntrypointVLD
VAProfileH264High : VAEntrypointEncSlice
VAProfileH264High : VAEntrypointFEI
VAProfileH264High : VAEntrypointEncSliceLP
VAProfileVC1Simple : VAEntrypointVLD
VAProfileVC1Main : VAEntrypointVLD
VAProfileVC1Advanced : VAEntrypointVLD
VAProfileJPEGBaseline : VAEntrypointVLD
VAProfileJPEGBaseline : VAEntrypointEncPicture
VAProfileH264ConstrainedBaseline: VAEntrypointVLD
VAProfileH264ConstrainedBaseline: VAEntrypointEncSlice
VAProfileH264ConstrainedBaseline: VAEntrypointFEI
VAProfileH264ConstrainedBaseline: VAEntrypointEncSliceLP
VAProfileVP8Version0_3 : VAEntrypointVLD
VAProfileVP8Version0_3 : VAEntrypointEncSlice
VAProfileHEVCMain : VAEntrypointVLD
VAProfileHEVCMain : VAEntrypointEncSlice
VAProfileHEVCMain : VAEntrypointFEI
VAProfileHEVCMain10 : VAEntrypointVLD
VAProfileHEVCMain10 : VAEntrypointEncSlice
VAProfileVP9Profile0 : VAEntrypointVLD
VAProfileVP9Profile2 : VAEntrypointVLD

 

inxi -CGS
System:
Host: terje-XPS-13-9370 Kernel: 6.8.0-52-generic arch: x86_64 bits: 64
Desktop: GNOME v: 46.0 Distro: Ubuntu 24.04.1 LTS (Noble Numbat)
CPU:
Info: quad core model: Intel Core i7-8550U bits: 64 type: MT MCP cache:
L2: 1024 KiB
Speed (MHz): avg: 704 min/max: 400/4000 cores: 1: 1000 2: 1000 3: 400
4: 1636 5: 400 6: 400 7: 400 8: 400
Graphics:
Device-1: Intel UHD Graphics 620 driver: i915 v: kernel
Device-2: Realtek Integrated_Webcam_HD driver: uvcvideo type: USB
Display: wayland server: X.Org v: 23.2.6 with: Xwayland v: 23.2.6
compositor: gnome-shell driver: X: loaded: modesetting unloaded: fbdev,vesa
dri: iris gpu: i915 resolution: 3840x2160~60Hz
API: EGL v: 1.5 drivers: iris,swrast
platforms: gbm,wayland,x11,surfaceless,device
API: OpenGL v: 4.6 compat-v: 4.5 vendor: intel mesa
v: 24.2.8-1ubuntu1~24.04.1 renderer: Mesa Intel UHD Graphics 620 (KBL GT2)

 

 

 

 

 

 

 

 

0 Kudos
Mike_Intel
Moderator
1,707 Views

Hello terje,

 

Thank you for the update.

 

Since you are inquiring a different product and system now, kindly create a new thread to avoid confusion.

And also, since I already addressed your inquiry in this thread, I need to close this inquiry. 


Thank you and have a great day. 

 

If you have questions, please let us know. Thank you.

 

Best regards,

Michael L.

Intel Customer Support Technician


0 Kudos
Reply