Le Wednesday 19 December 2007 13:22:01 radioworksEurope, vous avez écrit : > Hello,
Hi ! > We use liquidsoap to mix between a live stream and a MP3. Nice ! > Is it possible to start a MP3 on a specific METADATA? So, when the live > stream sends out a specific text via the METADATA Liquidsoap fades out the > live stream and start a MP3. When de MP3 is finished Liquidsoap must fade > in the live stream. Hey, that's a quite interesting usage of liquidsoap ! It's possible using the operator "execute", that execute a server command, a request source, and the on_metadata operator You set up a request source, catch the required metadata and push new files then. Here is a piece of code that broadcast the live source, catch comment metadatas as filename and pushes it: <------ live = (...) files = request.queue(id="files") def check_meta(m) = if m["comment"] != "" then ignore(execute("files.push",m["comment"])) end end live = on_metadata(check_meta,live) source = fallback(track_sensitive=false,[files,live]) <----- Tested here, works quite good ! We'll rework this and put a new operator in the langage for this purpose, as it seems on interesting application ! Romain