Running a Net Radio Station With Open-Source Software

Seven Linux enthusiasts decided that it would be cool to broadcast their own radio show over the Internet.
Starting Icecast

Icecast is very simple to run. Go into the account you want your broadcast server to run as and enter /usr/local/icecast/bin/icecast. This brings you to console mode on the Icecast server. If you type a “?” at the console you see all of the options that are available with Icecast. We would like to note that from the console you can see when someone connects to the site. If you start Icecast with a -b option it pushes the console to the background. Figure 2 is a screen capture of the startup of Icecast.

Figure 2. Icecast Startup Screen

Icecast Console

The Icecast console is a powerful tool that allows you to control all aspects of the server. For example, if you wish to get rid of particular listeners, you could use the kick command to boot them. Another useful command is dump, which allows you to dump a stream to a file. The full list of commands is available in the Icecast web interface.

Web Administration Interface

Icecast includes a web-based administration interface that can be accessed by entering the URL http://hostname.domain:port/admin, where hostname is your Icecast server and port is the port number that you defined in the icecast.conf file (see Listing 1). By default the web-based Icecast administration utility is wide open to any system, so be sure to set a password. The help section on the admin page gives detailed descriptions on how to use the web interface. The descriptions include topics that range from setting up user authorization to even disabling the web interface. One of the most useful features of the web interface is a dynamic listing of sources and listener streams. You can configure the administration pages to meet your needs. Refer to the admministration interface for more information.

Server Security

Any site on the Internet should be concerned with security. We recommend that you read all the security documentation that comes with the Icecast server. We also recommend that you do not run the Icecast server as root. You should run the server as nobody or a nonprivileged user.

Problems

We did not experience any problems with the Icecast setup and configuration. Icecast itself is very similar to a typical web server, and it is simple to configure.

Encoder Client

Requirements

Our set up uses a remote encoder client that is not located on the same system as our Icecast server. We use the Liveice client software to generate the output to be streamed to the Icecast server. We use a standard workstation, named zelda, running Mandrake Linux 7.2 with a 16-bit SoundBlaster (ES1371) sound card. We chose the SoundBlaster since it is a widely known and easily supported piece of hardware for our purposes.

Encoder Setup

We started the Liveice software installation by downloading the tar file that we found at http://www.icecast.org/ in the third party applications section. We did not find an RPM at icecast.org. Untar puts the files in our current working directory. Liveice also requires that we run a make to compile the binaries. The README file explains the full installation of Liveice. We put the files in /usr/local to make things simple and accessible via the current path. We changed the liveice.cfg file to point to the broadcast server. You can compare our icecast.conf (above) and our liveice.cfg (below) with the defaults to see where you have to make changes. The README file on the Liveice client offers a better understanding of each parameter. The most important paramenters include SERVER, PORT, PASSWORD and USE_LAME3.

SERVER is the server name that we used setup to the Icecast server. PORT is the port number on the Icecast server. The PASSWORD field must match the Icecast password to allow for the socket connection between Liveice and Icecast. The field USE_LAME3 tells Liveice which encoder to use to convert from analog to digital. The configuration we used works for our purposes, but there are numerous other configurations that accomplish the same output.

################################################
# liveice configuration file
################################################
SERVER www.opensourceradio.com
PORT 8002
NAME ReBroadcast of OSR, 10/5/2000
GENRE Live Linux Talk
URL www.opensourceradio.com
PUBLIC 1
ICY_LOGIN
SAMPLE_RATE 24000
STEREO
SOUNDCARD
FULL_DUPLEX
USE_LAME3 lame
BITRATE 32000
VBR_QUALITY 1
NO_MIXER
PLAYLIST playlist
DECODER_COMMAND mpg123
MIX_CONTROL_MANUAL
CONTROL_FILE mix_command
TRACK_LOGFILE track.log
#SAVE_FILE /osr/osr_10_5.mp3

LAME is an application that we downloaded from http://www.sulaco.org/ and we untarred it in the /usr/bin/ directory. If you put it in a directory that isn't in your $PATH, you have to put the full path to the encoder in the liveice.cfg file. The encoder is necessary to turn your voice into a digital MP3 format to be received by the Icecast server and broadcast over the Internet. We chose to use LAME, but you can use any encoder engine that you wish to use.

______________________

Comments

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

Re: Running a Net Radio Station With Open-Source Software

Anonymous's picture

This was far too indepth for someone with no experience of setting up Internet Radio. It would have been really helpful to have some basic starting points for laymen!!!!

Webinar
One Click, Universal Protection: Implementing Centralized Security Policies on Linux Systems

As Linux continues to play an ever increasing role in corporate data centers and institutions, ensuring the integrity and protection of these systems must be a priority. With 60% of the world's websites and an increasing share of organization's mission-critical workloads running on Linux, failing to stop malware and other advanced threats on Linux can increasingly impact an organization's reputation and bottom line.

Learn More

Sponsored by Bit9

Webinar
Linux Backup and Recovery Webinar

Most companies incorporate backup procedures for critical data, which can be restored quickly if a loss occurs. However, fewer companies are prepared for catastrophic system failures, in which they lose all data, the entire operating system, applications, settings, patches and more, reducing their system(s) to “bare metal.” After all, before data can be restored to a system, there must be a system to restore it to.

In this one hour webinar, learn how to enhance your existing backup strategies for better disaster recovery preparedness using Storix System Backup Administrator (SBAdmin), a highly flexible bare-metal recovery solution for UNIX and Linux systems.

Learn More

Sponsored by Storix