Old 6th May 2013, 10:31   #1
milosz
Senior Member
 
Join Date: Apr 2006
Location: chicago
Posts: 123
How to stream 2 streams on sc_serv 2

I know it's now possible with sc_trans 2 to stream audio from more than one sc_trans instance, for example music from one sc_trans could be streamed from port 8000 and news from another sc_trans could be streamed on port 8001

But I don't understnad what needs to be in the sc_serv.conf and sc_trans.conf files to make this happen

Is all that's needed to have these lines in sc_serv.conf?

serverport_1 = 8000
serverport_2 = 8001

streammaxuser_1 = 500
streammaxuser_2 = 100
maxuser = 600


Is anything else needed in sc_serv.conf?

And for sc_trans.conf, what is needed in each .conf file for the multiple instances of sc_trans that will be connecting to the singe sc_serv?

Can someone post an example that works?
milosz is offline   Reply With Quote
Old 6th May 2013, 10:39   #2
DrO
 
Join Date: Sep 2003
Posts: 27,873
serverport is not a valid config option for the DNAS (i should really get that removed from the doc examples).

everyone (source or listeners) connects to the v2 DNAS (currently) on 'portbase' so that is what you have to set as the serverport in the sc_trans configuration - you just have to then set streamid in the different sc_trans configs (and if needed per-stream passwords) to get them connecting.

then the listeners just need to be provided the specific url based on the stream number as they connect on portbase and based on the url used to access the stream will determine the stream provided.

as i'm limited on time, all i can suggest is checking the config examples provided with the tools and looking at the docs e.g. http://wiki.winamp.com/wiki/SHOUTcas...#Miscellaneous on how to map sc_serv to sc_trans config options.
DrO is offline   Reply With Quote
Old 6th May 2013, 10:51   #3
milosz
Senior Member
 
Join Date: Apr 2006
Location: chicago
Posts: 123
So all I do is have

portbase_1=8000
portbase_2=8001

in sc_serv.conf file

and

serverport_1=8000

in one sc_trans.conf file

and

serverport_2=8001

in the other stream's sc_trans.conf file? That's all that's needed?
milosz is offline   Reply With Quote
Old 6th May 2013, 12:45   #4
DrO
 
Join Date: Sep 2003
Posts: 27,873
no, there is only 1 portbase for each DNAS (as i said above and is clearly stated in the docs). serverport in the sc_trans config needs to be set to portbase for the DNAS it's being asked to connect to.

so both use serverport_1=8000 if portbase=8000

it's streamid that you need to change so streamid _1=1 in one sc_trans and streamid _1=2 in the other (and make sure you set outprotocol=3 in both otherwise they won't work as expected). as streamid is what allows multiple streams in the v2 DNAS (along with sc_trans running with outprotocol=3).
DrO is offline   Reply With Quote
Old 6th May 2013, 13:06   #5
milosz
Senior Member
 
Join Date: Apr 2006
Location: chicago
Posts: 123
If both streams are using the same port (i.e. 8000 in this case) how does a listener connect to the stream he wants?

Currently listeners connect to hear my stream by pointing their player to http://50.7.16.114:8000 I want to add a second program, so if all the streams are on port 8000 what URL does a listener use to connect to one or the other of the two programs???
milosz is offline   Reply With Quote
Old 6th May 2013, 13:41   #6
DrO
 
Join Date: Sep 2003
Posts: 27,873
http://wiki.winamp.com/wiki/SHOUTcas...ream_Addresses and http://wiki.winamp.com/wiki/SHOUTcas...Administration

when another stream is running on the DNAS, you'd see it shown on the index page and from there the specific listen links for the stream can be found on the stream summary pages.
DrO is offline   Reply With Quote
Old 6th May 2013, 13:50   #7
milosz
Senior Member
 
Join Date: Apr 2006
Location: chicago
Posts: 123
so, listeners would go to http://50.7.16.114:8000/1 or http://50.7.16.114:8000/2 ?

with one sc_trans.conf having

streamid_1=1

the the other sc_trans.conf having

streamid_2=2 ? Or will the second sc_trans.conf have streamid_1=2 ?

If there were just a multi stream example sc_serv.conf and sc_trans.conf's someplace it would likely be much clearer.
milosz is offline   Reply With Quote
Old 6th May 2013, 14:19   #8
DrO
 
Join Date: Sep 2003
Posts: 27,873
50.7.16.114:8000/stream/x/ where x is the streamid (though stream #1 depending on the build of the DNAS will do the same as a v1 DNAS did i.e. just 50.7.16.114:8000/ ).

you still use streamid _1 for both of the sc_trans configs (though if you want to use streamid _2 you can but there's possible issues without having a stream #1 with the current sc_trans beta build so is best to start and #1 and work up irrespective of the destination stream id).

there probably should be some sort of example but based on prior experience, no one bothers to look at the examples, so i've not been particularly interested in spending time to sort out a sane example (which doesn't in turn cause more questions than it's meant to).
DrO is offline   Reply With Quote
Old 6th May 2013, 14:32   #9
milosz
Senior Member
 
Join Date: Apr 2006
Location: chicago
Posts: 123
OK I'll play around with this, if I get it working I'll post my .conf files
milosz is offline   Reply With Quote
Old 6th May 2013, 14:36   #10
DrO
 
Join Date: Sep 2003
Posts: 27,873
you just need to get one sc_trans configured and connecting to the DNAS, then copy that configuration and change it to point to stream #2 on the DNAS (and any specifics needed for that stream to be different from the other).

i don't know how else to make it simpler as the example configs do the first step anyway. maybe we should setup a paid configuration setup service... might actually mention that to management (even though everything needed to make configs is provided with the tools *shrugs* ).
DrO is offline   Reply With Quote
Old 6th May 2013, 15:33   #11
milosz
Senior Member
 
Join Date: Apr 2006
Location: chicago
Posts: 123
Yes I suppose if you are immersed in this it all sees so simple.... coming at it cold, however, the documentation is not terribly clear on certain things - for example 'streampath' - a term not used outside of Shoutcast - is not defined in a way that makes it meaning terribly clear in terms of the - to say that it's the "path that clients need to use to access the stream" - Path is defined as "A path, the general form of the name of a file or directory, specifies a unique location in a file system." So, to say a streampath is a "PATH that clients need to use" means that it a unique location in a file system, when clearly in reality it's nothing to do with a file system
milosz is offline   Reply With Quote
Old 6th May 2013, 15:42   #12
DrO
 
Join Date: Sep 2003
Posts: 27,873
fair point, though path relates to web address as well. mountpoint is something else which can be used for it as well, but things were somewhat locked in as to how things are named with the v2 DNAS so we're stuck with streampath now (though might be able to do something with the docs to try to better clarify - just then ends up having more text which isn't helpful either - can never win it seems).
DrO is offline   Reply With Quote
Old 6th May 2013, 15:55   #13
milosz
Senior Member
 
Join Date: Apr 2006
Location: chicago
Posts: 123
When a path is part of a web address (a URL ) it refers to a file structure on the web server. I understand the need to come up with a term for the stream identifying string, but "path" is so closely associated with file structures that I keep trying to think "well is this the location of the MP3 files? The path to the binaries on the server?" and so on. Maybe "channel" would have been better, something like that....

And I still don't see how you can have

streamid=1
streampath=random

setting this variable to 'random?' Really? That works?
milosz is offline   Reply With Quote
Old 6th May 2013, 16:07   #14
DrO
 
Join Date: Sep 2003
Posts: 27,873
streampath is a virtual path / address / mountpoint / channel, whatever it can or should be called.

it's just a way clients, etc access the DNAS for specific things (same as with 50.7.16.114:8000/index.html which isn't a real file on the machine, but something the DNAS generates as needed).

so using streampath=/random (note the / at the start), the listener would be provided 50.7.16.114:8000/random.

but 50.7.16.114:8000/stream/1/ will give the same result of playing stream #1 as accessing 50.7.16.114:8000/random.

really the streampath configuration is just to make it possible to provide nicer urls if wanted, but in most cases it really doesn't matter and can just be ignored. the even better option is to just provide one of the playlist links e.g. 50.7.16.114:8000/listen.m3u?sid=1 or 50.7.16.114:8000/listen.asx?sid=2 (or any of the other supported /listen.* urls) as most players can play them fine - it's only with embedded site players that you then normally need to have the actual stream url.

and this is why i removed references to streampath in the example configurations for whenever a new update mythically happens.
DrO is offline   Reply With Quote
Old 22nd May 2013, 19:38   #15
milosz
Senior Member
 
Join Date: Apr 2006
Location: chicago
Posts: 123
Two SC_TRANS running, can only hear one of them

I configured a second instance of SC_TRANS with streamid_1=2

(first instance has streamid_1=1)

I set outprotocol=3 in both sc_trans.conf files

Both sc_trans start up and run. However when I tell my player (Winamp, Windows Media Player, etc) to go to http://<ipaddress>:8000/2/ I only get the audio from the first instance of sc_trans

How do I listen to my second stream? Is there some variable I am supposed to set in sc_trans?

Here's my sc_trans.conf
streamtitle=<redacted>
streamurl=<redacted>
genre=Old Time Radio
serverport=8000
outprotocol=3
streamid_1=2
unlockkeyname=<redacted>
unlockkeycode=<redacted>
logfile=/home/2/apps/sc_trans/logs/sc_trans.log
playlistfile=/home/2/sc_trans/playlists/stream2.lst
shuffle=0
applyreplaygain=1
xfade=0
public=1
nextlookahead=10
encoder=mp3
mp3quality=1
bitrate=48000
channels=1
password=<redacted>
serverip=127.0.0.1
Am I supposed to have a streampath= in there? what do I set it to? Something like stream2 and then the URL to open in Winamp would be http://<ipaddress>:8000/stream2/ ?
milosz is offline   Reply With Quote
Old 22nd May 2013, 19:55   #16
DrO
 
Join Date: Sep 2003
Posts: 27,873
you don't have to use streampath as i've already covered. http://wiki.winamp.com/wiki/SHOUTcas...ream_Addresses details how to access the different streams on the same DNAS.

or as i believe i said earlier, get the playlist urls from the admin pages the DNAS provides and use them rather than direct links to the streams (though you can get the direct link out of the playlists).

and if the sc_trans config is what you're using for both, then 'streamid_1' is wrong as one needs to be using 'streamid_1=1' and the other using 'streamid_1=2'
DrO is offline   Reply With Quote
Old 22nd May 2013, 23:12   #17
milosz
Senior Member
 
Join Date: Apr 2006
Location: chicago
Posts: 123
>>then 'streamid_1' is wrong as one needs to be using 'streamid_1=2' and the other using 'streamid_1=2'<<

Really? Both sc_trans.conf need to have 'streamid_1=2' in them? That's what you just said, above...

I would have thought that one instance would need ''streamid_1=1' and the other sc_trans.conf would need 'streamid_1=2'
milosz is offline   Reply With Quote
Old 22nd May 2013, 23:15   #18
milosz
Senior Member
 
Join Date: Apr 2006
Location: chicago
Posts: 123
In http://wiki.winamp.com/wiki/SHOUTcas...ream_Addresses

It says:

<serverurl> is typically formed as http://dstiportbase (see sections 4.2 and 4.8)
<streamid> is the 'streampath' set from the stream configuration (see section 4.12)


so, in the URL <streamid> is the 'streampath' ?

Huh? streamid and streampath are the same as far as the URL is concerned?
milosz is offline   Reply With Quote
Old 22nd May 2013, 23:22   #19
DrO
 
Join Date: Sep 2003
Posts: 27,873
Quote:
Originally Posted by milosz View Post
I would have thought that one instance would need ''streamid_1=1' and the other sc_trans.conf would need 'streamid_1=2'
i'm only human and i'd typed the wrong thing in the posts above (now corrected).

Quote:
Originally Posted by milosz View Post
so, in the URL <streamid> is the 'streampath' ?

Huh? streamid and streampath are the same as far as the URL is concerned?
<streamid> is 1, 2, 3, etc. it is not the same as streampath and it shows how much people actually look at the documentation as i once again have screwed up *joy* wiki page now fixed.
DrO is offline   Reply With Quote
Old 22nd May 2013, 23:53   #20
milosz
Senior Member
 
Join Date: Apr 2006
Location: chicago
Posts: 123
AHHH very good. Now I see! The documentation was wrong.

OK, now I've got it working. Working perfectly. Many thanks.
milosz is offline   Reply With Quote
Reply
Go Back   Winamp & Shoutcast Forums > Shoutcast > Shoutcast Technical Support

Tags
sc_serv 2.multiple

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