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.
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
Open it with your favourite editor. This is my config:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28
Now we need to setup NFS. First on the fileserver edit
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
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.
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
$ rm -rf ~/.xbmc/userdata/Thumbnails $ ln -s /media/filestore/Thumbnails ~/.xbmc/userdata/Thumbnails
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.
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?