Originally Published: Wednesday, 13 December 2000 Author: Rodney "meff" Gordon II.
Published to: enhance_articles_multimedia/Audio Articles Page: 1/1 - [Printable]

Setting Up Your Own Station: A Free Radio Under Linux Howto. v0.1

Radio Free Linux! Rodney Gordons explains how to setup a Internet radio station for streaming MP3s. Pirate radio stations in the new era -- Not that we'd encourage copyright infringement.

   Page 1 of 1  

Contents:
  1. Introduction
  2. Installation
  3. Requirements
  4. Configuration
  5. FAQ

1. Introduction

So, you want to run your own radio station? This guide will assist you in becoming your own DJ.

Top

2. Requirements

Here are some basic requirements for running a station on your computer, most of which you probably already know:
  • 150+ Mhz Processor.
  • 32 MB RAM.
  • Cable, DSL, or some kind of broadband Internet access.
  • Some free space, for mp3's you wish to broadcast, etc..

    OS:

  • Any fairly modern Linux distribution, with a v2.2 or newer kernel.

    Software:

  • XMMS 1.2.x or later. http://www.xmms.org/
  • LAME v3.x or later. http://www.sulaco.org/mp3
  • Icecast 1.3.x or later. http://www.icecast.org/
  • Liveice-XMMS. http://star.arm.ac.uk/~spm/software/liveice.html

    If you're using Debian, you can just

    apt-get install xmms icecast-server
    to install xmms and the Icecast server. As for LAME, you can use a program called Alien to convert an RPM package into a Debian package. Just
    apt-get install alien
    and, as root,
    alien package.rpm
    to produce a .deb, which you can install by using
    dpkg -i <file>
    where <file> is the name of the Debian package.

    Top

    3. Installation

    Installation should be pretty straight forward. Right now you should have all the packages you need to get things rolling. If you're compiling from source, you should compile and install software as directed by the documentation. Also, install dependencies as needed.
    If you're using RedHat or one of its brothers, you can grab an RPM, download it, and install it like this:
    rpm -Uvh <file>
    where <file> is the name of the RPM to install.
    If you're using Debian, you can just
    apt-get install xmms
    icecast-server
    to install xmms and the Icecast server. As for LAME, you can use a program called Alien to convert an RPM package into a Debian package. Just
    apt-get install alien
    and, as root,
    alien package.rpm
    to produce a .deb, which you can install by using
    dpkg -i <file>
    where <file> is the name of the Debian package. You'll need to be root while doing most of this.

    If you encounter any difficulty with installation, let me know. My contact information is at the end of this document.

    Now that you've installed all of the required software, let's get to setting it up.

    Top

    4. Configuration

    First on the list of things to configure will be the Icecast server. Find your Icecast configuration directory (mine was /etc/icecast, probably the same for RPM. If you compiled it, you're advanced enough to know where it is) and you should be presented with a bunch of files with '.dist' after them. Move all these files to their name without the '.dist' .. if the file was 'icecast.conf.dist' it should be 'icecast.conf' now. If you don't see any files with '.dist' at the end, you're okay here.

    Go ahead and open up icecast.conf with your favorite editor. The configuration is pretty straight forward, but I'll help you along. Near the top you'll see some location/information fields:
    location Just west of Mars
    rp_email kirk@enterprise.space
    server_url http://www.icecast.org/
    Fill these out with whatever info you want people to see when they come to your station.

    The next section you will see is the server limits section:


    max_clients 900
    max_clients_per_source 900
    max_sources 10
    max_admins 5
    throttle 10.0
    These settings are pretty much outrageous for most users. Depending on how fast your Internet connection is, set these settings accordingly. You'll probably want
    max_clients
    around 10, same with
    max_clients_per_source
    the rest you can usually leave alone. Now scroll down in the file until you come upon these:
    encoder_password hackme
    admin_password hackme
    oper_password hackme
    If you installed the Icecast server under Debian, or your version has encrypted password support, it gets a little tricky here. You need to encrypt your password in this file with the mkpasswd program, which is probably installed on your system already. You can encrypt a password like this:
    mkpasswd your_password --crypt
    Copy and paste this into the configuration file to make it look somewhat like this:
    encoder_passwd --WZKu0fXj3bQ
    admin_passwd --WZKu0fXj3bQ
    oper_passwd --WZKu0fXj3bQ
    No matter which method you used to install, be sure to set these with different passwords from 'hackme'. Generally all of them should have the same password. Remember the password you set here, we'll be using it later when we configure Liveice-XMMS.

    Go farther down until you see:

    console_mode 0
    Change this to 3, so it launches into the background.

    The rest of the configuration file you can usually leave alone. All of you advanced users can look around for more interesting things to change if you wish.

    Now for configuring Liveice-XMMS:

    Reload XMMS so it notices there is another plugin. Rightclick on XMMS, Click Preferences. Go into Effect/General Plugins. Under Effect Plugins you should see Liveice in the list. If you don't, check your installation of Liveice-XMMS. After you've selected Liveice, click Configure.

    Under audio format, most of these settings are standard, so you probably won't need to change too much. Change the encoder type to 'Lame' and the executable name to 'lame'. If you already have some other LAME binary on your system, enter the path to it here. Under the Description tab, change anything that's needed.

    Go to the Server tab, and change 'Encoder Password' to whatever you put in the Icecast configuration file (remember, that one I told you to remember?). But put it UNencrypted here, of course, if you had to encrypt it.

    You're done. Click OK. Check 'Use plugins' in the Preferences dialog that should still be up, and click OK again.

    In a terminal, type in 'icecast' and hit enter.. You should see it run and go into the background.

    If you're playing a song, click stop, and start playing it again.

    Nothing is.. Broken? No BOOM!? Well, you would hope so :) Get your friend to try to connect to your ip with XMMS or some other mp3 player, with the url http://yourcomputer:8000 .. they should hear music! If they don't, check out the FAQ for troubleshooting info.

    Otherwise, Congrats, you're now an amateur DJ! :)

    Top

    5. FAQ

    Make sure Icecast is running. If you have continued problems, in the conf file where you changed the console_mode to 3 change it back to 0 to get some debug messages. You should see yourself connecting as a source, if not, check your settings inside of Liveice. If you see that your connected as a source, or "encoder", and your friend is trying to connect but you don't see something along those lines, it isn't your problem.

    Q: People complain about the quality, what can I do?
    A: Well, that's one of the quirks of Internet radio. The most you can do is change your encoding preferences in Liveice. As a general guideline if you encode at 24,000 your going about 2k/s, so about ideal for modem users. If your encoding 128,000 or more, that's more like 11k/s, so you're merging on the broadband line here. Remember, if you encode at 128,000 and you have 10 users you're uploading at 110k/s, not many people can handle this. So make sure you review your connection max settings and such to adjust to this.

    If any of you have more questions/comments I will add them to the FAQ in a later version.

    Top


    Copyright (c) 2000 by Rodney "meff" Gordon II. meff@oddbox.org

    This HOWTO is free documentation; you can redistribute it and/or modify it under the terms of the GNU GPL. This document is distributed in the hope that it will be useful, but without any warranty; without even the implied warranty of merchantability or fitness for a particular purpose.

    Written in Emacs. :)





  •    Page 1 of 1