Welcome!

The kernel problem with recent updates has been solved. Find the solution here

Important information
-- Required MX 15/16 Repository Changes
-- Information on torrent hosting changes
-- Information on MX15/16 GPG Keys
-- Spectre and Meltdown vulnerabilities

News
-- Introducing our new Website
-- MX Linux on social media: here

Current releases
-- MX-18.3 Point Release release info here
-- Migration Information to MX-18 here
-- antiX-17.4.1 release info here

New users
-- Please read this first, and don't forget to add system and hardware information to posts!
-- Here are the Forum Rules

How to get VLC working with Intel va-api hardware acceleration

Post Reply
User avatar
Stevo
Forum Veteran
Forum Veteran
Posts: 19519
Joined: Fri Dec 15, 2006 8:07 pm

How to get VLC working with Intel va-api hardware acceleration

#1

Post by Stevo » Wed Jan 02, 2019 7:15 pm

That's hardware-accelerated video decoding, so your GPU handles all the hard work and your CPU can take a rest. This should allow a system to play much higher resolution video than it can with just software decoding. You need a supported Intel GPU:

The free and open-source drivers of the integrated graphics known as "Intel HD Graphics" (Intel HD Graphics 2000/2500/3000/4000/5000/6000/7000/8000) inside Intel Core i3 / i5 / i7 Processor Family (Nehalem, Sandy Bridge, Ivy Bridge, on up microarchitecture based) processor family.

The free and open-source drivers of the Intel G45 chipset (with Intel GMA X4500HD integrated graphics), and later.

The closed source proprietary drivers for Intel's Poulsbo chipset with Imagination Technologies's PowerVR-based GMA 500 integrated graphics.

The closed source proprietary drivers for Atom E6xx and Penwell based SoCs are also supported via its Media Infrastructure Accelerator (MI-X).

The closed source proprietary drivers Intel Medfield SoCs with Imagination Technologies's PowerVR (VXD375/385 and VXE250/285) based integrated graphics.

First, you need some way to watch your CPU use. You can use a system monitor like top or htop in the terminal, or the XFCE task manager (click on "CPU" to sort for that), or add the "CPU Graph" item to the XFCE panel.

Then you need some hi-definition video for testing. You can get 4K video samples here: http://4ksamples.com/

Install: The standard Stretch VLC 3.0.3 we ship has va-api broken because we have a newer va-api in MX 18 to support the latest hardware. But you can install VLC 3.0.5 from the test repo to fix that.

Then you need to install va-driver-all and vainfo:

Code: Select all

sudo apt install va-driver-all vainfo
Running "vainfo" in the terminal will then tell you what codecs your hardware will accelerate:

Code: Select all

$ vainfo
libva info: VA-API version 1.3.0
libva info: va_getDriverName() returns 0
libva info: Trying to open /usr/lib/x86_64-linux-gnu/dri/i965_drv_video.so
libva info: Found init function __vaDriverInit_1_3
libva info: va_openDriver() returns 0
vainfo: VA-API version: 1.3 (libva 2.3.0)
vainfo: Driver version: Intel i965 driver for Intel(R) Coffee Lake - 2.2.0
vainfo: Supported profile and entrypoints
      VAProfileMPEG2Simple            : VAEntrypointVLD
      VAProfileMPEG2Simple            : VAEntrypointEncSlice
      VAProfileMPEG2Main              : VAEntrypointVLD
      VAProfileMPEG2Main              : VAEntrypointEncSlice
      VAProfileH264ConstrainedBaseline: VAEntrypointVLD
      VAProfileH264ConstrainedBaseline: VAEntrypointEncSlice
      VAProfileH264ConstrainedBaseline: VAEntrypointEncSliceLP
      VAProfileH264Main               : VAEntrypointVLD
      VAProfileH264Main               : VAEntrypointEncSlice
      VAProfileH264Main               : VAEntrypointEncSliceLP
      VAProfileH264High               : VAEntrypointVLD
      VAProfileH264High               : VAEntrypointEncSlice
      VAProfileH264High               : VAEntrypointEncSliceLP
      VAProfileH264MultiviewHigh      : VAEntrypointVLD
      VAProfileH264StereoHigh         : VAEntrypointVLD
      VAProfileVC1Simple              : VAEntrypointVLD
      VAProfileVC1Main                : VAEntrypointVLD
      VAProfileVC1Advanced            : VAEntrypointVLD
      VAProfileNone                   : VAEntrypointVideoProc
      VAProfileJPEGBaseline           : VAEntrypointVLD
      VAProfileJPEGBaseline           : VAEntrypointEncPicture
      VAProfileVP8Version0_3          : VAEntrypointVLD
      VAProfileHEVCMain               : VAEntrypointVLD
      VAProfileHEVCMain10             : VAEntrypointVLD
      VAProfileVP9Profile0            : VAEntrypointVLD
      VAProfileVP9Profile2            : VAEntrypointVLD
You can then go into VLC's Preferences--Input/Codecs, and change it from Automatic to Disabled and back to see the difference in CPU use in your monitor. VLC must be restarted after a setting change there, and running it in the terminal with

Code: Select all

vlc <test-video>
should show va-api being used when "Automatic" is enabled.

Post Reply

Return to “Software / Configuration”