Wednesday, October 27, 2010

Hardware Accelerated HD Video playback with ATI graphic card

Hardware accelerated HD Video playback has been around for a long time in Windows OS. Previously, PC & laptop with slow processors were too slow to playback 1080P Full HD videos just by the slow processors in them. With graphic card accelerated HD decoding, all the PC & laptops with slow processors are suddenly empowered to playback 1080P Full HD Video. This is especially helpful in laptops with slow processors to extend battery life, while the onboard ATI/nVidia graphic chip are powerful enough to decode Full HD video with ease.

nVidia has to be commented for it's collaboration with the linux community & enabled hardware accelerated HD video playback with their integrated graphic chip or discrete graphic card. This is done through VDPAU & can be enabled by installing vdpau plugin for mplayer.

ATI however, has only recently enabled hardware accelerated playback via VAAPI support. And implementation in Ubuntu 10.10 Maverick still requires some tinkering with libraries and etc.

Here is how to enable VAAPI in XBMC media player for ATI graphic card/chips in Ubuntu 10.10.

ATI proprietary driver flgrx must be installed & activated via 'Additional Hardware drivers' under System tab in Ubuntu 10.10

Obtain latest libva files from

http://www.splitted-desktop.com/~gbeauchesne/libva/pkgs/i386/

libva1_0.31.1-1+sds4_i386.deb
libva1-dbg_0.31.1-1+sds4_i386.deb
libva1-dev_0.31.1-1+sds4_i386.deb

sudo dpkg -i *.deb

Add xbmc development ppa from

sudo add-apt-repository ppa:team-xbmc-svn/ppa lucid

(lucid is used here because the corresponding maverick xbmc ppa is not ready)

sudo apt-get update
sudo apt-get build-essential
sudo apt-get build-dep xbmc

sudo apt-get install -f
svn co https://xbmc.svn.sourceforge.net/svnroot/xbmc/trunk/ xbmc
cd xbmc
./bootstrap
./configure
make
sudo make install

sudo mv /usr/bin/xbmc /usr/bin/xbmc.bak
sudo mv /usr/bin/xbmc-standalone /usr/bin/xbmc-standalone.bak
sudo ln -s /usr/local/bin/xbmc /usr/bin/xbmc
sudo ln -s /usr/local/bin/xbmc-standalone /usr/bin/xbmc-standalone
sudo reboot


Now when you reboot xbmc should have VAAPI option under video playback.

On my AMD test rig running a PhenomII X2 555 unlocked to quad core 3.2GHz with integrated ATI 4250 graphic chip onboard, a snippet of 1080P Avatar was playback at 40~60% cpu utilisation without hardware acceleration in VLC & MPlayer. Cpu utilisation drops all the way below 20% when the same video clip was playback with Vaapi enabled XMBC.

( implementation of vaapi in mplayer & vlc to be further explored ... )

1 Comments:

Blogger Fabito said...

How do I install a XBMC patch for VAAPI. THere's a bug but I don't know to compile. Tks in advance. Fabio

5:01 PM  

Post a Comment

<< Home