Hi!

2011/4/29 Martin Konečný <[email protected]>:
> Hi Samuel,
> Regarding Ticket # LS-469: http://dev.sourcefabric.org/browse/LS-469
> Could you detail why Liquidsoap would have a very high CPU usage if I were
> to set a cue point more than a few seconds from the beginning of a track?
> One use-case we were hoping to address with this feature was restarting
> playback from a specific point in a track after a power failure. One of our
> users has a radio station in an area where the power goes out a few times a
> day, and some of their tracks are pre-recorded shows up to an hour long.
> We wanted to make it so that if the power goes out with 10 min left of a one
> hour show, they simply need to restart their system and we use liquidsoap to
> jump to the 50 min mark.

That's a very interesting case!

> I am curious why I can jump to any point in a track with media players such
> as Banshee and Rhythmbox instantaneously, but Liquidsoap cannot.

The problem is that Liquidsoap has always been designed as a _stream_
processing "engine". It works chunk by chunk to generate a stream.
This internal specification is very appropriate for many reasons but
also entails some limitations (one of which being the skip vs.
crossfade problem you mentioned and on which I still have to reply..)

When decoding a file, liquidsoap processes data frame by frame until
it ends. It has some limited view concerning the future, namely an
estimation of the remaining time for files and, in the case of
crossfade in conservative mode, a small buffer of data (which should
be the solution for your skip and cross issue: pass conservative=true
to the crossfade operator).

So, for now, we do not have any notion of skiping data in file
decoders. The cue point operator is implemented for now by decoding
all the data to skip at once at the beginning of the track and that is
what may cause high CPU usage. (the problem does not occur at the end
of the track).

Ideally, we should have a notion of skipping for file decoders.
However, I am not so sure about how this could be implemented. I
believe that it could be a source's property, that is only available
when possible (i.e. the source is a playlist, single but not
input.http etc..)
However, this probably requires a fairly large amount of work and
would also require the implementation of a skipping method for each
format (and don't get me started on the mess concerning mp3 data..)
(or the ogg muxing format also..) :-)

All in all, I would say the following:
 * For now Sam's operator is nice for cue points that are close to the
beginning of the file, which is usually the case for instance with
crossfading.
 * For you specific case, a cut_file protocol would probably be enough
(files are mp3 or ogg/vorbis?).

In the long term, I would like to have a skiping data support in
liquidsoap. However, I believe that is too much of a core change for
now, because we are still working on the 1.0 stable release...


Romain

> Regards,
> Martin
> P.S. Thanks for the quick implementation of this feature. Even in its
> current state we will have uses for it :)
>
> --
> Martin Konecny
> Software Developer, Sourcefabric
> [email protected]
>
> ------------------------------------------------------------------------------
> WhatsUp Gold - Download Free Network Management Software
> The most intuitive, comprehensive, and cost-effective network
> management toolset available today.  Delivers lowest initial
> acquisition cost and overall TCO of any competing solution.
> http://p.sf.net/sfu/whatsupgold-sd
> _______________________________________________
> Savonet-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/savonet-users
>
>

------------------------------------------------------------------------------
WhatsUp Gold - Download Free Network Management Software
The most intuitive, comprehensive, and cost-effective network 
management toolset available today.  Delivers lowest initial 
acquisition cost and overall TCO of any competing solution.
http://p.sf.net/sfu/whatsupgold-sd
_______________________________________________
Savonet-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/savonet-users

Reply via email to