LiveIce: 

Live Mp3 Streamer  For IceCast

About 
Setup and Installation
Using LiveIce
Mp3Mixer Mode

First Thing's First - Get The Source Code

Getting LiveIce -  you can get the source code either with the distributions of Icecast, it will be found in a subdirectory and needs to be compiled and installed seperately. Alternatively the newest versions of LiveIce will be available via anonymous CVS on the Icecast server. And finally for all those traditionalists out there I should always have a fairly recent version available for download as a .tar.gz archive.

As mentioned previously you will need a seperate encoder, so before you try compiling and running LiveIce it'd be a good idea to decide which encoder you'd like to use. Not every encoder will work, some encoders have problems reading from pipes - notably there are several popular adaptations of the ISO Dist10 sources which still crash when they try to seek on the input file. Once you've chosen an encoder you can modify liveice.h and set the default encoder to whichever one you'd prefer.

Supported Encoders

  • Fraunhofer's mpeg audio tools - l3enc and mp3enc 
  • Xing Technologies Beta Version of xingmp3enc (There is a serious problem with the production version which stops it being usable for encoding live sources - complain to them)
  • Lame 3.01+ - Dist10 derived mp3encoder, Distributed as patches to the ISO source for legal reasons. You need a version later than 3.01 to be able to use it within LiveIce
  • scrEamer - Isaac Richard's program sets itself up as a source client in a similar way to LiveIce, and it's compatible with the Enlightenment Sound Daemon. The encoder itself works quite nicely when it's used by LiveIce
  • Andreas Johannson's 'Encoder', basically a cleaned up version of ISO.

The Black List - Encoders Which Don't Work

  • Blade Encoder - it may be the most popular free encoder, but sadly it's no use to you budding DJ's...... It may be usable once the author releases the source and I can remove the simple mistake which causes it to die.
  • 8Hz - The project has been discontinued for legal reasons, but there are still copies of this encoder floating around, Sadly they contain the same mistakes as Blade so unless you get the source and modify it then you're not going to have much joy.
  • Dist10 - The ISO sources which most of the free encoders are based on, if you compile the encoder then you'll be faced with a maze of options which makes it difficult to figure out how to run,  and once you do it still doesn't like LiveIce.

Which Encoder Is Best For Me?

Selecting the best encoder for your purposes is a delicate scientific problem with thousands of varables which need to be taken into consideration....  well It should be.
Because mp3 is lossy and based on psychoacoustic modelling of what sounds are masked by others there  is a lot of  variation in the output of different encoders. Generally the commercial encoders are higher quality than the free encoders and if you're at all professional then you'll buy a commercial encoder. Fraunhofer's codec is certainly the best, especially at the low bitrates which are required for sending data to Modem users - however, they can take a lot of CPU power and mp3enc takes more than l3enc, on my PII 266 I can safely encode at up to 32Kbit/sec without worrying about the soundcard buffer overrunning. Xing Technologies encoder has been tried in beta form and makes great use of MMX instructions to speed up the process, in fact I can encode at almost any bitrate without any strain on my CPU, the quality isn't quite as good as Fraunhofer's, and the output seems to come in 32k chunks, but this is probably the best encoder to use. Sadly - the production release of xingmp3enc will not encode data sent to it from pipes, so I'd recommend everyone stay away from it until  they can fix this problem.
Of the free encoders I would recommend Lame - there is a lot of development going on to improve the quality of the output and the speed of the encoder - this is the best free encoder. However it won't do bitrates below 32Kbit/sec so you won't be able to broadcast to Modem users - fortunately scrEamer will do these low bitrates, but the codec is the same as ISO so the quality is abysmal, probably acceptable for speech though. Both of these are distributed as patches to the Dist10 sources, if you can't be bothered with the hassle of  patching source code then you're left with Andreas Johannson's encoder, No encoding below 32Kbit and not great quality.....

MPG123 - The Decoder 

If you plan to use the mixer mode then the programme needs to be able to decode mp3's stored on your hard disk, again I've left this task up to an external decoder rather than implement this functionality in the client itself. This isn't for legal reasons... this is for scientific reasons - I'm doing a PhD and can't spend all my time hacking around with internet radio while there are killer asteroids flying around the solar system ;-)

Download the sources from the website and install the mpg123 binary somewhere in your path. If you get the beta version 0.59q then you can also use this for listening to Icecast broadcasts so there are plenty of other reasons for having this on your system.

More recent versions of LiveIce have added a quick hack for reading .wav , .au, .aiff and other file formats using 'sox', this is a fairly common program for messing around with soundfiles, so you should all have it by default. I hope that I can incorporate support for these formats into the binary, but of course that all depends on spare time.

Anything Else I Should Consider Before Compiling?

Well there is the matter of the user interface, the mixer mode needs to read the keyboard if you're going to be able to do anything interesting. There is a simple terminal interface which works quite nicely and also a Curses based display which looks a lot nicer. This is my current weak point on compatibilty, some versions of the Curses libraries don't seem to behave, while the terminal interface currently uses linux specific tty settings to put it in nonblocking canonical input mode. This should be addressed soon, but you might want to play around with the settings in config.h if one terminal mode doesn't like your system. (BTW, config.h is created after you run the ./configure script). There is a minimalist GUI available which is written in TK, It just provides you with all the buttons in a nice window, I hope this can be developed a little further.

The system also requires the OSS sound drivers, (although it is possible to run it without using the soundcard) if you haven't got them then you won't be able to comple the code .... Sorry about that, but I kind of think a radio system needs some sort of feedback.

What do I do to make an executable?

In theory... (1) Run the configure script provided. (2) run make.

And that's it..... but it never is. If you're on a non linux, non OSS system I can't guarantee anything.

Other Than The Executable, are there any other Files?

Most of the options can be set via the command line, but all configuartion options are settable in a config file which is searched for as /etc/liveice.cfg and ./liveice.cfg  .  /etc/liveice.cfg should be used for all your default settings - the encoder, the decoder, default bitrates and sample rates etc. The only things which need to be changed on a per-session basis can be altered using command line options.... but more on the meaning of all this in the  Using LiveIce page.

Scott Manley / spm@star.arm.ac.uk