A simple Icecast2 client…

While experimenting with Icecast2, I tried out the icesclient. It very nicely handles either live or precompressed streams, and can provide audio encoded reencoded at lower bit rates. But this seemed to be overkill to me: I already had a number of streams encoded at the rate that I wanted. Not only was it wasteful to decode and reencode them, but it resulted in lower quality audio for the listener.


Luckily, the icecast guys provide libshout2, a library for talking to both Shoutcast and Icecast servers. In a few minutes I coded up the relatively simple program shout-mp3.c. It is barely extended from the example that is in the libshout documentation, and merely accepts a bunch of files as command line arguments, and loops them repeatedly. The advantage is that this client takes virtually no CPU time: well under 1% of my old 400 Mhz Celeron box. Much nicer.

I’ve now switched my brainwagon radio feed to spew 12 episodes of the old Buck Rogers radio serial: a show carefully designed to sell Popsicles to the youth of the 50s. Enjoy.