| Icecast Installation and Management: A Guide to Open Source Audio Streaming | ||
|---|---|---|
| <<< Previous | Next >>> | |
As the Icecast Project has matured over the past few years, the icecast server application and related programs have improved and matured respectively. Currently, icecast2 is the recommended audio streaming application for many radio stations and online DJs. It supports most audio formats currently available. The developers have been quietly moving ahead in adding new features and incorporating emerging technologies into their program.
This chapter explains the basics of installing the icecast2 server, editing the configuration files and tweaking its basic performance. As mentioned throughout this book, the icecast server is only half of the variable; the other half is the streaming tool, which is more closely addressed in the next chapter.
The icecast source code and pre-built binaries are available in a variety of locations. The best and most dependable location has always been the main Icecast page, http://www.icecast.org/. However, there are many other modules and varying builds of the source. Some of these can be downloaded at the sound application development site, Xiph, http://www.xiph.org/.
There are several sites hosted by the developers themselves, who add to the icecast products customized features, cutting-edge items, or pre-built binaries for users. The home page of icecast's lead developer, Michael Smith, provides the latest source at the following address: http://www.xiph.org/~msmith/. Additional sites and locations can be gleaned off the main icecast page or from the developers themselves via the mailing list. The most commonly used method of downloading the icecast2 source is Subversion. This next section describes the standard methodology and modules available for download.
The latest icecast source as of this writing is available, not only in regular tarball and RPM formats, but also via Subversion. Subversion is a CVS-like application allowing users to check-out or check-in new code. The code contained in the Subversion repositories is fairly cutting-edge and may or may not have yet been tested in a production environment. Developers place their latest advancements or additions to developing source here. Downloading and installing code contained in a Subversion repository is fairly standard for accessing the most up-to-date code implementations and installing them on your server. Be aware that bugs can sneak into the system as the source is still cutting-edge.
Make certain the Subversion client is installed on your host machine. Subversion is available for nearly all Linux distributions as well as for Windows and Solaris users. Reference the Subversion home page for more information on downloading and installing Subversion: http://subversion.tigris.org/. Most Linux distributions include a Subversion client as a part of their standard packages.
Test whether Subversion is installed on your system by using the Subversion client to connect and download a test module from the xiph.org page:
$ svn co http://svn.xiph.org/<module-name> |
This command checks out a copy of the module source tree into the working directory on your local machine. You should find additional reference material that is frequently updated regarding Subversion and the module contents on the Xiph page at the following URL: http://xiph.org/svn.html. This page also lists all available modules. The next few sections cover a few of the available modules that work in tandem with icecast2.
![]() | As no page is ever static, the modules mentioned here may change over time on the Xiph page. Consult the module listings page for the most current updates. |
Experience has shown that the best method for installing icecast2 and related applications is to download all source code and then compile it later rather than downloading each program individually, compiling, and then downloading again. The same applies for downloading code off the Xiph Subversion directory. The order and methodology recommended is to first download libshout, then ices2, and finally icecast2. Build or compile each in the same order. The ices2 program requires libshout prior to installation, as does icecast need ices in order to compile successfully.
Make certain the working directory is the same in which you wish to store the code. The directory /usr/local/src is a good starting point for code management. Other directories work just as well on differing Linux distributions. If you wish to keep your regular source separate from the Subversion checkout code, create another directory in which to store the local repository. Here is one possible example:
$ mkdir $HOME/xiphrepository/ |
After changing to a standard directory or to your new repository, log in to the Subversion repository for the latest developers' source code. Check out the most recent additions or updates here or simply test the latest upload. Again, checking out a module is simple:
$ svn co http://svn.xiph.org/<module-name> |
This command creates a subdirectory of the same name as the module and downloads the code from the repository into the new directory. To update a module:
$ svn update <module-name> |
To check out only the main icecast trunk execute the following command:
$ svn co http://svn.xiph.org/icecast/trunk/icecast/ icecast |
This command updates your repository to the newest revision.
![]() | If attempting to access the Subversion repository from behind a proxy server, first edit the configuration settings in the ~/.subversion/servers file. The [global] variables section is where you might want to change all access settings. Place the proxy name, port number, username and password in the appropriate section. |
Should you not have access through your proxy or not have necessary privileges to install Subversion, you can access the modules online via a web browser using the following location: http://svn.xiph.org/. Connectivity speeds to the Subversion directory may vary based on the available bandwidth and the amount of activity on the site itself. The site in general tends to respond slowly.
If you want to download the latest stable icecast and streaming audio code instead, consult the main Icecast project home page. Use the links titled Download (http://www.icecast.org/download.php) and 3rd Party Apps (http://www.icecast.org/3rdparty.php). Save the tarred and zipped files to the directory of choice.
In addition to the standard icecast source code located within the Subversion repository, there are many other modules available for download and compilation. Some of these tie in closely with the icecast2 server application and may be mentioned later on in the course of this book. Others will not be used, but can be tested in conjunction with icecast2.
A list of the modules available for download is on the http://www.xiph.org/svn.html page. To download any of these modules simply substitute the new module name in place of the last svn command. The only ones needed for now are the three mentioned previously, namely libshout, ices and icecast.
The icecast streaming server. This directory contains not only icecast, but also ices, ices0, and libshout along with some other minor related applications.
A CD ripper, written in Perl.
A script to turn PCM files into wav files.
The source code to the integer-only Ogg Vorbis decode library named "Tremor."
The source code to libao, used by some vorbis utilities.
Python bindings to libao.
The source code to cdparanoia and Paranoia-III.
Source code for DryIce, a live Ogg stream source client.
The source code of ezstream, a Win32 command line utility to stream mp3 or other audio formats.
The source of a video converter from MPEG to theora.
The source code to a package that collects masking data from a user by running listening experiments.
The source code to MGM, a status/load meter package written in Perl.
The source code to libogg.
Python bindings for libogg.
The source code to various command line utilities for other types of Ogg files.
The source code to libogg2.
Python bindings for libogg2.
Source code of the Ogg Vorbis DirectShow filter collection.
Illiminable Ogg Directshow Filters for Speex, Vorbis, Theora and FLAC.
Positron is a synchronization tool for the Neuros portable music player.
Postfish is a digital audio post-processing, restoration, filtering and mixdown tool.
Perl bindings for libshout.
Python bindings for libshout.
A RealPlayer output recorder.
The source code to the Speex low-bitrate voice-only audio codec.
The original Tarkin video CODEC source experiment.
The source code to the Theora video CODEC project.
The source code to various command line Ogg Theora utilities.
The source code to libvorbis, libvorbisfile, libvorbisenc and example code.
The source code to a few Ogg Vorbis player plugins.
Python bindings for libvorbis, libvorbisfile and libvorbisenc.
The source code to various command line Ogg Vorbis utilities.
The source code for a Vorbis I header/stream information dump tool.
The source code to ON2's VP3.2 video codec.
The source code to another Tarkin video CODEC source experiment.
Source code for Windows Ogg tools.
Source code for Windows Ogg development SDK.
Source code of OggWrit, a format for encoding subtitles.
These modules can be used in conjunction with icecast though they are not necessary for icecast to work. They simply provide added functionality. Download and test those that are of interest to you. The more important items such as the Ogg Vorbis libraries may already be installed on your specific Linux distribution.
Once you have downloaded the latest Subversion code, change to the working directory where the code is stored. For example, if you wanted to compile the libshout source, change to the following directory and begin compiling using the standard commands:
$ cd /usr/local/src/icecast/trunk/libshout/ $ ./configure $ su # make |
The same applies to the ices and icecast source. Change to their respective directories and begin compiling. If unsure as to the proper method, there is normally an INSTALL file included that explains any other miscellaneous commands in detail.
Once you are through downloading the necessary source files, make certain any and all required components are already installed so you may successfully compile the server software. In order to properly stream and encode raw audio in Ogg Vorbis format additional libraries are required. Those listed here are needed for encoding in Ogg Vorbis format. Normally, these are included with most Red Hat (Fedora) and SUSE releases. You may, however, prefer to download the RPMs or compile the source yourself. The easiest method is to simply install these libraries while setting up the machine initially.
To check for the required libraries and whether they are already installed, use the following method:
# rpm -q libogg libvorbis libxml2 libxslt libxslt-devel |
Versions of each application should be displayed after this command. Here is an example of a typical installation's output or the displayed versions of the installed software:
# rpm -q libogg libvorbis libxml2 libxslt libxslt-devel libogg-1.1-56.1 libvorbis-1.0.1-56.1 libxml2-2.6.7-28.1 libxslt-1.1.2-58.1 package libxslt-devel is not installed |
Notice that the last package is not currently installed. If a package is not available, use either the Linux distribution CDs or download the application or library off the Ogg Vorbis site: http://www.vorbis.com/download_unix.psp. This link contains the source code as well as source and binary RPMs for Linux. If you are using another flavor of Linux or another Unix variant, download the source code, compile and install. If you are lacking the libxslt-devel RPM or any of the other libraries utilities, use a download utility such as yum, which works very nicely for installing missing libraries and RPMs. Otherwise, use the download manager of your Linux distribution.
You should now have the lame and lame-devel RPMs installed on your machine. The latest editions of these files are 3.95.1 for Fedora Core and 3.93.1 for Red Hat Linux 9. If your Linux distribution does not offer a compiled version, download the source code and compile it yourself. When using programs such as darkice at a later time, you will need to know the location of the lame headers, if using the source release. The LAME headers are normally found in the /usr/local/lib directory.
![]() | The LAME source provides all the same libraries and features that the lame and lame-devel RPMs offer. If you do not normally deal with RPMs, use the source to get all the functionality and avoid missing library messages. |
If compiling LAME from source, be aware that the gtk+-devel library is also required. This can be downloaded and installed from RPMs. Use apt or yum or your favorite update utility to download and install these files.
# yum install gtk+-devel lame lame-devel |
If you do not wish to install using binaries or RPMs, download the GTK+ source and compile it as you would most any other source-based application.
After downloading the appropriate icecast module, build the code. Run the command autogen.sh within the icecast root directory. The following tools must be installed on the target system in order to perform this step; libtool, autoconf, and automake. These usually come standard with customized Linux installations.
$ cd $HOME/xiphrepository/icecast $ ./autogen.sh |
The code looks for the necessary tools on the target by running the configuration checks. Once everything has been properly configured, issue a make command to begin the building process.
$ cd $HOME/xiphrepository/icecast $ make |
This is usually sufficient to begin working with the icecast code. If you would prefer more stable code, move on to the next section.
| <<< Previous | Home | Next >>> |
| MuSE | Downloading the Icecast Source |