Introduction to our new RTP adaptive jitter buffer algorithm

Primary tabs

Recent Linphone releases now incorporate a new RTP jitter buffer algorithm, which is the result of an internal R&D program started two years ago by Belledonne Communications. The benefits of this new algorithm is an improved audio & video quality.

What is an adaptive jitter buffer ?

In VoIP communications, audio and video data are carried over the Real-time Transport Protocol (RFC3550), an application-level protocol on top of UDP. The protocol header includes mainly a timestamp information that is intended for the receiver to timely decode and render the media packet to an output device (soundcard or screen for example).

During packet transmission, random events can occur and delay packets from time to time: temporary congestion of some routers, wifi interferences causing packet retransmissions, etc. This is a phenomenon actually very frequent with internet transmissions.

The effect of a burst of late audio packets is extremely bad for the user experience, because it will cause a buffer underrun at the soundcard level, causing silent audio to be heard by the user for a period of time.

For this reason, it is desirable that a RTP receiver applies a "safety" delay to all received packets in order to compensate for potential burst of delayed packets, and hence ensure that an uninterrupted flow of audio data is transmitted to the soundcard. This is the role of the RTP jitter buffer component.

The adaptive nature of the jitter buffer resides in the fact that it has to measure the network transmission characteristics in order to choose the most adequate latency to be applied in order to maximise the audio experience. More latency decreases the number of underruns, preserving audio quality, however unnecessary latency is detrimental for real time conversations.

What are the benefits of the new algorithm?

The new algorithm, compared to the former one, more finely estimates the clock skew between sender and receiver and the network jitter, thanks to linear regression techniques applied on the timestamp information carried by received RTP packets. Coupled with a decision algorithm engineered from post-analysis of real VoIP calls, the new algorithm has finally these two main benefits:

  • drastic reduction of soundcard underruns (late packets) thanks to a more adequate and reactive jitter buffer size control. The new jitter buffer quickly adapts to very jittered network conditions, providing the user with a better audio quality.
  • improved control of audio latency. If network transmission is found to be good and reliable, the jitter buffer latency can shrink to its minimum value (we set it to 40 ms), so that the users can experience the best audio latency during their call.

How to benefit from the new adpative RTP jitter buffer in a Liblinphone app?

The new algorithm has been intensively tested during these past monthes and proved its stability. Following versions actually use it by defaut : 

  • Linphone-iphone >= 3.16.0
  • Linphone-android >= 3.2.5
  • Linphone desktop >= 3.11.0 

No action or setting is required for software derivated or incorporating these versions.