How to script the recording of your favourite online radio show

I had a problem: I wanted to record my friend’s online radio show – it happened at a time when I wasn’t around to listen, but I was actually, genuinely interested in listening, and the station didn’t have any kind of podcast, or “listen again” system.

Linux/Ubuntu actually has a pretty nice gui called Streamtuner for recording online radio, however I didn’t want to have to leave my desktop computer on all the time – I wanted to leave a script running on a cronjob on a server somewhere.

It turns out that Streamtuner’s backend is a nice little CLI tool called Streamripper which proved to do everything I wanted.

It was pretty simple:

#!/bin/bash

#Make a nice file name
prefix=Awesome.radio.show
suffix=$(date +%e.%m.%Y) # date in UK time format
filename=$prefix.$suffix

#Record that Radio!
streamripper http://example.com/awesomefm.mp3 -u VLC -a $filename.mp3 -l 7400 -d /folder/to/store/recording/in/ --quiet

To explain the above slightly, streamripper tries to give the output files well documented, yet quite complex filenames – I just wanted “show.date.extension” which is what the above does.

To explain the arguments, the “-u VLC” bit makes the program identify as “VLC” rather than “streamripper” to the server, just in case some snoopy server admins get upset about it being recorded. The “-l 7400″ argument specifies how long to record for – in this case (just over), two hours – specified in seconds.

After making my script executable, I simply put
59 15 * * 4 user /path/to/the/script.sh
in my crontab

Since the clock on which a radio schedule runs on, generally tends to be a bit flexible (and missing the first 30 seconds of the show being annoying!) I set it to record at 15:59 on Thursday. [Crontab syntax is well documented – go and look it up. :)]

And that was it! Now, whenever I want to listen to my friend’s radio show, I don’t need to make sure I’ve actually tuned in, just look in a folder on my server and have groove out!

Stephen Fry at Oggcamp? Awesome or Awesome?

It’s not often I go to events were well known people are speaking. It’s even less frequently where the tech events I go to have well known broadcaster speaking.

However, Oggcamp – the world’s friendliest unconference – is a special sort of event and persuading Stephen Fry to give a video address, answering questions and his relationship with technology went down very well indeed!

Some memorable quotes:

Do I use Linux on any of my devices? Yes – I use Ubuntu these days – it seems the friendliest.

Sometimes I do worry that they [Apple] are a bit tyrannical and a bit silly.

Facebook is really just AOL but brushed up for the modern user generated content world.

It’s really quite watchable:

Stephen Fry – OggCamp 12 Interview

#UnitySucks. Sorry buddy, it just ain’t working out.

*brrring* *brrring*. Today I got a call. It’s my dad.

“Hi Tim, I just had an update box pop up on our Ubuntu computer so I updated like you told me and it’s all changed. WTF?

My parents have a Lenovo Thinkcentre with Ubuntu on it. It runs very nicely and has worked really well over the last few years. They’re very comfortable with it now, running updates, using thunderbird, etc. I’ve got them over all the hurdles that typically some face moving End Users to new environments.

Then: Unity. At first I’ve not really cared. I mean, if people want to bicker about window managers, random companies, communities etc, that’s fine. They can do it, I probably won’t pay much attention.

Thinking about it, my parents were originally moved to Gnome when KDE4 turned out to be a faily version of KDE3, back in the day.

Now someone really needs to grow some balls, admit enough is enough and stop the user interface rampage. Well, I say someone needs to; Ubuntu can do what they want with their user experience as far as I’m concerned; I can’t support end users on constantly changing desktop environments like this. No, the LTS Edition is not an option. I want out, for me, and my users.

I’ve enjoyed the efforts of the Ubuntu project since 2007, it’s early marketing efforts I felt were innovative, clever, and clearly very successful. I’ve been rubbed the wrong way one too many time by what I perceive as arrogance and unfortunately, I think this is the final straw. I’m not bitter, the community is full of great people and great developers, but I don’t think I can keep on recommending it.

I love the Debian project, the community (Mao FTW), the support, the stability, the security. On servers, I’ve always recommended Debian over Ubuntu every day of the week.

I’ve not touched Debian desktops since the days of Etch, possibly Sarge, and I think it’s time to find out about migrating to Debian Squeeze desktops.

So long buddy, and bon voyage.