Jump to content

Shoutcast

From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by AndrewMrse (talk | contribs) at 07:50, 16 March 2006 (This war needs to end, all links are in there now. Please stop removing links to your competitor.). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.

SHOUTcast is a multiplatform freeware audio streaming technology, developed by Nullsoft. SHOUTcast uses MP3 encoding of audio content and HTTP (though multicast can be used) as the transport protocol to broadcast web radio, also known as Internet radio. It runs on Windows, FreeBSD, GNU/Linux, Mac OS X and Solaris.

SHOUTcast is software that allows users to set up their own Internet radio servers using provided software. The output format is supported by multiple clients including the widely popular Nullsoft Winamp, XMMS, Zinf and Apple iTunes. Using the software, users may set up radio servers for their own needs. Current uses include listening to music as well as live broadcasting of events for the average person.

The SHOUTcast protocol

SHOUTcast runs on HTTP. To receive SHOUTcast, simply do a GET from the server. You can in fact do this directly in your web browser. For example, if you point your browser at a SHOUTcast server you get this:

 icy-notice1:<BR>This stream requires <a href="http://www.winamp.com/">Winamp</a><BR>
 icy-notice2:SHOUTcast Distributed Network Audio Server/Linux v1.9.2<BR>
 icy-name:WLHS 89.9 FM Lakota High School
 icy-genre:alternative rock
 icy-url:http://wlhsradio.com
 Content-Type:audio/mpeg
 icy-pub:1
 icy-br:48 
 
[MP3 bitstream data]

If the data stream is saved as an MP3 file, it will be possible to play it in an MP3 player.

SHOUTcast tags

The first block of data contains useful tags that provide information about the stream.

icy-notice
A general information tag.
icy-name
This gives the name of the channel being received.
icy-genre
As you might expect, this tag gives us the genre.
icy-url
Gives the URL for the station's web site.
Content-Type
States the MIME media type of the stream, usually audio/mpeg for MP3 radio. TV streams may use video/nsv.
icy-pub
Indicates if the stream is public (1) or private (0).
icy-br
This final tag gives the stream bit rate in kbit/s.

Song information

In order to get information about the song being played, the GET request must include a tag, like this GET / HTTP/1.0/r/nIcy-MetaData:1/r/n/r/n. The data that is received will now contain song information.

The first difference in the received stream is in the tags. There is an extra one:

icy-metaint:8000 

This provides the location of the song information. In this example, the data will be presented every 8000 bytes. That's MP3 data bytes, so ignore the header information, and the song information when working out where the song data is.

The first byte of the song information is the length of the information block. This number must be multiplied by 16 to get the length in bytes, and it includes itself. The remaining space is used by tags:

StreamUrl='www.club977.com';
StreamTitle='singer, title';

This gives us the URL of the stream. We also get the name of the artist and the title of the track.

Uses

One good use of SHOUTcast is to play synchronized music in different rooms at parties. It is easy to set up a broadcast from one computer and then make other computers listeners. These listeners will be synchronized with one another although the broadcasting computer will be a couple of seconds ahead.

To do this you will need the Winamp SHOUTcast DSP plugin and a SHOUTcast server (Nullsoft SHOUTcast server v.1.9.5 is recommended). One difficulty you may encounter is using SHOUTcast with a NAT router. In order to do this, both the broadcaster and the listeners must be on the same router. Then instead of publicly broadcasting the station, just turn this option off and load the station from each listener computer by going to Playlist->Add URL and type http://192.168.1.1:8000/listen.pls where 192.168.1.1 is the IP address of the broadcaster and listen.pls is the playlist.

There are numerous ways to enable Windows Media Player to stream SHOUTcast playlists, rather than having to use a proprietary player. The pls file format is very simple and there are numerous work arounds to enable WMP compatibility. One of the easiets methods is to install a small application [1] that parses the stream url out of a PLS file, which is then playable by Windows Media Player.

SHOUTcast Control Panel

Software such as SCPanel ([2]) dramatically simplifies the task of running a Shoutcast server by providing an intuitive graphical user interface for various management and configuration tasks. While other control panels are in development, SCPanel is the currently the only publicly Shoutcast control panel on the market.

See also

External Links