Mar 302010
 

So, streaming audio… to more than a few people… I managed to put together something that has been pretty much rock solid for over a year using nothing but what we had laying around.  SUCCESS!

Encoder Setup

Windows Media Encoder 9 Series
http://www.microsoft.com/downloads/details.aspx?FamilyID=5691ba02-e496-465a-bba9-b2f1182cdf24&displaylang=en

Windows Media Encoder 9 Series SDK
http://www.microsoft.com/downloads/details.aspx?FamilyID=000a16f5-d62b-4303-bb22-f0c0861be25b&displaylang=en

SRVSTART (Runs a command as a service)
http://www.nick.rozanski.org.uk/software#srvstart

A very old version of Centurion Guard (http://www.centuriontech.com/)

Windows XP Pro

To make things simpler, I moved wmcmd.vbs from the default installation location (C:WMSDKWMEncSDK9samplesvbwmcmdWmcmd.vbs) to something easier to remember (C:wmeWmcmd.vbs)

Hint: This is what I used for my srvstart.ini
[encode]
startup=C:WINDOWSsystem32cscript.exe "C:wmewmcmd.vbs" -adevice 1 -broadcast 8080 -silent -profile a32 -duration 604800 -title "Radio Station Name"
auto_restart=y
restart_interval=2

I set the audio levels of the integrated audio and danced a jig because the audio device started before logon, so running as a service is great success!

Then I set the hostname to something descriptive and locked the computer with the Centurion Guard.

Server Setup

We already had a Windows Media Services server running, so this isn’t too incredibly difficult… I just added a mountpoint for the streaming audio, set the source as  http://hostname:8080, set limits (we currently allow 7mbit/s which is around 210 listeners with some overhead spared for fast start)

Advertisement:

Windows Media Services Ports (If it isn’t already configured, allow these through your firewall)
http://www.microsoft.com/windows/windowsmedia/forpros/serve/firewall.aspx#Unicast

Display / Presentation

There are many options for publishing… We decided it would best to embed it within a webpage for displaying promotional materials

Embed code for WMA that seems to work on all platforms (assuming codecs are available)
<object id="MediaPlayer" width=330 height=45 classid="CLSID:22D6f312-B0F6-11D0-94AB-0080C74C7E95" codebase="http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=5,1,52,701" standby="Loading Microsoft Windows Media Player components..." type="application/x-oleobject" style="margin: 0px; padding: 0px;">
<param name="FileName" value="mms://external-hostname.tld/mountpoint" />
<param name="target" value="_blank" />
<param name="ShowControls" value="True" />
<param name="ShowVolume" value="True" />
<param name="ShowStatusBar" value="False" />
<param name="ShowDisplay" value="False" />
<param name="Autostart" value="TRUE" />
<param name="ClickToPlay" value="True" />
<param name="AnimationAtStart" value="True" />
<embed type="application/x-mplayer2" src="mms://external-hostname.tld/mountpoint" name="MediaPlayer" width="325" height="75" showcontrols="1" showstatusbar="1" showdisplay="0" autostart="1" style="margin: 0px; padding: 0px;"> </embed>
</object>

Another option that works really well is to just host an ASX file on your webserver. (ASX files are nothing but playlist files that point to the media)
<asx version="3.0">
<entry>
<title>Radio Station Name</title>
<ref href="
mms://external-hostname.tld/mountpoint" />
<copyright>©20-whatever Radio Station Name</copyright>
</entry>
</asx>

 Leave a Reply

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>

(required)

(required)