[Icecast] About latency, PCM and clients compliance

Philipp Schafft lion at lion.leolix.org
Fri May 31 03:41:45 PDT 2013


reflum,

On Thu, 2013-05-30 at 19:34 -0400, Sylvain Le Beux wrote:
> Hi all,
> 
> I am recently using icecast from server streaming, and even though I
> succeeding setting everything up to have a radio broadcast, I still have
> a few questions regarding icecast use.
> First, latency. I have a setup on a LAN, where I can add audio files to
> the stream, with a python script that automatically send the location of
> the file to be played continuously. I wanted to measure the latency from
> the moment when I sent ices2 a sound file, and the time it is being played.
> With a clean refresh of my firefox, I experienced a latency of app. 15
> secs. That's what I was expecting, but is it possible to reduce this
> latency further.
> Furthermore, must annoyingly, since the stream is playing continuously,
> when I send new file to be played, the latency grows as the time goes. I
> was able to measure latencies up to 1:30 or more after 20-30 mins of
> continous playing. Is that normal, or is there some parameter to set up
> in order to avoir this behavior.

I'm not understanding your setup fully.

The latency can change because the clocks are not in sync. If you
continue ti listen a stream the clock of the source and the clock of
your sound card will drift and that can result in higher latency.

1.5 min per 30 min is just 5%. I think there may be some other problems
as well but I have seen cheap (audio) clocks drifting by 5%.


> Related to this, I read that it's possible to send directly raw PCM to
> icecast when live streaming from the audio card input. Is it possible to
> send raw PCM files to icecast in the same way ? I haven't find any
> relevant information on this point. It would be neat, since I use of
> software that outputs raw PCM files, but I need to convert them to ogg
> before sending them to ices. As I understand it, if sent PCM audio,
> icecast achieves the conversion on its own, so I wonder also if it
> reduces latency to send it raw PCM or does not make much difference.

Icecast doesn't support PCM support (maybe OggPCM, but that would at
minimum be *very* experimental and not supported by *any* client).

You can stream Ogg/FLAC with icecast. I don't know how that will change
the latency. Also this is not supported by many clients.

If I want to send uncompressed audio I use other software like
RoarAudio.

But I don't think you really want this. You will need some more software
and *much* *more* bandwidth.


> Last thing, what are the requirements in terms of clients. It seems not
> all browsers react in the same way, same with audio players. Is there a
> spec list of which software versions are needed to listen to latest
> icecast2/ices2 streams.

if using ices2 and icecast2 you end with a true HTTP stream (nothing
special about this!) of a Ogg Vorbis file (also nothing special about
this!).

While the stream is /standard/ and has not changed in anyway since years
players are often implemented in strange, incomplet or broken way.
We (Xiph foundation in general, the icecast and the vorbis team,...) are
happy to support every player vendor who is really intersted in
implementing it the right way^TM.

Have a nice day!

-- 
Philipp.
 (Rah of PH2)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 482 bytes
Desc: This is a digitally signed message part
Url : http://lists.xiph.org/pipermail/icecast/attachments/20130531/3cb96e25/attachment.pgp 


More information about the Icecast mailing list