Guide to VoIP Audio Codecs. Which is Which? Nerd Need to Know 1 year ago

Hosted PBX Codecs

 

A codec is an encoding tool; it processes audio and video, storing it. It relies on an algorithm to shrink the size of the file, and decompress it when required. There are a number of types of codecs, each relying on different technology.

For the purposes of VoIP, there are a variety of options that are popular and used commonly. When we mention MOS it means Mean Opinion Score. The MOS standard measures the audio quality following compression, transmission, and decompression. The score is assigned using the P.800 and P.830 standards of the ITU-T. The MOS values run between 1 and 5, 1 being bag and 5 being excellent.

Softphone Codecs

Onto the individual codecs.

 

G.711

ITU introduced this codec in 1972 for digital telephony use. It has 2 variants, u-Law in the US and Japan, and A-Law in Europe. Both being the default standard in each respective country.

This utilizes a logarithmic compression and squeezes 16-bit samples to 8-bits. So, the compression ratio it achieves is 1:2. It’s bitrate for one direction is 64kbit/s, consuming 128kbit/s, which is a lot in comparison to other codecs.

This can be freely used for VoIP applications, there aren’t any licensing fees. It’s ideal for use in local area networks where there is plenty of available bandwidth.

On the MOS scale it’s a strong 4.

G.722

G.722 was approved by the ITU in 1988, and its technology is based on SB-ADPCM. It offers improved speech quality when compared to G.711 and sample data uses 14 bits.

The good news is that the patent is expired, so it’s totally free to use.

G.729

This codec has low requirements on the bandwidth front and also offers good audio quality. It encodes the audio in frames, with each frame being 10 milliseconds. Each frame contains eighty audio samples. It’s bitrate for one direction is 8kbit/s.

When used for the purposes of VoIP 3-6 frames can be sent in a packet. This is a licensed product, so the simplest way to leverage it is buying hardware that uses it, thus the fee will already be paid.

A common variant of it is G.729a, which has lower CPU requirements and is wire compatible with G.729.

On the MOS scale it just hits the 4.

The patent for the G.729 codec has also expired as of Jauary-2017 so it is now freely available! Thank’s to the developers for this codec which includes the University of Sherbrooke in Montreal!

G.723.1

There are 2 variants of this and both operate on 30 millisecond audio frames, but they operate of different algorithms.

The first variant has a bitrate of 6.4kbit/s, and rates a 3.9 on the MOS. The second variant has a bitrate of 5.3kbit/s and rates a 3.7 on the MOS. As far as encoded frames go, the first is 24 bytes long, and the latter 20.

GSM 06.10

This is also referred to as GSM Full Rate. It was designed by the ETSI (European Telecommunications Standards Institute for use by GSM mobile networks. This variation can be used freely, so it tends to be an incredibly common option in open source VoIP apps. It operates on audio frames of 20 milliseconds, which is 160 samples. Each frame is compressed to 33 bytes, with the resultant bitrate coming out at 13kbit/s.

As far as the MOS rating, the GSM 06.10 is a 3.7.

Speex

This open source codec is patent free. It was designed to work with 8kHz, 16kHz, and 32kHz sampling rates. The most popular choice for VoIP use is 8kHz.

Siren

There are 3 Siren codecs, and Siren 7 and 14 are available on royalty free license. Sire 22 requires licensing.

 

In summary
  • G.722 is for HD audio calls and is open-source. Usually included with every IP phone and most softphones.
  • G.711/u is the North American standard and is the most widely used codec, default and standard in any IP device.
  • G.711/a is the European equivalent of the G.711-u and is their standard codec. Also available in any IP device.
  • G.729 is a compressed codec using about 1/3 the bandwidth of a standard G.711 codec. Useful when on a mobile app or when connecting over a long geographical distance to cut down on audio issues due to lag. Recently open-sourced.

 

Want to know more?

VoIP Codecs Chart

 

For a detailed explanation of VoIP codecs, check out last week’s article What Are VoIP Codecs?