{"id":5528,"date":"2017-06-23T18:29:53","date_gmt":"2017-06-23T23:29:53","guid":{"rendered":"https:\/\/www.nurango.ca\/?p=5528"},"modified":"2023-02-01T20:20:57","modified_gmt":"2023-02-01T20:20:57","slug":"voip-codecs-guide","status":"publish","type":"post","link":"https:\/\/www.nurango.ca\/blog\/voip-codecs-guide","title":{"rendered":"Guide to VoIP Audio Codecs. Which is Which? Nerd Need to Know"},"content":{"rendered":"<p><span style=\"font-family: arial,helvetica,sans-serif;\">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.<\/span><\/p>\n<p><span style=\"font-family: arial,helvetica,sans-serif;\">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.<\/span><\/p>\n<p><span style=\"font-family: arial,helvetica,sans-serif;\"><img fetchpriority=\"high\" decoding=\"async\" class=\"size-full wp-image-5530\" src=\"https:\/\/www.nurango.ca\/wp-content\/uploads\/softphone-codecs.png\" alt=\"Softphone Codecs\" width=\"599\" height=\"430\" \/><\/span><\/p>\n<h5><span style=\"font-family: arial,helvetica,sans-serif;\">Onto the individual codecs.<\/span><\/h5>\n<p><span style=\"font-family: arial,helvetica,sans-serif;\"><strong>G.711 <\/strong><\/span><\/p>\n<p><span style=\"font-family: arial,helvetica,sans-serif;\">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.<\/span><\/p>\n<p><span style=\"font-family: arial,helvetica,sans-serif;\">This utilizes a logarithmic compression and squeezes 16-bit samples to 8-bits. So, the compression ratio it achieves is 1:2. It\u2019s bitrate for one direction is 64kbit\/s, consuming 128kbit\/s, which is a lot in comparison to other codecs.<\/span><\/p>\n<p><span style=\"font-family: arial,helvetica,sans-serif;\">This can be freely used for VoIP applications, there aren\u2019t any licensing fees. It\u2019s ideal for use in local area networks where there is plenty of available bandwidth.<\/span><\/p>\n<p><span style=\"font-family: arial,helvetica,sans-serif;\">On the MOS scale it\u2019s a strong 4.<\/span><\/p>\n<p><span style=\"font-family: arial,helvetica,sans-serif;\"><strong>G.722<\/strong><\/span><\/p>\n<p><span style=\"font-family: arial,helvetica,sans-serif;\">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.<\/span><\/p>\n<p><span style=\"font-family: arial,helvetica,sans-serif;\">The good news is that the patent is expired, so it\u2019s totally free to use.<\/span><\/p>\n<p><span style=\"font-family: arial,helvetica,sans-serif;\"><strong>G.729<\/strong><\/span><\/p>\n<p><span style=\"font-family: arial,helvetica,sans-serif;\">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\u2019s bitrate for one direction is 8kbit\/s.<\/span><\/p>\n<p><span style=\"font-family: arial,helvetica,sans-serif;\">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.<\/span><\/p>\n<p><span style=\"font-family: arial,helvetica,sans-serif;\">A common variant of it is G.729a, which has lower CPU requirements and is wire compatible with G.729.<\/span><\/p>\n<p><span style=\"font-family: arial,helvetica,sans-serif;\">On the MOS scale it just hits the 4.<\/span><\/p>\n<p><span style=\"font-family: arial,helvetica,sans-serif;\">The patent for the G.729 codec has also expired as of Jauary-2017 so it is now freely available! Thank\u2019s to the developers for this codec which includes the University of Sherbrooke in Montreal!<\/span><\/p>\n<p><span style=\"font-family: arial,helvetica,sans-serif;\"><strong>G.723.1<\/strong><\/span><\/p>\n<p><span style=\"font-family: arial,helvetica,sans-serif;\">There are 2 variants of this and both operate on 30 millisecond audio frames, but they operate of different algorithms.<\/span><\/p>\n<p><span style=\"font-family: arial,helvetica,sans-serif;\">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.<\/span><\/p>\n<p><span style=\"font-family: arial,helvetica,sans-serif;\"><strong>GSM 06.10<\/strong><\/span><\/p>\n<p><span style=\"font-family: arial,helvetica,sans-serif;\">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.<\/span><\/p>\n<p><span style=\"font-family: arial,helvetica,sans-serif;\">As far as the MOS rating, the GSM 06.10 is a 3.7.<\/span><\/p>\n<p><span style=\"font-family: arial,helvetica,sans-serif;\"><strong>Speex<\/strong><\/span><\/p>\n<p><span style=\"font-family: arial,helvetica,sans-serif;\">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.<\/span><\/p>\n<p><span style=\"font-family: arial,helvetica,sans-serif;\"><strong>Siren<\/strong><\/span><\/p>\n<p><span style=\"font-family: arial,helvetica,sans-serif;\">There are 3 Siren codecs, and Siren 7 and 14 are available on royalty free license. Sire 22 requires licensing.<\/span><\/p>\n<h6><span style=\"font-family: arial,helvetica,sans-serif;\">In summary<\/span><\/h6>\n<ul>\n<li><span style=\"font-family: arial,helvetica,sans-serif;\"><strong>G.722<\/strong> is for HD audio calls and is open-source. Usually included with every IP phone and most softphones.<\/span><\/li>\n<li><span style=\"font-family: arial,helvetica,sans-serif;\"><strong>G.711\/u<\/strong> is the North American standard and is the most widely used codec, default and standard in any IP device.<\/span><\/li>\n<li><span style=\"font-family: arial,helvetica,sans-serif;\"><strong>G.711\/a<\/strong> is the European equivalent of the G.711-u and is their standard codec. Also available in any IP device.<\/span><\/li>\n<li><span style=\"font-family: arial,helvetica,sans-serif;\"><strong>G.729<\/strong> 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.<\/span><\/li>\n<\/ul>\n<p><span style=\"font-family: arial,helvetica,sans-serif;\"><strong>Want to know more?<\/strong><\/span><\/p>\n<p><span style=\"font-family: arial,helvetica,sans-serif;\"><img decoding=\"async\" class=\"size-full wp-image-5525\" src=\"https:\/\/www.nurango.ca\/wp-content\/uploads\/VoIP-Codecs-Chart.jpg\" alt=\"VoIP Codecs Chart\" width=\"651\" height=\"465\" \/><\/span><\/p>\n<p><span style=\"font-family: arial,helvetica,sans-serif;\">For a detailed explanation of VoIP codecs, check out last week&#8217;s article <a href=\"https:\/\/www.nurango.ca\/blog\/voip-codecs-history\/\">What Are VoIP Codecs?<\/a><\/span><\/p>\n","protected":false},"excerpt":{"rendered":"<p>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&hellip;<\/p>\n","protected":false},"author":1,"featured_media":5529,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"content-type":"","footnotes":""},"categories":[4],"tags":[20,18,19],"class_list":["post-5528","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-guides","tag-audio-codecs","tag-codecs","tag-voip-codecs"],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/www.nurango.ca\/blog\/wp-json\/wp\/v2\/posts\/5528","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.nurango.ca\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.nurango.ca\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.nurango.ca\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.nurango.ca\/blog\/wp-json\/wp\/v2\/comments?post=5528"}],"version-history":[{"count":2,"href":"https:\/\/www.nurango.ca\/blog\/wp-json\/wp\/v2\/posts\/5528\/revisions"}],"predecessor-version":[{"id":10216,"href":"https:\/\/www.nurango.ca\/blog\/wp-json\/wp\/v2\/posts\/5528\/revisions\/10216"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.nurango.ca\/blog\/wp-json\/wp\/v2\/media\/5529"}],"wp:attachment":[{"href":"https:\/\/www.nurango.ca\/blog\/wp-json\/wp\/v2\/media?parent=5528"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.nurango.ca\/blog\/wp-json\/wp\/v2\/categories?post=5528"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.nurango.ca\/blog\/wp-json\/wp\/v2\/tags?post=5528"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}