Install MPlayer With VA-API (Hardware Acceleration For Intel / AMD GPUs) Support In Ubuntu

VA-API is an open source library/API which enables hardware accelerated video processing. It uses the GPU to accelerate video processing in order to offload the CPU.

Supported hardware includes Intel HD Graphics and G45 chipsets and newer as well as AMD Radeon GPUs (there’s also a Nvidia VDPAU backend for VA-API). You can find a list of supported hardware, drivers and video codecs HERE.
Here’s an example: on my laptop, the CPU usage is around 40-50% when watching an 1080p H.264 video using MPlayer without VA-API and around 2-5% when watching the same 1080p video using MPlayer with VA-API. You can see some screenshots below:
mplayer without vaapiCPU usage: MPlayer without VA-API
mplayer vaapiCPU usage: MPlayer with VA-API

Install Intel / AMD VA-API drivers in Ubuntu
Before installing MPlayer with VA-API support, install the VA-API drivers:

– for Intel GPUs (for Intel HD Graphics as well as G45 and later):
sudo apt-get install i965-va-driver
– for AMD Radeon GPUs (you also need the proprietary drivers!):
sudo apt-get install xvba-va-driver
The Intel VA-API driver is available in the official Ubuntu 12.04 Precise Pangolin (and newer) repositories. For Ubuntu 11.10 Oneiric Ocelot, you’ll find a package in the MPlayer VAAPI PPA (see below).
Nvidia users: MPlayer supports VDPAU by default so everything you need for hardware accelerated video decoding is already in the repositories. See THIS old post for more info (unless something has changed, but I can’t test it since I have Nvidia Optimus and Bumblebee doesn’t support VDPAU). You can also use the “vdpau-va-driver” driver which is a VDPAU-based backend for VA-API and follow use the instructions below to install Mplayer with VA-API.

Install MPlayer with VA-API support in Ubuntu
By default, the MPlayer version available in the official Ubuntu repositories doesn’t support VA-API, but you can use a PPA which provides custom MPlayer builds with VA-API support.
To install MPlayer with VA-API support in Ubuntu 12.10, 12.04 or 11.10, use the following commands:
sudo add-apt-repository ppa:sander-vangrieken/vaapi
sudo apt-get update
sudo apt-get install mplayer-vaapi
Once installed, open SMPlayer (or whatever MPlayer GUI you’re using: Gnome Mplayer, KMPlayer, etc.) and in its Preferences, on the Video tab (in SMPlayer: General Video > Output driver) set the video output driver to “vaapi”:
SMPlayer vaapi
That’s it!

Other Linux distributions:
Arch Linux users can install MPlayer with VA-API support from the community repository.The mplayer-vaapi source can be downloaded via gitorious.org
Note: I’ve tested this on an Intel GPU only!

via Ubuntu.ru wiki

Originally published at WebUpd8: Daily Ubuntu / Linux news and application reviews.



Category: Ubuntu | Comments Off on Install MPlayer With VA-API (Hardware Acceleration For Intel / AMD GPUs) Support In Ubuntu

Install MPlayer With VA-API (Hardware Acceleration For Intel / AMD GPUs) Support In Ubuntu

VA-API is an open source library/API which enables hardware accelerated video processing. It uses the GPU to accelerate video processing in order to offload the CPU.

Supported hardware includes Intel HD Graphics and G45 chipsets and newer as well as AMD Radeon GPUs (there’s also a Nvidia VDPAU backend for VA-API). You can find a list of supported hardware, drivers and video codecs HERE.
Here’s an example: on my laptop, the CPU usage is around 40-50% when watching an 1080p H.264 video using MPlayer without VA-API and around 2-5% when watching the same 1080p video using MPlayer with VA-API. You can see some screenshots below:
mplayer without vaapiCPU usage: MPlayer without VA-API
mplayer vaapiCPU usage: MPlayer with VA-API

Install Intel / AMD VA-API drivers in Ubuntu
Before installing MPlayer with VA-API support, install the VA-API drivers:

– for Intel GPUs (for Intel HD Graphics as well as G45 and later):
sudo apt-get install i965-va-driver
– for AMD Radeon GPUs (you also need the proprietary drivers!):
sudo apt-get install xvba-va-driver
The Intel VA-API driver is available in the official Ubuntu 12.04 Precise Pangolin (and newer) repositories. For Ubuntu 11.10 Oneiric Ocelot, you’ll find a package in the MPlayer VAAPI PPA (see below).
Nvidia users: MPlayer supports VDPAU by default so everything you need for hardware accelerated video decoding is already in the repositories. See THIS old post for more info (unless something has changed, but I can’t test it since I have Nvidia Optimus and Bumblebee doesn’t support VDPAU). You can also use the “vdpau-va-driver” driver which is a VDPAU-based backend for VA-API and follow use the instructions below to install Mplayer with VA-API.

Install MPlayer with VA-API support in Ubuntu
By default, the MPlayer version available in the official Ubuntu repositories doesn’t support VA-API, but you can use a PPA which provides custom MPlayer builds with VA-API support.
To install MPlayer with VA-API support in Ubuntu 12.10, 12.04 or 11.10, use the following commands:
sudo add-apt-repository ppa:sander-vangrieken/vaapi
sudo apt-get update
sudo apt-get install mplayer-vaapi
Once installed, open SMPlayer (or whatever MPlayer GUI you’re using: Gnome Mplayer, KMPlayer, etc.) and in its Preferences, on the Video tab (in SMPlayer: General Video > Output driver) set the video output driver to “vaapi”:
SMPlayer vaapi
That’s it!

Other Linux distributions:
Arch Linux users can install MPlayer with VA-API support from the community repository.The mplayer-vaapi source can be downloaded via gitorious.org
Note: I’ve tested this on an Intel GPU only!

via Ubuntu.ru wiki

Originally published at WebUpd8: Daily Ubuntu / Linux news and application reviews.



Category: Ubuntu | Comments Off on Install MPlayer With VA-API (Hardware Acceleration For Intel / AMD GPUs) Support In Ubuntu

How To Enable Intel SNA Acceleration In Ubuntu

SNA is a 2D acceleration architecture for the open source Intel Linux graphics driver that provides improved X.Org driver performance, and thus, better desktop user experience. The name stands for “Sandy Bridge New Acceleration” and contrary to its name, it not just for Sandy Bridge but for previous Intel graphics generations as well.

Here’s how to enable Intel SNA in Ubuntu 12.04 or 12.10.

According to the x.org wiki (link; cached copy since the page seems down right now), SNA should work with i830-i865G and newer Intel chipsets.
You can see some old UXA (used by default) vs SNA benchmarks at Phoronix.

intel sna ubuntu

Enable Intel SNA in Ubuntu 12.10
Intel SNA is available in Ubuntu 12.10 without installing any extra packages, but it’s not enabled by default.
To enable SNA, you need to create a /etc/X11/xorg.conf file:
gksu gedit /etc/X11/xorg.conf
And paste the following:

Section “Device”
Identifier “intel”
Driver “intel”
Option “AccelMethod” “sna”
EndSection
Then save the file, log out and log back in.

In my test (using an Intel HD 3000 GPU), there were some artefacts when using Intel SNA in Ubuntu 12.10, which don’t occur after adding the Xorg Edgers PPA so if that’s the case for you too, follow the steps under the alternative method below.
Or, if you just want to revert the changes, remove the xorg.conf file:
sudo rm /etc/X11/xorg.conf
Then log out and log back in.

Enable Intel SNA in Ubuntu 12.04 (alternative method for Ubuntu 12.10)
For Ubuntu 12.04 (or for Ubuntu 12.10, if the method above doesn’t work properly for you), you can use the Xorg Edgers PPA which has packages with SNA enabled by default for Intel.

Warning: this PPA uses Xorg packages from GIT and while I didn’t encounter any issues (I’ve used it for Ubuntu 12.04 and I’m using it now in Ubuntu 12.10), things may break. Use it at your own risk!
Add the Xorg Edgers PPA using the following command:
sudo add-apt-repository ppa:xorg-edgers/ppa
Then launch the Update Manager (now called Software Updater in Ubuntu 12.10) and update your system. Once the update finishes, log out and log back in (though a restart is probably better since this PPA upgrades many system packages).
If you want to revert the changes and go back to the drivers available in the official Ubuntu repositories, use the commands below:sudo apt-get install ppa-purge
sudo ppa-purge ppa:xorg-edgers/ppa

Originally published at WebUpd8: Daily Ubuntu / Linux news and application reviews.



Related Blogs

    Category: Ubuntu | Comments Off on How To Enable Intel SNA Acceleration In Ubuntu