Lately I have been a little obsessed with multimedia software. I have been trying out several different media center packages to see what each has to offer, and whats good/bad/ugly about each.
The most recent package I am trying out now is XBMC (xbox media center). I think this was originally developed for the 1st gen xbox console to turn it into a powerful media center. It has since been modified and adapted for multi platform (Linux, Win, OS X, Xbox etc). It has a lot to offer, but this write up is concerned mainly with getting it running on Gentoo, and not a review of the software itself.
The linux ports are geared toward ubuntu, but there is now an ebuild for gentoo, and (of course), the source is also readily available for anyone to check out and build on their own. One of the nice things about gentoo is its ability to track and emerge dependencies automatically, so I decided to give the ebuild a shot. Here's what I did (your system and experience may vary)
1. If you do not already have a portage overlay dir, you will need to create one. This is where you will store the ebuild file and patches for your system to use and keep separate from its "proper" portage dirs:
# mkdir -p /usr/local/overlay # make this dir as your primary overlay. You can place other packages here for testing.
# mkdir -p /usr/local/overlay/media-tv/xbmc/files # I chose to use media-tv, but you could use another approved component type.
2. Next, grab the latest ebuild file and patches. They are listed and available from the gentoo bugzilla page for the ebuild request (http://bugs.gentoo.org/198849).
# wget -O /usr/local/overlay/media-tv/xbmc/xbmc-8.10-r4.ebuild http://bugs.gentoo.org/attachment.cgi?id=176341
# wget -O /usr/local/overlay/media-tv/xbmc/files/xbmc.readsector.patch http://bugs.gentoo.org/attachment.cgi?id=176344
3. Make sure you have the PORTDIR_OVERLAY environment variable set in your make.conf:
# echo 'PORTDIR_OVERLAY="/usr/local/overlay"' >> /etc/make.conf
4. Next, update your ebuild manifest:
# ebuild /usr/local/overlay/media-tv/xbmc/xbmc-8.10-r4.ebuild digest
>>> Downloading 'http://ufpr.dl.sourceforge.net/sourceforge/xbmc/XBMC-8.10.src.tar.gz'
--2008-12-26 20:51:00-- http://ufpr.dl.sourceforge.net/sourceforge/xbmc/XBMC-8.10.src.tar.gz
Resolving ufpr.dl.sourceforge.net... 200.17.202.1, 200.236.31.1
Connecting to ufpr.dl.sourceforge.net|200.17.202.1|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 121992403 (116M) [application/x-gzip]
Saving to: `/usr/portage/distfiles/XBMC-8.10.src.tar.gz'
100%[==================================================================>] 121,992,403 710K/s in 2m 51s
2008-12-26 20:53:53 (697 KB/s) - `/usr/portage/distfiles/XBMC-8.10.src.tar.gz' saved [121992403/121992403]
>>> Creating Manifest for /usr/local/overlay/media-tv/xbmc
5. Next, add xbmc to package.keywords, since gentoo will see it as a masked package:
# echo "media-tv/xbmc **" >> /etc/portage/package.keywords
6. Finally, emerge xbmc
# emerge -av xbmc
My system emerged 15 packages total, and everything compiled just fine. I now have a working xbmc install on my Gentoo machine, and am poking at all the features and stuff now. So far it looks pretty slick!
Friday, December 26, 2008
Monday, December 1, 2008
Tversity for PS3 running in VirtualBox

My PS3 is now a big part of my media for my living room. It functions as my DVD player (Blu-Ray too of course), games, all sorts of video files, pics, audio, card reader etc. I was looking for a way to stream more of my content from my computer to the PS3, and there are lots of options out there, but I settled on TVersity. Its free for one, has a nice UI, is capable of streaming tons of content (youtube, hulu, CNN etc), capable of playback of tons of filetypes, and actually does encoding on the fly if needed. It also got great reviews so I decided to go with that.
One little catch though is that TVersity is Windows only right now. They mention something about porting it to linux in the future, but its not available yet. Since I only run Gentoo on my box, I tried to get it running in Wine, to no avail. So, I decided to install VirtualBox and then install Windows inside this instance and get it running there. Virtualbox is awesome, and installed perfectly, and I installed windows inside it as the guest OS. I ran into a few issues configuring it later, such as by default VirtualBox runs behind NAT, using the host interface for network, which is actually quite nice for being able to access the internet from within the instance, but sucks because its invisible to you LAN.
I then needed to setup an ethernet bridge so that my host and guest could both use the same interface, yet have individual ip's on my LAN, which would make my guest WinXP instance able to serve TVersity to my PS3 over my local network. I ran into a few more issues along the way (my linux kernel didnt have support compiled in for ethernet bridging etc). I grabbed a new kernel source (gentoo-sources; 2.6.26-r3) and compiled in support for bridging. Worked like a charm. After I got this working, I wrote a small bash script to create a bridge that allows both the host and guest os's to share the same device for network:
vbox_setup.sh:I can now see both my host Gentoo install and my guest WinXP install as individual nodes on my local network.
#!/bin/bash
# Script to setup ethernet bridge for virtualbox guest os to share with
# primary eth0 device. By default, virtualbox guest os uses NAT behind its
# host's ip. This sets up an ethernet bridge that allows both the host and
# the guest os to share the same ethernet device on separate ips. Both host
# and guest will have individual ip's visible on the LAN.
# Script based on instructions found at: http://www.scottro.net/vboxbridge.html
# Author: Noah Maxwell (noah.maxwell@gmail.com)
echo "Adding br0..."
brctl addbr br0
sleep 2
echo "Bringing down eth0 interface..."
ifconfig eth0 0.0.0.0
sleep 2
echo "Adding br0 to eth0..."
brctl addif br0 eth0
sleep 2
echo "Assigned new ip to br0..."
dhcpcd br0
echo "Adding user: nmaxwell"
VBoxTunctl -b -u nmaxwell
ifconfig tap0 up
echo "Adding br0 to tap0..."
brctl addif br0 tap0
echo "Done!"
Next I setup a samba share for my video and audio directories on my Gentoo box, so that my WinXP instance could access that content, and finally stream it to my PS3. I finally got it working tonight, and it is awesome!
For avi files, it needs to transcode them on the fly, so the startup time takes a couple seconds, so I just pause it for 10-15 seconds before playing the content back and it plays flawlessly. Mp3's play perfectly too. Another cool thing about TVeristy is that it automatically updates its library every 24 hours automatically (or you can force a sync at anytime), so that I can add/remove or edit any content on the shared directories and TVersity keeps the library updated. This works well for me since I do all my video processing/encoding and stuff on my linux box.
This is the short story anyway, and it probably took me about 8 hours total to get all of this setup and working correctly, but it was fun and challenging. And yes, I am still hoping for a linux client for TVersity at some point, which will just mean my setup will be more efficient, but it was a good excuse to play with VirtualBox, and now I have a full WinXP instance I can launch from within Gentoo as well, so I no longer need to dual boot to use any windows apps.
Subscribe to:
Posts (Atom)
