Hi Brian !

> I’m currently looking round for the bits and pieces to set up what most
> people would likely call, “Wikipedia Radio”. This would be a 24/7 stream
> of content from all Wikimedia projects. From Wikipedia we’d want the
> main page featured article synopsis, the “did you know?” section, latest
> articles, and possibly spoken featured articles. To that we’d be adding
> Wikinews news briefs at the top of the hour, lessons, tutorials, and
> workshops from Wikiversity (starting with how-tos on getting involved in
> a collaborative audio project), plus filling in any gaps with free music
> from Wikimedia Commons.

Right, we'd be glad to help you achieve this purpose for sure :-)

As I understand now, there are two tasks to fulfill:
 * Play free music during gaps, as well as scheduled news, like "top of the 
hour"
 * Insert news when needed

The first task looks like a fixed scheduling, and it is very easy to do this 
with liquidsoap. You first define the playlists, let say "pl1", "pl2", "pl3".

Now, if you want to stream pl1 on the first 20 min of each hour, pl2 and then 
pl3, you can combine them that way:
 playlists = switch([ ({0m-20m}, pl1), ({20m-40m}, pl2), ({40m-0m}, pl3)])

Adding a top of the hour news can be done much like this, but you will use the 
track_sensitive=false parameter in order to switch to the top source as soon 
as it becomes available.

The playlists pl1, pl2 and pl3 can be defined in various ways. The more easy 
for instance could be that the playlist is a file (possibly distant) 
generated by a script of yours, in any recognized format. Then, you would 
define the following:

pl1 = playlist(mode=normal,reload=1,reload_mode="rounds",URI)
where uri can be a local file, a http file (http://...), or a custom protocol 
(wikinews://..) if you need more complicated things. As defined here, the 
playlist would be played in normal order, and then reloaded when finished.

The top can be generated with a dynamic request:
def new_top()
  url = list.hd(get_process_lines("/path/to/script"))
  request.create(url)
end
top = request.dynamic(new_top)

Where "/path/to/script" is a script of yours that returns the next hour news 
to stream.

This would still need some customization to make sure the source is ready only 
each beginning of hour, using a switch for instance. Perhaps David knows 
better than me how to achieve this. Also, you should make sure that caching 
don't causes trouble, like downloading an old news (next file might be asked 
long time before it is played..).


Now for the second task, this is more interesting. Basically, you can imagine 
that the regular source defined above is played when there are no dynamic 
request. Then, when you need to add a news, a bot/script would generate a new 
song request, that would be played instead of the regular source.

For instance, the ondemand source could be:
ondemand = request.queue(id="ondemand")

You would then wrap it on top of the previous source that way:
combined = fallback(track_sensitive=false,[ondemand,regular])

Then, when you want to stream a new dynamic request, you (or the bot/script) 
would connect to the telnet server, and execute:
ondemand.push URI

This would trigger file resolution and check, and immediately stream it when 
done. You may also add some more beautification, like crossfade/jingle 
transitions, and even reduce the volume of the regular radio, and superpose 
the dynamic request.

I think these examples cover roughly what we discussed on IRC this morning. I 
only wrote quick example to try to give you an overview of what is possible 
with liquidsoap.

If you want to give more try to it, I'll be delighted to help you writting 
something for your usage, I believe it would be a great example of an 
advanced usage of liquidsoap.


Cheers,
Romain

-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference 
Don't miss this year's exciting event. There's still time to save $100. 
Use priority code J8TL2D2. 
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
_______________________________________________
Savonet-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/savonet-users

Reply via email to