I'm starting on a bit of a long term project (for myself) to implement dead air detection with an icecast stream. Basically at the location where we have icecast implemented it's a radio studio and it'll be good if we have the system automatically detect if the dj output is dead. To which I am firstly posting on here to find out if anyone's already implemented such a system and for me to save time. So implementation? I'd plan to detect the dead air on the stream itself, I considered listening to the audio stream directly off the sound card, however this leads to a less portable solution and would be of less use to other people. So pretty much I intend to listen to the icecast stream and take samples every 15 seconds, compare for dead air and if necessary start a 30 second timer checking if dead air still exists. If it does exist then redirect all existing users to the substain stream (setup on mpd already) and then use a relay to redirect new users. I also intend to use pygtk to write an application for the studio pc to warn deejays that dead air has been detected and let them be able to tell the system not to switch over. Anyway what I'd like to know from the icecast dev's is if there are existing functions/libraies within icecast that support mainly audio sampling within 15 seconds. I'd prefer to start off using the functions already availiable and build upon them. Cheers -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.xiph.org/pipermail/icecast-dev/attachments/20070213/b3a74fda/attachment.htm
Hi Peter, Although you might rule it out as a non-portable solution, liquidsoap has blank detection, and it's used as you describe at RadioPi. Supposing the studio stream is relayed by the source studio and your backup/automatic stream is auto, the following script is the simple implementation of what you're looking for: output.icecast(mount="bla", password="foo", fallback([strip_blank(studio),auto])) Usually I'd add track_sensitive=false to the fallback so that it switches back to studio as soon as it's available, not waiting for the end of auto's track. You can tweak the noise level that strip_blank considers as blank. Strip_blank will restore the studio stream as soon as there is enough noise on it -- more complex behaviour on demand. Hope it can help. -- David