Winamp & Shoutcast Forums

Winamp & Shoutcast Forums (http://forums.winamp.com/index.php)
-   Shoutcast Technical Support (http://forums.winamp.com/forumdisplay.php?f=86)
-   -   How to relay multiple streams from the internet? (http://forums.winamp.com/showthread.php?t=380311)

designworks 20th January 2015 03:25

How to relay multiple streams from the internet?
 
Hi guys,

I have successfully setup a Shoutcast server to relay one internet radio station from the internet on the company intranet via an old Windows Server 2003 box I had spare. But I can't make sense of how to relay additional streams via the same server. I have read the Wiki and tried to find an existing forum post trying to solve the same problem but I am yet to find a solution.

Here is the contents of my sc_serv_relay.conf file. NOTE: I realise I have commented out the second attempt at adding another stream. I did that so I don't get errors when running it as I am using as a relay currently.

code:
; NOTE: for any relative paths specified are relative to
; sc_serv and not to where the conf file is being stored


; we use the sc_serv_public.conf configuration file as the
; additional configuration to work from for a public server
; which itself is including sc_serv_basic.conf for defaults
include=sc_serv.conf

; assuming there is only one other stream defined then we
; create a second stream configuration for our relay where
; you will need to ensure the values entered are correct
; for the source the stream is coming from and so you can
; authenticate to the YP2 if making this a public system
;
; note: you can change the stream id as appropriate to you

streamid_2=2
streampath_2=/triplej
streamrelayurl=http://shoutmedia.abc.net.au:10326
;streamid_3=3
;streampath_3=/tripler
;streamrelayurl=http://s2.station*************:9020/3RRRFM
;streamauthhash_2=<enter_your_auth_key_here>

; to have more control on the handling of relays then the
; following options from sc_serv2.txt - section 4.0.10 to
; control use of relays or if the relay is set to a public
; state when the server is connected to the YP2
;allowrelay=0
;allowpublicrelay=0



Any tips or advice would be greatly appreciated.

Cheers,
Andrew

DrO 20th January 2015 21:24

that example is broken (likely due to being from an older version of the config examples). use streamrelayurl_2=xxx, streamrelayurl_3=yyy and so on as needed, ensuring you change the number after the underscore (as needs to be done for all of the mutli-config options otherwise it's treated as stream #1).

designworks 20th January 2015 23:53

Thanks for your reply DrO.

This was a new install with the latest version of SC from the webiste, downloaded just before Christmas so if its old and broken its because its the way it came. Also the Wiki examples I was trying to follow seemed to mirror these config files so I had no reason to suspect my config files were old and broken. =(

Maybe the current release files and the Wiki need to be updated to reflect this?

So is the streamrelayurl_X=YYY the only part that is broken? Everything else was fine?

I will try your suggestions now anyway.

Thanks again.

designworks 21st January 2015 00:15

So I modified my conf as you suggested DrO and it now loads without error but the PLS file it serves up only has the first stream.

Here is the relevant part of my conf.

streamid_1=1
streampath_1=/triplej
streamrelayurl_1=http://shoutmedia.abc.net.au:10326
streamid_2=2
streampath_2=/tripler
streamrelayurl_2=http://s2.station*************:9020/3RRRFM
;streamauthhash_2=<enter_your_auth_key_here>

designworks 21st January 2015 05:07

I should add that when executing SC with the command "sc_serv.exe sc_serv_relay.conf" I get a little error window with the title "Error" and the message "sc_serv.conf" and an OK button. Nothing else. I cant figure out what in that config is broken. I have tried commenting out lines 2 and/or 5 but it didn't help.

code:
adminpassword=admin
autoauthhash=0
email=email@domain.com
password=source
;streamid_1=1



Any ideas or suggestions? Thanks again.

DrO 21st January 2015 22:03

Quote:

Originally Posted by designworks (Post 3017625)
This was a new install with the latest version of SC from the webiste, downloaded just before Christmas so if its old and broken its because its the way it came. Also the Wiki examples I was trying to follow seemed to mirror these config files so I had no reason to suspect my config files were old and broken. =(

've checked what's on the site and it's definitely not including the correct version of the example files so i don't know how / why you've got it (unless it's from an earlier install and you're not looking at things in the examples folder (especially since the examples with <enter_your_auth_key_here> references were updated in the 2.2 release).

Quote:

Originally Posted by designworks (Post 3017625)
Maybe the current release files and the Wiki need to be updated to reflect this?

ithe wiki is out of date and what's provided with the DNAS should be the correct version for that build of the DNAS (as present in the docs folder).

Quote:

Originally Posted by designworks (Post 3017625)
So is the streamrelayurl_X=YYY the only part that is broken? Everything else was fine?

yes, that was the only part that was not correct in that it didn't specify the multi-stream part.

Quote:

Originally Posted by designworks (Post 3017626)
So I modified my conf as you suggested DrO and it now loads without error but the PLS file it serves up only has the first stream.

the playlist links from the DNAS only provides what is specified for the specified stream number. without a working link to the DNAS, it's getting hard to double-check what it gives back vs what you're saying.

Quote:

Originally Posted by designworks (Post 3017634)
I should add that when executing SC with the command "sc_serv.exe sc_serv_relay.conf" I get a little error window with the title "Error" and the message "sc_serv.conf" and an OK button. Nothing else. I cant figure out what in that config is broken. I have tried commenting out lines 2 and/or 5 but it didn't help.

am not aware of that from any of the code. can you please confirm it is definitely v2.4.2 build 167 that you're using ? (can be found at the start of the log or by running sc_serv -v). also are you running this directly or via some 3rd party control panel solution ? and what OS build is being used ?

designworks 2nd February 2015 03:47

Thanks DrO,

Sorry for the late response. This had to be put on the backburner for a bit. :)

This is the output from sc_serv.exe -v.
code:
SHOUTcast DNAS/win32 v2.4.2.167 (Oct 30 2014) libcurl/7.38.0 OpenSSL/1.0.1j zlib/1.2.8 expat/2.1.0


I have just done some more testing and fiddling and it looks like it might just be a problem with the second station I was trying to relay. The error shown in the admin GUI is 471
Quote:

Invalid stream type (could be a bad bitrate or mime type)
This is the error shown on the command line
code:
2015-02-02 15:37:32 ERROR [YP] Stream #2 connection attempt failed. YP2 error code is 471 [Invalid stream type]
2015-02-02 15:37:32 ERROR [YP] Bitrate should be numeric



I have added a 3rd station and it seems to be working fine along side the 1st and 2nd. I have also stumbled across how to get to the additional stream in the web GUI. By modifying the "sid" value in the URL. :)

The codec the station I am having issues with, is using OGG Vorbis and the other two that are working are using HE-AAC. To the best of your knowledge, is there anything I can do to get it working? It 'listens' fine. I just have issues relaying it.

Thanks for all your help DrO. And apologies for my noobness.

Cheers!

DrO 2nd February 2015 12:26

Quote:

Originally Posted by designworks (Post 3018525)
The codec the station I am having issues with, is using OGG Vorbis and the other two that are working are using HE-AAC. To the best of your knowledge, is there anything I can do to get it working? It 'listens' fine. I just have issues relaying it.

that is the reason why, only MP3 and AAC streams are supported on the DNAS (1.x or 2.x) and anything in an OGG container is not going to properly work (as playback / relaying doesn't detect title changes correctly nor does it provide the required starting header for such streams to play correctly in the listener software.

all i can do is just add a few checks to prevent against trying to listing an OGG based stream.

and the bitrate issue is because the Icecast server is providing it as "Quality 0" which is not at all what is expected i.e. it's not just a numeric value so that's why the bitrate aspect also fails as it's not relevant to what the DNAS is needing to use for the formats it supports.

designworks 2nd February 2015 20:11

OK cool. I really appreciate your help DrO.

You make it sound like you are the only dev on this project?? Is that true? A check for listening to OGG streams sounds like a great idea. :)

On a slightly off-topic but related note, is there a way to customise the index page that shows me all the streams I am relaying, so that instead of saying "stream 1, stream 2..." etc. it shows the name I specified in the the "streampath_X" settings?
It would make it a lot more user friendly. :)

Thanks again.

DrO 2nd February 2015 20:26

Quote:

Originally Posted by designworks (Post 3018560)
On a slightly off-topic but related note, is there a way to customise the index page that shows me all the streams I am relaying, so that instead of saying "stream 1, stream 2..." etc. it shows the name I specified in the the "streampath_X" settings?

there isn't a way to change it, though wouldn't showing the stream name and stream format be better than the stream path ? especially as i've seen some really bad streampath entries and that would make it a bit more like the server admin page and easier to pick a stream by it's format.

designworks 2nd February 2015 20:45

yeah, that's much better. I was just starting small and simple in the hope that it might seem super easy and get implemented quicker. :p

What you suggested sounds much better but also (to the uninitiated) much harder.

Actually, thats already done on the Admin status page. Would it be as simple as just copy some of the code from the admin status page over to the index.html?

DrO 2nd February 2015 21:08

1 Attachment(s)
Quote:

Originally Posted by designworks (Post 3018566)
Would it be as simple as just copy some of the code from the admin status page over to the index.html?

pretty much as per the screenshot taken from working code...

designworks 2nd February 2015 21:09

YES! Amazing! :)

(I think I might be buying you some beers!)

designworks 2nd February 2015 21:30

Quote:

Originally Posted by DrO (Post 3018567)
pretty much as per the screenshot taken from working code...

Oh wait, are you saying its already working that way? And I just need to update?

DrO 2nd February 2015 21:38

what's in the screenshot is from working code as part of my development build of the DNAS. it's not publically available but will be included as part of the next public DNAS release.

designworks 2nd February 2015 21:41

Quote:

Originally Posted by DrO (Post 3018571)
what's in the screenshot is from working code as part of my development build of the DNAS. it's not publically available but will be included as part of the next public DNAS release.

Love your work. Looking forward to its release. :)


All times are GMT. The time now is 15:58.

Copyright © 1999 - 2010 Nullsoft. All Rights Reserved.