A Jitter Buffer is a piece of software inside a Media Engine taking care of the following network characteristics:

  1. Packet reordering
  2. Jitter

The Jitter Buffer collects and stores incoming media packets and decides when to pass them along to the decoder for playback. It makes that decision based on the packets is has collected, the packets it is still waiting for and the timing required to playback the media.

YouTube video

Working Mechanism

Upon receiving packets, the Jitter Buffer holds them for a predetermined amount of time, known as the buffering delay, before sending them out in a more orderly fashion.

This delay allows the jitter buffer to collect enough packets coming through the network during that timed delay to smooth out the variations in arrival times as well as reorder the incoming packets if needed.

The challenge here is to strike a balance between reducing jitter and minimizing the buffering delay, as a longer delay can lead to higher latency which is undesirable in real-time communications.

Adaptive Jitter Buffer

In more sophisticated setups, an Adaptive Jitter Buffer is employed. Unlike a static Jitter Buffer, an Adaptive Jitter Buffer can adjust the buffering delay dynamically based on the network conditions. What is implemented for WebRTC in web browsers as an Adaptive Jitter Buffer.

This flexibility allows for a more optimized performance, ensuring smoother communications even under fluctuating network conditions.

Other aspects of the Jitter Buffer

The Jitter Buffer doesn’t work alone in WebRTC. There are multiple other algorithms and mechanisms that assist in handling network inconsistencies and improve the quality of real-time communications. Some of these include:

1. Forward Error Correction (FEC)

Forward Error Correction is a technique used to enhance the reliability of data transmission. In FEC, the sender encodes the message in a redundant way by adding some error-correcting code, which helps the receiver to correct errors without needing a reverse channel to request retransmission of data.

2. Retransmission requests

WebRTC can also employ a feedback path from the receiver to the sender. When the receiver detects an error in the data (missing packets), it requests the sender to retransmit the erroneous data. This is done using NACK, FIR and PLI requests.

3. Packet Loss Concealment (PLC)

Packet Loss Concealment is a technique used to mask the effects of lost or discarded packets. In real-time communications like VoIP, when a packet is lost, PLC algorithms can generate a plausible substitute for the missing data based on the previously received data.

4. Bandwidth estimation

Being able to effectively and accurately estimate the bandwidth available enables improving the media quality by not taxing the network more than it can handle.

Each of these algorithms and complementary technologies has its own set of advantages and trade-offs. Orchestrating between hem and choosing which to use when is part of the responsibility of every WebRTC implementation.

About WebRTC Glossary

The WebRTC Glossary is an ongoing project where users can learn more about WebRTC related terms. It is maintained by Tsahi Levent-Levi of BlogGeek.me.

Looking to learn more about WebRTC? 

Check my WebRTC training courses