Description and types of codecs
Codecs is different mathematical models are used for digital compression and analog audio coding. Most of these mathematical models based on the fact that the human brain has the ability to form an overall impression even from incomplete information. After all, in fact, our brain interprets us what we want to hear, rather than what we actually hear. Exactly the same happens with optical illusions.
Different coding algorithms have a specific goal – between effective bandwidth and voice quality has to be a balance. For example, in the case of an audio CD sound quality comes to the fore, therefore saving bandwidth is not as important. CD-ROM is quantized in 16 bits (2 times for stereo), with a sampling frequency of 44,100 Hz. Given that such figures he had finally 70s, the quality was quite good.
But for the telephone line is not necessary in such a high level of quality as to optimize bandwidth. Therefore encoding telephone signals is performed using 8 bits, and the sampling frequency is 8000 Hz.
Generally initially “codec” was the name of the device that convert the signal from analog to digital. Now, this word has a value of compression / decompression.
Any phone, gateway, the program typically support several types of codecs, and while they may be calling each other “agree”, which codec will be used.
Codecs are used in VoIP:
BroadVoice Codec 16Kbps to 32Kbps narrowband and broadband
DoD CELP – 4.8 Kbps
GIPS Family – 13.3 Kbps or higher
GSM – 13 Kbps
iLBC – 15Kbps, 13.3 Kbps
ITU G.711 – 64 Kbps, in two versions: A-law and μ-law
ITU G.722 – 48/56/64 Kbps ADPCM 7 kHz bandwidth
ITU G.722.1 – 24/32 Kbps 7 kHz bandwidth (based on the codec SIREN by Polycom)
ITU G.722.1C – 32 Kbps, advanced codec from Polycom, 14 kHz bandwidth
ITU G.722.2 – from 6.6Kbps to 23.85Kbps. Also known as the AMR-WB. CELP 7 kHz bandwidth
ITU G.723.1 – 5.3 / 6.3 Kbps
ITU G.726 – 16/24/32/40 Kbps
ITU G.728 – 16 Kbps
ITU G.729 – 8 Kbps
LPC10 – 2.5 Kbps
Speex – from 2.15 to 44.2 Kbps
Now let’s talk codec voip comparison and describe codec voip best.
AMR (Eng. – Adaptive Multi-Rate) codec to decode narrowband signals (200-3400Gts) at a variable bit rate in the range of 4.75 to 12.2 kbps with quality ranging from 7.4 kbps to make long distance calls. Codec AMR – standard codec, required for 2.5G / 3G wireless networks, which is based on GSM (WDMA, EDGE, GPRS).
AMR codec originally developed for GSM and was standardized in 1999 by the European Telecommunications Standards Institute ETSI. Already in 2006 it was included in the specification of CableLabs PacketCable 2.0.
AMR can operate at various bit rates and in every GSM and WCDMA phone. It guarantees that such content that it generates will be perceived absolutely any mobile phone anywhere in the world.
BroadVoice – it is a whole family of codecs, which was created by Broadcom. They standardize CableLabs, ANSI and others.
Codec voip BroadVoice has two variants: 16 kb / s version called BroadVoice16 (BV16) for narrow-band telephone lines with a sampling rate of 8 kHz, 32 kb / s version called BroadVoice32 (BV32) for broadband lines with a sampling frequency of 16 kHz. BV16 is a standard codec in the following standards: PacketCable ™ 1.5, PacketCable 2.0, ANSI / SCTE 24-21 2006 and Recommendation ITU-T J.161. BV32 is a standard codec in PacketCable 2.0, ANSI / SCTE 24-23 2007 and Recommendation ITU-T J.361. RTP format for BV16 BV32 and is specified in RFC4298.
BroadVoice developed completely from scratch, and the objective was to optimize the transmission of voice over IP-based networks. Design BroadVoice must encode the minimum delay and complexity codec. In this case, the output we should have a good quality and be similar to the original version.
These codecs received standardized in 1991 by the US Department of Defense. It standardized the 4.8 kbit / s CELP codec as the federal standard 1016. DoD CELP codec has the ability to encode it in 30ms units, which are subsequently divided into four 7.5 ms sub-blocks. The encoder 10 calculates the number of filter coefficients for each frame to get a short synthesis filter. This is then used to make a model of the vocal tract speaker.
To do this, the filter is determined by the excitation, and for each subframe, and given the amount of scalable records from two books ciphers.
To simulate long-term periodicity, which is in the voice of speech, used the adaptive codebook. Each subframe has its own index and gain, which are determined in advance for this book ciphers.
Also looking for a fixed codebook, which contains 512 pseudo-random codes. To find a record of such a book, the gain factor for this listing. This is done to minimize the error between the reconstructed and original speech samples.
Two codebook entries are passed through the filter synthesis. This is necessary in order to reproduce the reconstructed speech. Then, the speech is transmitted through the post-filter, which greatly improves the quality of its reception.
GIPS (Global IP Sound) – manufacturer of the family of codecs and VOIP software. Its rate of 13.3 kb / s and higher.
GIPS codec can support voice quality with 30% packet loss. This technology is licensed to use Skype.
GIPS iLBC created a narrowband codec that they also provide, however, a limited but free license. This codec is supported by default in Asterisk and the standard IETF.
Broadband GIPS codecs (sampling rate of 16 kHz) are paid. These include:
iSAC (internet Speech Audio Codec): variable bit rate codec with high performance, designed for low-speed connections including dialup. This codec that most closely corresponds to that used by the client Skype.
iPCM-wb (internet Pulse Code Modulation wide-band): For a high-speed connections.
GSM (Eng. – Global System for Mobile communications) – very popular outside the US standard for cellular telephony. Original ‘Full Rate’ GSM speech codec is called RPE-LTP (Eng. – Regular Pulse Excitation Long-Term Prediction). He is able to use information from previous samples, as this information does not change very quickly, and so he can “guess” the current sample.
The speech signal is divided into blocks of 20 ms. Then the samples are transferred to the Elementary codec, which has a bit rate 13 kbit / s, to obtain blocks of 260 bits.
Modern GSM systems at their disposal are newer codecs, but they are strongly associated with patents.
EFR (Enhanced Full Rate) uses patent ACELP
HR (Half Rate) uses patent CELP-VSELP
GSM can be called almost native codec for all Asterisk / Trixbox installation.
It is very convenient because it does not require a license, and thus has excellent, just a delightful performance. It is believed that this codec has a lower sound quality than G.729A, but this is a personal preference rather than an objective assessment.
Codec voip GSM is the speed of 13 Kbps and does not require licensing.
iLBC – originally created by Global IP Sound as VoIP codec, but later it became available in free, but limited license. In particular, it has been made available the source code that you are permitted to change.
iLBC codec can be called free, which transmits voice and perfect for reliable voice communications over the Internet. It is used in narrow-band transmission lines with a bit rate of 13.33 kbit / s, as well as support for encoding frame length of 30 ms and 15.20 kbit / s encoding frame length of 20 ms.
ILBC codec has a high quality basic than, for example G.729A, and also has high resistance to packet loss.
iLBC codec is very attractive mix of quality and low bandwidth, and if you need to maintain an acceptable quality of communication at a low speed of the internet, then this codec is the best solution.
iLBC adheres Asterisk, but he did not gained such popularity as codecs ITU, so it can not be combined with conventional IP-phones or commercial systems VoIP. In IETF RFC 3951 and 3952 was enabled iLBC. Because iLBC codecs in their work using complex algorithms, they are able to achieve a high degree of compression, and therefore they are strong enough CPU intensive in Asterisk.
Although you can use iLBC without paying royalties, but you need each time you use the codecs for commercial purposes, to notify the owner of the patent for the iLBC – Global IP Sound (GIPS).
G.711 – this codec standard ITU high bitrate – 64 kb / s. He is the “mother” of modern digital telephone network.
G.711 codec invented company Bell Systems and presented to the public in the early 70s, but he got standardization in 1988. In this codec to use digital trunk T1, which used 8-bit uncompressed encoding scheme uncompressed pulse code modulation (PCM). The sampling frequency was 8000 samples per second.
According to the theoretical data, voice bandwidth was at 4000Gts.
Connecting line T1 can carry 24 digital channel PCM multiplexed together. However, the modern improved European standard E1 is able to transfer 30 channels.
G.711 codec has two versions: A-law and μ-law.
Codec μ-law – T1 is the internal standard used in North America and Japan.
Codec A-law – E1 is an internal standard used in the rest of the world.
They work the same, the difference lies only in their sampling the analog signal. In the two diagrams in the logarithmic signal is sampled, rather than a linear shape. In this A-law allows for a more dynamic range than μ-law. So the sound is a result of less clear, as arising from sampling artifacts are suppressed better.
G.711 codec to VoIP allows us to give the best voice quality, because this codec is also used by the PSTN lines and ISDN. Their sound is different no different because there is in the normal or ISDN phone. In this codec are slight delays, so it has no need for strong compression, which only takes computing power.
However, there are also disadvantages. For codec need high bandwidth, and it is higher than for other similar codecs. Bandwidth required up to 84 kb / s, including TCP / IP. However, broadband providers are increasing their capacity, so they should have no problems.
G.722 – this codec standard ITU high bitrate – 48/56/64 kb / s.
This speech encoding codec differs wider bandwidth, whereby voice quality is very good. Wideband speech coding algorithm CCITT signaling support transmission speeds of 64, 56 and 48 kbps.
All codec integrated on a single chip, so its total delay is about 3ms, which is quite a good indicator and causes no echo in communication networks. Codec also allows for acceptable performance for the bit error rate of up to 1000. Therefore, even under bad conditions the transmission performance will deteriorate hollow. High-quality coding wideband speech coder G.722 provide an anchor for sampling bits of information, where low and high sub-band ADPCM encoders using 6 bits / sample, and 2 bits / sample quantizers, respectively.
When the signal is in a low sub-band, it is more like a narrowband speech signal and a high SNR in the lower passband becomes perceptually more important than in the higher band. The dynamic range of the quantizer low signal bandwidth was set at 51 dB and a high signal quantizer band was set at 66 dB, primarily for music signals. To prevent the occurrence of zero code in data by 4 bits are used only 15 levels quantizer. This also restricts the view of the data on the bits 5 and 6 at 30 and 60 quantizer levels.
G.723.1 – codec standard ITU. He has a fairly low bitrate (6.3Kbps or 5.3Kbps) and is used in the H.323 standard Sipro Lab Telecom Company requires the purchase of a license if you want to use these codecs in their product.
G.723.1 yavlyaetsyaofitsialnym called speech coder for multimedia communications with data transmission at 5.3 and 6.3 kbit / s. G.723.1 codec can operate at bitrates of 6.3 kbit / s (using a 24-byte frames) using the MPC-MLQ algorithm or a bit rate of 5.3 kbit / s (using a 20-byte frames) using the algorithm ACELP.
To use the G.723.1, you need a patent or license covering algorithm. Authorized intellectual property rights and technology licensors for G.723.1 is Sipro Lab Telecom. G.723.1 patent pool members are AudioCodes, France Telecom, University of Sherbrooke, Nippon Telegraph and Nokia.
G.726 – this ITU standard codec. It uses an adaptive differential pulse code modulation (ADPCM).
As G.711, G.726, a codec has its roots in the network PSTN. Typically, it is used to try to international lines, since it allows to save bandwidth. G.726 has a bit rate of 32 Kbps, and provides quality, almost similar to the G.711 c bitrate 64kbps. Also, it is the standard codec in cordless phones DECT.
G.726 is not gained much popularity in the 1990s, as he could not transmit modem and fax tones. However, its capacity and low load on the system is still made him famous and widely used.
Bitrate can vary in the region 16, 24, 32 or 40 Kbps, but the 32 Kbps, but the standard.
Asterisk currently supports only standard 32kbps.
ITU G.728 codec is a standard for encoding voice information at a bitrate of 16 kbit / s. For encoding technology is used LD-CELP. Delay codec is only 5 samples (0,625ms). Finally, the standard was completed in 1992 and he received a code for floating point. However, already in 1994 was able to retrieve the codec bit fixed-point. G.728 modem transmits signals to a 2400 bit / s. Also runs a network alarm. RealAudio 28_8 is a variation of this codec with a bitrate of 15.2 kb / s.
Is the ITU G.729 codec standard. There are two variations: A and B. This codec can be long-distance voice transmission quality at low bit rate – 8 kbit / s.
But in terms of computing time, it is quite “expensive” codec, so some VoIP-phones and adapters (in particular brands Linksys / Sipura / Cisco) can only handle one G.729 call (channel) simultaneously.
If such a codec you want to use your product, you must purchase a license. Licenses can be purchased from resellers G.729 licenses, such as: Digium, Howler Technologies, VoiceAge, Adaptive Digital Technologies.
But if you want to use the codec for non-commercial purposes, you can use the free trial implementation.
Codec uses small enough bandwidth, so G.729A provides elegant sound quality. He does this by using CS-ACELP speech compression algorithm. Use G729A without paying a license fee is not possible, because it is protected by a patent, but it is very popular and well supported on different phones and systems. To achieve this degree of compression codec impressive amount of power required by the processor. For example, on systems Asterisk, use codecs with strong compression codecs may delay the processor.
LPC – English. Linear Predictive Coding – linear predictive coding.
LPC10 used for lines with a narrow bandwidth with a bit rate of 2.5 kbit / s. The voice signal is clean, but sound like a robot voice.
Speex – open and free outgoing code that has no patents. He is an audio speech compression. Speex is a free alternative to expensive codecs. In addition, one of the important advantages of Speex appears to be adapted to Internet applications. It provides many useful features that are often lacking in other codecs. Also worth mentioning that the Speex is part of the GNU Project and is available under the Xiph.org variant of the BSD license.
Speex became popular because of its flexibility. Nevertheless, it consumes more CPU resources than the G729, G726 and GSM codecs, and about the same as iLBC. While iLBC comes with an atypical number of frames – 30 ms and his work are lost packets, you can adjust to fit your needs Speex through codecs.conf in the Asterisk, unlike any other codec.