[Icecast] schedule a fallback and / 2 sources streaming at 1 server ???

Dick Trump dtrump1 at triadav.com
Sat Sep 6 08:38:07 PDT 2008


kosnickx wrote:
> Now let's see if i got it right.

Mostly right.

> You have lets say 5 mount points, all of them playing the same stream 
> (from the same client - Simplecast).

Yes

> Every hour you use one of these mount points (lets say #3) to insert 
> alternate stream.
> So with your own application (kind of scheduler i guess) you connect a
> new client (that is EZstream) to mount point 3 (i suppose only for a few
> moments - some ads and jingles maybe).

No.  The inserts are usually an hour long and for a given mount, only occur once or twice a day.  This is a state-wide radio network for the blind, serving multiple communities.  These inserts are pertinent to the local community, not the rest of the stations in the network.

> So EZstream provides mount point 3 with new stream right?

Yes

> What happens to Simplecast (it was streaming to mount point 3 too - now
> both Simplecast and EZstream stream to mount point 3)?

Simplecast continues to encode to all mount points but is temporarily disconnected from mount point 3 (in your example).

> What happens when EZstream stops streaming to mount point 3 (while, i 
> guess, Simplecast kept streaming to mount point 3)?

When EZstream is forced to stop by the application (necessary since by default, it would just loop), Icecast reconnects to the primary source from Simplecast.

Here's where my application is somewhat backward from what the normal intent of fallbacks would be.  Instead of the Simplecast mount point being the primary one, it is configured as the fallback-mount.  The insert (temporary) mount point is the primary mount for that destination.  So the configuration for destination 3 would look something like this:

     <mount>
        <mount-name>/MOUNTNUM3-INSERT</mount-name>
        <max-listeners>3</max-listeners>
        <fallback-mount>/MOUNTNUM3</fallback-mount>
        <fallback-override>1</fallback-override>
    </mount>

The INSERT mount is sourced by EZstream and the fallback-mount is sourced by Simplecast.

Of course, the max-listeners tag of 3 has nothing to do with the MOUNTNUM3 but rather allows me to connect for monitoring purposes only.

Since all of this happens on a single machine,  I can only handle one insert at a time (one instance of EZstream).  If I ever need to schedule two inserts simultaneously, I'll need to use a 2nd machine to handle that.

Incidentally, this same machine also runs another program on schedule that captures segments of the stream that are live, archives them and FTP's them to our web server for on-demand streaming.  Not too bad for an old P3 machine donated when it was "obsolete".

-- 
Dick
dtrump1 at triadav.com



More information about the Icecast mailing list