What are VoIP Codecs and How They Affect Call Quality?
A Voice over Internet Protocol (VoIP) network is a type of network that helps to transmit audio signals or voice calls over the internet. These voice calls are usually encrypted and sent through an IP address and vice versa.
VoIP systems come with many benefits; one of those is that they compress data to make the voice signals transfer quicker and seamless. This is where digital devices known as codecs come in. Codecs help digital systems work optimally in audio signal transmission.
They are both data compressors and decompressors. Large amounts of data are compressed and sent over an internet bandwidth. They then get decompressed by another codec on the receiving end for data to be accessible.
What are VoIP Codecs?
VoIP codecs are a technology that controls the quality, bandwidth, and compression of VoIP phone calls. They convert analog voice signals into compressed digital packets and then back into decompressed voice signals.
Types of VoIP Codecs
Here are the types and details of VoIP Codecs:
The G.711 codec uses the most bandwidth, but its quality is one of the best. The least bandwidth per line is 96Kbps. It will need between 112Kbps or 128Kbps of bandwidth per line to get a lower compression and an enhanced audio quality.
For HD voice quality, G.711 is a desirable option. It is also suitable if your VoIP system needs to connect to the Public Switched Telephone Network (PSTN).
The G.711 codec has a compression ratio of 1:2 which means every 16-bit data sample is compressed to 8-bit. As a result, compared with other VoIP codec protocols, G.711 provides better audio quality.
G.711 codec does not have a licensing fee and performs well in a local area network with more available bandwidth. This means you can use it in any VoIP environment without incurring additional costs.
The G.722 codec uses the Adaptive Differential Pulse Code Modulation technology and operates within 48, 56, and 64 Kbps.
G.722 offers high audio quality and samples data at a rate of 16 kHz. It provides an enhanced audio quality without a complex VoIP setup compared to codecs like G.711.
The G.722 codec is a more flexible codec than the G.711. At its highest compression, this codec needs just 32Kbps per line. However, with 128Kbps per line, you will get better audio quality if you have additional bandwidth.
The G.722 codec works well to increase compression by briefly adding more VoIP lines with the same bandwidth.
G.722 is also a good application in high-quality VoIP because of its wideband audio coding system.
The G.729 codec uses low bandwidth and delivers excellent audio quality. It encodes the audio in frames of 80 audio samples that are ten milliseconds long.
After compressing audio data into frames, the codec encodes each distinct frame at a frequency of 8 kHz.
Higher compression allows you to make more calls from your network. Even though several VoIP providers may not support the G.729 codec, it still offers a fine audio quality.
When the G.729 codec is used in VoIP, you can send six frames in a packet with a single-direction bit rate of 8Kbps. The number of frames is 6 because the overhead of packet headers is 40 bytes, and this much usable information has to be sent.
The G.729 has a licensing fee. However, users can buy hardware that uses the G.729 codec and won’t need to pay the licensing fee. Manufacturers of the hardware would have paid, so you don’t have to.
Another option is using its variant G.729a. It is compatible with the G.729 codec and is more efficient as it requires less CPU usage.
The G.723.1 codec was designed in an ITU competition to create an algorithm for calls over 28.8 and 33 kbit/s modem links.
For the G.723.1 codec, the ITU competitions came up with two results used as the codec variants.
The two variants operate on separate algorithms but have the same 30-millisecond audio frames.
The first has a bit rate of 6.4kbit/s, MOS rates of 3.9, and the encoded frames are 24 bytes long. The second has 5.3kbit/s and MOS rates of 3.7 and encoded frames 20 bytes long.
OPUS is the best VoIP codec to transmit high-quality audio with ultra-modern compression techniques.
The OPUS codec is very versatile and can be used for hi-fi audio and clear speech. The OPUS codec supports bitrates from 6 kb/s to 510 kb/s and sampling rates from 8 kHz (narrowband) to 48 kHz (full band).
The OPUS codec was initially made for Web Real-Time Communication (WebRTC) but is now out of the scope of browser-based telephony as seen in their SIP telephones.
Besides WebRTC, the OPUS codes also provide options for voice record and wireless audio. It handles low latency issues well but still needs some upgrade with lossless audio compression.
Supported features are:
- Floating point and fixed-point implementation
- Good packet loss concealment (PLC)
- Adjustable bitrate, audio bandwidth, and frame size
- Multistream frames up to 255 channels
- Mono and stereo
- Speech and music
- Audio bandwidth from narrowband to full band
- Constant bitrate (CBR) and variable bitrate (VBR)
- Frame sizes from 2.5 ms to 60 ms
The GSM 06.10 codec, also known as GSM Full Rate, was initially designed for GSM mobile networks by the European Telecommunications Standards Institute but is now employed in open source VoIP applications.
The GSM 06.10 codec is a prevalent option in open-source VoIP systems and can be used freely.
It works on audio frames of 20 milliseconds, i.e., 160 samples with every frame compressed by 33 bytes, and has a resultant bitrate of 13 kbit/s.
However, the encoded frame is 32 and a half-byte long, and 4 bits are not used in each frame. The GSM 06.10 codec’s audio quality is fair and has a MOS rating of 3.7.
Speex is an open-source, patent-free VoIP codec for speech compression. It was designed to work with Narrowband (8 kHz), wideband (16 kHz), and ultra-wideband (32 kHz), with the most popular being 8kHz.
Speex is well-adapted to internet applications and offers a free alternative to expensive proprietary speech codecs.
Additionally, it provides valuable features that most other codecs don’t, like embedded coding, intensity stereo encoding, and a Variable bitrate (VBR) mode.
The Speex technology is based on Code-excited linear prediction (CELP) and compresses audio signals at bit rates ranging from 2 to 44 kbps.
Speex features include:
- Intensity stereo encoding
- Noise suppression
- Acoustic echo canceller
- Fixed-point port
- Discontinuous Transmission (DTX)
- Voice Activity Detection (VAD)
- Variable bitrate operation (VBR)
- Packet loss concealment
Siren is a family of patented, wideband audio VoIP codecs licensed and developed by PictureTel Corporation.
There are 3 Siren codecs: Siren 7, 14, and 22. Siren 7 and 14 are on a free license, while Siren 22 needs licensing.
Siren 7 offers 7 kHz audio, bit rates 16, 24, 32 Kbps, and a sampling frequency of 16 kHz. The Siren 7 algorithm is similar to the G.722.1 codec, but the data compression formats are different. For example, G.722.1 only offers bit rates of 24 and 32 kbit/s, while Siren 7’s bit rate is 16 kbit/s.
Siren 14 supports both stereo and mono audio. It offers 14 kHz audio, bit rates 24, 32, 48 kbit/s for mono, 48, 64, 96 kbit/s for stereo, and 32 kHz. The Siren 14 algorithm uses transform coding technology, using a modulated lapped transform (MLT). It offers a 40-millisecond algorithmic delay, using 20-millisecond frame lengths.
Siren 22 offers 22 kHz audio, sampling frequency 48 kHz, bit rates 64, 96, 128 kbit/s stereo, and 32, 48, 64 kbit/s mono. It is a new G.719 full-band codec based on Siren 22 audio technology and also offers a 40-millisecond algorithmic delay using 20-millisecond frame lengths.
Internet Low Bitrate Codec (iLBC) is a free speech codec suitable for strong voice communication over IP.
It allows an excellent speech quality even in the event of lost frames due to delayed IP packets. The iLBC codec has a payload bit rate of 13.33 kbit/s (encoding frame length of 30 ms) and 15.20 kbps(encoding frame length of 20 ms).
Features of iLBC:
- Royalty-free Codec
- Computational complexity like G.729A
- Essential quality higher than G.729A increased robustness to packet loss
- Bitrate 13.33 kbps for the frame size of 30 ms
- Bitrate 15.2 kbps for the frame size of 20 ms
How VoIP Codecs Improve Call Quality
VoIP codecs improve call quality because they use lossy compression.
In lossy compression, audio data is removed as much as possible to compress data. As a result, a codec can reduce audio data to one-eighth or one-tenth of the original size and still give high-quality VoIP call audio.
VoIP codecs do well in selecting specific audio data to avoid affecting call quality when compressed. Of course, you’ll still need to monitor call quality, but codecs will surely help you deliver the best possible audio quality.
Calculating VoIP Codec Bandwidth
VoIP Codec Bandwidth is calculated based on how many VoIP lines you have. That’s why it’s important to know which VoIP codec you’re using and also that you need two channels per line.
However, regardless of which codec you use for VoIP calls, a single line will require less than 0.5Mbps of bandwidth. Therefore, you could support a few VoIP lines with a rough estimate of 115Kbps of bandwidth per line.
VoiP Codecs FAQs
1. What is the best codec for VoIP?
Although this can depend on your specific needs, the G.729 codec is the most common voice-over IP codec. This is because it provides an excellent balance of audio quality and low bandwidth requirements.
2. What are codecs in VoIP?
They are both data compressors and decompressors that help in the transmission of voice data. VoIP codecs are G.711, G.722 HD, G.729, G.723.1, OPUS, GSM 06.10, Speex, Siren, and iLBC
3. Which codec is better: G711 and G729?
G711 provides an uncompressed high-quality voice but uses a lot of bandwidth. G729 uses less bandwidth but at the cost of some sound quality which is good enough for most calls.
4. Is the g722 an HD?
Yes. When it comes to HD, G.722 can deliver double the quality of a G.711 phone session in the same bandwidth amount. It captures audio at 7 kHz and a sampling rate of 16 kHz.
Summary & Takeaways
Each VoIP codec has its pros and cons. For example, while some have better audio quality, others prioritize data compression. Before investing in a VoIP codec, assess and ensure it meets your specific business goals for optimal performance.
- VoIP codecs all have a purpose – to compress data and move it quickly.
- The difference between VoIP codecs is the way they compress the audio.
- It’s wise not to use 100% of your total bandwidth. Instead, leave room for variances in network performance