Yes, when blank is detected, the track is changed, and so on_metadata
can be used to have a callback. Something like (not tested)
def on_blank (m)
system("mail -s \"Stream changed!\" [email protected]")
end
s = strip_blank(input.harbor(...))
s = on_metadata(on_blank, s)
s = fallback([s, playlist])
This will send you a message each time the track changes. Then by
looking at the metadata in m in on_blank you should easily be able to
detect whether this is a track change in the harbor or a blank (for
instance sending a mail when the title of the song is empty should do
the trick).
++
Sam.
On Sun, May 5, 2013 at 3:27 AM, Nicholas Vrtis <[email protected]> wrote:
> Well, I'm not an expert, but when I needed to know when a song started, I
> used the on_meta to trigger a quick PHP script that ran in the background to
> avoid tying up Liquid Soap.
>
> Nick
>
>
> On Sat, May 4, 2013 at 5:21 PM, Andy Brown <[email protected]> wrote:
>>
>> Hi all,
>> I'm currently using liquidsoap as a failover for a live stream. Script
>> in liquidsoap connects to local icecast, it then expects a remote source
>> to connect using harbor and stream content, if the stream times out or
>> silence detected it will failover to local MP3's. That's done using a
>> basic:
>>
>> live1 = strip_blank(
>> input.harbor(id="live", port=8004, password="xxx",
>> buffer=18.,max=90.,"studio1.ogg"),
>> max_blank=50., threshold=-50.)
>>
>> However at the moment this seems to be failing over quite a lot at the
>> moment. I've just increased the max_blank to 50 and set threshold to
>> -50. to see if this helps.
>>
>> However, what I'm really after, is some way of notifying me of the
>> failover. Is there a way to trigger an email, or maybe to touch a
>> file/update a file to notify that the failover has kicked in (or that
>> harbor has lost input) so I can then run an external alert using monit
>> or similar?
>>
>> Any suggestions!
>>
>> --
>> Andy
>> e: andy @ thebmwz3.co.uk
>> e: andy @ broadcast-tech.co.uk
>> w: http://www.thebmwz3.co.uk
>> w: http://www.broadcast-tech.co.uk
>>
>>
>> ------------------------------------------------------------------------------
>> Get 100% visibility into Java/.NET code with AppDynamics Lite
>> It's a free troubleshooting tool designed for production
>> Get down to code-level detail for bottlenecks, with <2% overhead.
>> Download for free and get started troubleshooting in minutes.
>> http://p.sf.net/sfu/appdyn_d2d_ap2
>> _______________________________________________
>> Savonet-users mailing list
>> [email protected]
>> https://lists.sourceforge.net/lists/listinfo/savonet-users
>
>
>
> ------------------------------------------------------------------------------
> Get 100% visibility into Java/.NET code with AppDynamics Lite
> It's a free troubleshooting tool designed for production
> Get down to code-level detail for bottlenecks, with <2% overhead.
> Download for free and get started troubleshooting in minutes.
> http://p.sf.net/sfu/appdyn_d2d_ap2
> _______________________________________________
> Savonet-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/savonet-users
>
------------------------------------------------------------------------------
Try New Relic Now & We'll Send You this Cool Shirt
New Relic is the only SaaS-based application performance monitoring service
that delivers powerful full stack analytics. Optimize and monitor your
browser, app, & servers with just a few lines of code. Try New Relic
and get this awesome Nerd Life shirt! http://p.sf.net/sfu/newrelic_d2d_may
_______________________________________________
Savonet-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/savonet-users