Playing Shoutcast or IceCast streams

Preliminary test have shown that wimpy will connect to a standard ShoutCast stream and an IceCast stream. The IceCast stream connection was handled through OddSock's Oddcast. The ShoutCast stream was handled through the standard ShoutCast Server. Both servers must be set up to stream mp3 data.

Both tests were conducted on a local Windows IIS server (Windows XP Professional).


Only Mozilla's Firefox allowed the stream to play through Wimpy. Wimpy would not play the stream through Internet Explorer. The reason seems to stem from the way that IE determines the type of stream / the way the data is handled. I tried a number of "shims" (using PHP to apply the proper headers for the connection), but this didn't work for IE, probably because older versions of IE used "content sniffing" and ignored headers.

The idea is pretty straight forward, since Macromedia Flash can playback mp3 data. setting up a playlist to connect to the MP3 stream, the binary MP3 data streams through the player.


Then using the Customizer tool to run wimpy off of the playlist, Wimpy would play both the Shoutcast and IceCast/Oddcast streams through the Wimpy interface with FireFox, but not Internet Explorer.

All attempts to "shim" the stream through PHP, using a "FREAD", mp3 header, socket and so on did not work.

Click here to download an example playlist set up.

Known Issues

The way that Wimpy works in conjunction with a streaming server is that it will connect, and then start streaming until the "post buffer" allocation has been met. In other words, once the number of megabytes defined in "post buffer" has been reached, Wimpy will make another connection to the streaming server.

With some streaming servers, each time a connection is made the avatar is first played. This means that each time Wimpy makes a new connection, the avatar will play.

Another issue is that the demo version "forces" a new connection every 10 seconds regardless of the setting defined for "post buffer" (post buffer is configured using the Customizer tool).

So basically, if you use the non-demo version, you can set the "post buffer option" to a higher number -- anything between 10-1000 should work) -- however, once 10 or 1000 MB have been streamed to the client, a new connection will be made and if your streaming server is set up so that an avatar gets played when a new connection starts, your avatar will once again play.


Playing Icecast or Shoutcast streams through Wimpy

Both Wimpy Button and Wimpy MP3 Player can play IceCast and Shoutcast streams. As of this writing, Shoutcast streams must run through a "proxy" in order for the streams to play in Internet Explorer. Icecast Streams do not need a proxy.

NOTE: A proxy is not the most efficient way to play a stream, so playback may be choppy and/or unusable through Shoutcast. You can download an example of a shoutcast proxy set up here.

The remainder of this document will refer to using Wimpy with Icecast.

To run Wimpy off of an Icecast stream, first install and setup an Icecast server, using Oddsock's Oddcast DSP plugin for either Winamp or Foobar.

NOTE: When testing, WinAmp seems to do a better job of playing back the files, whereas FooBar seemed to have issues with playing back the audio "hot" -- or too loud, which caused "clipping" when the audio was played through Wimpy.


Loading the Icecast stream into Wimpy

There are two settings used to control a stream:

1. Buffer Audio
Buffer Audio references a number of seconds that a connection should buffer before actually starting to play. You may want to set and change this option to a value somewhere between 5-10

2. Icecast
This option references the total number of kilobytes (KB) that Wimpy should store before making a new connection. Good number to use are between 400 and 1000.

It is HIGLY recommended that you use the Customizer Tool, or Wimpy Button Maker Tool to configure these options, since editing the HTML manually will cause the player to not work across all browsers.


Wimpy Button

Use the Wimpy Button maker tool and click the "icecast" option. Set the URl to the "mp3 file" to the URL for your streaming server.

Upload the resulting HTML code to your web site.


Wimpy MP3 Player

There are two methods for loading the stream into the player. Either through the Embedded Playlist option, or through an XML playlist.

1. Using an Embedded Playlist

To use this option, go to the Customizer tool and in the "Advanced Options" area, enter the URL to the Icecast mount point.

Then click the checkbox for 'Play Icecast stream" -- and set "post buffer" to the maximum number of MegaBytes that wimpy will maintain in the end user's machine's memory before it makes a new connection

IMPORTANT NOTE: The mount point must use an "mp3" extension so that Wimpy will recognize the "filename" as an MP3 file.


2. Using an XML playlist

Click here to download an example playlist set up. Here is an example of how the XML should be set up:

   <title>High Bandwidth</title>
   <title>Low Bandwidth</title>

IMPORTANT NOTE: Your mount point should include a "dot mp3" extension so that Wimpy recognizes the item as an MP3 file. If the mount point does not include a "dot mp3" extension, the stream will not play.

You can set up multiple mount points within the XML playlist for different kinds of connections.

Once you ave created an XML playlist, upload it to your server and then use the Customizer Tool to set "Wimpy Script" to the URL to your XML playlist.



Click the checkbox for "Play Icecast stream" and set the "post buffer" option to the number of kilobytes Wimpy should retain before it makes a new connection.

Upload the resulting "myWimpy.html" file to your server and open the file with a web browser.

About streaming.

Wimpy streams audio using the "progressive download" approach. "Streaming" is a generic term. The term "streaming" is used to simplify the concept of allowing data to be decoded/played as soon as possible. There are many different ways to stream information. For audio and video it basically means the audio or video will be decoded and played back as soon as the data can be interpolated and presented to end user's system/software.


Understanding the basic streaming server setup.

Why is setting up a streaming server so confusing?

Because the terminology repeats itself. in other words, words such as "server" and "client" have two or three meanings. So every time the word is mentioned, it is unclear exactly what "they" are talking about.

That being said, setting up a streaming server is still a little tricky if you're not a network administrator by trade. And if you're a newbie, go make a pot of coffee, it's gonna be a long night.

What I'm going to try and do is explain the different components and how they inter-relate. And I'll also try and clarify ubiquitous terms such as "client."

A streaming server consists of three pieces of software.

1. Server (Server software)
Server Software allows your machine to "serve" data to other machines. If you look at things the other way around, the "server software" manipulates the operating system and the hardware to allow remote machines to connect to your machine.

2. Player (DSP capable player)
DSP stands for "Digital Signal Processing." There are a couple well-known and widely used audio players that allow third party "plugins."

The majority of the DSP plugins are used to add effects to audio files, such as echo and reverb. The idea being that the audio player makes the analog signal available to the plugin prior to releasing it to the speakers (or audio card) so that cool effects can be applied to the sound.

Streaming server DSP plugins (see "bridge" below) take this idea of capturing the signal before it goes to the speakers and rather than applying a cool effect, they transmit the signal/data over a network.

Here are two nice audio players with DSP support:
- WinAmp
- Foobar

3. Bridge (DSP conversion software)
Bridging software captures an analog signal, then converts the signal into a digital format, then sends the data to the Server Software. In other words, it "bridges" your audio player software to your server software.

The Bridging software does the reverse of what a standard audio player does -- it converts an analog signal into digital data.

A standard audio player takes a digital file and converts it into an analog signal so that your speakers can play it. The only way to send stuff over a network is if it is digital. We can not send analog data over a network. Phones and telegraphs are used to do that.

What we are trying to do here is send raw digital data directly to another machine. In other words, a remote computer can "point" it's audio player to our machine and thereby receive the raw digital data and then convert the digital data back into an analog signal and then out to the speakers -- i.e. stream audio.

Here's a word picture of how things shake out:

my computer -> audio player -> bridge -> server ->

-> --- internet --- ->

-> bob's computer -> bob's audio player -> bob's speakers -> bob's ears -> bob's brain -> bob's thoughts -> bob's dreams -> bob's words -> bob's actions

In other words your computer can control bob's actions.


Installing and setting up an Icecast-based streaming server.

Download and install:

"special installer"

 -- Or --


"Icecast Current Release"

"OddcastV3 DSP For Winamp And Foobar 2k"

"FAAD 2 for Win32 decoder"
"FAAC v1.24.1 Binary for Win32"

LAME mp3
"Encoders/decoders built using LAME 3.97 beta 2"
Bundle: includes lame.exe, lame_enc.dll and lameACM.acm

While you're there you may want to grab a non-beta-non-alpha release such as the LAME 3.96.1 bundle



Assumes you have installed all the items above

Configure IceCast

1. You can access the icecast config file using the icecast main menu, but I recommend just going to the icecast installation folder and dealing with the files directly, since we need to make some back ups and so on.
3. Navigate to your icecast installation folder:
... and open icecast.xml in a text editor.
4. The file is kinda hard to read, so i've created a basic config file that uses the setting need to just get the thing going. You'll probably want to do some more research on the other settings. Click here to see an example icecast.xml file that works for my particular setup. You can just copy and paste this example into your icecast.xml file.
5. Edit the IP addresses to match the IP addresses for your machine. you may also want to create a "tmp" folder at the root of your hard drive since dump-file and fallback-mount refer to this directory. I didn't fiddle around with these configurations, so you may need to set them to the appropriate C:\tmp\example.mp3 and C:\temp respectively. (I'm not sure how IceCast handles back slashes).
6. Be sure to note the password: "myPassword" and the mount name "/myMount.mp3" -- we will be referring to these when we configure OddCast.
7. Set all the port references to whatever you want. Of course, you'll want to note this as well.
8. Open defined ports on your system
You can do this through the "security" settings
- Start > settings > control panels > windows firewall
- Exceptions tab > add Port button
- Define any name you want and set a port, preferably in the 8000 range.
You're on your own to deal with your router and network.

Configure Foobar (or WinAmp see below)

1. Ensure that LAME is present in your foobar folder.
You should have downloaded LAM during the download stages. I'm not sure exactly which folder lame.dll, lamenc.dll and lame.exe need to go into, so i just put copies in both the foobar installation folder and in foobar's components folder. (If you plan on playing mp4 files, the FAAC and FAAD files need to be included in the Foobar folders too)
C:/ProgramFiles/Foobar2000/lame.* (+ faa*.*)
C:/ProgramFiles/Foobar2000/components/lame.* (+ faa*.*)

2. Open Foobar and from the main menu > foobar2000 > preferences > + playback + DSP manager
3. In the right hand column under "Available DSPs" select "Oddcast V3"
4. Click the <= button to move oddcast to the 'active DSPs" column
5. Load a couple mp3s into the foobar playlist and click the play button to ensure that the files play OK.
6. Close Foobar


Installing and using WinAmp

- download and install winamp
- download and install the oddcast plugin for winamp.
- download and install lame (and any other codec) into your winamp installation directory.
- open winamp and from the main menu click Options > Preferences
- scroll to the "plugins" section in the left hand menu and click "DSP/effect"
- Click the oddcast plugin from the right hand area
- The oddcast dialog will appear, click the "config" button on the bottom of the oddcast dialog

bitrate 128 128 128
sample rate 44100
channels 2
Encoder Type LAME
Archive Directory
log level 1
log file oddcastv2.log

VBR | x |
VBR Mode vbr_abr
Quality 1

Record from windows recording device | |
Server Type Icecast2
Server pluto [or your ip address]
Reconnect Secs 10
Port 8050
Live Rec Sample rate 44100
Encoder Password check [or whatever you've set in Icecast]
Genre whatever
Public Server | x |
Reconnect | x |
Mountpoint /128.mp3 [or whatever you've set in Icecast]
Stream URL http://whatever
Server Dec whatever


Configure Oddcast

1. Open Foobar again and click play. The OddCast dialog should open.
2. Click the "Add Encoder" button on the OddCast panel.
3. Double click on the newly created item in the list to edit it.
4. From the "Basic Settings tab:
bitrate: 128 (recommended, but whatever you prefer)
samplerate: 44100 (recommended, but whatever you prefer)
channels: 2
encoder type: MP3 Lame
server type: icecast2
Server IP (the same as what's in the icecast.xml file
Server port 8000 (the same as what's in the icecast.xml file
Encoder pwd: myPassword (the same as what's in the icecast.xml file)
Mountpoint /myMount.mp3 (the same as what's in the icecast.xml file)
reconnect 10




Tricky settings:
Watch out that you use a slash before the mount point e.g.:

Watch for the proper "Server"

You can see when oddcast tries to connect what the URL to the stream is in the "destination" of the oddcast dialog. Make sure that it is a valid URL to your "mount point"






  ©Copyright Plaino LLC. All rights reserved.