![]() |
#1 |
Senior Member
Join Date: Apr 2006
Location: chicago
Posts: 126
|
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? |
![]() |
![]() |
![]() |
#2 |
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. |
![]() |
![]() |
![]() |
#3 |
Senior Member
Join Date: Apr 2006
Location: chicago
Posts: 126
|
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? |
![]() |
![]() |
![]() |
#4 |
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). |
![]() |
![]() |
![]() |
#5 |
Senior Member
Join Date: Apr 2006
Location: chicago
Posts: 126
|
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??? |
![]() |
![]() |
![]() |
#6 |
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. |
![]() |
![]() |
![]() |
#7 |
Senior Member
Join Date: Apr 2006
Location: chicago
Posts: 126
|
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. |
![]() |
![]() |
![]() |
#8 |
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). |
![]() |
![]() |
![]() |
#9 |
Senior Member
Join Date: Apr 2006
Location: chicago
Posts: 126
|
OK I'll play around with this, if I get it working I'll post my .conf files
|
![]() |
![]() |
![]() |
#10 |
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* ). |
![]() |
![]() |
![]() |
#11 |
Senior Member
Join Date: Apr 2006
Location: chicago
Posts: 126
|
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
|
![]() |
![]() |
![]() |
#12 |
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).
|
![]() |
![]() |
![]() |
#13 |
Senior Member
Join Date: Apr 2006
Location: chicago
Posts: 126
|
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? |
![]() |
![]() |
![]() |
#14 |
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. |
![]() |
![]() |
![]() |
#15 |
Senior Member
Join Date: Apr 2006
Location: chicago
Posts: 126
|
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>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/ ? |
![]() |
![]() |
![]() |
#16 |
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' |
![]() |
![]() |
![]() |
#17 |
Senior Member
Join Date: Apr 2006
Location: chicago
Posts: 126
|
>>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' |
![]() |
![]() |
![]() |
#18 |
Senior Member
Join Date: Apr 2006
Location: chicago
Posts: 126
|
In http://wiki.winamp.com/wiki/SHOUTcas...ream_Addresses
It says: <serverurl> is typically formed as http://dstip ![]() <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? |
![]() |
![]() |
![]() |
#19 | |
Join Date: Sep 2003
Posts: 27,873
|
Quote:
<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. |
|
![]() |
![]() |
![]() |
#20 |
Senior Member
Join Date: Apr 2006
Location: chicago
Posts: 126
|
AHHH very good. Now I see! The documentation was wrong.
OK, now I've got it working. Working perfectly. Many thanks. |
![]() |
![]() |
![]() |
#21 | ||
Junior Member
Join Date: Sep 2020
Posts: 1
|
Hello
Sorry to re-open this old post ![]() It helps me a LOT, but i´m having some issues I´m using : Shoutcast Server v2.6.0.753/posix(linux x64) I have 2 files : 1 - sc_trans.conf with this content: Quote:
2 - sc_serv.conf with this content: Quote:
I have this error : 2020-09-08 16:57:38 ERROR [MICROSERVER] Error opening port 8000 because could not bind to 8000 because address already in use 2020-09-08 16:57:38 INFO [MAIN] Shutdown Running netstat -tulpn | grep LISTEN I get : tcp 0 0 0.0.0.0:8000 0.0.0.0:* LISTEN 21953/./sc_serv tcp 0 0 0.0.0.0:8001 0.0.0.0:* LISTEN 21953/./sc_serv Apparently, even with that error, the streams works fine connecting to streaming.mydomain.com:8000 I have a radio station running under stream1 that is working fine. But when i try to stream using the stream#2 thru winamp DSP shoutcast plugin, i login perfect with stream#2 password and begins to play (also i can hear the music on the web payer too), but the stream runs 10 seconds (EXACTLY 10 seconds) , and disconnect, reconnect, runs 10 seconds, and disconnect, continuosly (meanwhile the stream#1 works perfect without disconnect) You have any clue about this? Could be because both streams runs under port 8000 ? Thanks in advance for any help Fabian |
||
![]() |
![]() |
![]() |
#22 |
Senior Member
Join Date: Apr 2006
Location: chicago
Posts: 126
|
2 streams from shoutcast
FYI sc_trans is old old software and no longer officially supported....
Most broadcasters use another "front end" like liquidsoap. But if you want to continue using sc_trans.... I think your problem is that you are not giving streampaths for your two streams In your sc_serv.conf you have streamid_1=1What you need is something like this: streamid_1=1then your stream URLs would be http://your ip address or domain:8000/namefor example - my 2 streams http://streams.audionoir.com:8000/noir -and- http://streams.audionoir.com:8000/insomnia where my two streampaths in my sc_serve.conf are streampath_1=/noir-and- streampath_2=/insomniasee https://www.liquidsoap.info/ |
![]() |
![]() |
![]() |
|
Tags |
sc_serv 2.multiple |
Thread Tools | Search this Thread |
Display Modes | |
|
|