XBMC Community Forum
[LINUX] HOW-TO use VAAPI HW Acceleration on AMD Zacate (Fusion) platform - Printable Version

+- XBMC Community Forum (http://forum.xbmc.org)
+-- Forum: Help and Support (/forumdisplay.php?fid=33)
+--- Forum: XBMC General Help and Support (/forumdisplay.php?fid=111)
+---- Forum: Linux and Live support (/forumdisplay.php?fid=52)
+---- Thread: [LINUX] HOW-TO use VAAPI HW Acceleration on AMD Zacate (Fusion) platform (/showthread.php?tid=99154)



- ErikB - 2011-09-06 09:42

FernetMenta Wrote:The "big pixels" are probably because killa-sample and other videos showing this are encoded with h.264 level > 4.1. The xvba backend driver reduces the number of references needed by h.264 in this case. There might be a better way of dealing with level > 4.1. vdpau does not support level > 4.1 either but plays killa-sample fine.

Sure, with VDPAU it looks good, but my hardware can only bring me up to around 12 fps... (Asrock E350M1 (Fusion) )

Crossing my thumbs that this will be fixed further ahead, but for most movies current support is great!


- hipp0 - 2011-09-06 10:09

Thanks spocky184 will try this. I think the key is to add these lines and the 11.8 drivers.

I think I had some Problems with the xorg.conf and the refresh rate. @spocky184 could please write me an PM with your xorg.conf? Or perhaps a screenshot of the ati control center. Could perhaps help me. In xbmc, are you using the "Adjust display refresh rate to match video " option?
Quote:Controll if you have also these two sections in /etc/X11/xorg.conf:
Code:

Section "Extensions"
Option "Composite" "Disable"
EndSection

Section "ServerFlags"
Option "AIGLX" "off"
EndSection

I build the mainline yesterday with the patches from FernetMenta, it also works quite well. The "big pixels" I also noticed in some videos.

Seems everything is getting well :-)


- abudabi - 2011-09-06 11:44

@ErikB

I too have the "big pixel" affect on some 1080p and it's definately related to the level that FernetMenta mentioned. My ramblings here documents my findings


- ErikB - 2011-09-06 19:10

So, today I'm thinking about doing the same process but with ubuntu server instead of ubuntu desktop. Will I succeed?

Why, you ask?
Because when performing installation like i mentioned before - I run too low on disk space. I have a 16GB USB stick, which was partitioned to leave 3GB for linux-swap etc, and in the end i have less than 1GB free when everything is installed. not enough, sadly.

So, any advice not-to do it before I start?


- Balinus - 2011-09-06 19:43

ErikB, I'm surprised that you only have 1GB left after your installation. 16GB should be more than plenty for Ubuntu desktop version.

Side question : Is there a lot of files that are encoded in "H.264 content over HP@L4.1" ?


- spocky184 - 2011-09-06 23:11

@hipp0
hipp0 Wrote:In xbmc, are you using the "Adjust display refresh rate to match video " option?
No, but that seems to help if you have stuttering playback while playing mkvs.

Greetings
spocky184


- ErikB - 2011-09-06 23:50

ErikB Wrote:So, today I'm thinking about doing the same process but with ubuntu server instead of ubuntu desktop. Will I succeed?

Why, you ask?
Because when performing installation like i mentioned before - I run too low on disk space. I have a 16GB USB stick, which was partitioned to leave 3GB for linux-swap etc, and in the end i have less than 1GB free when everything is installed. not enough, sadly.

So, any advice not-to do it before I start?

Actually I got it to work even in the ubuntu server!
Just basically the same procedure as before, only using a minimal amd64 install!

Code:
(first - minimal install of ubuntu server 64bit)

sudo apt-get update
sudo apt-get upgrade
sudo apt-get install wget dh-modaliases ia32-libs
apt-get install dkms
apt-get install xorg

cd ~; mkdir catalyst11.8; cd catalyst11.8
wget http://www2.ati.com/drivers/linux/ati-driver-installer-11-8-x86.x86_64.run
chmod +x ati-driver-installer-11-8-x86.x86_64.run
sudo sh ./ati-driver-installer-11-8-x86.x86_64.run --buildpkg Ubuntu/natty


sudo dpkg -i fglrx*.deb


sudo aticonfig --initial -f
sudo aticonfig --input=/etc/X11/xorg.conf --tls=1
reboot


sudo apt-get install -y libkms1 libdrm-dev pkg-config vainfo

cd ~
mkdir vaapi; cd vaapi
wget http://www.splitted-desktop.com/~gbeauchesne/xvba-video/xvba-video_0.8.0-1_amd64.deb
sudo dpkg -i xvba-video_0.8.0-1_amd64.deb

cd /usr/lib/dri; sudo ln -s /usr/lib/va/drivers/fglrx_drv_video.so fglrx_drv_video.so

sudo nano /etc/environment
insert:
LIBVA_DRIVER_NAME=xvba
LIBVA_DRIVERS_PATH=/usr/lib/va/drivers

sudo reboot


sudo apt-get install python-software-properties
sudo add-apt-repository ppa:lars-opdenkamp/xbmc-pvr
sudo apt-get -y update
sudo apt-get install xbmc

sudo adduser xbmc video
sudo adduser xbmc audio

reboot

xinit xbmc

Now I just need help how to get the server to automatically run "startx" upon boot. Right now I need to ssh into the server and run startx to run.
How can I get it to run that by it self?

When I boot the server, the monitor connected to the server only shows a blinking "_" in the top left corner - until I ssh to it and run startx.

Thanks


- spocky184 - 2011-09-07 00:04

maybe try this:
Code:
echo 'case "`tty`" in' >> ~/.bash_profile
echo '   /dev/tty1) clear && startx &>/dev/null;;' >> ~/.bash_profile
echo 'esac' >> ~/.bash_profile

and if you also want to start xbmc automatically:
Code:
echo 'exec xbmc --standalone' > ~/.xsession

only tested on ubuntu alternate not on server installation.

hope that helps
cheerz spocky184


- ErikB - 2011-09-07 09:30

spocky184 Wrote:maybe try this:
Code:
echo 'case "`tty`" in' >> ~/.bash_profile
echo '   /dev/tty1) clear && startx &>/dev/null;;' >> ~/.bash_profile
echo 'esac' >> ~/.bash_profile

and if you also want to start xbmc automatically:
Code:
echo 'exec xbmc --standalone' > ~/.xsession

only tested on ubuntu alternate not on server installation.

hope that helps
cheerz spocky184

Thank you, but I don't really succeed..
What happens is that the server boots, quickly splashes the "ubnutu 11.04" loading background, goes to black with a _ in top left corner for a few seconds and then goes all black. Seems like it started startx, but does not start xbmc or any console there, just goes black.

If I dont add contents to .bash_profile screen stays in blinking "_" - mode.

BUT! I've found another solution.
I can boot the server, with no .bash_profile, and then connect with ssh, and then run "startx&".
The & makes it run in the background and then I can logout from ssh and xbmc keeps playing on my server. Nice.
Only drawback is that whenever I reboot I need to ssh to start xbmc.

Strange, should be able to automatize something like that.


- ErikB - 2011-09-07 09:47

ErikB Wrote:Strange, should be able to automatize something like that.

Actually, you can. By doing this!
create a file, for instance xbmcstarter, and put it in /etc/init.d

Content:
Code:
#!/bin/sh
startx

And finally run chmod +x xbmcstarter


When starting the server like this, xbmc starts after bootup.. but when starting a movie xbmc instantly restarts, for some reason.
Guess there is some difference between starting from /etc/init.d and from ssh...

EDIT: Maybe it has to do with the fact that startx is run as root instead of as xbmc - and root doesnt have video or audio privileges.. Will try adding root tho those groups tonight. (or maybe the other way around or something else login-related)