NORTH SOUTH UNIVERSITY




                   Report
                    On
Compare Study of CODEC. Which is
suitable for ...
1.1       Introduction
With respect to voice over IP, a codec is an algorithm used to encode and decode the
voice conversa...
1.3    Why do we need codecs?
Because video and music files are large, they become difficult to transfer across the
Intern...
Sampling            Nominal Payload
                   Bandwidth
Codec       Rate             Bandwidth Size   License    ...
Excellent
                                                                       bandwidth
                               ...
Source                bit rate to
                                                                       minimise
        ...
Kbps)
G.726
         15                             60
(24               5 ms                          20 ms     50       ...
The voice payload size can also be represented in terms of the codec samples. For
  Voice Payload         example, a G.729...
2.6    Which Codec for which network?

A lot of work about the characterization of Codecs in terms of bandwidth utilisatio...
3.4       Internet Low Bitrate Codec (iLBC): 13.33 or 15.2 kbps

Uses an 8 kHz sampling frequency and employs Block-Indepe...
3.7       Services officially supporting low bandwidth VOIP

      •   NetzeroVoice — works over dialup and connects throu...
Reference:

http://netforbeginners.about.com/od/multimedia/f/codec.htm

http://www.ozvoip.com/voip-codecs/

http://www.voi...
Upcoming SlideShare
Loading in...5
×

Raisul Islam 063441556

1,046

Published on

Published in: Spiritual
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total Views
1,046
On Slideshare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
8
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Raisul Islam 063441556

  1. 1. NORTH SOUTH UNIVERSITY Report On Compare Study of CODEC. Which is suitable for Bangladesh (Low bandwidth)? Submitted to Dr. Mashiur Rahman Date of Submission: 16.04.08 Submitted By M. Raisul Islam # 063441556
  2. 2. 1.1 Introduction With respect to voice over IP, a codec is an algorithm used to encode and decode the voice conversation. Since voice and sound as we hear it is analogue, it needs to be converted (or encoded) to a digital format suitable for transmission over the Internet. Once at the other end, it needs to be decoded again so the other person can hear what you are saying. There are a variety of different ways this encoding and decoding can be done - many of which utilise compression in order to reduce the required bandwidth of the conversation. A key thing to remember with VoIP, is that encoding, particularly when heavy compression is used, takes time, which adds a delay to the conversation. Thus, the holy grail is a codec which not only maintains good quality with compression, but is able to do the encoding and decoding in a minimal amount of time. It is important to keep in mind that different VoIP clients support different codecs, and each VoIP provider will only support a subset of the codecs too. Generally, when a VoIP call is established, you will need to use a codec that both parties and the provider support. No need to worry though, this sort of negotiation is handled automatically, but knowing the details will enable you to force or encourage certain codecs to be used. Understanding codecs will also help you understand why some VoIP clients sound better than others, and why voice quality with some providers, or through certain ISPs, are better than others. 1.2 What is CODEC? "Codec" is a technical name for "compression/decompression". It also stands for "compressor/decompressor" and "code/decode". Codecs are standard methods of Compressing and decompressing data. All of these variations mean the same thing: a codec is a computer program that both shrinks large movie files,data and makes them playable on your computer. Codec programs are required for your media player to play your downloaded music and movies.
  3. 3. 1.3 Why do we need codecs? Because video and music files are large, they become difficult to transfer across the Internet quickly. To help speed up downloads, mathematical "codecs" were built to encode ("shrink") a signal for transmission and then decode it for viewing or editing. Without codecs, downloads would take three to five times longer than they do now. 1.4 Is there only One CODEC Need? Sadly, there are hundreds of codecs being used on the Internet, and will need combinations that specifically play files. There are codecs for audio and video compression, for streaming media over the Internet, videoconferencing, playing mp3's, speech, or screen capture. To make matters more confusing, some people who share their files on the Net choose to use very obscure codecs to shrink their files. This makes it very frustrating for users who download these files, but do not know which codecs to get to play these files. If you are a regular downloader, you will probably need ten to twelve codecs to play your music and movies. Some common codec examples are MP3, WMA, RealVideo, RealAudio, DivX and XviD. There are many other more obscure codecs. There is no single best answer to this question. There are so many codec choices. The easiest option is to download "codec packs". Codec packs are collections of codecs gathered in single large files. There is much debate over whether it is necessary to get a large group of codec files, but it certainly is the easiest and least-frustrating option for new downloaders. Here are the codec packs we recommend at About.com: 2.1 Codec Comparison The following table lists the various codecs used in voice over IP, and in particular SIP. Many codecs come in a few varieties, and we have attempted to list all such version of each codec.
  4. 4. Sampling Nominal Payload Bandwidth Codec Rate Bandwidth Size License Comments Pros Cons ? (kbps) (kHz) (kbps) (ms) Not a very DVI4 unknown unknown unknown common codec. G.711u/a Designed to often refered deliver to as u-law/a- Including precise overheads, law: where a- transmission uses Open law is the >64kbps, thus G.711 8 64 87.2 20 of speech at least Source European 128kbps version and u- bandwidth in Very low each direction law the processing is required US/Japanese overheads version 16 48 unknown An ITU Open G.722 16 56 unknown 30 standard Source codec. 16 64 unknown 8 5.3 20.8 30 Very high Often used by compression dialup VoIP whilst Requires a lot G.723.1 Proprietry users for of processor 8 6.3 21.9 30 maintaining power. optimal high quality quality. audio. 8 16 unknown An improved version of CPU 8 24 47.2 20 overhead is Open G.721 and G.726 8 32 55.2 20 relatively low Source G.723 (totally for level of compression different from obtained. 8 40 unknown G.723.1) An ITU Open G.728 unknown 16 31.5 standard Source codec.
  5. 5. Excellent bandwidth utilisation for toll quality An ITU speech License G.729 8 8 31.2 20 Patented standard required for codec. use Performs well under random bit errors Relatively Same high encoding as compression used in GSM ratio. mobile phones Royalty free GSM 8 13 unknown Proprietry (though means it is improved available in version are many often used hardware and nowadays). software platforms. unknown 13.33 unknown 30 High Free to iLBC robustness to unknown 15 unknown 20 use packet loss Not much known about this codec, Siren unknown unknown unknown and does not appear to be commonly supported. Speex 8 unknown unknown Open Uses variable 16 unknown unknown
  6. 6. Source bit rate to minimise bandwidth 32 unknown unknown usage 2.2 Bandwidth • Bandwidth values represent the amount of data in the payload of the IP packets. • Bandwidth values indicate the bandwidth in each direction - not the sum of upstream and downstream bandwidths. • Bandwidth values assume continuous transmission of voice in both direction with no silence suppression. • The 'nominal bandwidth' column indicates the typical Ethernet bandwidth one can expect the codec to use. Codec Information Bandwidth Calculations Bandwidth Codec Codec Codec Mean Voice Voice Packets Bandwidth w/cRTP Bandwidth & Bit Sample Sample Opinion Payload Payload Per MP or MP or Ethernet Rate Size Interval Score Size Size Second FRF.12 FRF.12 (Kbps) (Kbps) (Bytes) (ms) (MOS) (Bytes) (ms) (PPS) (Kbps) (Kbps) G.711 80 160 (64 10 ms 4.1 20 ms 50 82.8 Kbps 67.6 Kbps 87.2 Kbps Bytes Bytes Kbps) G.729 10 20 (8 10 ms 3.92 20 ms 50 26.8 Kbps 11.6 Kbps 31.2 Kbps Bytes Bytes Kbps) G.723.1 24 24 (6.3 30 ms 3.9 30 ms 34 18.9 Kbps 8.8 Kbps 21.9 Kbps Bytes Bytes Kbps) G.723.1 20 20 (5.3 30 ms 3.8 30 ms 34 17.9 Kbps 7.7 Kbps 20.8 Kbps Bytes Bytes Kbps) G.726 20 80 5 ms 3.85 20 ms 50 50.8 Kbps 35.6 Kbps 55.2 Kbps (32 Bytes Bytes
  7. 7. Kbps) G.726 15 60 (24 5 ms 20 ms 50 42.8 Kbps 27.6 Kbps 47.2 Kbps Bytes Bytes Kbps) G.728 10 60 (16 5 ms 3.61 30 ms 34 28.5 Kbps 18.4 Kbps 3 Bytes Bytes Kbps) 2.3 Explanation of Terms Based on the codec, this is the number of bits per second that need to be Codec Bit Rate transmitted to deliver a voice call. (codec bit rate = codec sample size / codec (Kbps) sample interval). Based on the codec, this is the number of bytes captured by the Digital Signal Processor (DSP) at each codec sample interval. For example, the G.729 coder Codec Sample operates on sample intervals of 10 ms, corresponding to 10 bytes (80 bits) per Size (Bytes) sample at a bit rate of 8 Kbps. (codec bit rate = codec sample size / codec sample interval). This is the sample interval at which the codec operates. For example, the G.729 coder operates on sample intervals of 10 ms, corresponding to 10 bytes (80 bits) Codec Sample Interval (ms) per sample at a bit rate of 8 Kbps. (codec bit rate = codec sample size / codec sample interval). MOS is a system of grading the voice quality of telephone connections. With MOS, a wide range of listeners judge the quality of a voice sample on a scale of MOS one (bad) to five (excellent). The scores are averaged to provide the MOS for the codec. 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 Voice Payload Size (Bytes) example, G.729 packets can use 10, 20, 30, 40, 50, or 60 bytes of voice payload size.
  8. 8. The voice payload size can also be represented in terms of the codec samples. For Voice Payload example, a G.729 voice payload size of 20 ms (two 10 ms codec samples) Size (ms) represents a voice payload of 20 bytes [ (20 bytes * 8) / (20 ms) = 8 Kbps ] 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 PPS 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) ] 2.4 Bandwidth Calculation Formulas The following calculations are used: • Total packet size = (L2 header: MP or FRF.12 or Ethernet) + (IP/UDP/RTP header) + (voice payload size) • PPS = (codec bit rate) / (voice payload size) • Bandwidth = total packet size * PPS 2.5 Sample Calculation For example, the required bandwidth for a G.729 call (8 Kbps codec bit rate) with cRTP, MP and the default 20 bytes of voice payload is: • Total packet size (bytes) = (MP header of 6 bytes) + ( compressed IP/UDP/RTP header of 2 bytes) + (voice payload of 20 bytes) = 28 bytes • Total packet size (bits) = (28 bytes) * 8 bits per byte = 224 bits • PPS = (8 Kbps codec bit rate) / (160 bits) = 50 pps Note: 160 bits = 20 bytes (default voice payload) * 8 bits per byte • Bandwidth per call = voice packet size (224 bits) * 50 pps = 11.2 Kbps
  9. 9. 2.6 Which Codec for which network? A lot of work about the characterization of Codecs in terms of bandwidth utilisation, but has there any work been done on the suitability of different codecs based on network SLA parameters. For example, bandwidth on a broadband Internet connection is essentially free up to ~512K per second, so bandwidth efficiency of one call in a truly distributed switched environment is probably not at all interesting for an end user. 3.1 Which CODEC is suitable in BD (Low Bandwidth)? At first there are some example are given below for low BW network then we will get a clear idea of codecs in BD. Although voice quality may suffer, VOIP can be used over a dial-up Internet or other low bandwidth connection. Some fancy mathematics comes into play as VoIP streams are compressed below 16 kbps, but they come at the expense of call quality, with the following codecs offering some insight into the tricks needed to deliver voice in low-bandwidth environments. 3.2 ITU G.726 & ITU G.727: 16, 24, 32 or 40 kbps Uses an 8 kHz sampling frequency and employs Adaptive Differential Pulse Code Modulation to encode PCM values as differences between the current and the previous value. While the more bandwidth intensive codecs use 8-bit PCM sampling, G.726 reduces this to 2, 3, 4 or 5-bit. It is the standard codec used in DECT wireless phone systems. G.726 replaced G.721 (32 kbps) and G.723 (24 and 40 kbps). G.727 offers the same bit rates as G.726 but is optimised for Packet Circuit Multiplex Equipment. 3.3 ITU G.728: 16 kbps Uses an 8 kHz sampling frequency and employs a Low-Delay version of Code Excited Linear Prediction - an algorithm designed specifically for low bit rate speech compression. It is favoured for some video, cellular and satellite applications.
  10. 10. 3.4 Internet Low Bitrate Codec (iLBC): 13.33 or 15.2 kbps Uses an 8 kHz sampling frequency and employs Block-Independent Linear-Predictive Coding. iLBC is free to use but not open source Some users have reported being able to use the Vonage service over dial-up, although Vonage doesn't offically support this. 3.5 ITU G.729: 8 kbps Uses an 8 kHz sampling frequency and employs Conjugate Structure Algebraic-Code Excited Linear Prediction to squeeze a VoIP call into 8 kbps. G.729 is the codec of choice for consumer VoIP providers running over the open internet, as Australia's engin and MyNetFone. G.729A is compatible with G.729 but requires less computation, while G.729B uses Discontinuous Transmission (DTX), Voice Activity Detection (VAD) and Comfort Noise Generation (CNG) to reduce bandwidth usage during silence in a call. 3.6 ITU G.723.1: 5.3/6.3 kbps Uses an 8 kHz sampling frequency and employs Algebraic Code Excited Linear Prediction to achieve 5.3 kbps or Multipulse LPC with Maximum Likelihood Quantization to achieve 6.3 kbps. Hints for Low Bandwith VOIP • OrbisTelecom offer G.711 and other low codecs with thier software. • Choose your codec to minimize bandwidth — experiment those available in your system Some companies seem cater to the low bandwidth market - for example: • PCPhoneline.com — H.323 and SIP products support G.723.1/G.711 codecs and work with dialup connections as low as 19.2 kbps. Prices under $50 • IPmental — says requires minimum 10Kbps • CuPhone — says requires minimum dialup • Azatel — SIP ATA for dial-up Internet connections
  11. 11. 3.7 Services officially supporting low bandwidth VOIP • NetzeroVoice — works over dialup and connects through most firewalls • VoicePulse 3.8 Features of Voice Pulse Supported Protocols * Inter-Asterisk Exchange 2 (IAX2) * Session Initiation Protocol (SIP) Supported Codecs * G.711ulaw * G.711alaw * GSM * ADPCM * ILBC Supported User Agents • Asterisk The Open Source PBX, AsteriskNOW, AA50, Swith Vox * Fonality PBX * trixbox CE, SE, EE, CCE * Cisco/Linksys SIP devices * Aastra, Grandstream, Snom SIP devices * Softphones So we can say on depending above discussion that G.711ulaw, G.711alaw, GSM ADPCM, ILBC codec are suitable for Bangladesh
  12. 12. Reference: http://netforbeginners.about.com/od/multimedia/f/codec.htm http://www.ozvoip.com/voip-codecs/ http://www.voip-info.org/wiki-Codecs http://www.cisco.com/en/US/tech/tk652/tk698/technologies_tech_note09186a0080094ae 2.shtml http://searchvoip.techtarget.com.au/articles/23239-VoIP-codecs-Day-Three-Low- bandwidth-codecs http://www.voipfoneuserforum.com/about884.html http://www.inphonex.com/support/voip-codecs.php

×