Hello,

As you might know, we want to use liquidsoap to dynamically switch between 
soundcard input, multiple audio streams and local and remote files.
Currently I am working on dynamic stream switches. This worked fine at our 
radio project at autumn, where we used a fix set of remote source streams.
Unfortunately now there amount and location changes dynamically so we can't go 
on using this approach any longer.

Since we don't know the source type (file or URL) at start of the liquidsoap 
process and locations change, we cannot use static input.http.
Since most streams are not pushing, we cant use harbor for stream input source.
I tried the dynamic request function (see 7) and the queues, but did not get it 
working with web streams.

Finally I had the idea to use "playlist" function and it's "reload" parameter
to switch between local and remote streams and files
by updating the playlist and triggering the playlist update.

My playlist tests with local and remote files worked mostly fine,
but I have some open points when using streams and URLs (and some ideas at the 
end...)

1)
I did not get it run if playlist file contains a continous stream
(maybe because stream download never ends?)

liquidsoap 
'out(playlist(reload=20,mode="normal","http://localhost/request.m3u";))'

with http://localhost/request.m3u serving the single entry

http://piradio.de:8765/radio

2010/12/04 18:38:30 [request(dot)m3u:3] Successfully loaded a playlist of 1 
tracks.
2010/12/04 18:38:30 [threads:3] Created thread "wallclock_pulse" (1 total).
2010/12/04 18:38:30 [clock.wallclock_pulse:3] Streaming loop starts, no sync.
2010/12/04 18:38:30 [mksafe:3] Switch to safe_blank.

2)
I noticed, that playlist function does not resolve remote playlist files

liquidsoap 
'out(playlist(reload=20,mode="normal","http://localhost/request.m3u";))'

where http://localhost/request.m3u contains one or more playlists itself

http://piradio.de:8765/radio.m3u

Here I get

2010/12/04 18:58:51 [clock.wallclock_pulse:3] Streaming loop starts, no sync.
2010/12/04 18:58:51 [mksafe:3] Switch to safe_blank.
2010/12/04 18:58:51 [decoder.mp3:3] Invalid file extension for 
"/tmp/liq64700a.m3u"!
2010/12/04 18:58:51 [decoder:3] Unable to decode "/tmp/liq64700a.m3u" as 
{audio=2;video=0;midi=0}!
2010/12/04 18:58:52 [decoder.mp3:3] Invalid file extension for 
"/tmp/liq86feeb.m3u"!

Support of unwrapping remote playlists and putting these entries as single 
entries into liquidsoap's playlist would be really cool.

3)
playlist reload does seem to be executed during playing out a playlist entry.
This makes it impossible to switching between entries that are (endless) 
streams.

4)
If playlist is reloaded then it starts from the beginning.
This means if I add an entry in "normal" playmode then the playlist will start 
from scratch again.
At least for "normal" mode it would be fine, if playlist would not be restarted 
in case that only entries after the current playing have changed.

5)
A good idea could be a explicit playlist reload function to trigger the reload 
externally from the server interface.

6)
Support of "file:///" protocol would be helpful. Many browsers support it.

Example:

liquidsoap 
'out(playlist(reload=20,mode="normal","file:///var/www/request.m3u"))'

This could be useful for playlist entries themself too

example: http://localhost/request.m3u contains

file:///var/www/track.mp3

This could provide a common handling for URLs and files.

7)
Maybe same cause as 1) following did not work for me.

set("log.file",false);set("log.stdout",true);set("log.level",3)
def get_request() =
   request.create("http://piradio.de:8765/radio";)
end
out(request.dynamic(id="s",get_request))

for files it works, but not for streams.


Maybe I did not use the playlist interface for what it is designed for
but at least I have got some ideas when playing around:

A)
A unified support of all source types (audio files and streams, playlist files)
and source locations (URLs and files)
for playlist function and request.dynamic(request.create(...))
could make liquidsoap even smarter.

B)
For simply playing out a list of sources that might change dynamically, the 
playlist function could simplify user's life, since complex changes of playlist 
could be completely done externally at the scheduler.
 From my POV, the playlist function in using "normal" mode could be used as a 
much simpler interface than using queues with polling status, checking ids, 
dropping them in case of changes and swapping queues.
For a smart use of playlist for scheduling, only two functions are missing: a 
reload triggering function and a "status" function, which returns the source 
string (path/url) of the currently playing source. An external scheduler would 
only need to set the playlist (which contains the current source and the next 
sources) and trigger the update function. Liquidsoap could prepare some of the 
next tracks to be played and remove those which are not needed anymore.

Please let me know how you feel about this proposals, but important to me, if 
you have any idea how I could dynamically set streams as input sources.

Thanks in advance,

BR, Peter


------------------------------------------------------------------------------
What happens now with your Lotus Notes apps - do you make another costly 
upgrade, or settle for being marooned without product support? Time to move
off Lotus Notes and onto the cloud with Force.com, apps are easier to build,
use, and manage than apps on traditional platforms. Sign up for the Lotus 
Notes Migration Kit to learn more. http://p.sf.net/sfu/salesforce-d2d
_______________________________________________
Savonet-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/savonet-users

Reply via email to