SHOUTcast Server Source Support

From Winamp Developer Wiki
Revision as of 01:53, 16 March 2015 by DrO (Talk | contribs)

Jump to: navigation, search

Shoutcast Home | Shoutcast Server (DNAS) | Shoutcast Developer (API) | Shoutcast For Business & Revenue Generation | Shoutcast DSP (encoder Plug-In for Winamp)


The SHOUTcast DNAS server since the introduction of v2.0 has been able to provide multiple streams from a single DNAS server instance. To be able to do this, it has required the source for the stream to be a relay (pulling a copy of the stream from another server) or by using SHOUTcast 2 protocol compatible source client software (where you specify the stream number to connect to as part of the source configuration).

The downside of this is that unless you are relaying or using an updated source client, existing source client software which is only SHOUTcast 1 protocol compatible has only been able to connect as the source from stream #1 (due to not being able to indicate the required stream number). There was a partial workaround by using the 'streamportlegacy' option but this had issues and was marked as an experimental feature.

With the release of the v2.4.7 DNAS server (and future versions), not being able to use multiple SHOUTcast 1 protocol compatible source software to connect as the source for any stream on the DNAS server has now been removed. The changes to support this will typically not require any source client software updates as this is all handled by the DNAS server as long as the correct password is provided.

How It Works

With the SHOUTcast 2 protocol, the ability to specify the desired stream for the source client to be used for is a core part of the protocol via the required stream identifier. Whereas the SHOUTcast 1 protocol was designed before it was considered to be able to provide multiple streams from a single DNAS server instance (as the v2.x DNAS server supports) and so there is no direct means in the protocol to specify the stream identifier.

All SHOUTcast source client connections require a password to be provided irrespective of the SHOUTcast protocol version being used and with the SHOUTcast 1 protocol, this is the first primary piece of information sent to the DNAS server when the source is attempting to connect.

By manipulating the password provided from a SHOUTcast 1 protocol compatible source client to also include the intended stream identifier, it is now possible for the DNAS server to know the intended stream the source client is to be used for. This is what will now allow for the v2.4.7 DNAS server (and future versions) to be able to support multiple SHOUTcast 1 protocol compatible source clients along with the added benefit of not requiring source client software updates (though native SHOUTcast 2 protocol support is preferred over SHOUTcast 1 protocol based source clients).

How To Do It

To connect a SHOUTcast 1 protocol compatible source client to a specific stream then you can append :#<sid> to the end of the password to be used so you have <password>:#<sid> (where <password> is the configured stream password and <sid> is the required stream identifier).


to connect to stream #2 with the configured password as bob

the value to enter in the source client password field is: bob:#2

stream #1 is the default stream assumed for a SHOUTcast 1 protocol compatible source client
and so it is not necessary to add :#1 to the end of the password, though it is ok to do this

The colon character is now a reserved character and cannot be used as a value in passwords. If the DNAS server detects a colon then the password will be rejected and the DNAS server may abort running.

DJ / User ID

In addition to the ability to provide the stream identifier, it is also possible to provide a DJ / User ID for the source connection. This is done in a similar manner but places the DJ / User ID value at the start of the password field





<dj> is the value to send
<password> is the configured stream password
<sid> is the required stream identifier

This support is currently used just to see which DJ / User is connected as the source client for the stream, however in future DNAS releases then this may be used as a way to do additional controlling of the source client connections to the DNAS server.

Is There Anything Else?

To ensure that SHOUTcast 1 protocol compatible source clients areable to access the DNAS server, you may need to open an additional port to just portbase to allow the source connection to be made if it is not from the same machine or the same local network as the DNAS server i.e. you are making an external source connection.

If the source is running on the same machine or local network then you
will not need to open any additional ports for the connection to work.

How to do this will depend upon your setup but often requires ports to be opened on the router and in the Operating System's firewall. You should be able to find information for your router on how to do port forwarding from | (which only requires TCP connections to be forwarded and not UDP connections).

Usually you will be forwarding port 8000 as well as port 8001 (which is the actual port that the SHOUTcast 1 protocol uses for source connections). If you have changed portbase from it's default value then you will need to ensure that portbase+1 is opened so that the external source connection can be made. You can use | to confirm that the port forwarding is working correctly (just ensure the DNAS server is actually running at the time!).

If not done correctly then the source connection will fail
either due to a connection timeout or an unknown error code.

Additional Information


If you are still unsure about what to enter into the source client password field, the View Source Login Details page (found on the DNAS server admin summary page) which shows the appropriate password to use for the different SHOUTcast protocol source clients via the Password and Legacy Password values shown.