Insights & Resources7 min read

How VoIP Codecs Affect Call Audio Quality

Even when there's a good connection, sound quality can vary greatly with different VoIP codecs.

Sara Weichhand
VoIP Codecs and Quality
From a high level, a codec is a data compressor and decompressor. Codecs make large chunks of data smaller to reduce the internet bandwidth required to transmit that data. That compressed data then gets decompressed by a codec on the receiving end to make that data usable again.
VoIP codecs do that for audio data on VoIP calls. Here’s what you need to know.

How Codecs Affect Call Quality

The reason VoIP codecs affect call quality is that VoIP codecs typically use lossy compression. Lossy compression discards some audio data to compress the data as much as possible.
Discarding a little bit of audio data enables a lossy compression codec to reduce audio data to one eighth or one tenth of the original size. That’s why VoIP codecs use lossy compression.
However, even with lossy compression, you can still get very high quality VoIP call audio. In fact, most people can’t tell the difference between music compressed with lossy compression and uncompressed music.
The key is that your VoIP codec does a good job of carefully selecting which audio data gets discarded during compression, and doesn’t discard too much audio data.
There’s a method for selecting which audio data gets discarded. Those will get covered a little further on. For now, just understand that you want a VoIP codec that reduces your bandwidth requirements as much as possible, while retaining clear voice quality.
Generally speaking, the more your VoIP codec compresses the audio data, the more audio quality you’ll lose. A codec that reduces audio data to one fourteenth of the original size will sacrifice more audio quality than a codec that reduces the data to one eighth of the original size.
If your VoIP codec discards too much audio data or does a poor job of selecting which audio data can be safely left out, you’ll get grainy, distorted voice calls. This can have a huge negative impact on any business, where negotiation, sales, and customer service are handled over the phone.
Therefore, a weak VoIP codec could cost you big bucks. Therefore, before you select an audio codec, it’s important to know how much bandwidth you have and how much you’ll need. That way you can avoid using a codec with more compression than you actually need.

Calculating VoIP Codec Bandwidth

Yes, you can estimate how much bandwidth you need, based on how many VoIP lines you have. You can use 115Kbps per VoIP line. However, that’s a very loose estimate that errs on the side of avoiding using more bandwidth than you have.
So you may prefer calculating how much bandwidth you need, which depends on which VoIP codec you’re using. Broadly, there are three common VoIP codecs.

G.711 VoIP codecs

The G.711 codec offers some of the best sound quality. However, it also requires the most bandwidth.
This codec requires at least 96Kbps of bandwidth per line. If you want slightly better audio quality, you can use this codec with less compression. But that will require 112Kbps or 128Kbps of bandwidth per line.
But this codec is a good choice if you need high definition audio quality. It’s also a good option if your VoIP infrastructure requires connecting to the public switched telephone network (PSTN), since the G.711 codec uses no digital compression.

G.722 VoIP codecs

The G.722 codec is one of the most versatile codecs. At the highest compression rate, this codec requires only 32Kbps per line. If you have more bandwidth and want better audio quality, you can use up to 128Kbps per line.
This codec works well if you want the option of increasing compression to temporarily add more VoIP lines using the same amount of bandwidth.

G.729 VoIP codecs

The G.729 codec offers the lowest bandwidth requirements. At the highest compression rate, this codec requires just 12.8Kbps per line. But, typically, this codec requires 16Kbps or 23.6Kbps per line.
The impressive thing about the G.729 codec is that the audio quality is quite good, considering the low bandwidth requirements. This codec is a very good choice if you need to connect high volumes of VoIP lines. The audio quality is high enough for business calls. And the bandwidth requirements are low enough to make efficient use of your internet connection.
Unfortunately, your VoIP codec may be determined by your VoIP carrier. Ideally, though, your VoIP provider will enable you to select the VoIP codec you want.
But, regardless of which codec you use for VoIP calls, you’ll need less than 0.5Mbps of bandwidth for a single VoIP line. And, based on the rough estimate of 115Kbps of bandwidth per line, you could support a few VoIP lines with 0.5Mbps of bandwidth.
For a more specific calculation, use this VoIP bandwidth calculator.
You’ll need to know which VoIP codec you’re using. And keep in mind that you’ll need two channels per VoIP line (an inbound and outbound channel). Lastly, it’s wise not to use 100% of your total bandwidth. You should only use about 80% of your total bandwidth, to leave some room for variances in network performance.
Therefore, if you have nine VoIP lines, using the G.729 codec at 8Kbps, you’d need at least 144Kbps of bandwidth. That would require 180Kbps of total bandwidth, if you’re keeping that 20% of bandwidth padding.
Even though you’ll need to do your own calculations to determine how much bandwidth to keep in reserve, this calculator will give you a much more specific bandwidth requirement than the loose estimate.
A more specific bandwidth requirement calculation will enable you to use your internet connection much more cost efficiently for VoIP calling. It also saves you from having insufficient bandwidth for all the VoIP lines you need.
If you have more VoIP lines than your internet connection can handle, you’ll experience a lot of jitter, distortion, latency delays, and even dropped VoIP calls. When your VoIP network has more traffic than it can handle, it must prioritize that traffic. And some of that data is going to get dropped because there’s simply not enough room on the network for all that data.
That’s why it’s crucial to work out your bandwidth requirements and make sure your internet connection is capable enough for all your VoIP lines. Otherwise your VoIP calling will be unreliable and unusable for business calls.
Since this is so important, it’s worth understanding how codec compression works, since your VoIP codec compression ratio could be the difference between running three VoIP lines on your internet connection and running twenty-two VoIP lines.

How Codec Compression Works

As we mentioned earlier, some of the audio data will get discarded during the lossy compression method that VoIP codecs use. VoIP codecs determine which audio data can be safely left out through sampling.
Sampling just means that the codec collects a certain number of audio samples per second, and discards the least important audio data (some codecs use a method called “framing” for this. It’s a slightly different method, but the end result is the same). Then, when the codec compresses the audio data, it uses these samples to determine which sounds can be discarded with the most minimal impact on the audio quality for the end user.
During lossy compression, the codec will leave out more data to achieve higher compression ratios. That’s why compressing the audio data to one eighth of the original size produces better audio quality than compressing the audio data to one sixteenth of the original size.
That’s why you need more bandwidth to handle higher quality VoIP calls. So choosing a VoIP codec is a matter of balancing your available bandwidth with call quality.

VoIP Codecs for Fax

Codec compression will cause faxes to fail. If you send faxes through your VoIP provider, use the G.711 codec. This codec uses no digital compression, and works for sending faxes through your VoIP carrier’s IP network.

Common VoIP Codec Questions

There’s a lot of information to absorb about VoIP codecs. Here’s a quick lightning round of questions about VoIP codecs to round out this high level look.

Can You Test VoIP Audio Codecs?

Yes. As long as your VoIP provider enables you to select which codec you use, you can set your VoIP codec and make calls to test the audio quality.

What is the Most Commonly Used Standard Codec VoIP?

The G.729 codec is the most commonly VoIP codec. This codec has an excellent balance of audio quality and low bandwidth requirements.

What is the Difference Between G729 G729A VoIP Codec?

The G.729 codec uses a high complexity algorithm for audio compression. The G.729a codec uses a less complex algorithm and requires less processing power. However, the lower complexity algorithm also produces slightly lower audio quality.

What’s the Best VoIP Codec for High Latency?

You’ll experience call quality issues if your internet connection’s latency is higher than 250 milliseconds, regardless of which VoIP codec you use. The G.729 codec works well with high latency connections, because it requires relatively little bandwidth, which reduces network stress.
Share on Social

Get Started for Free!

Create a free account to set up voice, messaging, IoT, video & more.