Hi,

2012/11/16 Alexander Dal Farra <[email protected]>:
>>Creating a blank source which relays another source immediately when
> available, however, is quite easy: you only have to use the mksafe()
>>operator. For instance, if s if a source that will be available
> sometimes, you can do:
>># Wrap s with mksafe() to output blank (silence) when it is not
> available:
>>s = mksafe(s)
>
>
> Thank you Romain, I have followed your suggestion and done this:
>
> s = single("/my/default.mp3")  -- a file that doesn't exist
> s = mksafe(s)
> monosource = mean (s)
> output.icecast(%mp3(msg="",mono=true,bitrate=64),fallible=true,mount="this
> streamis_blank.mp3",host="server.com",port=8080,password="pwd",monosource)

You don't need fallible=true here. Since you are wrapping the source
in mksafe, it will always be available.

> of course, Liquidsoap sends me plenty of error messages since the single
> .mp3 is not existing on my server. How could this be omitted?

Well, that's where you have to forge on your script and write a
definition for source s that actually matches what you want to do :-)

For instance, if you want a source to which you'd push a file from
time to time, you can do:

s = request.queue(id="spare_source")

This will give you a spare_source.push /path/to/file.mp3 telnet/server
command that you can use whenever you want to start playing something
on the source..

If you need to do more/different thing, I invite you to read the documentation:
  http://liquidsoap.fm/doc-1.0.1/documentation.html
and the various examples in the cookbook for instance:
  http://liquidsoap.fm/doc-1.0.1/cookbook.html

Good luck with your script!
Romain

------------------------------------------------------------------------------
Monitor your physical, virtual and cloud infrastructure from a single
web console. Get in-depth insight into apps, servers, databases, vmware,
SAP, cloud infrastructure, etc. Download 30-day Free Trial.
Pricing starts from $795 for 25 servers or applications!
http://p.sf.net/sfu/zoho_dev2dev_nov
_______________________________________________
Savonet-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/savonet-users

Reply via email to