Related YoLinux Tutorials:
°Linux Sys Admin
°Web site configuration
°YoLinux Tutorials Index
Free Information Technology Magazines and Document Downloads
|Audio Streaming Server Set-Up Using IceCast 1:
This tutorial outlines the installation and set-up of an Icecast MP3 audio
streaming server using the binary Linux RPM from icecast.org.
Icecast comes with an http server built in. Icecast can use this if staticdir directive is incuded in the configuration file or icecast will use an existing server such as Apache or Netscape.
This example will employ the http server within Icecast.
Note on using Linux RPM's:
The configuration I used was the icecast 1.3.10 server from the RPM downloaded
from icecast.org and the shout module supplied by the Red Hat RPM.
The icecast.org icecast-1.3.10 RPM did not include the shout module.
The Red Hat powertools icecast RPM included shout but in other ways the RPM
was horribly incomplete (No templates or configuration file.) and thus
the icecast server it shipped with was unuseable.
The configuration file detailed below is intended for the icecast 1.3.10
server and does NOT work with the Red Hat RPM
Bottom line: I had to install both RPM's to get a complete set of tools.
Amazingly enough there were no RPM conflicts and both installed without
Using TCP wrappers:
- File: /etc/hosts.deny
or use nothing at all to allow everyone.
- File: /etc/hosts.allow
icecast: 192.168.10. - Allow from 192.168.10.* network addresses
icecast: ALL - Allow all to listen
More Icecast Info:
- People typically use 128 kbps compression mono MP3 files. (Sample rate: 44100 Hz)
- Icecast uses TCP port 8000
[Potential Pitfall]: Many corporate firewalls block everything except port 80.
Many of the large MP3 streaming stations such as live365.com have changed
all their servers to stream over port 80 to avoid problems.
- The streaming protocol used is called the shoutcast protocol.
- Header type: application/x-audio
- Icecast has a web interface for administration which is good for viewing
the status of the icecast server but useless at making changes.
(That part is broken.)
- Remote administration can be performed in console mode:
- telnet node.your-domain.com 8000
- Enter: ADMIN password then Enter + Enter (carraige return twice)
- Switch to operator status: oper operator-password
- Get list of commands: help
- You can list your server with a directory server to gain exposure and more listeners.
List of directory servers:
Point your browser at: http://dir.xiph.org/ to take a peek of the directory listings.
- Icecast can run as a relay thus adding scalability by adding more servers.
Use the "alias" directive to employ this capability.
- Icecast can support access control lists (ACL) using "deny" and "allow" directives.
- There are NO man pages.
Icecast configuration file directives for /etc/icecast/icecast.conf
||Directive for old directories.
||Directive for new directories. Icecast 1.3+
Default port: 80
||How often the directory servers get 'touched' by the icecast server.
Default: 5 minutes
||Max. number of simultaneous connected admins.
||0: admin console
1: same as 0 but without logfile info
2: Use as logfile window
3: Run icecast as a daemon process.
||0: Turns off reverse lookups of IP addresses.
1: Reverse lookup all ips to hostnames.
||0: Deny connections if no rule is given.
1: Allow connections by default if no rule is given.
||Debugging messages output to log file:
0: No debigging output
2: Even more output
6: Max debugging output
||Debugging messages output to console:
0: No debigging output
2: Even more output
6: Max debugging output
||Template for stream title sent to client and
directory servers. The symbol "%s" will be replaced with the filename
of the current song.
||Access logging which can be parsed by Apache log file parsers.
||0: No www admin access
1: Allow www admin access
||Include the contents of another include file.
|alias /directory-1 /directory-2
||Server mount points set as the same logically.
||0: Send message "HTTP 404 Stream Not Found" if not found.
1: Send default stream if not found.
For more information and a full list of directives see the icecast manual.
Icecast command line directives:
Useage: icecast [options]
||Command line parameters overide configuration file directives.
||Used for all client, source, and admin connections.
||If exceeded, icecast will issue the error: 'HTTP/1.0 504 Server Full'
||Password used to deliver stream to server.
||Run in background as a daemon process.
Shout configuration file directives for /etc/icecast/shout.conf:
Format: option value or option bool
where bool is yes/no, on/off or 1/0.
||Same port as configured in icecast.conf.
||Name of server.
||Same as defined in the icecast.conf as the encoder password.
||Mount point for this stream/channel. (Other examples: rock, rap, etc)
||Name of this stream.
Default: Icecast Radio
||A description of the channel.
||Web address associated with this stream.
||If you want this published on a yp server lookup list.
Supported only if the icecast server has yp touch enabled.
||talk, rock, rap, alt, techno...
||Fully qualified file names to play.
||true: Endless playing loop.
||true: Shuffle playlist entries.
||Check the file for bitrate info, before trying to stream it. If no, it will be sent at the default bitrate.
||If different than file and autodetect is off, you get a mess.
||on: If file does not match the default_bitrate, skip file.
||Program/script to run before every song.
||Trim path names from file names when using non ID3 data for stream title info.
||Turns title updates on or off.
||Use id3 tags for title streaming.
Requires: title_streaming yes
||Adapt the stream calculations to match each file's bitrate.
||yes: launched in the background.
||yes: Extra text output.
Download source and see file shout.h for full list of directives and the defaults.
# Comments are valid
- SIGINT: makes shout skip to the next song.
- SIGUSR1: makes shout reshuffle the internal playlist.
- SIGHUP: makes shout re-read its configuration file.
You may run multiple instances of shout, one for each channel. i.e.
http://localhost:8000/rock, http://localhost:8000/rap, etc...
using rock and rap etc as the different mount points.
Shout command line directives:
Useage: shout host-name [options]
||Base/root for all of shout's files.
||Specify a configuration file.
||Run this before every song.
||Specify encoder password.
Must match that specified in /etc/icecast.conf
||Display all settings and exit.
||Use verbose output.
||Use specified description.
||Turn on automatic bitrate (transfer) correction.
||Go on forever. Loop through playlist endlessly.
||Use specified file as a playlist.
||Use specified url
||Go into the background (Daemon mode)
||Enable title streaming
To view all directives use the command shout -h.
MP3 MIME Types:
||Used by shoutcast.com for their MP3 streams
|| Used by icecast.org for their MP3 streams
||Used by mp3.com for their MP3 streams
Testing with the Xmms client:
Testing with the FreeAmp client:
- Attaching FreeAmp to a streaming server:
- freeamp http://220.127.116.11:8016
MP3 Streaming Stations: See http://www.live365.com
Directories of MP3 Streaming Stations: (pick one and listen)
Audio Streaming Servers:
- IceCast.org - Open Source MP3 and OggVorbis Streaming Server
- Shoutcast.com - Commercial MP3 Audio streaming
- DarkIce -
Live streamer - Takes live input from a soundcard, encodes it and sends
the encoded stream to an IceCast server. DarkIce uses an external mp3
- AmpJuke - Web based.
Uses Apache, MySQL and PHP. AmpJuke streams music files to one or more
clients using the HTTP-protocol. Scanning and import of music stored in
the MP3, OGG, WMA and/or APE format.
- Ampache - Web-based
Audio file manager. Implemented with MySQL, and PHP. It allows you to
view, edit, and play your audio files via the web. Supports playlists,
artist and album views, album art, random play, playback via Http/On
the Fly Transcoding and Downsampling.
- kPlaylist.net - PHP interface to a streaming web site (ogg, mp3, wav, ...) Allows upload, creation of playlists, share, search and download.
- Agatha - Stream music and playlists
- Edna - MP3 streaming
- Fluid - MP3 streaming server written in JAVA
- Streamcast - Supports ID3 tags, mountpoints. The PHP-stream version is a database enabled version of streamcast.
- netjukebox - Web based Winamp/httpQ media jukebox.
- Comparason of MP3 encoders on Linux
- Shout - MP3 stream encoder from the icecast site
- LiveIce - Provide "Real Time" streams for icecast.
- MuSE - Desktop GUI
application for the mixing, encoding, and network streaming of sound.
Can use 6 encoded audio bitstreams (from files or network) plus a
souncard input signal to be played locally or encoded for broadcast.
Also hadles Ogg Vorbis.
Ogg Vorbis Encoders: