Code And Bandwidth

VOIP bandwidth caculator

1) codec bit rate = codec sample size / codec sample interval.

this is the number of bits(bytes)captured by the Digital Signal Processor (DSP) at each codec sample interval.

for instance, G.729. codec bit rate = 8kbps , because codec sample size = 10 bytes(80 bits) per sample and sample interval is 10ms.
80bits/0.01s = 8000 bits/s = 8kbps.

2) voice payload size

The voice payload size represents the number of bytes (or bits) that are filled into a packet. The voice payload size must be a

multiple of the codec sample size. For example, G.729 packets can use 10, 20, 30, 40, 50, or 60 bytes of voice payload size.

or The voice payload size can also be represented in terms of the codec samples. For example, a G.729 voice payload size of 20 ms
(two 10 ms codec samples) represents a voice payload of 20 bytes. Notice that the codec bit rate is always maintained: (20 bytes * 8)

/ (20 ms) = 8 Kbps

3) PPS = (codec bit rate) / (voice payload size)

PPS represents the number of packets that need to be transmitted every second in order to deliver the codec bit rate.

For example, for a G.729 call with voice payload size per packet of 20 bytes (160 bits), 50 packets need to be transmitted every

second [50 pps = (8 Kbps) / (160 bits per packet) ]

for G.711, default voice payload size = 20ms = 64kbps* 20ms = 160 bytes. thus PPS = 64kbps/160 = 50 pps

4) Bandwdith requirement
Total packet size = (L2 header: MP or FRF.12 or Ethernet) + (IP/UDP/RTP header) + (voice payload size)
Bandwidth = total packet size * PPS

Multilink Point-to-Point Protocol (MP) : 6 bytes header
Frame Relay: 12 bytes header
Ethernet: 18 Bytes

IP head: 20 bytes header
UDP: 8 bytes header
RTP: 12 bytes header
L3 total is 40 bytes

Compressed Real-Time Protocol (cRTP) reduces the IP/UDP/RTP headers to 2 or 4bytes

thus for G.729 with cRTP, Total packet size (bytes) = (MP header of 6 bytes) + ( compressed IP/UDP/RTP header of 2 bytes) + (voice

payload of 20 bytes) = 28 bytes , PPS = 50 pps , Bandwidth per call = voice packet size (224 bits) * 50 pps = 11.2 Kbps

5) When you increase the voice payload size the VoIP bandwidth reduces and the overall delay increases. , the recommended one-way

overall delay for voice is 150 ms. For a private network, 200 ms is a reasonable goal, and 250 ms must be the maximum.

understand codec

http://www.cisco.com/en/US/tech/tk1077/technologies_tech_note09186a00800b6710.shtml

High Complexity: G.729, G729 Annex-B & Medium Complexity: G.729A, G.729A Annex-B

G.729 is a high complexity algorithm, and G.729A (also known as G.729 Annex-A) is a medium complexity variant of G.729 with slightly lower voice quality. All platforms that support G.729 also support G.729A.

G.729 Annex-B is a high complexity algorithm, and G.729A Annex-B is a medium complexity variant of G.729 Annex-B with slightly lower voice quality.

The difference between the G.729 and G.729 Annex-B codec is that the G.729 Annex-B codec provides built-in IETF voice activity detection (VAD) and Comfort Noise Generation (CNG).

These G.729 codec combinations interoperate:
- G.729 and G.729A
- G.729 and G.729
- G.729A and G.729A
- G.729 Annex-B and G.729A Annex-B
- G.729 Annex-B and G.729 Annex-B
- G.729A Annex-B and G.729A Annex-B

There are two versions of G.723.1 called Annex-A and non Annex-A. These versions do not interoperate. G.723.1 Annex-A includes a built-in IETF VAD algorithm and CNG.

Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License