Friday, 10 March 2006

Meet the New Boss

Our old boss is leaving the company in disgrace. Normally disgrace involves immediate absence, however we like to drag out the agony as long as contractually possible. The same seems to be happening with one of our sales team who, post-resignation is still "selling" the company's wares. Oh well, ours not to reason why!

On the positive side, we have a new chap taking over with a wider remit. At the moment he is meeting with each member of the team to get an overview of the current state of affairs.

The meetings have varied in length from an hour or so to a day and a half. This would seem to indicate some variation in either the amount of issues each person has with the company or the faith each person has that their comments will not be used in evidence against them.

From my experience, I'm inclined to believe that no one starts a new job intending anything other than to make improvements. Of course, what is an improvement from the perspective of the company is not always an improvement for the employee.

Here's to interesting times! I'm positive about the future, but not self deluding enough to believe it will be easy.

Tuesday, 28 February 2006

Back on Line

Phew! My ISP upgraded to Rails 1.0, which knocked the version of Typo I've been using for six. I probably ought to put the correct version of Rails into the vendor folder to stop it happening again.

I decided to start using the Subversion release. I normally wouldn't trust code that's non-release, but since Typo seems to be written test first, I have a lot more confidence in it's ability to stay unbroken by new code.

Anyway, after some struggle converting my old data into the new format - including trouble installing MySQL Server 4, I'm up and running again.

Friday, 13 January 2006

Myth2iPod

Found a nice little project called Myth2iPod that transcodes MythTV .nuv files to iPod video and provides them as a subscribable podcast feed.

Unfortunately it relies on the xvid support in the latest version of ffmpeg (only available through CVS), that doesn't want to compile on my FC3 machine. Will post if and when I get it working.

Monday, 9 January 2006

Upgraded to Rails v1.0

Managed the upgrade to version 1 without any major hitches. Just two notable differences...

  • The AJAX stuff is fixed (which stopped us from upgrading to the last release).
  • ActiveRecord has slightly stricter constraints on creation of new objects with has_and_belongs_to_many relationships.

The ActiveRecord change means that you can't create a new object and it's join table based relationships without first saving the main object. If object has_and_belongs_to_many relations, then... object = Object.new object.relations << relation object.save needed changing to... object = Object.create object.relations << relation

It makes some sense, since the identity of object has not yet been created, but it's a bit of a shame that the ORM layer can't hide these issues from you.

Monday, 2 January 2006

Make your own Linux iTunes Server

Make your own Linux iTunes Server

This walkthrough is based on Fedora Core 3 which I'm running on my MythTV Server. If you find any innaccuracies, please let me know and I'll fix 'em.

Install daapd using APT

Make sure you have Dag's repository set up for apt (you might wish to set up a Yum repo instead as Yum is included by default with Fedora).

My repo file looks like this...

# cat /etc/apt/sources.list.d/dries.list
rpm http://apt.sw.be dries/fedora/fc3/i386 dries
rpm-src http://apt.sw.be dries/fedora/fc3/i386 dries

Make sure you are up to date then get the daapd package, the howl package (needed for mDNSRepsonder) and their depencencies...

# apt-get update
# apt-get dist-upgrade
# apt-get install daapd
# apt-get install howl

Configuration

Create a config file like this one

# cat /etc/daapd.conf
Port            3689
ServerName      MythMusic
DBName          daapd music
Password
Root            /av/audio
Cache           /var/spool/daapd/cache
Timescan        2
Rescan          0

Change /av/audio to the location of your music collection, and create the folder /var/spool/daapd/cache as root (if you don't do this, the files will be rescanned by the server each time you run daapd). If you want to secure your audio files, put a password in the obvious gap.

Start daapd as a Service

Create a file called /etc/rc.d/init.d/daapd with the following contents

# cat /etc/init.d/daapd
#!/bin/sh
#
# A startup script for the daapd DAAP server
#
# chkconfig: 345 98 2
# description: This script is used to start the daapd \
# server as a background process.\
#
# Usage /etc/init.d/daapd start|stop|reload|restart|status

# Source function library.
. /etc/rc.d/init.d/functions

DAAP_CONF=/etc/daapd.conf
DAAP_LOG=/var/log/daapd/access_log
prog=DAAP
exe=/usr/bin/daapd

start() {
        echo -n "Starting $prog: "
        if [ -f /var/lock/subsys/daapd ] ; then
                echo_failure
                echo
                exit 1;
        fi
        daemon $exe -c $DAAP_CONF >> $DAAP_LOG &
        RETVAL=$?
        [ $RETVAL = 0 ] && touch /var/lock/subsys/daapd && echo_success
        echo
        return $RETVAL
}

stop() {
        echo -n "Stopping $prog: "
        killproc $exe
        RETVAL=$?
        echo
        [ $RETVAL = 0 ] && rm -f /var/lock/subsys/daapd /var/run/daapd.pid
}

reload()
{
        echo -n $"Reloading $prog:"
        killproc $exe -HUP
        RETVAL=$?
        echo
}


case "$1" in
start)
        start
        ;;
stop)
        stop
        ;;
reload)
        reload
        ;;
restart)
        stop
        start
        ;;
status)
        status $exe
        RETVAL=$?
        ;;
*)
        echo "Usage: daapd {start|stop|reload|restart|status}"
        exit 1
esac

Create the log folder so that the service can write a log file.

# mkdir -p /var/log/daapd

Now you should be able to start daapd as a service...

# service daapd start
Starting DAAP:              [  OK  ]

It may be some time before you can access this service if you have a large collection, as it will not respond until it has indexed the files.

mDNSResponder Configuration

In order for iTunes to detect the new playlists, you need to setup mDNSResponder to broadcast the presence of the service. Add the following line to the end of the mDNSResponser config file.

# tail -1 /etc/howl/mDNSResponder.conf
MythMusic _daap._tcp.     local.  3689

Start mDNSResponder

# service mDNSResponder start
Starting mDNSResponder...   [  OK  ]

Any copies of iTunes residing on your local network should now have a shared music folder containing your entire music collection, including any playlists found in the same folder.

Merry Christmas

...and a happy new year to you all.

Penny gave me an 60GB iPod Video for Christmas, which I have been playing with constantly.

So far, I've got my main MythTV server running an iTunes server (DAAP), so that anyone using iTunes on my LAN can browse my MP3 collection. It was pretty easy using Dag's APT repo.

My next little project will be to get MythTV automatically converting certain TV programs to iPod compatible MP4 video files.

Saturday, 24 December 2005

DVB Freeview Tuner

Got an aerial guy to come and fit a decent wide-band aerial, which made all the difference. MythTV automatically scanned for and found loads of free TV channels - Woo!

Now I can do picture in picture as well as recording 2 channels at once or watching one channel while recording another.

It's not quite clear how it chooses which tuner to use and the <C> key doesn't switch between them as I expected it to.

It's still way cool though and the quality of the Freeview programs is substantially better. The tuner card just saves the demultiplexed M-PEG stream straight to the hard disk rather than re-encoding the video that's already been decoded by the NTL Cable box.

The only other problem so far is that I can't play back the Freeview video files on a PC using MythTV Filters. Guess I'll have to do a little codec research.