Complete Guide to Audio Streaming in LAN

Status
Not open for further replies.

alib_i

Cyborg Agent
This tutorial will explain all steps involing in setting up a radio broadcast server for your Intranet/LAN preferably using winamp and .mp3 files

Note:
  • This tutorial is only for LAN Servers. To broadcast over the Internet, search this forum. You'll find a few links. I am not discussing that because I havent tried it myself. Somebody may help me out there.
  • This is entirely written by me and my experience with radio broadcasting inside LAN ( I mean it's not a rip-off :) ). But there are lots of good tutorials over the internet. You can google out, if this seems insufficient.
  • This tutorial is only for windows. For a linux specific tutorial, go this tutorial: How to Install Shoutcast
  • This is a audio streaming tutorial. For video streaming, refer to this tutorial: Guide to Streaming Video in LAN
  • All comments/suggestions/corrections invited.

SHOUTcast
____________________________________________________________________________________________________

Shoutcast is the most popular choice for creating streaming servers. Following Steps describe the procedure

1. Install Winamp. Homepage | Download Page
IMP: You need either Winamp 2.x or Winamp 5.x for this. Winamp 3.x doesnt work !

2. Download and Install SHOUTCast DSP Plugin (Download|224KB) and SHOUTCast Server (Download|267KB). You may have to restart Winamp if already running.

3. Configure DSP:
Start Winamp and go to Option -> Preferences -> DSP/Effect and Select "Nullsoft SHOUTCast Source DSP". It will open a new window which looks like following
*img81.imageshack.us/img81/1062/Clipboard46.jpg
Go to Output Tab
*img81.imageshack.us/img81/6084/Clipboard45.jpg
and enter following changes:
  • Select "Output 1"
  • Press "Connection" Button
  • Address = "localhost"
  • Port = "8000" (or any other if you want, 8000 is default)
  • Password = {any passw you want}
  • Encoder = "1"
  • Press "YellowPages" Button
  • Uncheck "Make this server public" (select it when you want your server listed in shoutcast. That's an altogether different matter)
  • Put in a Description, URL, etc
  • Keeping "Enable Title Updates" allows the song title to be displayed at the listener's end
In Encoder Tab
  • Select "Encoder 1"
  • Encoder Type = "MP3"
  • Encoder Settings = {pick a setting from the list}
    ( I would suggest select something above 90kbps, stereo for enjoyable sound )
In Input tab
Make sure the Input Device is "Winamp". You can choose "Soundcard Input" if you want to stream microphone/line-in sound. Useful for DJing :)


4. Configure Server
Start the server from "SHOUTCast DNAS (GUI)" link in start menu. Click on "Edit Config". This will open sc_serv.ini in notepad.
  • Appoximately 20th line of the ini file says "MaxUser=<some value>". Change the value to what you want. ( say 32)
  • A few lines furthur below is "Password=changeme". Change the password to what you've kept in DSP in Step3.
  • Furthur few lines below is "PortBase=8000". Change it to whatever you've entered in Step3 in Output tab
"Kill Server" and start it again.

.
..
Almost done.
..
.

5. Go to Winamp's SHOUTCast Source window -> Output tab -> Press Connect.
It should connect and the status should show something like "[time]Sent [some] data"
There you have your radio up and running.
You can look at the status of your server using a HTTP link: *Yo.ur.I.P:8000 ( or *127.0.0.1:8000 ). It shows a page like this :
*img81.imageshack.us/img81/151/Clipboard47.jpg

Anybody can listen to your radio by either clicking on "Listen" in above page or manually entering *yourip:8000 in Winamp's Add URL box

Note(IMP):
  • You can run only .mp3 files for broadcasting. Other files create problem
  • If you accidentaly run a .wma, etc file, you have to restart winamp to make the radio running properly again
  • The volume you keep in your winamp's window doesnt change the volume of broadcasted song
  • You can find how many people are connected your radio by keeping your mouse over the shoutcast server icon in your taskbar
    *img81.imageshack.us/img81/646/Clipboard48.jpg
  • Your Radio can be connected using Winamp/JetAudio(I think) and many other players in Windows, Audion and iTunes in Mac and XMMS in Linux.
  • The "SHOUTcast Source" window will remain open till you have shoutcast's DSP selected in Winamp's preferences. You can select "NONE" in DSP/Plugin window in preferences in winamp when you are not running the radio.
  • There is a 1-3 second lag between broadcaster and listener. You can easily notice the lag if your radio server and listener computers are physically close to each other. :)


Icecast
____________________________________________________________________________________________________

Next to SHOUTcast, in popularity, is Icecast. It's most poweful feature is that it works in Linux environment and it's Open Source. It can stream Ogg Vorbis format along with MP3 format. In fact it's develoved by Ogg's creators. foobar2000/Winamp/Sonique(I think) in Windows and XMMS in Linux can connect to an Icecast Server.

1. To connect to SHOUTcast DSP, follow the first 3 steps described above.

2. Download and install Icecast2 Server | Webpage | DownloadLink | 1.98 MB

3. Go to Icecast's installation folder (C:/Program Files/Icecast2 Win32) and rename the "icecast.xml" or anything (say icecast_original.xml) and rename another file called "icecast_shoutcast_compat.xml" to "icecast.xml". Now you can open this file in notepad and change the port number and source-password to what you've used in Shoutcast DSP.

4. Start the server and Press Connect in Shoutcast's DSP window and you have your radio running. The "global stat" called "sources" in Icecast window should turn to "value=1". Switch to "Source Level Stats" in Icecast's window. It must be showing "/stream" over there. You can see the number of listeners, etc there.
*img81.imageshack.us/img81/364/Clipboard08.jpg
Note:
  • Others can connect to your radio using the URL: *Yo.ur.I.P:8000/stream (Use the port you entered in shoutcast). Note the "/stream" attached to the URL.
  • To check the status of your radio, use this URL: *Yo.ur.I.P:8000/status.xsl. It look like this:
    *img81.imageshack.us/img81/1936/Clipboard43.jpg
  • The "/stream" is default name of stream and can be changed to anything else you want. You need to edit the icecast.xml for this. Read THIS page for more info.
  • If you're broadcasting in .ogg format then the stream name should necessarily contain ".ogg" in it's name (ex. /stream.ogg)
  • You can use Oddsock instead of SHOUTcast's DSP plugin. But I would suggest to use it only if you want to stream in .ogg format. For mp3, I would still suggest SHOUTcast. I'm saying this because you need to download lame_enc.dll separately for streaming mp3 with Oddsock and the configuration gives errors at times. I couldnt make it work error freely.
  • For a complete list of Icecast Compatible Souce Clients (for both Windows/Linux Platforms), see THIS page
Advantages:
Many people consider Icecast to be more reliable and better than SHOUTcast. I didnt see any specific difference between both. May be Icecast being open source adds to it's popularity.
Disadvantages:
Nothing worth mentioning, except the fact that configuring using XML files could be a little confusing for new users.


jetCast
____________________________________________________________________________________________________

jetCast is yet another very popular streaming server. It's advantage is that it can stream in MP3, Ogg Vorbis and WMA formats and it has much better support for microphone. Plus you donot need to download a separate server for broadcasting, the DSP comes with the broadcasting server itself.

Going step by step
1. Install Winamp

2. Download and install jetCast DSP plugin for Winamp | WebPage | DownloadLink | 6MB
No need of downloading jetCast server separately.
IMP: This plugin also tries to install "Windows Media 9 Format Runtimes". Install this only if you want to relay your radio from .wma files. Or else it's quite useless.

3. Start Winamp and go to Option -> Preferences -> DSP/Effect and Select "jetCast DSP plugin for Winamp". It will open a new window which looks like following
*img81.imageshack.us/img81/8417/Clipboard49.jpg
Click on the 3rd button from left (It will be disabled when radio is 'on air'). It will open Preferences for jetCast Server
  • In "General->Format" select WMA or OGG Vorbis or MP3 according to your need. Click on "config" to change the bitrate.
  • In "Station" Option you can fill in various details about the radio
  • In "Server" Option enter the port number (default being 9000) for the radio and max listeners
  • In "Directory Server" uncheck "register at jetCast" and "register at Shoutcast" (you dont need it for internal broadcasting)
  • Click OK

4. Start playing any song in winamp and click on the 1st button from left in the jetCast's window and your radio is 'on-air'. You see the bitrate/no.of listeners/title etc on the window. You can press the 2nd button (mic) on the jetCast's window to switch ON the mic. Now you can speak your favorite words along with the song for fun. Press the same button again to switch the mic OFF. The orange panning bar on the right of the buttons decides the volume of mic vs. the volume of song.

Anybody can check the status of your server using following link: *Yo.ur.I.P:9000 (or whatever port) in a browser. To connect to your server, manually add the "*yo.ur.i.p:9000" to winamp's/jetaudio's playlist
*img81.imageshack.us/img81/6975/Clipboard50.jpg

Advantages:
Very very useful if you want to broadcast voice along with song ( proper DJing :) ). Mic control is very handy and easy in jetCast.
Disadvantage:
I've noticed that it takes quite long to connect to winamp and even in my 100MBps LAN I've seen it buffer an intranet radio occasionaly. Many other players dont support jetCast.


Other Combinations
____________________________________________________________________________________________________

1. There is a separate jetCast Server also (DownloadLink|3.76 MB). This server can be used (instead of Shoutcast server) along with Shoutcast DSP Plugin. But from my experiences, I've seen jetcast radio server seems to be slower in connecting/buffering and supports less media players. Plus it offers less choices of bitrate/quality. I would suggest that Shoutcast DSP + Shoutcast Server is a better combination that Shoutcast DSP + Jetcast Server.

2. You can also use jetCast's Server along with jetCast DSP Plugin, but it's quite useless as jetCast DSP already has the server in-built.

3. One good combination I could be : jetCast DSP Plugin + SHOUTcast Server
Install and start the plugin and server as I've described above. Now go to jetCast DSP Plugin and press Configure button (3rd from left) -> (in preferences window) Server -> Press Config. -> Check "use external server" and select the Shoutcast server. Give the required port and password. It works but the damn thing crashes for no reason. If someone can figure out why it occurs and solves, it could be helpful.

4. Best combination now could be : jetCast DSP Plugin + Icecast Server
Just like I described in last combination, go to "use external server" and select Icecast 2.x server. Put in the mount="/stream" (say), hostname="localhost" and port number and password. Remember to put the same port/passw in Icecast's Config. This combo works like wonder. You get very good configurable options from jetCast and along with that you also get Icecast's reliability.

5. DSP Enhanced Sound
Now, as you've selected Shoutcast or Jetcast or whatever DSP in you DSP/Plugin List, you cannot use the common Sound enhancing DSPs like DFX or SoftAmp VirtualSound. To solve this problem, there are plugins which can stack DSPs together so that now you can run a DFX Enhanced Shoutcast Server. Cool aint it! Follow the links: Multiple-DSP Stacker or Multiple DSP Plugin


Result of this whole damn article :) ::

# Use Shoutcast DSP + Shoutcast Server when you dont want any headache :p, as it's really easy to configure and supported by very large number of players in various platforms.

# Use jetCast if you want frequent change from mic to song and back. It's very easy with jetCast

# Use Icecast Server if you love open source softwares, being less prone to bugs, crashes, etc. Use it with Shoutcast DSP for ease for configuring or jetCast's DSP for ease for use with mic.

-----
alibi
 

digen

Youngling
Nice tutorial dude !
I always wanted to try this.Since I'm a foobar user I believe Icecast should be perfect for me.
 
OP
alib_i

alib_i

Cyborg Agent
Thank digen

I'm going to post a PHP script to extract info from a SHOUTcast server .. and display it in a more fancy way in some time


-----
alibi
 
Status
Not open for further replies.
Top Bottom