On 05/15/2015 06:40 PM, dtouch3d completely wrote:
> Hello,
>
> I have a large number of streams (about 100) produced by liquidsoap. the
> will be available from a web site and I want to show the corresponding
> metadata. Ideally, I would like to use something like websockets from a
> separate application, so the metadata would be pushed to listeners on
> change.
>
> I am thinking about using the on_track function in liquidsoap. What is
> the proper way to send the metadata from liquidsoap to my app ? I
> thought about making a request to a local webserver but I cannot find a
> way to do this natively from liquidsoap. I could try to call system and
> make a request with curl or something. Or maybe I could use UNIX sockets.
>
> Is there a proper way to do something like this ?
Hi,
My way is to call an API from liquidsoap and populate a database. From
this database you can make what you want (and have a metadata history)
#!/usr/bin/lisquidsoap
stream_id="20"
stream_name="MY RADIO STATION"
[...]
def store_meta(m) =
song = url.encode(m["title"])
ignore(http.get("http://server:port/api/setMetadata?id=#{stream_id}&metadata=#{song}"))
log("#{stream_name} #{stream_id} - metadata:#{song}")
end
[...]
source = on_metadata(store_meta, source)
[...]
Yoann!
------------------------------------------------------------------------------
One dashboard for servers and applications across Physical-Virtual-Cloud
Widest out-of-the-box monitoring support with 50+ applications
Performance metrics, stats and reports that give you Actionable Insights
Deep dive visibility with transaction tracing using APM Insight.
http://ad.doubleclick.net/ddm/clk/290420510;117567292;y
_______________________________________________
Savonet-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/savonet-users