From Gentoo Wiki
Jump to: navigation, search

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

Hardware support

Driver Chipset Formats
intel Intel GMA X4500HD and newer See - VAAPI | Linux Graphics
VDPAU All supported graphics cards


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

FILE /etc/portage/make.conf

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

Cannot load package information. Is the atom x11-libs/libva correct?

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

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


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

Software support


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


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


Currently, the main MPlayer branch doesn't support VAAPI. There is a development branch (hwaccel-vaapi) available on GitHub that supports VAAPI.

Build the VAAPI enabled MPlayer:

user $git clone -b hwaccel-vaapi vaapi-mplayer
user $cd vaapi-mplayer
user $./configure --disable-vdpau --enable-vaapi
user $make

Install the VAAPI enabled MPlayer (not recommended):

root #make install
Be extremely careful when installing anything on your system aside of Portage, since it can conflict with the installed files.

Instead, configure media-video/smplayer to use the VAAPI enabled MPlayer executable (Preferences → General → MPlayer executable). Next, set the output driver (Preferences → General → Output driver → User defined...) to vaapi.

See also