Icecast Scripts

by Jamie Zawinski

Here's how we do our streaming audio webcasts:

Here are the shell scripts that make all that work. Please let me know if you find this useful, or make any improvements...

ice-downcoder.pl This is the script that listens to one icecast stream, and then rebroadcasts it as another, after changing the bitrate. It uses LAME to decode and then re-encode the MP3 data.

This is also the script that reads from the local sound card, converts it to an on-the-fly MP3 stream, and feeds that to an Icecast server.

shout-archive.pl When the club is open we broadcast live audio; but when the club is closed, we used to re-broadcast audio from our archive of past live performances. We don't do that any more, but this is the script that did it. This script rolls through the directory of archived MP3 files and feeds them to the icecast server one after another, from oldest to newest. When it runs out, it wraps around and does it again.
shout-randomly.pl Loops, feeding a directory tree of MP3s to an Icecast server, randomized. This is how "DNA Lounge Radio" works.
write-metadata.pl This is a handy little script for updating the metadata (streaming titles) in an existing Icecast stream.