Icecast

For COMP 435, I needed to propose a streaming server. I chose Icecast since it’s so popular and plus audio is another area that I really interested in.

To setup a full internet broadcast radio station, you will need Icecast server and a source client which provides the audio stream. I decided on ezstream, since it was the only source client that actually worked, and configuration/setup was easy.

Here is a sample “icecast.xml” configuration file that might be used on a server:

<icecast>
    <limits>
        <!-- Specifies the number of clients that can connect -->
		<clients>25</clients>
		<!-- One for main source client, one for standby, third for microphone input -->
		<sources>3</sources>
    </limits>
    <authentication>
        <!-- Should change this in production use. -->
		<source-password>hackme</source-password>
        <admin-user>admin</admin-user>
        <admin-password>hackme</admin-password>
    </authentication>

	<!-- Use your registered domain name -->
    <hostname>www.my-radio-station.org</hostname>
    <listen-socket>
        <port>8000</port>
    </listen-socket>
    <paths>
        <!-- Where logs are stored. -->
		<logdir>./logs</logdir>
        <webroot>./web</webroot>
        <adminroot>./admin</adminroot>
        <alias source="/" dest="/status.xsl"/>
    </paths>
    <logging>
		<accesslog>access.log</accesslog><!-- Name of log file -->
        <errorlog>error.log</errorlog><!-- Name of log file -->
      	<loglevel>2</loglevel> <!-- 4 Debug, 3 Info, 2 Warn, 1 Error -->
		<logsize>50</logsize>
    </logging>
	
	<!-- Publish on YP. Can add mulitple sites. -->
	<directory>
		<yp-url-timeout>15</yp-url-timeout>
		<yp-url>http://dir.xiph.org/cgi-bin/yp-cgi</yp-url>
    </directory>
	<directory>
        <yp-url-timeout>15</yp-url-timeout>
        <yp-url>http://openradiodirectory.org/yp.php</yp-url>
    </directory>
</icecast>

Then you can use ezstream as a source client to send the stream to the Icecast server. A sample ezstream XML file might look like the following:

<ezstream>
    <url>http://www.my-radio-station.org:8000/stream</url>
    <sourcepassword>hackme</sourcepassword>
    <format>VORBIS</format>
    <filename>stream.m3u</filename>
	<playlist_program>0</playlist_program>
    <stream_once>1</stream_once>
    <svrinfoname>My Radio Stream</svrinfoname>
    <svrinfourl>www.my-radio-station.org</svrinfourl>
    <svrinfogenre>70s Rock</svrinfogenre>
    <svrinfodescription>Streaming audio from the 70s.</svrinfodescription>
    <svrinfobitrate>96</svrinfobitrate>
    <svrinfochannels>2</svrinfochannels>
    <svrinfosamplerate>44100</svrinfosamplerate>
    <svrinfopublic>1</svrinfopublic>
</ezstream>

3 Responses to Icecast

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: