A codec (coder-decoder) compresses and decompresses voice for VoIP calls. The codec you use affects call quality, bandwidth and CPU load, so it is worth knowing the common choices.
The most common VoIP codecs
| Codec | Audio bitrate | Quality | Notes |
|---|---|---|---|
| G.711 | 64 kbps | Toll quality (narrowband) | Universal support, no compression |
| G.722 | 64 kbps | HD voice (wideband) | Better clarity at the same bitrate as G.711 |
| G.729 | 8 kbps | Good for voice | Low bandwidth, licensing and quality trade-offs |
| Opus | Variable (about 6 to 510 kbps) | Excellent, adaptive | Flexible and common in modern apps |
What a call really uses
The audio bitrate is not the whole story. Each packet also carries IP, UDP and RTP headers (40 bytes), and Ethernet adds more. With 20 ms packets, a G.711 call is about 80 kbps at the IP layer (about 87 kbps with Ethernet headers), and a G.729 call is about 24 kbps (about 31 kbps with Ethernet). These figures apply to each direction.
| Codec at 20 ms | IP layer per call | With Ethernet headers |
|---|---|---|
| G.711 | 80 kbps | 87.2 kbps |
| G.729 | 24 kbps | 31.2 kbps |
G.711 vs G.729
G.711 uses more bandwidth but is simple, widely supported and gives the best quality for standard phone audio. G.729 saves bandwidth, which can matter on slow links, but the heavy compression can reduce quality and adds processing. On modern broadband, many businesses simply use G.711 or an HD codec such as G.722 or Opus.
How to choose
- Plenty of bandwidth: use G.711, G.722 or Opus for the best quality
- Limited upload speed: consider G.729 or a low-bitrate Opus setting
- Mixed devices: make sure both ends support the codec you select, or calls may be transcoded
Frequently asked questions
Which VoIP codec has the best quality?
Wideband codecs such as Opus and G.722 usually sound clearer than G.711 and G.729.
Does G.729 save a lot of bandwidth?
Yes. At 20 ms packets it uses roughly 24 kbps per call at the IP layer versus 80 kbps for G.711, before other overhead.
What is transcoding?
Converting audio from one codec to another when the two ends do not share one. It adds delay and can reduce quality.