Alternating sources

Steamcast is a stand alone server that combines the features of SHOUTcast and Icecast2 and more to make one mega awesome server.
akrall
Posts: 31
Joined: Fri Jan 23, 2004 11:57 am

Alternating sources

Post by akrall »

Is there a way to make a mount point or something in steamcast that accepts an incoming live source (SAM3) and if the source disconnects or stops transmiting, to make kick in a list of mp3 (locally) to play and if the source tries to reconnect, drop the list and let the live source in again?
User avatar
Jay
Will work for food (Administrator)
Posts: 3020
Joined: Mon Jan 14, 2002 12:48 am
Location: Next Door
Contact:

Post by Jay »

The closest steamcast provides for is SourceBackup.

However you will still need to have a connected encoder to source the backup mount. If you want something local you can use something local like a local winamp or sc_trans depending on your environment.
- Jay
akrall
Posts: 31
Joined: Fri Jan 23, 2004 11:57 am

Post by akrall »

Jay wrote:The closest steamcast provides for is SourceBackup.

However you will still need to have a connected encoder to source the backup mount. If you want something local you can use something local like a local winamp or sc_trans depending on your environment.
I use linux, so sc_trans is viable.. how would that source backup work? I know how to use sc_trans just want to know how everything ends up working.

Also, is sc_trans will stream local mp3 which are at 128kbps and the stream is configured to be 24kbps.. will steamcast transcode it to 24kbps?
User avatar
Jay
Will work for food (Administrator)
Posts: 3020
Joined: Mon Jan 14, 2002 12:48 am
Location: Next Door
Contact:

Post by Jay »

basically you setup 2 sources in steamcast then you assign one of the sources to the other by using the sourcebackup.

Steamcast will not transcode so every encoding setting needs to be identical. Also if you relay at all the meta interval must be identical at this point.
- Jay
akrall
Posts: 31
Joined: Fri Jan 23, 2004 11:57 am

Post by akrall »

Do you know any linux transcoder that can resample the mp3 before sent to steamcast?
User avatar
Jay
Will work for food (Administrator)
Posts: 3020
Joined: Mon Jan 14, 2002 12:48 am
Location: Next Door
Contact:

Post by Jay »

sc_trans will do that. If you need it to transcode a url stream then the only thing I know if is oddsock's transcoder.
- Jay
akrall
Posts: 31
Joined: Fri Jan 23, 2004 11:57 am

Post by akrall »

since this is for local mp3, sc_trans might do the trick...

I setup the main mount point and saw that backup part but.. where do I define the actual settings for the backup mp? I only see the settings for the main one... also, will the backup mp be listed in sc and all the other settings that the main one has?
User avatar
Jay
Will work for food (Administrator)
Posts: 3020
Joined: Mon Jan 14, 2002 12:48 am
Location: Next Door
Contact:

Post by Jay »

you setup the backup mount the exact same way as you setup any other mount point with the exception of the backupmount.

The setting will not be identical to any other mount so you need to redefine everything.

http://www.radiotoolbox.com/docs/index. ... 4&doc_id=4 goes into detail on how the source configuration system works, it's extremely simple and similar to the shoutcast configuration method with the big difference being the ability to define multiple mount points.
- Jay
akrall
Posts: 31
Joined: Fri Jan 23, 2004 11:57 am

Post by akrall »

Jay.

I mounted everything and it was working for a bit but now Im getting this error:

[02/12/2005@19:23:51] <201.128.92.57> Connection Closed [L: 0] {0 bytes} (1 secs) RE: No Data Flow Timeout

while trying to listen to the first MP using winamp or WMP..

Any ideas?
User avatar
Jay
Will work for food (Administrator)
Posts: 3020
Joined: Mon Jan 14, 2002 12:48 am
Location: Next Door
Contact:

Post by Jay »

do you get any audio?
- Jay
akrall
Posts: 31
Joined: Fri Jan 23, 2004 11:57 am

Post by akrall »

no, winamp says mpeg2 error and WMP says it cant connect...

This error is on steamcasts logs and after this I need to restart steamcast and both sc_trans streams.

It works for a bit and then same errors...

Also this is preventing the backup stream to take over when the main one goes out.
User avatar
Jay
Will work for food (Administrator)
Posts: 3020
Joined: Mon Jan 14, 2002 12:48 am
Location: Next Door
Contact:

Post by Jay »

so it is happening because you are killing the source or is the source still going. The fact is that error should only show up if the client receives no data for 60 seconds. The fact that it happens so quickly means you probably found some bug, while we are at it go ahead and pm me your config file so I can make sure it's not something in that, feel free to blank out passwords.
- Jay
akrall
Posts: 31
Joined: Fri Jan 23, 2004 11:57 am

Post by akrall »

What Im doing is testing the backup stream so I start steamcast, then sc_trans 1 and then sc_trans 2. Then I connect a client to the stream and it listens to what sc_trans 1 is sending.... so I kill sc_Trans 1.... sometimes the signal from sc_trans 2 kicks in without any problems or intervention on the user part... but sometimes it doesnt so the user stops listen to music.... he then tries to reconnect and gets and error on winamp... so I start sc_trans 1 again.. both trans reconnect to the server and everything seems to be normal but when the user tries to connect again, winamp gives a constant error about mpeg2 error and on steamcast's logs shows the no data error so I need to kill everything and start again.

Here's the config for steamcast:

PortBase=9000
MaxUser=50

; IPMaxUser [*0]: The maximum amount of streaming clients Steamcast should
; handle per IP, this is a global setting for all multimedia connections.
; A setting of 0 disables this feature.
; IPMaxUser=0

LogFile=steamcast.log
ScreenLog=Yes
RealtimeLog=Yes
YPLog=Yes
PidFile=steamcast.pid
NameLookups=Yes
ClientTimeout=30
AdminUser=admin
AdminPass=xxxxx

SourceMount=/live.mp3
SourceBackup=/backup.mp3
SourceUser=encoder
SourcePass=xxxxx
SourceUserMax=50
; SourceRelay=audio.str3am.com:4080
SourceAvgBitrateLimit=30
SourceIsSC=Yes
SourceIsDefault=Yes
; SourceIP=123.45.67.89
; SourceAuth=No
; SourceBuffUtil=100
Directory=http://www.radiotoolbox.com/mediatoolbox/yp-cgi.php
Directory=http://www.oddsock.org/cgi-bin/yp-cgi
Directory=http://dir.xiph.org/cgi-bin/yp-cgi
; ServIP=ANY
; SrcIP=ANY

SourceMount=/backup.mp3
SourceUser=encoder
SourcePass=xxxxx2
SourceUserMax=50
; SourceRelay=audio.str3am.com:4080
SourceAvgBitrateLimit=30
SourceIsSC=Yes
SourceIsDefault=No
; SourceIP=123.45.67.89
; SourceAuth=No
; SourceBuffUtil=100
Directory=http://www.radiotoolbox.com/mediatoolbox/yp-cgi.php
Directory=http://www.oddsock.org/cgi-bin/yp-cgi
Directory=http://dir.xiph.org/cgi-bin/yp-cgi
; ServIP=ANY
; SrcIP=ANY
User avatar
Jay
Will work for food (Administrator)
Posts: 3020
Joined: Mon Jan 14, 2002 12:48 am
Location: Next Door
Contact:

Post by Jay »

everything below SourceBuffUtil doesn't need to be duplicated

so the Directory and SrvIP and SrcIP only need be done once, not per source as you seem to have it.

Basically if the Configuration Item starts with Source it belongs to a SourceMount.

Also sourcebackup will not keep the source that is down active, in other words if people try to connect while it's source is down they will get the usual no source error. It will only activate for already connected users.

It is bizarre that it sometimes disconnects, I'll look into on my dev stuff.
- Jay
akrall
Posts: 31
Joined: Fri Jan 23, 2004 11:57 am

Post by akrall »

that might be a problem... if backup source kicks in for already connected users... how do I go about the ones trying to connect?

The idea for this is that when a live show ends, I need sc trans to kick in with mp3s all thru the night until live goes online the next day... any ideas?
Post Reply