[Icecast] The myth of the two different kinds of mounts [WAS: Re: falling back]
kengroups at icloud.com
Sat May 22 11:40:55 UTC 2021
Incredibly helpful Phillip, thank you.
Could I ask more about this point here. Are you suggesting that the CGI script is run by an http server (being accessed by the Icecast relay mount, when first listener connects) or by Icecast directly?
That would simplify the Icecast side of things, but how would that be stopped when the last Icecast listener disconnects? Icecast would then ‘disconnect’ from that source, but how would that then stop the CGI/transcoding? Although having done a fair bit of web design in the past, it is now quite a long time in the past, so rusty and out-of-date and would appreciate some advice here?
Alternatively, is there any way to tap into Icecast's use of the internal source client for relays, to use as a trigger in the way I’m trying to use the on-(dis)connect functions to start and stop the transcode process, but which does not seem to work for a relay?
Ken G i l l e t t
> On 22 May 2021, at 11:32, Philipp Schafft <phschafft at de.loewenfelsen.net> wrote:
> Also based on what we learned above:
> If you want a source to be started only when there are listeners: Use a
> relay. The relay source will notify an external component of the demand
> (by requesting content). That is the way to go.
> To make this work with an external data source just write a tiny CGI
> script or similar that sends the necessary headers and start a
> encoder/transcoder that sends data to stdout (which is what is send
> back to the client for CGI).
> That can for example be done with just a few lines of shell. Something
> printf "some: headers\r\n\r\n";
> exec myencoder blabla -o -
> Hope this mail was helpful everyone and people learned a bit more about
> Icecast. :)
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Icecast