Codecs are the lynchpin of digital media. A codec encodes sound or video into a digital stream that can be sent across the Net, and a compatible codec turns it back into sound or video at the recipient’s end. The name is derived simply from “coder-decoder”. Data streams often need to carry both audio and video along with metadata to keep them synchronised on playback, and different codecs sample, compress, encrypt and package those signals in different ways.
The choice of codec essentially comes down to choosing the most efficient way to deliver content at the quality required by the situation. When you’re watching Youtube on a small screen you don’t need so many pixels, and therefore bandwidth, as you do to enjoy a movie on a big one.
Most popular codecs are “lossy” – meaning that they sacrifice the quality of the original media in order to deliver it faster and leaner. With modern compression algorithms, that loss can be literally undetectable. When problems arise (freezing video, out-of-sync audio) it is often due to the wrong choice of codec, or to less than perfect compatibility between the codec used at the encoding and receiving ends of the stream.
Codecs for VoIP
When you’re watching recorded material, you don’t need the signal to arrive as promptly as you do when engaged in a 2-way telephone conversation. VoIP makes three demands; sound quality must be as good as a traditional telephone, the signal must arrive and be reassembled quickly without any discernible time lag, and the packets must make minimal demand on bandwidth
Bandwidth is an issue both for the business user and for the wholesale DID origination provider. Lean packets allow you to operate numerous telephone numbers through a single router, without fighting for access with your other internet-based applications. A lean codec also enables your wholesale DID origination provider, such as IDT, to keep down the cost of sending the call, minimising your bills.
Some popular VoIP codecs
Your fax, phone and conference calls will all use different codecs, but to illustrate their advantages and disadvantages we will describe just two that are often used in VoIP.
One called G.711 collects 80 bytes worth of the original sound signal at a time and does this every 10ms (the “sample rate”). It then wraps these into the packets that are used to send information on the Net and dispatches them at a rate of 50 per second. You can work out that each packet needs to carry approximately 20ms of audio for the codec at the other end to reconstruct “real-time” voice. The G.711 codec uses 87.2 Kbps of your broadband while it is doing this.
By way of contrast, the G.723.1 codec takes 20 byte samples every 30ms and sends them in packets at a rate of 33.3 per second. This time, each packet will need to contain roughly 30ms of voice to achieve quality real-time audio, but uses only 20.8 Kbps of your bandwidth.