Hello,
It's a quite simple liq file, here it is
----
#!/usr/local/bin/liquidsoap
# Logging!
set("scheduler.log",true)
set("log.level", 5)
# Fluxid is a commandline argument
fluxid = argv(1)
name = argv(2)
description = argv(3)
finaldesc = string.replace(pattern="_",(fun (s) -> " "),description)
genre = argv(4)
mountpoint = "flux-"^fluxid
cmd = "/radionomy/grabcf.php "^fluxid
# Our input is the output of a php-script..
input = request.dynamic(id=fluxid, fun () ->
request(get_process_output(cmd)))
# We can override the default values with the metadata tags
liq_fade_in, liq_fade_out and liq_start_next.
def our_crossfade(~start_next,~fade_in,~fade_out,s)
# log("log", 3, "start next:"^start_next^" fade_in"^fade_in^"
fadeout"^fade_out)
s = fade.in(duration=fade_in,s)
s = fade.out(duration=fade_out,s)
fader = fun (a,b) -> add(normalize=false,[b,a])
cross(duration=start_next,minimum = -1.0,fader, s)
end
# Crossfade
input2=our_crossfade(start_next=6.0,fade_in=3.0,fade_out=3.0, input)
# Compress/Normalize
input2 = nrj(input2)
input2 = rewrite_metadata([("artist",'$(if $(display_artist),"$
(display_artist)","$(artist)")'),("title", '$(if $(display_title),"$
(display_title)","$(title)")'),("album", '$(if $(display_id),"$
(display_id)","$(album)")')],input2)
# Call a webservice to say what is playing on this fluxid
input2 = on_metadata(fun (meta) -> system("curl http://something/somewhere?
"^fluxid^","^quote(meta["album"])),input2)
# Output to icecast
output.icecast.mp3(mount=mountpoint, host="localhost", port=8080,
password="password", genre=""^genre, url="http://www.radionomy.com",
name=""^name,description = ""^finaldesc, mksafe(input2))
----
Here is the annotate :
----
annotate:display_title="O
Compagnons
",display_artist
=
"Raphaƫl
",display_id
=
"98081
",display_year
="",liq_fade_in="0.03",liq_fade_out="2.50",liq_start_next="2.50""
:/radionomy/fluxes/5155/track0AAd2s_0.13.43_2.23.40.mp3
----
In fact, the grabcf.php is doing a lot of things before returning the
annotate :
- get the file to play from a webservices
- check if file is present in local store
- if not it's doing a web request on the storage server & writing it
local
- it's cutting the file using mp3split (to drop sounds before entry
point and after exit point)
- it's writing the file in the flux id folder
- it's returning the annotate
Best regards,
Jef
On 07 Jun 2009, at 15:48, David Baelde wrote:
> Hi,
>
> Thanks for this nice report! We've thought a bit about efficiency, but
> it has never been the priority. It's really cool to hear that it's so
> light.
>
> Could you also give us a rough idea of how complex your liquidsoap
> configurations are? If I remember correctly, you're using
> smart_crossfade() but no other sound processing operator.
>
> Cheers,
> --
> David
--
Jean-Francois Mauguit - [email protected]
CTO - RADIONOMY SA
------------------------------------------------------------------------------
Crystal Reports - New Free Runtime and 30 Day Trial
Check out the new simplified licensing option that enables unlimited
royalty-free distribution of the report engine for externally facing
server and web deployment.
http://p.sf.net/sfu/businessobjects
_______________________________________________
Savonet-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/savonet-users