Alright, here's a simple .liq script that demonstrates what I'm wanting
to do.
def harbor_auth(login, password) =
ret = get_process_lines("./harbor_auth.sh #{login} #{password}")
ret = list.hd(ret)
bool_of_string(ret)
end
set("harbor.port", 8000)
commercials = single("2010-02-13.mp3")
stream1 = mksafe(input.harbor(id = "stream1", auth = harbor_auth,
"stream1"))
stream2 = mksafe(input.harbor(id = "stream2", auth = harbor_auth,
"stream2"))
expanse = mksafe(switch(track_sensitive = false, [
({ 15m-17m }, commercials),
({ 29m-33m }, commercials),
({ 40m-42m }, commercials),
({ 59m-03m }, commercials),
({ 06h00m-18h00m }, stream1),
({ 18h00m-06h00m }, stream2),
]))
output.icecast.lame(
id = "output",
host = "192.168.254.82",
port = 8000,
password = "hackme",
mount = "expanse",
bitrate = 64,
expanse)
It "functions" as-is (obviously playing test audio). But I'm wanting to
make it dynamic. That is, I want to be able to make changes to what
plays without having to restart liquidsoap.
So that would mean the following:
I would like to create "commercials" as a playlist that is generated
from a script, and regenerated each time it's queued up to be played.
The script will be responsible for returning the correct number of MP3s
to make sure that it fits the 2m or 4m window provided. This particular
aspect would be very important, since these will change every single
time they're played.
Obviously "stream1" and "stream2" are just examples, and no stream will
run for that long (a stream will typically run from 1h to 3h, but is
subject to change, and ideally I'd be able to change this without
restarting liquidsoap. This is less important than the dynamic
commercial generation since it won't change as frequently, and I could
live with restarting liquidsoap if I had to because my front-end
Icecast2 server has a fallback so I wouldn't drop listeners.
I'm sure this can all be done, but being new to liquidsoap I'm sure it's
my limited understanding that's the major stumbling block. Would this
be a case for request.dynamic()?
------------------------------------------------------------------------------
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
Savonet-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/savonet-users