Live MP3 audio streaming server v0.1

Download



This is a MP3 streaming audio server that takes a live analogue audio source, such as a microphone, encodes it in realtime and streams it to connected clients. Any client that recognises the Icecast protocol can connect to it. These include Winamp, iTunes, RealPlayer and MediaPlayer. MP3 encoding is performed by the LAME MP3 encoder. You'll need to get hold of lame_enc.dll in order for the program to run.

System setup

Enter the name of your currently broadcast programme in the dialog box. You can update this when the stream is running by clicking 'Update'.

Before you start the server you must setup the MP3 and network parameters.

Network setup

Select an IP address and port for the server to bind to. Set the metadata interval. The metadata interval is the number of MP3 stream bytes that the server sends before sending the program title information. Set this to a few kbytes. Set the maximum number of clients that can connect to your stream. The maximum number will be limited by your network connection's upstream capacity. Divide your upstream rate by the MP3 encoding rate to estimate the maximum clients that you can accommodate. Finally set your station name.

MP3 setup

Set the audio sampling rate, audio channels and MP3 bitrate of your stream. There are also some flags you can set. See the LAME documentation for details of these parameters.

Linking to the stream

Each client requires different HTML links to start the stream. Here are some that I've found work for me. In each case replace the IP address and port (81.107.207.101:8000) with those of your own server.

Client Type File contents
WINAMP
iTunes
RealPlayer(maybe)
PLS (.pls) file [playlist]
numberofentries=1
File1=http://81.107.207.101:8000/test server
Windows Media Player M3U (.m3u) file [playlist]
numberofentries=1
File1=http://81.107.207.101:8000/test server


Or you can embed MediaPlayer in a webpage with the following HTML:

<object id="MediaPlayer1" classid="CLSID:22D6f312-B0F6-11D0-94AB-0080C74C7E95" codebase="http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=6,0,02,902" standby="Loading Microsoft® Windows® Media Player components..." type="application/x-oleobject" align="middle">
<param name="FileName" value="http://81.107.207.101:8000">
<param name="AutoStart" value="true">
<param name="animationatStart" value="true">
<param name="transparentatStart" value="true">
<param name="showControls" value="true">
<embed type="application/x-mplayer2" pluginspage ="
http://www.microsoft.com/Windows/MediaPlayer/" src="http://81.107.207.101:8000" align="middle" autostart=true>
</embed>
</object>