VoIP codecs have a direct impact on the quality, compression, and bandwidth usage of your VoIP calls. The most common VoIP codec is G.711, which is meant to provide clear human voice communication.
G.711 has its merits, but it isn’t always the best VoIP codec. In fact, a few other VoIP codecs have advanced features that are far better suited for certain scenarios.
What VoIP Codecs Do
The term codec stands for compression and decompression—or code and decode.
During a VoIP call, analog voice signals are converted into digital data before being transmitted over the internet. VoIP codecs compress (encode) audio data to ensure it gets to the receiver quickly, maintaining optimal bandwidth usage and good audio quality. On the receiving end, the compressed data is decompressed and converted back into analog voice signals.
There are several VoIP codecs available and supported by VoIP providers, so the sender and receiver will often have to “negotiate” and decide on the best codec to use. For communication to work, both the sender and receiver must use the same codec—which must also be supported by both devices
VoIP codecs go a long way in determining the quality of your calls. They rely on a few important components that include sample rate, bitrate, and bandwidth.
- Sample rate: During a VoIP call, the analog voice data is “sampled” at regular intervals and converted into digital data. Each sample contains a piece of digital audio data. The sample rate is the frequency (in Hz) at which a VoIP codec can measure and collect samples. High sample rates will produce higher fidelity audio but will require more bandwidth, while low sample rates require less bandwidth but capture less detail—which can lead to bad call quality.
- Bandwidth: Measured in bits per second (bps), bandwidth represents the amount of data that can be transmitted over a network channel. Though most VoIP bandwidth requirements are low, some codecs require high bandwidth usage, and this can come at the cost of latency.
- Bitrate: This is the amount of data captured in a sample. It determines the quality of the audio. VoIP codecs with high bit rates will produce better sound quality from the compressed data.
Why is G.711 Such a Popular VoIP Codec?
G.711 is one of the most popular VoIP codecs. It’s a simple and free codec designed for traditional telephony that nearly every VoIP provider supports.
Narrowband codecs like G.711 typically prioritize speech rather than music audio. This makes it suitable for scenarios in which clear, high-quality, and low-latency voice communication is the top priority.
Unlike other codecs, G.711 doesn’t compress voice data. Instead, it uses PCM, or Pulse Control Modulation, operating at a fixed bit rate of 64kbps with a sample rate of 8kHz. Since voice data has a narrow frequency range of up to 4kHz, G.711 can accurately capture human voices with minimal distortions.
There are two variants of the G.711 codec: μ-law and A-law. The μ-law variant is used in Japan and North America, while the A-law variant is used predominantly in Europe.
Because G.711 doesn’t compress voice, it uses more data and has a relatively high bandwidth requirement. This can be an issue in scenarios where the available bandwidth is limited or the telephone network has a low capacity. If this is the case, you’re better off choosing a VoIP codec that compresses voice data for better transmission.
4 Additional VoIP Codecs
Every VoIP codec has its strengths and weaknesses, but you should choose one that aligns with your needs. Always consider the volume of calls your business receives, as well as your bandwidth usage.
Here are four alternative VoIP codecs you can try instead of G.711:
G.722
G.722 is a royalty-free, wideband codec covering a frequency range of 50Hz to 7kHz, offering HD audio. In contrast with G.711—which covers up to 4kHz—a wideband codec like G.722 can capture a greater range of human speech.
Naturally, G.722 has a high bandwidth requirement, operating at three different bitrates of 48kbps, 56kbps, and 64kbps. Its sample rate is 16kHz, which is double the sample rate of G.711. Nevertheless, both codecs use a similar amount of bandwidth—the main difference is that G.711 is fixed at 64kbps, while G.722 is more adaptable with its variable bitrate options.
G.722 uses a compression technique known as Subband Adaptive Differential Pulse Code Modulation (SB-ADPCM). With it, audio signals are separated into subbands, and higher-frequency signals are compressed separately from the lower-frequency signals. This helps produce high-quality audio that sounds natural while optimizing the use of available bandwidth.
The major drawback of G.722 is its compatibility, as it’s not as widely supported by VoIP providers. However, it remains a reliable VoIP codec that can be used in scenarios that require superior voice quality and when the network is unstable.
Opus
Opus is an ultra-wideband codec with a frequency range of 50Hz to 20kHz, very much capable of producing HD voice. It’s also open-source, royalty-free, and there are no recurring licensing fees—so anyone can use it.
Catering for both narrow and wideband, Opus has a variable bitrate ranging from as low as 8kbps to 512kbps. It can also adjust its bandwidth to adapt to the state of the network, and it has a very high sample rate of up to 48kHz.
Despite how Opus is neither as widely supported as G.711 nor as wide-ranged as G.722, it continues to grow in popularity. Its main drawback tends to be its complexity because it uses advanced compression techniques that require more processing power than G.711. Nevertheless, it can still produce better audio than G.711 at low bitrates.
Ultimately, Opus is ideal in scenarios that require low latency and involve low bandwidth. It’s also useful when you need to transmit music, which operates at a much wider frequency range than human speech—namely, from 20Hz to 20KHz.
G.729
As opposed to ultra-wide codecs like Opus, G.729 is a narrowband VoIP codec that operates with a fixed bitrate of just 8kbps. This is significantly less than the 64kbps of G.711. Meanwhile, it has a sample rate of 8kHz, which is the same as G.711.
G.729 uses a complex and aggressive compression technique that produces small-sized data packets from analog voice signals. As such, it only offers acceptable or moderate audio quality when compared to G.711.
Notwithstanding, due to its low bandwidth usage, G.729 can support more calls simultaneously—which is ideal in business environments with high network traffic, like the ones you’ll find in call centers. G.729 can also ensure good voice communication in scenarios where the network is severely limited.
AMR-WB
AMR-WB stands for Adaptive Multi-Rate Wideband. It’s also known as G.722.2, which is simply a more advanced version of the G.722 codec.
G.722.2 operates on a frequency range of 50Hz to 7kHz and can capture HD audio. It also has variable bit rates from 6.6kbps to 23.85kbps, meaning it can adapt to changing network conditions.
This codec is ideal for both speech and music, and it’s widely used in mobile phone networks where it’s essential to have both high-quality audio and other forms of media. This is unlike G.711, which is designed for traditional telephone communication through the PSTN.
G.722.2 enjoys widespread support, ensuring interoperability across different VoIP devices and systems.
Conclusion
G.711 is a very popular and widely supported VoIP codec that can give you clear calls, but several alternatives perform better in different scenarios. Thus, choosing a codec depends on the specific needs and requirements of your business.
If you’re looking for a reliable codec for traditional voice communication, then G.711 is well-suited.
G.722 steps things up with superior audio quality and flexibility.
G.729 can effectively manage low-bandwidth environments and will offer acceptable audio quality.
Opus is modern and versatile, capable of HD audio.
Finally, there’s G.722.2, which can capture more than human speech.
Remember, each VoIP codec has its own advantages, which means no single one is definitively better than the rest.
