Do you want to own a broadcast station? Using Icecast you can send your programs around the world.
But why just as a big broadcast station?
Another nice use of Icecast is inside an intranet, which itself supports a much more efficient transport of the files.
Maybe you have a server with many mp3 files placed in the cellar and want to stream music into your local network. Just one person has to create a playlist and all users can choose their favorite songs just like using a Jukebox (also see IceDJ).
The installation of the program is not difficult as long as you do not try unusual settings.
First, get Icecast from the internet. The homepage of Icecast is located at http://icecast.linuxpower.org/.
You should download the newest version (as source code) and uncompress it:
>> tar zxvf icecast-1.x.x.tar.gz -C /tmp >> cd /tmp/icecast-1.x.x/The program can be compiled typing:
>> ./configure >> makeYou install the package as root by executing:
>> make installThis command copies all necessary files into /usr/local/icecast ..
# --first a few setting of the server and owner # #The location where the server is placed location Music from the mars #the owner's email address rp_email webmaster@home.de #The URL of the web page corresponding to the music server_url http://www.linuxnetmag.de [...] #--You can administrate the icecast server via the network, # this option is secured by a password #normal clients should not be able to log in client_password not_used #The remaining passwords have to be changed encoder_password mypassword admin_password mypassword oper_password mypassword [...] #The port icecast uses port 8010 #The host name of the server server_name my.computer.com |
All other settings should remain untouched.
Now you can start Icecast the first time (as root on port 8010):
>> /usr/local/icecast/bin/icecast -P 8010Icecast would send the following to the I/O if everything was set properly:
[09/Jan/2000:16:38:37] Icecast Version 1.3.0 Starting.. [09/Jan/2000:16:38:37] Using stdin as icecast operator console [09/Jan/2000:16:38:37] Tailing file to icecast operator console [09/Jan/2000:16:38:37] Server started... [09/Jan/2000:16:38:37] Listening on port 8010... [09/Jan/2000:16:38:37] Using [ronny.ziegler.de] as servername... [09/Jan/2000:16:38:37] Max values: 20 clients, 10 clients per source, 10 sources, 5 admins -> [09/Jan/2000:16:38:37] [Bandwidth: 0.000000MB/s] [Sources: 0] [Clients: 0] [Admins: 1] [Uptime: 0 seconds] -> |
This output offers a prompt which can be used to configure Icecast during running.
Typing help gives you a list of all available commands.
Until now, Icecast does not play any music because it was never programmed for this.
Shout does this job and is placed at /usr/local/icecast/bin/ .
Shout can be started on another computer inside of the network. This work-sharing between streaming server and music database makes sense. While the Icecast server has a lot of work to do steaming the music to all clients another computer can be used as a database or, if you wanted to be a live broadcast station, it would be able to encode the music in real time.
Therefore Shoutcast needs some options that have to be specified depending on your configuration.
>> /usr/local/icecast/bin/shout localhost -P mypassword -e 8010 /tmp/mp3/*If everything works well, Shout starts transmitting music to Icecast:
Playing /tmp/mp3/Alice_in_Fashionland.mp3 [2:38] Size: 2219520 Bitrate: 112000 (28455 bytes/dot) [...................................... |
Icecast mentions in the prompt that it accepted the connection:
-> [09/Jan/2000:17:37:57] Accepted encoder on mountpoint /monkey from localhost. 2 sources connected -> [09/Jan/2000:17:37:57] Assigning listeners from pending source 3 -> [09/Jan/2000:17:37:57] Kicking source 3 [localhost] [Lost all clients to new source] [encoder], connected for 10 minutes and 19 seconds, 824214 bytes transferred. 2 sources connected -> [09/Jan/2000:17:37:57] Kicking all 0 clients for source 3 -> |
Now you can hear the music on port 8010 on all mp3 players that support music streaming will hear it also. Using freeamp, a simple
>>freeamp http://my.server.de:8010is enough. The program automatically connects to Icecast. To get the best quality, use Xmms. Too bad that you have to create a playlist by your own including the Icecast server:
[playlist] numberofentries=1 File1=http://my.server.de:8010 |
If you load this file, you can hear internet radio with Xmms, too.
All M$ Windows users should create a link to their homepage which automatically starts the predefined mp3 player and contacts the Icecast server.
You need the following tags in your HTML page:
<a href="shoutcast-playlist.pls"><img src="tunein.gif" Border=0>< /a> |
and you need a file shoutcast-playlist.pls placed in the same directory. This file should look the same way as the playlist for Xmms.
[playlist] numberofentries=1 File1=http://my.server.de:8010 |
Now your internet broadcast station is ready. The abilities of icecast are impressively overwhelming and just the most important options are described in this "short" article. Until now you transmit music that is placed in a special directory. Also icecast can manage live steaming and send data in real time. It supports playlists and many more useful things that would make this article too big.