xbmc, ubuntu & vaapi
I've never liked ATI graphics cards and always been an nVidia fan due to linux support (from many years ago). However, i've been putting together a media centre machine which i'd like to run xbmc primarily, plus a bit of skype and firefox on the tele when needed (i've always had an ubuntu at my tv, and have come to rely on how convenient it really is - everyone should have an ubuntu on their tele!).
Anyways, i bought an hp microserver which is totally brilliant and dirt cheap, tore out the disk, installed ubuntu to an internal usb stick, and (like an idiot) stuck an ATI 5450 (which was really my only option due to availability and it being a low profile card) into the thing. Installed the ATI drivers from restricted sources, seemed to be working fine, had some sort of ATI control panel app which convinced me it was working. Grabbed xbmc from the team-xbmc ppa and discovered that the darn build does not include vaapi support (required for ATI hardware acceleration). This meant that 1080p decode was jerky and unusable. vdpau support comes for free, which means that nVidia cards should be a-ok, but poo for ATI people.......
So, lets build xbmc with vaapi support, here are my steps on a clean installation on natty narwhal (11.04):
// grab xbmc sources (takes ages)
# git clone git://github.com/xbmc/xbmc.git xbmc
// as per xbmc build instructions (xbmc/README.ubuntu):
// distribution dependencies
# sudo apt-get install git-core make g++ gcc gawk pmount libtool nasm yasm automake cmake gperf zip unz
ip bison libsdl-dev libsdl-image1.2-dev libsdl-gfx1.2-dev libsdl-mixer1.2-dev libfribidi-dev liblzo2-dev l
ibfreetype6-dev libsqlite3-dev libogg-dev libasound-dev python-sqlite libglew-dev libcurl3 libcurl4-gnutls
-dev libxrandr-dev libxrender-dev libmad0-dev libogg-dev libvorbisenc2 libsmbclient-dev libmysqlclient-dev
libpcre3-dev libdbus-1-dev libhal-dev libhal-storage-dev libjasper-dev libfontconfig-dev libbz2-dev libbo
ost-dev libenca-dev libxt-dev libxmu-dev libpng-dev libjpeg-dev libpulse-dev mesa-utils libcdio-dev libsam
plerate-dev libmpeg3-dev libflac-dev libiso9660-dev libass-dev libssl-dev fp-compiler gdc libmpeg2-4-dev l
ibmicrohttpd-dev libmodplug-dev libssh-dev gettext cvs python-dev libyajl-dev libboost-thread-dev
// adding team-xbmc's unstable dependencies (unstable means development version)
# sudo add-apt-repository ppa:team-xbmc/unstable
# sudo apt-get update
// pulls the build deps for xbmc
# sudo apt-get build-dep xbmc
// ccache for quicker re-compiling
# sudo apt-get install ccache
// compile (according to xbmc/README.linux)
# ./bootstrap // seems to cleanup / configure contained deps
# ./configure --enable-vaapi
# make -j2
// run xbmc!
# ./xbmc.bin
And voila, xbmc compiled with vaapi support BUT if you watch your logs we still don't get vaapi decode... we need newest version of libva!
// grab latest libva and and xvba
# wget http://www.splitted-desktop.com/~gbeauchesne/libva/pkgs/i386/libva1_0.32.0-1+sds2_i386.deb
# wget http://www.splitted-desktop.com/~gbeauchesne/xvba-video/xvba-video_0.8.0-1_i386.deb
// attempt to install 'em
# sudo dpkg -i libva1_0.32.0-1+sds2_i386.deb
// if you get errors about attempting to overwrite, just apt-get remove them (generally means old libva is still around)
# sudo dpkg -i xvba-video_0.8.0-1_i386.deb
// check your vainfo is looking good (must be on terminal inside x)
# vainfo
Retry your xbmc and yebo yes you'll get hardware decode and teeny weeny cpu usage!
update 2011-09-11 (work in progress)! did ubuntu upgrade and had to reinstall libva from splitted desktop again. no big deal. also got latest from xbmc git repo and decided to rebuild, couple things i needed to do:
// couple fixes for new xbmc version?
# apt-get install libplist-dev (assume new xbmc dep required)
# apt-get install libva-dev (update had wiped it?)
// fetch and rebuild xbmc latest
# make distclean
# git reset --hard
# git clean -xfd
# git pull --rebase
# ./bootstrap
# ./configure --enable-vaapi
# make -j2
nice!
