Old 20th June 2013, 17:25   #1
DirtMcGirt
Member
 
Join Date: Jan 2009
Posts: 62
Quick v2 Server Question!

So I'm thinking of upgrading to v2 after years and years of using v1.

My case: I've got 3 Sam Broadcaster servers all on their separate machine & all using their own Shoutcast v1 to stream out. SAM1 streams out on port 80, SAM2 on 8000 and SAM3 at 8002.

My questions:
1. Would I just need to just set up 1 sc_serv configuration for all my SAM servers or 1 sc_serv per SAM instance?

2. Can I stream all 3 of my SAM servers out on Port 80 rather than having to create a proxy server and stuff like that? Right now, my SAM1 box streams out on port 80, but the other 2 do not.

Thanks, still reading the documentation btw.
DirtMcGirt is offline   Reply With Quote
Old 20th June 2013, 19:13   #2
DrO
 
Join Date: Sep 2003
Posts: 27,873
1) depends on what SC protocols the version of SAM you are using as not all provide the means to connect on mount point #2 and higher.

so if the version you have has the support, then one v2 DNAS will suffice. if it doesn't have the support, then at the moment (*) you would need to run three v2 DNAS like you already have to do with the v1 DNAS.

2) depends on the point above. if you can get all streams to connect to the same v2 DNAS then you can have it all running on the single DNAS and all over port 80. as the connection request is what determines which stream the clients are provided.


(*) i am looking to make the v2 DNAS able to setup additional input ports so multiple v1 based sources are able to connect to the v2 DNAS, so even without source software support, you would then be able to make use of the means to host multiple streams irrespective of the source software.

currently i have it working in a rough test build but it doesn't process v1 song title updates (so is likely to be in that state with the pending beta build).
DrO is offline   Reply With Quote
Old 20th June 2013, 21:06   #3
DirtMcGirt
Member
 
Join Date: Jan 2009
Posts: 62
Quote:
Originally Posted by DrO View Post
1) depends on what SC protocols the version of SAM you are using as not all provide the means to connect on mount point #2 and higher.
I'm running the latest SAM Broadcaster version 2013.3

Quote:
so if the version you have has the support, then one v2 DNAS will suffice. if it doesn't have the support, then at the moment (*) you would need to run three v2 DNAS like you already have to do with the v1 DNAS.
I have my MP3 encoder set up in SAM to use Shoutcast v2, it connects (I'm using port 8002) and broadcasts fine.

Quote:
depends on the point above. if you can get all streams to connect to the same v2 DNAS then you can have it all running on the single DNAS and all over port 80. as the connection request is what determines which stream the clients are provided.
So basically (and correct me if I'm wrong)... I can set up my Shoutcast Server on a totally different machine and have my SAM1, SAM2, & SAM3 server hit that shoutcast's servers config file and all brodcast out from port 80 right? If so, do you or can you link me to a sample config file that will turn my port 8002 ---> 80 outgoing?

Thanks for the help!
DirtMcGirt is offline   Reply With Quote
Old 20th June 2013, 21:14   #4
DrO
 
Join Date: Sep 2003
Posts: 27,873
Quote:
Originally Posted by DirtMcGirt View Post
I'm running the latest SAM Broadcaster version 2013.3
that doesn't mean much to me. as long as you can enter a stream id / sid then you can use it to make multiple sources to a v2 DNAS as-is.

Quote:
Originally Posted by DirtMcGirt View Post
I can set up my Shoutcast Server on a totally different machine and have my SAM1, SAM2, & SAM3 server hit that shoutcast's servers config file and all brodcast out from port 80 right?
correct.

Quote:
Originally Posted by DirtMcGirt View Post
If so, do you or can you link me to a sample config file that will turn my port 8002 ---> 80 outgoing?
you just need to have the DNAS running on port 80 (portbase=80) in the configuration and then you'd have to make all of the sources connect on port 80 with an appropriate stream id in SAM. if you already have a working config using 8002, it's a simple change to do it (as mentioned).
DrO is offline   Reply With Quote
Old 20th June 2013, 21:31   #5
DirtMcGirt
Member
 
Join Date: Jan 2009
Posts: 62
[QUOTE=DrO;2944679]that doesn't mean much to me. as long as you can enter a stream id / sid then you can use it to make multiple sources to a v2 DNAS as-is.[quote]

Here's a quick screen grab of SAM's config, it has the SID portion on it, but care to show me in the script how to set it up? I'm still running 3 instances of SAM on 3 separate machines, but I'm assuming that doesn't matter. Is the Endpoint & "streamid" in Shoutcast code the same termanology?


Quote:
you just need to have the DNAS running on port 80 (portbase=80) in the configuration and then you'd have to make all of the sources connect on port 80 with an appropriate stream id in SAM. if you already have a working config using 8002, it's a simple change to do it (as mentioned).
Can you show me where to add my separate instances then in my script? Here's what I have currently.

code:
;DNAS configuration file
;Made with the SHOUTcast 2 Configuration Builder

password=******
adminpassword=**********
portbase=8002
requirestreamconfigs=1
logfile=sc_serv.log
w3clog=sc_w3c.log
publicserver=always
banfile=sc_serv.ban
ripfile=sc_serv.rip
maxuser=50

streamid=1
streamauthhash=xxxxxxx
streamadminpassword=xxxxxxx

DirtMcGirt is offline   Reply With Quote
Old 20th June 2013, 21:48   #6
DrO
 
Join Date: Sep 2003
Posts: 27,873
each SAM needs to use a different SID on it's config. so one would be sid=1, another sid=2 and the other sid=3 (just for ease of dealing with things, you could do sid=1337, sid=31337, etc if you wanted).


for the config, you just change portbase from portbase=8002 to portbase=80 and add:
streamid_x=x
streamadminpassword_x=<password_here>


where x is the number of the streamid and assuming you want per-stream control on the stream admin pages (as you have streamadminpassword in there for stream #1). that's all there is to it.
DrO is offline   Reply With Quote
Old 20th June 2013, 22:01   #7
DirtMcGirt
Member
 
Join Date: Jan 2009
Posts: 62
Quote:
Originally Posted by DrO View Post
each SAM needs to use a different SID on it's config. so one would be sid=1, another sid=2 and the other sid=3 (just for ease of dealing with things, you could do sid=1337, sid=31337, etc if you wanted).


for the config, you just change portbase from portbase=8002 to portbase=80 and add:
streamid_x=x
streamadminpassword_x=<password_here>


where x is the number of the streamid and assuming you want per-stream control on the stream admin pages (as you have streamadminpassword in there for stream #1). that's all there is to it.
Ok, I'll give that all a shot... but when you said change the portbase from 8002 --> 8000 did you mean change it to port 80? Remember I wanted to stream all 3 of my SAMs out on port 80, if possible.
DirtMcGirt is offline   Reply With Quote
Old 20th June 2013, 22:06   #8
DrO
 
Join Date: Sep 2003
Posts: 27,873
that was a typo on my part, posts corrected.
DrO is offline   Reply With Quote
Old 20th June 2013, 22:15   #9
DirtMcGirt
Member
 
Join Date: Jan 2009
Posts: 62
Thank bro, I really appreciate all your help.

So here's what I ended up with as far as my config files go.

code:

;DNAS Configuration

password=xxxx
adminpassword=xxxx
portbase=80
requirestreamconfigs=1
logfile=sc_serv.log
w3clog=sc_w3c.log
publicserver=always
banfile=sc_serv.ban
ripfile=sc_serv.rip
maxuser=50

streamid_01=01
streamadminpassword_01=xxxx

streamid_02=02
streamadminpassword_02=xxxx

streamid_03=03
streamadminpassword_03=xxxx


streammaxuser=50

streamauthhash_1=xxxxxx



MY TRANS FILE
code:

streamtitle=test
streamurl=http://test.com
genre=Lounge
adminport=5000
adminpassword=xxxxxxx
adminuser=yz
inheritconfig=sc_serv.conf
;unlockkeyname=xxxxxxxxx
;unlockkeycode=xxxxxxxxx
logfile=sc_trans.log
public=1
playlistfile=playlist.lst
shuffle=0

encoder=mp3
bitrate=128000

DirtMcGirt is offline   Reply With Quote
Old 20th June 2013, 22:23   #10
DrO
 
Join Date: Sep 2003
Posts: 27,873
it needs to be _1, _2, etc not _01, _02, etc for multi-stream values
DrO is offline   Reply With Quote
Old 21st June 2013, 16:36   #11
DirtMcGirt
Member
 
Join Date: Jan 2009
Posts: 62
Quote:
Originally Posted by DrO View Post
it needs to be _1, _2, etc not _01, _02, etc for multi-stream values
Ok, got it working sort of ha...

I just want to make of a few things because I have to run 3 different mp3 keys, 3 authhash's, 3 different Streaming titles, etc running all in this 1 config file.

To do this, and this is my question... do you basically use the SID id# and use an underscore_ to specify when writing the config?

example
streamtitle_1=Station Name
streamtitle_2=Station Name 2
streamtitle_3=Station Name 3

unlockkeyname_1=xxx
unlockkeycode_1=xxx
unlockkeyname_2=xxx
unlockkeycode_2=xxx

... and so on
DirtMcGirt is offline   Reply With Quote
Old 21st June 2013, 17:20   #12
DrO
 
Join Date: Sep 2003
Posts: 27,873
i'm not following why are you mixing up things for sc_trans with the DNAS and it's config -the unlock* stuff is purely for sc_trans. and it doesn't do per-stream configs so what you've posted is wrong anyway.

yes, underscore followed by the SID is how to do it in either config.

and with sc_trans, i thought you're doing SAM -> DNAS, so am not sure where / why you've got sc_trans involved in things.
DrO is offline   Reply With Quote
Old 21st June 2013, 17:30   #13
DirtMcGirt
Member
 
Join Date: Jan 2009
Posts: 62
I was under the impression that because I'm running 3 different streams that I could configure just 1 sc_trans and 1 sc_serv file?

Or am I supposed to create a seperate sc_trans for each stream?
DirtMcGirt is offline   Reply With Quote
Old 21st June 2013, 17:53   #14
DrO
 
Join Date: Sep 2003
Posts: 27,873
that still doesn't answer why you're using sc_trans, as everything across your posts has implied you're doing SAM -> DNAS without any intermediate steps until a sc_trans config randomly appeared. so that assumption is wrong?

as now it sounds like you're doing SAM -> sc_trans -> v1 DNAS with that repeated for all 3 stream instances. or is it SAM -> sc_trans -> 3 x v1 DNAS? or something else?

as until i know that, there's little point in me making any more comments about the config as clearly i've been giving bunk information based on what hadn't been mentioned.


and to clarfiy, sc_trans is one input, multiple output, the v2 DNAS is multiple input to multiple output.
DrO is offline   Reply With Quote
Old 21st June 2013, 18:19   #15
DirtMcGirt
Member
 
Join Date: Jan 2009
Posts: 62
Ok... so you're saying I don't even need to configure an sc_trans because SAM Broadcaster is doing the work?

So in essence I should just have SAM v2 ---> DNAS?
DirtMcGirt is offline   Reply With Quote
Old 21st June 2013, 19:14   #16
DrO
 
Join Date: Sep 2003
Posts: 27,873
if all you're doing is have SAM go into sc_trans and one stream at the same type and bitate come out of it then yes there's no need for sc_trans being in there.

it'd only be needed if you wanted to have multiple bitrates of what SAM puts out (and then that's not really needed as SAM should be able to do that for you anyway).

so as long as you setup the v2 DNAS as per my prior comments, then you just need to make the SAM instances connect on each stream id (SID) as configured and then all 3 will be accessible from the same DNAS on the same port.
DrO is offline   Reply With Quote
Old 21st June 2013, 20:52   #17
DirtMcGirt
Member
 
Join Date: Jan 2009
Posts: 62
Quote:
Originally Posted by DrO View Post
if all you're doing is have SAM go into sc_trans and one stream at the same type and bitate come out of it then yes there's no need for sc_trans being in there.
Yes, I'm only configuring 1 encoder on each SAM server at 128k

Quote:
so as long as you setup the v2 DNAS as per my prior comments, then you just need to make the SAM instances connect on each stream id (SID) as configured and then all 3 will be accessible from the same DNAS on the same port.
Ok, so having said that... how does my script look now? Only question I have is if I need to use "streampath" and "requirestreamconfigs" ?
code:

;DNAS Configuration
password=xxx
adminpassword=xxx
portbase=80
requirestreamconfigs=1
logfile=sc_serv.log
w3clog=sc_w3c.log
publicserver=always
banfile=sc_serv.ban
ripfile=sc_serv.rip

streamid_1=1
streampath_1=?
streamadminpassword_1=xxx
streammaxuser_1=50

streamid_2=2
streampath_2=?
streamadminpassword_2=xxx
streammaxuser_1=50

streamid_3=3
streampath_3=?
streamadminpassword_3=xxx
streammaxuser_1=25

maxuser=125

streamauthhash_1=xxx
streamauthhash_2=xxx
streamauthhash_3=xxx



Lastly, I need to have remote DJ's login and take over the stream. Is this where I'll need to use the sc_trans file and if so, do I just need to have it contain this code only?
code:

djport=8005
djport2=8005
djlogin=xxx
djpassword=xxx

DirtMcGirt is offline   Reply With Quote
Old 22nd June 2013, 03:05   #18
DirtMcGirt
Member
 
Join Date: Jan 2009
Posts: 62
I actually have everything playing fine with the above script. I pointed all my SAM Encoders on v2 using port 80 and my sc_serv portbase is 80. That said, how do I get the listeners to go to the correct streams because on SID 1&2 the are getting pointed to the same stream? Do I just use what the Shoutcast admin listen pls is pointing to? I've got a bunch of .pls, .asx, etc files

http://my IP:80/stream/1/
http://my IP:80/stream/2/
http://my IP:80/stream/3/
DirtMcGirt is offline   Reply With Quote
Old 22nd June 2013, 03:17   #19
DrO
 
Join Date: Sep 2003
Posts: 27,873
i've not looked at the rest of your posts (probably won't until monday now), but if 1 & 2 are playing the same stream, then you've most likely not followed the config docs and missed the leading / on the streampath items in the config file e.g. streampath=blah must be streampath=/blah

streampath is only needed if you know what it's for, otherwise you can remove it and just let the DNAS auto-generate things as needed in the /listen.*?sid=xx responses it can provide. plus there's some issues with streampath handling in that build, so it's better to let the DNAS do it's thing to avoid those issues (like what i think you've already hit as per the first part of my reply).
DrO is offline   Reply With Quote
Old 22nd June 2013, 04:04   #20
DirtMcGirt
Member
 
Join Date: Jan 2009
Posts: 62
Quote:
Originally Posted by DrO View Post
i've not looked at the rest of your posts (probably won't until monday now), but if 1 & 2 are playing the same stream, then you've most likely not followed the config docs and missed the leading / on the streampath items in the config file e.g. streampath=blah must be streampath=/blah

streampath is only needed if you know what it's for, otherwise you can remove it and just let the DNAS auto-generate things as needed in the /listen.*?sid=xx responses it can provide. plus there's some issues with streampath handling in that build, so it's better to let the DNAS do it's thing to avoid those issues (like what i think you've already hit as per the first part of my reply).
I just used the path's in my previous posts in my pls, asx files and everything seems to be working good. Thanks for all your help man. I'll be back asking about Remote DJ logins soon haha. Take care mate.
DirtMcGirt is offline   Reply With Quote
Reply
Go Back   Winamp & Shoutcast Forums > Shoutcast > Shoutcast Discussions

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 Off

Forum Jump