Old 24th January 2002, 02:36   #1
Sawg
Guest
 
Posts: n/a
Shoutcast: Multi-bitrate Streams

Sending Out Multi-bitrate Streams

This document describes how to create a Shoutcast stream that sends out one stream at two different bitrates. It is written towards the audience of a Shoutcast novice. Only the setup for two streams is described here though extra streams can be created following the same patterns. I assume that you have already read How To Set Up An Internet Radio Station. The example streams used here are referred to as high and low throughout the article.


Shoutcast DNAS Setup
First step in this process is creating the separate INI files for the high and low bitrate streams. In the Start Menu, select Programs > Shoutcast DNAS > Edit SHOUTcast DNAS configuration. This will open the configuration file in Notepad (or your default text editor). To set up the high bandwidth configuration file, select File > Save As and save it as high.ini (make sure you are saving into the Shoutcast directory).

Next, to set up the low bitrate configuration file find "PortBase=8000" (8000 is default, you may have changed it before) under the "Required stuff" heading and change it to a port that gives each entry a two port range. For example, if in the high bitrate configuration file you have port 8000 used (default) use port 8002 or 7998. The exact port number is up to you as long as it does not conflict with another program running on your computer. Once you have your port decided on, go to the "File" menu and select "Save As..." and save this one as low.ini (make sure you are saving into the Shoutcast directory). Remember the ports you assigned to each configuration, you will need these later when you set up the Shoutcast DSP plug-in.

Now you must make the shortcuts to start each server instance. This part might be kind of tricky for the computer novice. Open Windows Explorer (Start > Programs > Windows Explorer or the WinKey+E on your keyboard) or My Computer. Select the drive you have the Shoutcast DNAS installed to ('C' usually) then Program Files and then SHOUTcast. Your folder may be different if you did a custom install. Your newly created high.ini and low.ini should be in there. Right click and drag "sc_serv_gui" to some white space (background) and let go. Select "Create shortcut(s) here." This is pictured below.



Repeat this twice. Rename each one to High and Low, or whatever you want to designate your two streams. This is pictured below.



Right click on one of the two shortcuts and select "Properties." In the box that pops up, select the Shortcut tab and look for a box called "Target:"
Depending on your setup you should see a line that looks something like this:

"C:\Program Files\SHOUTcast\sc_serv_gui.exe"

After that line, depending on the icon you selected first, add at the end either high.ini or low.ini

"C:\Program Files\SHOUTcast\sc_serv_gui.exe" high.ini



Repeat this process for the other icon respectfully.
"C:\Program Files\SHOUTcast\sc_serv_gui.exe" low.ini

Now feel free to move these icons to where they best suit you, eg. the Start Menu or the Desktop. Assuming you did everything correctly you should get two instances of Shoutcast DNAS and their logs will look a little something like this.

Started with the "Low" shortcut:
code:

*******************************************************************************
** SHOUTcast Distributed Network Audio Server
** Copyright (C) 1998-2000 Nullsoft, Inc. All Rights Reserved.
** Use "sc_serv filename.ini" to specify an ini file.
*******************************************************************************

Event log:
<01/23/02@19:33:29> [SHOUTcast] DNAS/win32 v1.8.3 (Aug 7 2001) starting up...
<01/23/02@19:33:29> [main] loaded config from C:\Program Files\SHOUTcast\low.ini
<01/23/02@19:33:29> [main] initializing (usermax:32 portbase:8002)...
<01/23/02@19:33:29> [main] No ban file found (sc_serv.ban)
<01/23/02@19:33:29> [main] No rip file found (sc_serv.rip)
<01/23/02@19:33:29> [main] opening source socket
<01/23/02@19:33:29> [main] source thread starting
<01/23/02@19:33:29> [main] opening client socket
<01/23/02@19:33:29> [main] Client Stream thread [0] starting
<01/23/02@19:33:29> [main] client main thread starting
<01/23/02@19:33:29> [source] listening for connection on port 8003



Started with the "High" shortcut:
code:

*******************************************************************************
** SHOUTcast Distributed Network Audio Server
** Copyright (C) 1998-2000 Nullsoft, Inc. All Rights Reserved.
** Use "sc_serv filename.ini" to specify an ini file.
*******************************************************************************

Event log:
<01/23/02@19:33:30> [SHOUTcast] DNAS/win32 v1.8.3 (Aug 7 2001) starting up...
<01/23/02@19:33:30> [main] loaded config from C:\Program Files\SHOUTcast\high.ini
<01/23/02@19:33:30> [main] initializing (usermax:32 portbase:8000)...
<01/23/02@19:33:30> [main] No ban file found (sc_serv.ban)
<01/23/02@19:33:30> [main] No rip file found (sc_serv.rip)
<01/23/02@19:33:30> [main] opening source socket
<01/23/02@19:33:30> [main] source thread starting
<01/23/02@19:33:30> [main] opening client socket
<01/23/02@19:33:30> [main] Client Stream thread [0] starting
<01/23/02@19:33:30> [main] client main thread starting
<01/23/02@19:33:30> [source] listening for connection on port 8001



Troubleshooting
If in the server longs you see an error like "[conf] Couldn't find C:\Program Files\SHOUTcast\lo.ini -- assuming defaults" you should check your shortcuts because most likely the configuration file referenced in the shortcut is not a valid entry. In the error above "low.ini" was misspelled as "lo.ini". Depending on how you opened the servers you may or may not also get this error "[main] error opening source socket! FATAL ERROR!" If you got both errors ignore this last one.

If you do not see "[conf] Couldn't find C:\Program Files\SHOUTcast\lo.ini -- assuming defaults" but you still get "[main] error opening source socket! FATAL ERROR!" then you have a port conflict. Read back above and reassign a different port set in the configuration file of the server instance that created the error.


Shoutcast DSP Setup
Start the Shoutcast DSP as you normally would.
Preferences (Ctrl-P) > Plug-ins > DSP/Effect > Select "Nullsoft Shoutcast Source DSP..."

Once you select this the Shoutcast DSP box will pop up. First select the "Encoder" tab. Select an Encoder (Use Encoder 2 because Encoder 1 currently has a bug), select an Encoder Type (currently only MP3), and then select the format and bitrate you want to stream with in the "Encoder Settings" drop down. Select the proper bitrate for this version of the stream, remember which encoder it is on and if it is your high or low stream. Repeat this process again selecting the next encoder in the list and set it up as your other stream and remember the encoder number.

Next select the "Output" tab and select an Output (Output 1 by default is good). Hit the "Connection" button if it is not already selected. Type in the address of your server ("localhost", if the DSP and server are on the same machine). For "Port" enter the port you have as PortBase in the first configuration file. Enter the password you selected when editing sc_serv.ini. Finish off by selecting the encoder number that you previously set that matches the stream and port number you entered. For example, if for your high bandwidth server you left the port as the default 8000 and set Encoder2 as the high bandwidth stream, enter "8000" for port and "2" for encoder.



Select the second output option and enter the proper port and encoder number like you did above. For example, if your low bandwidth stream is set to 8002 in the configuration file you made and you set Encoder 3 as your low bitrate encoder, enter "8002" for the port and select "3" for the Encoder. You may want to select the yellow pages button for each Output and note that if the stream is high or low bandwidth in the title.



Now, assuming everything is set up correctly, start both instances of your server by opening the shortcuts you made previously. Select the first output in the Shoutcast DSP and hit connect. Make sure that it did connect to the server and the proper server. Select the second output and hit connect, it should connect to the other instance of the Shoutcast DNAS.

If you made it this far you are now done, you are now sending out multiple streams, congratulations.


======================
[Version: 1]
[Last Updated: 01-23-02]
  Reply With Quote
Reply
Go Back   Winamp & SHOUTcast Forums > Tech Support Greatest Hits

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is On

Forum Jump