May 13, 2003

Radio and TV recording

Being an Aussie living in Holland, I tend to miss a lot of things about home. One of these things is good ol' Aussie FM radio and television, and the variety of shows and programming available. Fortunately, I have made a way around this problem. With my server hosted in Sydney, I can now listen to any FM radio station in Sydney, either live or recorded, and do the same with most TV stations too.

Read on for how...

The setup that I've got running allows me to do the following things:

  • Tune in to any FM or TV station (that my antenna receives!)
  • Record radio as mp3 or ogg files, at any bitrate.
  • Record television to most file formats (I use DivX;)
  • Schedule shows to be recorded regularly
  • Stream live to clients.

With these abilities, I can now enjoy a good dose of Aussie news, music shows, or anything else to help ease the homesickness. Setting it up has been fun and quite a challenge, a lot due to much of the software simply not being available at all. Fortunately the situation is now a lot better with the software having matured, and I've got access to all the right tools to do everything I need.


The hardware that I'm using is incredibly simple. I have a standard PC with a 500MHz processor and 128Mb RAM.

Two bt878 based tuner cards do most of the real work here, and they're cheap and available from just about any computer store. One of the cards is a standard PAL card with mono audio output. This is what I use for TV. The other card is a slightly better model which supports FM radio, with stereo audio outputs. As the video tuner on this card is NTSC, it's useless for television.

The tuner cards each have an antenna placed in the best reception spots I could find.
These two cards have their audio outputs fed into a standard PC sound card, one into the Line in, and the other I've put into the CD player audio input. Because of this and CPU limitations, I can only have one Tuner active at any time. If I really wanted to, I could put a 1GHz CPU in and a second sound card but I dont use it enough.


All of the software that I'm using is 100% free. Beer-free and speech free! This makes the cost of the system incredibly cheap and also very very flexible.

The OS on the server is a standard Linux distribution. Nothing special here. The standard kernel drivers automatically detect all of the hardware so I didnt need to do anything fiddly there.

The radio side uses rtune to tune the card into the particular station that I want. Audio is then picked up from the sound card, and icecast is used to stream the audio as Ogg Vorbis to clients. Very very simple! Recording radio for listening later is done simply by using wget to dump the stream from icecast. I then pick up the recordings via HTTP.

TV is a little more involved. To tune the stations, I use xawtv and its associated utilities (particularly v4lctl). Adjusting the fine tuning was probably the most fiddly bit! Having tuned into the station, I use mencoder which is in the Mplayer suite. This is a powerful and flexible video encoder, and I usually encode to 300Kbps DivX;-) streams for watching later on. The script which I use to encode also sets the sounds card recording source to the particular input for the TV tuner.

To watch live TV, I still have a somewhat experimental setup, using ffmpeg to encode and stream.

All of the above is controlled by a couple of scripts and some cron jobs which make light work of all of this. Of course, I still have to look at the TV guide to see what's on! However I am very happy with the setup that I have finally made. Eventually I might make a web page to control the scheduling, but for now a manually edited crontab and the occasional at-job is just perfect.

Posted by Ben at May 13, 2003 12:36 PM
Post a comment

Remember personal info?

Recent Entries
- Linux on an HP Compaq NC6400
- Sodium in water? Bah..try Caesium!
- I'm off to Lugradio
- Food for thought...
- Replacing ugly Helvetica fonts in Xorg
Support me...

Email me:
NL time:03:29
Book: Assassini (Thomas Gifford)
Amazon wish list
Search the web