Acer Revo HTPC Running XBMC
Benefits to MySQL Backend Setup
I have two XBMC machines, each sharing the same library. This is possible due to the recent changes in XBMC which allow you to use a MySQL backend for your library. This allows me to do some really cool things like stop a show and start where I left off in another room, or another day. It also keeps track of what shows you have watched and which you haven’t, synced between all of your HTPC’s.
You will need
- Acer Revo AR3610-E9032
- Toshiba 40RV525R 40” LCD TV 1080p
- Generic USB IR receiver
- Logitech Harmony Remote
- Ubuntu 9.10 Karmic
- XBMC Software
- Fileserver machine running MySQL and NFS
Acer Revo AR3610-E9032 Specs
- Genuine Windows 7 Home Premium, 64 bit version
- Intel Atom 330 processor (1M Cache, 1.60 GHz, 533 MHz FSB)
- 160GB SATA hard drive, 5400RPM
- 2GB DDR2 SDRAM
- NVIDIA ION graphics solution
- Gigabit LAN, 802.11b/g/n WLAN
- USB wireless Keyboard and Mouse
What I did first
First off I installed Ubuntu on the Revo. I’m not going to go into detail with how to install Ubuntu, Google is your friend.
Then I installed the Nvidia VDPAU Ubuntu PPA and the XBMC Daily SVN build repositories
# add-apt-repository ppa:nvidia-vdpau
# add-apt-repository ppa:team-xbmc-svn
And installed the latest nvidia drivers and XBMC, and updated all packages
# aptitude update
# aptitude install nvidia-glx-195 xbmc
# aptitude upgrade
First things first. Reboot.
Now you have the latest nvidia drivers and the latest XBMC build. These both support VDPAU which is how you can play 1080p video without any stutters.
MySQL-based Library
Now the next part, we are going to set XBMC up to connect to the MySQL server on my main media server.
First, run XBMC and immediately close it again. This just creates the default profile stuff in your user dir.
Then setup MySQL and create a DB and a user who can access that DB. Again this part is better left to another walkthrough (or Google). There is no reason to populate the DB, or create any schema. XBMC will create it automatically.
Next thing you will need to do is edit ~/.xbmc/userdata/advancedsettings.xml
Open it with your favourite editor. This is my config:
<advancedsettings>
<video>
<smallstepbackseconds>4</smallstepbackseconds>
<smallstepbacktries>3</smallstepbacktries>
<smallstepbackdelay>300</smallstepbackdelay>
<usetimeseeking>true</usetimeseeking>
<timeseekforward>26</timeseekforward>
<timeseekbackward>-15</timeseekbackward>
<timeseekforwardbig>570</timeseekforwardbig>
<timeseekbackwardbig>-300</timeseekbackwardbig>
</video>
<videodatabase>
<type>mysql</type>
<host>fileserver.hostname</host>
<port>3306</port>
<user>user</user>
<pass>pass</pass>
<name>xbmc_video</name>
</videodatabase>
<musicdatabase>
<type>mysql</type>
<host>fileserver.hostname</host>
<port>3306</port>
<user>user</user>
<pass>pass</pass>
<name>xbmc_music</name>
</musicdatabase>
</advancedsettings>
NFS Sharing
Now we need to setup NFS. First on the fileserver edit /etc/exports
/media/filestore 192.168.2.1/24(rw,sync,anonuid=1000,anongid=1000,all_squash)
All of my files are stored in /media/filestore, edit to match where you have your files stored on the local machine.
Then I edit /etc/fstab
on the HTPC that is going to use the NFS share
server.host:/media/filestore /media/filestore nfs rsize=8192,wsize=8192,intr,timeo=14
The important note here is that I am mounting /media/filestore from the file storage machine to the exact same directory name. This way XBMC’s library will look for the same files in the exact same place.
Thumbnails
One additional thing I needed to handle was thumbnails. I created a directory inside my filestore called “Thumbnails” and then on each XBMC machine I symbolically linked ~/.xbmc/userdata/Thumbnails
to /media/filestore/Thumbnails
.
$ rm -rf ~/.xbmc/userdata/Thumbnails
$ ln -s /media/filestore/Thumbnails ~/.xbmc/userdata/Thumbnails
XBMC Settings
Now the rest is pretty simple. Load XBMC and add your shows, movies and music to your library. Go to the other XBMC machine and it should automatically see the same media (you may have to go in and out of the menu).
You will also want to check the video settings inside XBMC. Ensure VDPAU is enabled.
Have Fun!
Start a video, and then stop it a few minutes in. Go to the other machine, try to play the same video.
You will notice it will prompt you to start the video where the other one left off. Pretty cool eh?
Comments