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.
IMPORTANT: When setting the URL to your stream, it is important that the URL ends with "mp3". This allows Wimpy to recognize the kind of file being used.
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
This option references the total number of seconds that Wimpy should play before making a new connection. The default value is 300 (5 minutes). If this setting is set to "1" (or lower e.g. "0") the default will be used.
The reason this value is needed is because Flash will continue to store the MP3 data on the local machine. If a new connection is not established, the file size on the end-users disk cen become enourmous. Re-connecting prevents the local cache to grow too large.
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.
Use the Wimpy Button maker tool and click the "icecast" option. The "post buffer" references the total number of seconds that Wimpy should play before making a new connection. The default value is 300 (5 minutes). If this setting is set to "1" (or lower e.g. "0") the default will be used.
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:
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.
NOTE: Click here for more information on LAME settings that may not work with Flash.
Upload the resulting "myWimpy.html" file to your server and open the file with a web browser.
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:
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:
-- Or --
"Icecast Current Release"
"OddcastV3 DSP For Winamp And Foobar 2k"
FAAD + FAAC:
"FAAD 2 for Win32 decoder"
"FAAC v1.24.1 Binary for Win32"
"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
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
Encoder Type LAME
log level 1
log file oddcastv2.log
VBR | x |
VBR Mode vbr_abr
Record from windows recording device | |
Server Type Icecast2
Server pluto [or your ip address]
Reconnect Secs 10
Live Rec Samplerate 44100
Encoder Password check [or whatever you've set in Icecast]
Public Server | x |
Reconnect | x |
Mountpoint /128.mp3 [or whatever you've set in Icecast]
Stream URL http://whatever
Server Dec whatever
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)
encoder type: MP3 Lame
server type: icecast2
Server IP 192.168.0.2 (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)
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"