[Live-devel] Live555 Buffer Latency

Ross Finlayson finlayson at live555.com
Thu Aug 21 22:35:24 PDT 2014


> My name is Jon Anderson. I am working on an application using Live555 to stream L16 data for real-time audio playback at the lowest latency possible. I have stripped down many buffers on the OS side and have gotten my stream to playback with a latency of about 60 - 70 ms. My attention is now focused on Live555. I have notice several buffers built into Live555, but the only one that I am expecting to cause latency is the ReorderingPacketBuffer. For now, my plan is to get the latency down to as low as possible and then work it up for the sake of audio quality. With that in mind, I set the ReoderingPacketBuffer threshold time to 0ms.

Note that the 'packet reordering threshold time' (default value: 100ms) will occur as latency *only* when a packet gets lost, or if packets arrive out of order.  (In the latter case, the actual latency will be <= the threshold value.)  If there's no packet loss or reordering on your network (which should be the common case if you're streaming over a LAN), then the 'packet reordering threshold time' will have NO effect on latency.  But if packets ever arrive out of order, then the 'packet reordering threshold time' is important, otherwise the out-of-order packet(s) will get discarded.

Therefore, I don't recommend that you change this value, unless you're *certain* that packets will never get reordered on your network, but you expect packet loss to be quite common.


> What other buffers might be causing audio playback delay?

Nothing in the LIVE555 code.  Note, however, that if you're using a media player (on the client side) to render and play the audio, then the media player will typically have a 'jitter buffer' that smooths out the incoming audio samples, before playing them.  There's going to be some latency there - and it's unavoidable, because network jitter is unavoidable.

Ross Finlayson
Live Networks, Inc.
http://www.live555.com/

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.live555.com/pipermail/live-devel/attachments/20140821/abfc18b0/attachment.html>


More information about the live-devel mailing list