Wednesday, September 20, 2006

The media center adventure...

I'm suspending work on mysql-ha until friday, because I need to get some progress on the media center demo machine.

So far, I've tried freevo (great if you want to build a 'black box' machine) and improvements on regular software (like the xmms cdcover plugin).

As usual, my test system is a FC5 box with no tv tuner now, but hopefully a linux-supported pinnacle
board will be on next week.

In order to get freevo running on FC5 you need to:

Configure the repositories

freevo.repo:

[freevo]
name=Freevo RPM Repository for Fedora Core
baseurl=http://freevo.sf.net/fedora/$releasever
gpgkey=http://freevo.sourceforge.net/fedora/tcwan_freevo_key.asc
enabled=1
gpgcheck=0

dries and/or (I'm not sure yet!) freshrpms for dependencies:

[dries]
name=RPMForge: Dries
mirrorlist=http://apt.sw.be/dries/fedora/fc$releasever/mirrors-rpmforge
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY.dries.txt
gpgcheck=0
enabled=1

[freshrpms]
name=RPMForge: Freshrpms
baseurl=http://ayo.freshrpms.net/fedora/linux/$releasever/$basearch/freshrpms/
mirrorlist=http://ayo.freshrpms.net/fedora/linux/$releasever/mirrors-freshrpms
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-freshrpms
gpgcheck=0
enabled=1

Get freevo

At this point, yum install freevo will work, but it won't get some of the dependencies. To be fair, it
will get anything you need to actually run the thing, but, for instance, if you don't have mplayer or xine, it won't be installed.

Running freevo


For the first time, you need to run freevo setup. This will create a ~/.freevo/freevo.conf file, which you
shouldn't mess around with since it's automatically generated. Instead, if you want to alters freevo's behaviour, you should write a ~/.freevo/local_conf.py file. In fact, you need this file before you can run freevo, with at least a line containing CONFIG_VERSION = 5.15

Now you're ready to run freevo, which can start as an X application, or can be started from a console session with the -fs option, which will start another X session and run freevo on it.

Things I've tried

The audio.coversearch plugin, which uses Amazon's web services (you'll need a developer account, and they're free) in order to fetch the cover of the CD you're currently playing. The downside is you need to press 'e' while listening to the CD to get a menu that will let you fetch the cd cover. I'm working on changing the default behaviour so that the cover is fetched automatically.

The headlines plugin, which I couldn't get to work with google news (other rss feeds worked OK so maybe I'm doing something wrong).

You'll probably need to manually specify the CD-ROM drive(s) by setting the ROM_DRIVES variable in the config file.

Here's my entry, as an example:
ROM_DRIVES = [ ('/media/cdrom', '/dev/hdc', 'CD') ]

If that doesn't look like a typical config setting, take into account that this is a py file after all, so freevo will be configured by running this file through the python interpreter (hence, the file contents must be valid python code).

So far I'm still messing around with it and I still have a lot of work to do, but I like the architecture very much. Python code is easily hackable (I had nice experiences with anaconda in the past) and everything here is written as a plugin, which you can enable/disable at will.

There's a wiki at the freevo site (freevo.sf.net) and it includes documentation on writing your own plugins.

More news on this tomorrow or friday.

Regards,

No comments: