libvdpau-va-gl is a VDPAU driver that uses OpenGL under the hood to accelerate drawing and scaling, and VA-API (if available) to accelerate video decoding.

Using it, you can get hardware acceleration on some Intel graphics cards for Mplayer (well, we already have and even Adobe Flash Player (the Flash content needs to use StageVideo! - YouTube supports it for instance). That means a lot less CPU usage as you'll see below.



(well, we already have mplayer-vaapi but it hasn't been merged)

AMD users: in theory, this should also work with AMD cards (Catalyst) however, from what users are reporting , it doesn't seem to work properly and the libvdpau-va-gl developer said that he can only test this on Intel, so it's unlikely that the AMD bugs will be fixed soon. However, the open source AMD drivers should have built-in VDPAU support (you need Linux 3.10 and Mesa 9.2).





In my test (Ubuntu 13.10, Intel graphics), a full-screen 1080p flash YouTube video used around 160-170% CPU without libvdpau-va-gl and about 14-17% CPU when using libvdpau-va-gl. There were some occasional spikes when using libvdpau-va-gl, but usually it stayed around those values which is a really great improvement.



Note: I've tested this with Firefox and Chromium browsers with Adobe Flash Player 11.2 r202. It doesn't seem to work with Pepper Flash (available by default in Google Chrome).





libvdpau-va-gl is work-in-progress and while it has worked properly with Adobe Flash Player / Firefox on my system, it may not work properly for you or it may cause problems with other VDPAU-enabled applications and for this reason, it's advisable not to use this system-wide.





Below you can watch a quick video demoing the CPU usage for a YouTube flash video, with and without libvdpau-va-gl:



(direct video link; for more videos, subscribe to our YouTube channel)

Install and set up libvdpau-va-gl in Ubuntu

Important:

1. Firstly, install the VAAPI drivers (for Intel HD Graphics as well as G45 and later)::

sudo apt-get install i965-va-driver

2. Install libvdpau-va-gl by using the main WebUpd8 PPA (I've used Vincent Bernat's Debian Install libvdpau-va-gl by using the main WebUpd8 PPA (I've used Vincent Bernat's Debian packaging - thanks!):

sudo add-apt-repository ppa:nilarimogard/webupd8 sudo apt-get update sudo apt-get install libvdpau-va-gl1

3. Adobe Flash doesn't use hardware acceleration by default on Linux so we'll have to force it:

sudo mkdir -p /etc/adobe echo "EnableLinuxHWVideoDecode=1" | sudo tee /etc/adobe/mms.cfg echo "OverrideGPUValidation=1" | sudo tee -a /etc/adobe/mms.cfg

VDPAU_DRIVER=va_gl firefox

sudo sed -i "s/^# \[/\[/g" /etc/X11/Xsession.d/20vdpau-va-gl sudo sed -i "s/^# export/ export/g" /etc/X11/Xsession.d/20vdpau-va-gl

You can check if libvdpau-va-gl is working and Adobe Flash Player uses hardware acceleration by right clicking a Flash video on YouTube and selecting "Stats for nerds". The stats box that shows up should display the following: "accelerated video rendering, accelerated video decoding", like in this screenshot

sudo apt-get install vdpauinfo

VDPAU_DRIVER=va_gl vdpauinfo

And you should get something like THIS . If you get an error (for example "Failed to open VDPAU backend"), either your graphics card doesn't support VA-API (since this VDPAU driver requires VA-API) or you've missed a step from the instructions above.





For more information, source code or bug reports, see the libvdpau-va-gl GitHub page. Also see: known issues.

Like I was telling you above, it's not a good idea to enable libvdpau-va-gl system-wide yet. Instead, you can simply launch an application with "VDPAU_DRIVER=va_gl".Example: to launch Firefox with libvdpau-va-gl enabled, use:To enable libvdpau-va-gl system-wide (not recommended for now because this may cause problems with some VDPAU-enabled applications), you need to openas root with a text editor and uncomment (remove the "#" in front of the lines) the last two lines. Or simply copy/paste the commands below:Optional: check if libvdpau-va-gl/VDPAU is working.Another way to check if libvdpau-va-gl/VDPAU is working propely, install vdpauinfo:Then, run: