Jitter Buffer

What is a Jitter Buffer?

A jitter buffer is a shared data area where audio data is temporarily collected and stored during a VoIP (Voice over Internet Protocol) call before being sent to the recipient. It helps to improve the quality of voice calls by reducing jitter, which can cause audio delays and sound distortion.

There are two main types of jitter buffers—static and dynamic. As their names suggest, a static jitter buffer is a fixed-size buffer, while a dynamic one adapts to the current network conditions.

How Does a Jitter Buffer Work?

When you make VoIP calls, the audio data is transferred in small pieces, called packets. Due to changing network conditions, these packets may get transmitted at different speeds, even if they come from the same source. The difference between each packet's arrival time is the "jitter."

For most network activity, varying packet arrival times don't cause many problems. But if your activity depends on real-time communication (like streaming or video calls), jitter means the call recipient ends up with choppy or lagging audio.

A jitter buffer helps to even out that jitter to improve audio quality for the recipient. It delays and stores incoming data packets before sending them on to the recipient. The delay is normally imperceptible—less than a second. But adding a tiny delay helps to smooth out the audio and give them a better experience.

A fixed jitter buffer will keep its delay the same the whole time, so if network conditions deteriorate, the recipient may still have audio problems. A dynamic or adaptive jitter buffer monitors the conditions experienced when transferring the most recent voice packets, and either reduces or increases its buffer size as needed.

Why a Jitter Buffer is Important for Real-time Communications

A jitter buffer helps improve audio and video quality even when recipients can't make other improvements to their network conditions --- such as upgrading their internet connection or using an ethernet connection rather than Wi-Fi. It offers three core benefits:

  • Improves audio quality—communication recipients can improve the quality of the audio and video they receive by turning on the jitter buffer in your product. 

  • Makes internet calls more reliable—if recipients can still receive real-time communications when they have poor Wi-Fi signal or high levels of network congestion, they trust they can rely on your product to work well for them.

  • Provides a more professional experience—call reliability and quality are two core measures of how professional your product looks to your users. If it was often unreliable or calls were always choppy, people would think your product was amateur or less valuable, making them more likely to look for other options.

These benefits are especially useful for real-time communications, as you can't wait and watch back the call later or reschedule an event until your network performance improves.

When to Use a Jitter Buffer

A jitter buffer can improve your users' experience using your product if it has audio or video calling functionality, but it won't fix any problems caused by their router or internet connection. It won't solve all their audio problems, but there are several scenarios where it can improve their experience.

Network Congestion

Network congestion happens when multiple users and devices use the same network connection. Most of the time, it may work fine, but if people do things that need a lot of bandwidth—such as making video calls or uploading large files—at the same time, speeds will drop.

So if your product is aimed at a mainstream audience who are likely to be making calls or real-time communications at peak times, having a jitter buffer will help them maintain audio quality. It can help boost performance as an alternative to upgrading their internet connection, which is a more permanent solution if network congestion is an ongoing problem.

Poor Wi-Fi Signal

Poor Wi-Fi signal happens when you don't have sufficient coverage in your home or office. Alternatively, people can struggle with a poor signal if they're relying on public Wi-Fi, such as if they're using your product on the go.

People can sometimes improve their internet connection by moving closer to the router or plugging in an ethernet cable instead of relying on Wi-Fi. But if neither option is available, a jitter buffer can help boost call quality without changing their Wi-Fi signal.

For example, if people are likely to use your app while traveling or commuting, they're likely to experience problems caused by inconsistent connectivity. A jitter buffer will help to improve their experience with your product.

High-bandwidth Activities

Video conferencing and live streaming are examples of high-bandwidth activities. Viewers or participants are more likely to experience network congestion and other connectivity issues when carrying out high-bandwidth activities like these.

If these activities are a core feature of your product, a jitter buffer is a valuable addition. For example, if your product is likely to be used by event professionals to stream talks, presentations, and keynotes. A jitter buffer can help reduce streaming delays or poor-quality audio for your audience, giving them a better event experience.  

Example Use Cases for a Jitter Buffer

A jitter buffer can help improve the quality of audio and video calls over the internet, so it has many potential use cases across different industries.

Education

Jitter buffers may be a useful addition to education apps and products, especially if students need to join online classes or watch pre-recorded sessions. For example, if your product is an online learning platform where students can join classes remotely, a jitter buffer can help to improve audio and video quality, even if they don't have the best Wi-Fi signal.

Audio and video quality are essential for their learning—if the audio is choppy or distorted, students will miss half the information they need. So adding a jitter buffer into your product gives the user more control over fluctuating or dropping call quality.

Gaming

Gaming apps can also benefit from a jitter buffer if users are going to live stream their gameplay or play online multiplayer games. A jitter buffer will help people viewing a live stream hear audio and watch the gameplay clearly, with less distortion. They'll be able to react and enjoy the action in real-time, rather than having audio or video delays that put them a few seconds behind other viewers.

And if your users are playing multiplayer games online, a jitter buffer can help them communicate clearly with their team (or opponents) without a drop in audio quality. They'll be able to collaborate or compete effectively, even if they're playing at peak internet traffic times. 

Virtual Events

Apps for live streaming conferences, concerts, and other virtual events will benefit from jitter buffer functionality because streaming is a high-bandwidth activity. You need to give users a high-quality experience with minimal audio or visual lag—even if they're experiencing temporary network congestion.

Online conferences with multi-speaker panels will particularly benefit from a dynamic jitter buffer. Speakers will be joining from different locations with different connectivity speeds. So an adaptive jitter buffer can help to smooth out the difference in packet delivery speeds from each speaker, ensuring viewers see the panelists' contributions in the right order, with minimal audio or visual delays.

Frequently Asked Questions

What is jitter?

Jitter measures the variation in how long it takes audio data packets to reach their destination. Data packets sent from the same source don’t always get transmitted at the same speed, so they don’t always reach the recipient at regular intervals. This can cause choppy or distorted audio.

What does a jitter buffer do?

A jitter buffer helps to improve the quality of audio or video calls over the internet. It queues up a number of packets as they arrive, and adds a small delay (a buffer) before sending them on to the recipient. This helps to smooth out any problems that could come from data packets arriving at irregular intervals or out of order.

How large should a jitter buffer be?

The size of your jitter buffer sets the amount of time, in milliseconds, that arriving data packets are queued up for before sending them on to the recipient. Some products offer different buffer sizes that users can change in their jitter buffer settings to give them more control over their audio quality.

In general, a jitter buffer should add a buffer of between 20 milliseconds and 60 milliseconds. The larger the buffer, the more latency is introduced into the call, which can affect the user’s experience.

Related Terms:

Next Steps

Start by opening an account and trying out our products. We’re here to help you understand the best solution to your use case. Contact us any time to learn more about Stream.

Chat Messaging

Build any kind of chat messaging experience without scalability or reliability issues.

Learn more about $ Chat Messaging

Activity Feeds

Build any kind of feed without the headache of scalability or reliability of your feeds.

Learn more about $ Activity Feeds