On 16 November 2013 07:06, Alessio Elmi <[email protected]> wrote: > I'm trying to experiment a bit with this tool. It's really simple and > powerful at the same time. I was wandering if there is a way to trigger an > event as soon as sound gets back. > Let's say I prepare an emergency 24h-long mp3 which is played by Silentjack > after 1 minute of silence, like after power failure of the host or a missing > log in Riv. or whatever. > But when sound gets back how to catch that event and stop playing the > emergency track? > There should be an opposite tool: when jackd output is bigger than a certain > level do simething. > Anyone?
Liquidsoap has an "on_blank" function that can detect silence and then act on it. It supports two callbacks; one for silence detection and one for noise detection. It can run system commands or even output Jack audio data. You could even use it to generate a backup stream from either another Icecast mountpoint or from static files in a directory. We have it running on a web stream that we send using Icecast. On silence, it will log the event, send an email to the managers and switch to a backup source that's actually a directory filled with songs that it will play in shuffle (with crossfades), and every 40-ish seconds, it ducks the program and plays excuse messages from another directory. If you don't need it to do this, you could always send the generated Liquidsoap content to a dummy output. In our case, the main program is taken from a line-in input, and the program is encoded in both MP3 and Vorbis and streamed to a distant Icecast server. All this is running on an old 1.60GHz Pentium 4. Send me an email me if you need pointers on how to set-up Liquidsoap... -- Sébastien Leblanc _______________________________________________ Rivendell-dev mailing list [email protected] http://caspian.paravelsystems.com/mailman/listinfo/rivendell-dev
