VAAPI

From Gentoo Wiki
Jump to: navigation, search
External resources

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 https://01.org/linuxgraphics/community/vaapi
VDPAU All supported graphics cards

Installation

Portage knows the global USE flag vaapi for enabling support for VAAPI in other packages. Enabling this USE flag will pull in x11-libs/libva automatically:

File/etc/portage/make.conf

USE="... vaapi ..."

The USE flags of libva are:

→ Information about USE flags
USE flag Default Recommended Description
opengl Yes Adds support for OpenGL (3D graphics)
vdpau No Enable the Video Decode and Presentation API for Unix acceleration interface
dummy No VIDEO_CARDS USE flag: dummy driver
intel No VIDEO_CARDS USE flag:see Intel
fglrx No VIDEO_CARDS USE flag:see fglrx
nvidia No VIDEO_CARDS USE flag:see nvidia-drivers

After setting this you want to update your system so the changes take effect:

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

Configuration

You may need to tweak the config files of the programs, you can make use of VAAPI.

Usage

vainfo shows if VAAPI is supported.

Software support

VLC

Vlc supports Vaapi natively. Activate the appropriate codecs through the Preferences Menu (VA API Acceleration).

MPV

Mpv also supports the vaapi acceleration through the commandline option --hwdec=vaapi

Mplayer

As of now, main branch Mplayer doesn't support vaapi. There is a development branch though that brings vaapi support. the branch is hwaccel-vaapi, available at gitorious. https://gitorious.org/vaapi/mplayer/source/1923fa10ed77bbf8408f2ce312d85a97dab1f0f3:

It doesn't seem there is a proper ebuild providing mplayer-vaapi, even on the overlays

You can use the following commands to get a vaapi enabled mplayer

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

You will get yourself an executable, that you can install with the not recommanded following procedure :

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

Instead, configure a player like smplayer to use your special executable (Preferences/Mplayer executable), then video driver (User defined/vaapi)

See also