Le Wednesday 30 January 2008 08:30:46 Marcin Lewandowski, vous avez écrit :
> Hi,

        Hi !

> I use request.dynamic and annotate to send files from my scheduler to
> liquidsoap.
>
> Is there any way to get e.g. via telnet interface information about
> estimated time to play all files already cached by liquidsoap? I know,
> that I can use myid.remaining, but it applies only to currently
> broadcasted element, not next ones in the queue.
>
> I have some programmes that I need to emit at particular time, but I
> need to know, where liquidsoap currently is - real playback time can
> differ a lot, it depends on length of already cached elements.

Hey, I've just added a file.duration primitive to liquidsoap :-)

It computes an audio file duration.
Some limitations:
 * Computation can be expensive, it is better if you can use it 
asynchronously, i.e. in a add_timeout
 * As mp3 is a dirty format, computation might be wrong in this case, or 
return non-nul on a jpeg file for instance. This happen rarely, but try to 
avoid non-audio files if you need to rely strongly on this value.

A recent API can be found there:
  http://savonet.sourceforge.net/wiki/LiqReferenceSVN

You might also like to play with the new request.* API, which allows to 
control request resolution inside your scripts.

Romain



Reply via email to