Hi, I'll just forward my reply from this morning, for the archive. I forgot to Cc to the list, and now we have two similar answers.
By the way, just one remark on Romain's mail: the default_duration is in fact used most of the time, not only for MP3. It is used as soon as there is no "duration" metadata (containing a decimal float number giving the duration in seconds). This metadata can be set by any protocol in the request resolution, it will be set if it is present in the file's metadata, but is not set by the MP3 and Vorbis decoders. Cheers, ---------- Forwarded message ---------- From: David Baelde <[EMAIL PROTECTED]> Date: Wed, Nov 19, 2008 at 11:32 AM Subject: Re: [Savonet-users] Early requesting of playlist items. To: Łukasz Jarosław Mozer <[EMAIL PROTECTED]> Hi Łukasz, Good to hear that the docs were helpful, and that you found migrating easy. Your problem is known but not so much documented. I'll explain how to work around it. Basically, "it's not a bug, it's a feature", but it's annoying. Liquidsoap prepares files in advance to make sure that the stream won't be interrupted because the network is slow or some files are corrupted: a priori, the preparation of a request can involve downloading, sometimes replaygain analysis, always decodability checking, etc. So we have a queue of prepared files that liquidsoap tries to keep filled. The first thing you can do is to play with the parameters of that queue. Here is the relevant part of "liquidsoap -h request.dynamic": * length :: float (default 60.) How much audio (in sec.) should be downloaded in advance. * default_duration :: float (default 30.) When unknown, assume this duration (in sec.) for files. * timeout :: float (default 20.) Timeout (in sec.) for a single download. By setting default_duration to less that 2*length you'll get only one file prepared in advance. But you won't be able to go under that (at least not without risking strange things, I think). The second thing you can do is adapt a bit your PHP app. Currently, when you feed a request to liquidsoap, you assume that it's being played. You can delay this second aspect to the moment where it's really played. We do that for Dolebraï (http://savonet.sourceforge.net/doc-0.3.7/dolebrai.html) the files are passed to liquidsoap by a request.dynamic() like you, but our scripts are told only later that a song passed, using on_metadata() and the feedback() function/script. The feedback triggers scripts that update the history on played files that users can see on our website. This is not so natural since we have to fake the playback of a song when it is fed to liquidsoap (in order to avoid that it's fed twice) before that the playback is later confirmed, with precise info, using the feedback mechanism. I don't know if that's clear enough. I hope that you can adapt your system easily. As I said it's not the most natural thing about liquidsoap, but it makes sense and has some advantages. I don't know of any case where it was a real blocker. If it's one for you, we could build an unqueued variant of request.external() but it would be very tricky to use, and would basically not allow any complex protocol (e.g. replaygain) in requests' resolution. Good luck, -- David -- David ------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ _______________________________________________ Savonet-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/savonet-users
