2011-12-15, 17:47
XVBA has been deprecated and is not developed anymore.
AMD Gfx users should not use this howto anymore, instead follow http://forum.xbmc.org/showthread.php?tid=174854
Nvidia and Intel users should switch to mainline.
The information below is only kept for reference
Notice for xbmc-xvba-testing users:
FernetMenta bleeding edge development snapshots moved to ppa:wsnipex/xbmc-fernetmenta-master
------------------------------------- old post -------------------------------------
What is Xvba
X-Video Bitstream Acceleration is the AMD API for hardware accelerated video playback on Radeon and Fusion GPUs with UVD.
here is an article with some background information, if you are interested.
The development was started and organized by masterchief FernetMenta (H264, huge part of xbmc integration) and fritsch (VC1, bugfixes, (mpeg-2)).
Current Status
What you get on AMD:
- great improvements over VAAPI(xvba-va-driver) in stability, performance and robustness.
- H264, VC-1 decoding support including smooth 24p playback.
What does not yet work:
- mpeg2/4: not yet enabled in fglrx
- fglrx doesn't support HD audio(DTS HD/MA) yet
- H264 with Level >= 5.1 (artefacts, judder - fglrx driver limitation)
If you find garbage with non supported h264 levels or too many reframes(>4 @1080p), you can disable xvba for this file. You will need a fast CPU for this to work.
Fixed as of 06/28/12
General improvements:
- video renderer rewritten for improved performance and stability
- improved windowing: multi display support
What you need:
on AMD GPUs:
- fglrx binary driver(amd catalyst) >= 11.11 (>=fglrx 2:8.911) - 13.6 recommended - installed as debs (see step 2 below) on AMD (integrated) GPUs
on Nvidia GPUs:
- nvidia binary driver
on Intel (integrated) GPUs:
- intel open source driver, libva
GIT Source:
https://github.com/FernetMenta/xbmc/commits/master
Ubuntu Packages are available here:
Tested Git builds: https://launchpad.net/~wsnipex/+archive/xbmc-xvba not updated anymore
Frodo stable: https://launchpad.net/~wsnipex/+archive/xbmc-xvba-frodo
Unstable development snapshots: https://launchpad.net/~wsnipex/+archive/...ba-testing not updated anymore
---------------
Xbmc-Live Xvba: http://www.xbmcfreak.nl/en/exclusive-xbm...w-version/
edit 06/15/12: xbmcbuntu 12.04 with xvba: http://xbmcfreak.binkey.nl/xbmcbuntu-11....ing-v1.iso
Arch packages: http://aur.archlinux.org/packages.php?ID=55296
Gentoo ebuild: https://bugs.gentoo.org/show_bug.cgi?id=453012
please note, that those are not made and supported by us.
---------------
IRC:irc.freenode.net:7000 #xbmc-xvba
NOTE: Compositing window managers (e.g. compiz, gnome-shell) do not play well with XBMC
If you have issues, please first disable compiz. If you want unity you can try unity-2d.
You should also set vsync to always on in XBMC - system - settings - system - video output.
AMDs Tearfree option must be disabled as it causes problems.
fglrx cannot do DTS-HD and True-HD audio. You have to set the your speakers to 2.0 in order to get these formats correctly downmixed.
To workaround another bug, also enable LPCM for now if you use audio over HDMI.
assign 512MB RAM to your GFX card, if you have integrated GFX
Attention for AMD Trinity APUs(Ax5xxx): you need a newer kernel, so you must install ubuntu 12.10 quantal
Howto Install XBMC PVR Xvba for AMD GPUs from scratch
note this howto was originally written specifically for AMD Xvba. If you run nvidia or intel replace the drivers as appropriate.
edit: updated guide to ubuntu 12.04
edit 2012-08-10: very comprehensive guide by guilmxm: http://youresuchageek.blogspot.fr/2012/0...linux.html
edit 2012-09-30: install script for ubuntu 12.10 by Bram77: http://forum.xbmc.org/showthread.php?tid=141369
Step 1:
We will use an 64-bit 12.04 Ubuntu Precise minimal to start with the newest basic packages for your OS.
AMD trinity users must use ubuntu 12.10
Choose Command-line-install and use xbmc for username.
After reboot, install ssh so you can continue work with Putty (for win) or with the "ssh -l xbmc your.IP.address" from a linux terminal. We will install py-properties to easyly add the needed ppas and add the user (I have chosen xbmc as the username) to the video and audio group because without this the xserver can not access your gpu directly and falls back to software rasterizer.
Get a terminal with crtl+alt+f1, then
Step 2:
We need to install the AMD/ATI drivers
optional: disable underscan(black borders)
Choose which Xvba build to use, do only one step here
-------------------------------------
Step 3: Tested Git Builds
Alternative Step 3: Frodo stable
-------------------------------------
Step 4:
Auto Start Xbmc
edit /etc/lightdm/lightdm.conf
edit /usr/share/xsessions/XBMC.desktop
Step 5:
allow xbmc to change its nice level:
edit /etc/security/limits.conf
add following line at the end of the file. xbmc stands for your username, so adjust to fit if you chose something else
Step 6:
create the file /etc/polkit-1/localauthority/50-local.d/custom-actions.pkla
Step 7:
XBMC tweaks
Enable Dirty Region Rendering (drastically reduces CPU load on XBMC idle) and DDS Fanart
NOTE: do not do this as root or with sudo. this file must belong to your normal xbmc user
create: ~/.xbmc/userdata/advancedsettings.xml
Step 8:
reboot
Step 9:
Recommended Xbmc settings
System->Settings->System->Video Settings:
System ->Video->Playback:
----------------
Optional: workaround for suspend resume
since fglrx seems to have a bug with suspend/resume xbmc can have video playback problems after wakeup.
here is a workaround that will restart X automatically after resume. You should only use it if you have auto-login enabled.
add a new file /etc/pm/sleep.d/99_fglrx
make the file executeable:
----------------
Movie Scraping not working with TMDB?
Install the Youtube plugin in Xbmc, the tmdb scraper depends on it.
----------------
too high idle CPU load?
disable the RSS feed in System - Appearance - Skin
----------------
Get wireless LAN working:
http://forum.xbmc.org/showthread.php?tid=81858
----------------
sample /etc/asound.conf for fusion systems: Only relevant for Eden branch, Audio Engine does not use it.
choose Standards (Alsa) for your output and hw:0,3 as your passthrough device
Adjust if you want SPDIF.
----------------
auto mount external drives/usb sticks
create the file /etc/udev/rules.d/11-media-by-label-auto-mount.rules
click the link above
----------------
How to use the Xvba packages from Xbmcbuntu
remove currently installed xbmc version:
now follow step3 from above.
----------------
Manually upgrade fglrx:
This driver only supports AMD series >=5xxx cards. If you have <=4xxx series you must download the fglrx-legacy driver and replace the filename accordingly.
http://forum.xbmc.org/showthread.php?tid...pid1138272
Edit: update to best driver for precise:
http://forum.xbmc.org/showthread.php?tid...pid1212272
AMD Gfx users should not use this howto anymore, instead follow http://forum.xbmc.org/showthread.php?tid=174854
Nvidia and Intel users should switch to mainline.
The information below is only kept for reference
Notice for xbmc-xvba-testing users:
FernetMenta bleeding edge development snapshots moved to ppa:wsnipex/xbmc-fernetmenta-master
------------------------------------- old post -------------------------------------
What is Xvba
X-Video Bitstream Acceleration is the AMD API for hardware accelerated video playback on Radeon and Fusion GPUs with UVD.
here is an article with some background information, if you are interested.
The development was started and organized by masterchief FernetMenta (H264, huge part of xbmc integration) and fritsch (VC1, bugfixes, (mpeg-2)).
Current Status
What you get on AMD:
- great improvements over VAAPI(xvba-va-driver) in stability, performance and robustness.
- H264, VC-1 decoding support including smooth 24p playback.
What does not yet work:
- mpeg2/4: not yet enabled in fglrx
- fglrx doesn't support HD audio(DTS HD/MA) yet
- H264 with Level >= 5.1 (artefacts, judder - fglrx driver limitation)
If you find garbage with non supported h264 levels or too many reframes(>4 @1080p), you can disable xvba for this file. You will need a fast CPU for this to work.
Fixed as of 06/28/12
General improvements:
- video renderer rewritten for improved performance and stability
- improved windowing: multi display support
What you need:
on AMD GPUs:
- fglrx binary driver(amd catalyst) >= 11.11 (>=fglrx 2:8.911) - 13.6 recommended - installed as debs (see step 2 below) on AMD (integrated) GPUs
on Nvidia GPUs:
- nvidia binary driver
on Intel (integrated) GPUs:
- intel open source driver, libva
GIT Source:
https://github.com/FernetMenta/xbmc/commits/master
Ubuntu Packages are available here:
Tested Git builds: https://launchpad.net/~wsnipex/+archive/xbmc-xvba not updated anymore
Frodo stable: https://launchpad.net/~wsnipex/+archive/xbmc-xvba-frodo
Unstable development snapshots: https://launchpad.net/~wsnipex/+archive/...ba-testing not updated anymore
---------------
Xbmc-Live Xvba: http://www.xbmcfreak.nl/en/exclusive-xbm...w-version/
edit 06/15/12: xbmcbuntu 12.04 with xvba: http://xbmcfreak.binkey.nl/xbmcbuntu-11....ing-v1.iso
Arch packages: http://aur.archlinux.org/packages.php?ID=55296
Gentoo ebuild: https://bugs.gentoo.org/show_bug.cgi?id=453012
please note, that those are not made and supported by us.
---------------
IRC:irc.freenode.net:7000 #xbmc-xvba
NOTE: Compositing window managers (e.g. compiz, gnome-shell) do not play well with XBMC
If you have issues, please first disable compiz. If you want unity you can try unity-2d.
You should also set vsync to always on in XBMC - system - settings - system - video output.
AMDs Tearfree option must be disabled as it causes problems.
fglrx cannot do DTS-HD and True-HD audio. You have to set the your speakers to 2.0 in order to get these formats correctly downmixed.
To workaround another bug, also enable LPCM for now if you use audio over HDMI.
assign 512MB RAM to your GFX card, if you have integrated GFX
Attention for AMD Trinity APUs(Ax5xxx): you need a newer kernel, so you must install ubuntu 12.10 quantal
Howto Install XBMC PVR Xvba for AMD GPUs from scratch
note this howto was originally written specifically for AMD Xvba. If you run nvidia or intel replace the drivers as appropriate.
edit: updated guide to ubuntu 12.04
edit 2012-08-10: very comprehensive guide by guilmxm: http://youresuchageek.blogspot.fr/2012/0...linux.html
edit 2012-09-30: install script for ubuntu 12.10 by Bram77: http://forum.xbmc.org/showthread.php?tid=141369
Step 1:
We will use an 64-bit 12.04 Ubuntu Precise minimal to start with the newest basic packages for your OS.
AMD trinity users must use ubuntu 12.10
Choose Command-line-install and use xbmc for username.
After reboot, install ssh so you can continue work with Putty (for win) or with the "ssh -l xbmc your.IP.address" from a linux terminal. We will install py-properties to easyly add the needed ppas and add the user (I have chosen xbmc as the username) to the video and audio group because without this the xserver can not access your gpu directly and falls back to software rasterizer.
Get a terminal with crtl+alt+f1, then
Code:
sudo apt-get update
sudo apt-get install ssh python-software-properties software-properties-common udisks upower xorg alsa-utils mesa-utils git-core librtmp0 lirc libmad0 lightdm lightdm-gtk-greeter lm-sensors libmpeg2-4 avahi-daemon
sudo adduser xbmc video
sudo adduser xbmc audio
sudo reboot # not sure if this is needed
Step 2:
We need to install the AMD/ATI drivers
Code:
sudo apt-get install fglrx
sudo aticonfig --initial -f
sudo aticonfig --sync-vsync=on
sudo aticonfig --set-pcs-u32=MCIL,HWUVD_H264Level51Support,1
optional: disable underscan(black borders)
Code:
sudo aticonfig --set-pcs-val=MCIL,DigitalHDTVDefaultUnderscan,0
Choose which Xvba build to use, do only one step here
-------------------------------------
Step 3: Tested Git Builds
Code:
sudo add-apt-repository ppa:wsnipex/xbmc-xvba
sudo apt-get update
sudo apt-get install xbmc xbmc-bin
Alternative Step 3: Frodo stable
Code:
sudo add-apt-repository ppa:wsnipex/xbmc-xvba-frodo
sudo apt-get update
sudo apt-get install xbmc xbmc-bin
Step 4:
Auto Start Xbmc
edit /etc/lightdm/lightdm.conf
Code:
[SeatDefaults]
autologin-user=xbmc
autologin-user-timeout=0
user-session=XBMC
greeter-session=lightdm-gtk-greeter
edit /usr/share/xsessions/XBMC.desktop
Code:
[Desktop Entry]
Name=XBMC
Comment=This session will start XBMC Media Center
Exec=xbmc-standalone
TryExec=xbmc-standalone
Type=Application
Step 5:
allow xbmc to change its nice level:
edit /etc/security/limits.conf
add following line at the end of the file. xbmc stands for your username, so adjust to fit if you chose something else
Code:
xbmc - nice -1
Step 6:
create the file /etc/polkit-1/localauthority/50-local.d/custom-actions.pkla
Code:
[Actions for xbmc user]
Identity=unix-user:xbmc
Action=org.freedesktop.upower.*;org.freedesktop.consolekit.system.*;org.freedesktop.udisks.*
ResultAny=yes
ResultInactive=yes
ResultActive=yes
[Untrusted Upgrade]
Identity=unix-user:xbmc
Action=org.debian.apt.upgrade-packages;org.debian.apt.update-cache
ResultAny=yes
ResultInactive=yes
ResultActive=yes
Step 7:
XBMC tweaks
Enable Dirty Region Rendering (drastically reduces CPU load on XBMC idle) and DDS Fanart
NOTE: do not do this as root or with sudo. this file must belong to your normal xbmc user
create: ~/.xbmc/userdata/advancedsettings.xml
Code:
<advancedsettings>
<loglevel hide="false">0</loglevel>
<cputempcommand>sensors|sed -ne "s/temp1: \+[-+]\([0-9]\+\).*/\1 C/p"</cputempcommand>
<gputempcommand>/usr/bin/aticonfig --od-gettemperature | grep Temperature | cut -f 2 -d "-" | cut -f 1 -d "." | sed -e "s, ,," | sed 's/$/ C/'</gputempcommand>
<gui>
<algorithmdirtyregions>3</algorithmdirtyregions>
<nofliptimeout>0</nofliptimeout>
</gui>
<video>
<latency>
<delay>0</delay>
<refresh>
<min>23</min>
<max>24</max>
<delay>175</delay> <!-- set to zero or adjust if audio seems out of sync with 24p movies -->
</refresh>
</latency>
</video>
</advancedsettings>
Step 8:
reboot
Code:
sudo reboot
Step 9:
Recommended Xbmc settings
System->Settings->System->Video Settings:
- Vertical Sync: Always on
System ->Video->Playback:
- XVBA: On
- Adjust Refreshrate to match video: On
- Sync Playback to Display: On
- Sync Method: Video Clock (Drop/Dupe)
----------------
Optional: workaround for suspend resume
since fglrx seems to have a bug with suspend/resume xbmc can have video playback problems after wakeup.
here is a workaround that will restart X automatically after resume. You should only use it if you have auto-login enabled.
add a new file /etc/pm/sleep.d/99_fglrx
Code:
#!/bin/sh
case $1 in
suspend|suspend_hybrid|hibernate)
/usr/sbin/service lightdm stop
/sbin/rmmod -f fglrx
;;
resume|thaw)
/sbin/modprobe fglrx
/usr/sbin/service lightdm start
;;
esac
Code:
sudo chmod +x /etc/pm/sleep.d/99_fglrx
----------------
Movie Scraping not working with TMDB?
Install the Youtube plugin in Xbmc, the tmdb scraper depends on it.
----------------
too high idle CPU load?
disable the RSS feed in System - Appearance - Skin
----------------
Get wireless LAN working:
http://forum.xbmc.org/showthread.php?tid=81858
----------------
sample /etc/asound.conf for fusion systems: Only relevant for Eden branch, Audio Engine does not use it.
Code:
pcm.!default {
type plug
slave {
# pcm "hw:1,0" #delete the first hash for sound over analog
# pcm "hw:1,1" #delete the first hash for sound over optical
pcm "hw:0,3" #delete the first hash for sound over hdmi
rate 48000
}
}
Adjust if you want SPDIF.
----------------
auto mount external drives/usb sticks
Code:
sudo adduser xbmc users
create the file /etc/udev/rules.d/11-media-by-label-auto-mount.rules
click the link above
----------------
How to use the Xvba packages from Xbmcbuntu
remove currently installed xbmc version:
Code:
sudo apt-get remove xbmc xbmc-bin
now follow step3 from above.
----------------
Manually upgrade fglrx:
This driver only supports AMD series >=5xxx cards. If you have <=4xxx series you must download the fglrx-legacy driver and replace the filename accordingly.
http://forum.xbmc.org/showthread.php?tid...pid1138272
Edit: update to best driver for precise:
http://forum.xbmc.org/showthread.php?tid...pid1212272