VAAPI

Resources

VAAPI (Video Acceleration API) Article description::provides access to graphics hardware (GPU) acceleration for video processing.

Hardware support

Driver Chipset Formats
intel Intel GMA X4500HD and newer See 01.org - VAAPI Supported Hardware & Features
VDPAU All supported graphics cards

Installation

USE flags

Global

VAAPI support can be enabled system-wide by adding the vaapi value to the USE variable:

FILE /etc/portage/make.conf
<syntaxhighlight lang="bash">USE="vaapi"</syntaxhighlight>

Enabling VAAPI support will pull in the x11-libs/libva package, which has the following USE flags:

USE flags for x11-libs/libva Video Acceleration (VA) API for Linux

X Add support for X11
drm Enables VA/DRM API support.
opengl Add support for OpenGL (3D graphics)
utils Install VA-API utility programs.
vdpau Enable the Video Decode and Presentation API for Unix acceleration interface
wayland Enable dev-libs/wayland backend

These flags can be adjusted in /etc/portage/package.use.

The system needs to be updated if the USE variable has been set to vaapi:

root #emerge --ask --changed-use --deep @world

Usage

Emerge media-video/libva-utils and run vainfo to check VAAPI support.

root #vainfo
vainfo: VA-API version: 0.35 (libva 1.3.1)
vainfo: Driver version: Intel i965 driver - 1.3.0
vainfo: Supported profile and entrypoints
      VAProfileMPEG2Simple            :	VAEntrypointVLD
      VAProfileMPEG2Simple            :	VAEntrypointEncSlice
      VAProfileMPEG2Main              :	VAEntrypointVLD
      VAProfileMPEG2Main              :	VAEntrypointEncSlice
      VAProfileH264ConstrainedBaseline:	VAEntrypointVLD
      VAProfileH264ConstrainedBaseline:	VAEntrypointEncSlice
      VAProfileH264Main               :	VAEntrypointVLD
      VAProfileH264Main               :	VAEntrypointEncSlice
      VAProfileH264High               :	VAEntrypointVLD
      VAProfileH264High               :	VAEntrypointEncSlice
      VAProfileVC1Simple              :	VAEntrypointVLD
      VAProfileVC1Main                :	VAEntrypointVLD
      VAProfileVC1Advanced            :	VAEntrypointVLD
      VAProfileNone                   :	VAEntrypointVideoProc
      VAProfileJPEGBaseline           :	VAEntrypointVLD

It is possible to override the automatic VAAPI driver selection with the LIBVA_DRIVER_NAME variable:

  • Intel:
    • For libva-intel-driver use i965
    • For libva-intel-media-driver use iHD
  • NVIDIA:
    • For Nouveau use nouveau
    • For NVIDIA use vdpau
  • ATI/AMD:
    • For AMDGPU driver use radeonsi

When setting LIBVA_DRIVER_NAME to a driver for a secondary GPU, be sure to set DRI_PRIME accordingly as well.

Software support

VLC

VLC supports VAAPI natively. Activate the appropriate setting through the preferences menu (Tools โ†’ Preferences โ†’ Input/Codecs โ†’ Hardware accelerated decoding).

mpv

mpv also supports the VAAPI acceleration through the command-line option --hwdec=vaapi.

See also

This article is issued from Gentoo. The text is licensed under Creative Commons - Attribution - Sharealike. Additional terms may apply for the media files.