RFC 3551 has defaults for common codecs in RTP. It is a good idea to stick to those defaults when you can for improved interoperability. It does however note:
4.3 Guidelines for Sample-Based Audio Encodings <snip> An RTP audio packet may contain any number of audio samples, subject to the constraint that the number of bits per sample times the number of samples per packet yields an integral octet count. Section 4.2 also has good advice: 4.2 Operating Recommendations The following recommendations are default operating parameters. Applications SHOULD be prepared to handle other values. The ranges given are meant to give guidance to application writers, allowing a set of applications conforming to these guidelines to interoperate without additional negotiation. These guidelines are not intended to restrict operating parameters for applications that can negotiate a set of interoperable parameters, e.g., through a conference control protocol. For packetized audio, the default packetization interval SHOULD have a duration of 20 ms or one frame, whichever is longer, unless otherwise noted in Table 1 (column "ms/packet"). The packetization interval determines the minimum end-to-end delay; longer packets introduce less header overhead but higher delay and make packet loss more noticeable. For non-interactive applications such as lectures or for links with severe bandwidth constraints, a higher packetization delay MAY be used. A receiver SHOULD accept packets representing between 0 and 200 ms of audio data. (For framed audio encodings, a receiver SHOULD accept packets with a number of frames equal to 200 ms divided by the frame duration, rounded up.) This restriction allows reasonable buffer sizing for the receiver. John -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Schwarz Albrecht Sent: Tuesday, September 23, 2008 12:38 AM To: Jagan Mohan Cc: sip-implementors@lists.cs.columbia.edu Subject: Re: [Sip-implementors] Should 'ptime' value be multiple of 5 or 10 The frame size is an inherent codec capability, independent of the application level framing protocol (like RTP, AAL2, FR, 3GPP FPs, etc). Right, the packetization time for G.711 is basically 5 ms for short packet technologies like AAL2, see ITU-T I.366.2. However, you may also find proposals for < 5 ms or like 5.5 ms (e.g. in ATM-F proposals). For RTP I would suspect 10 ms due to the packet overhead. ________________________________ From: Jagan Mohan [mailto:[EMAIL PROTECTED] Sent: Montag, 22. September 2008 20:32 To: Schwarz Albrecht Cc: Aneesh Naik; sip-implementors@lists.cs.columbia.edu Subject: Re: [Sip-implementors] Should 'ptime' value be multiple of 5 or 10 AFAIK, there is no standard which tells that the 5ms samples per frame, need to be used for G.711 codec. Since G.711 codec involves just sampling and quantization, its more implementation specific. Certain implementations of G.711 codec operate on sample intervals of 5ms. Hence, encoding of 5ms of G.711 samples in one frame. Here, ptime can be multiples of 5ms. Some implementations operate on sample intervals of 10ms. Hence, encoding of 10ms of G.711 samples in one frame. Here, ptime would be multiples of 10ms. Thanks, Jagan On Mon, Sep 22, 2008 at 9:18 PM, Schwarz Albrecht <[EMAIL PROTECTED]> wrote: I know that 125 µs relates to the sample period, which is however identical to the frame size in case of G.711 IMHO. Could you provide your reference concerning the 5 ms definition? Thanks, Albrecht ________________________________ From: Aneesh Naik [mailto:[EMAIL PROTECTED] Sent: Montag, 22. September 2008 14:45 To: Schwarz Albrecht Cc: Sachin Rastogi; sip-implementors@lists.cs.columbia.edu Subject: Re: [Sip-implementors] Should 'ptime' value be multiple of 5 or 10 125 µs is not the frame size of G.711. It is the time sampling rate. 8000 samples in 1 sec. 1 sample in 125 µs. Number of such samples are combined to form a frame of data. This frame size for G.711 is 5ms. Hope this clears your understanding. Thanks, Aneesh On Mon, Sep 22, 2008 at 5:43 PM, Schwarz Albrecht <[EMAIL PROTECTED]> wrote: > > The frame size for g.711 is 5ms G.711 has a frame size of 125 µs in my understanding. See ITU-T G.711. > -----Original Message----- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] On > Behalf Of Sachin Rastogi > Sent: Montag, 22. September 2008 13:45 > To: Aneesh Naik > Cc: sip-implementors@lists.cs.columbia.edu > Subject: Re: [Sip-implementors] Should 'ptime' value be > multiple of 5 or 10 > > Thanks Aneesh,Alex for quick reply. > > > Sachin > > On Mon, Sep 22, 2008 at 3:03 PM, Aneesh Naik > <[EMAIL PROTECTED]> wrote: > > > Yes, as explained by alex the ptime depend on the frame size... > > The frame size for g.711 is 5ms, for g.729 is 10ms and for > g.723 it is > > 30 ms. > > So the ptime for 711 and 729 can be 10, 20, 30... and for > 723 it can > > be 30,60.... > > > > -Aneesh > > > > On Mon, Sep 22, 2008 at 1:50 PM, Alex Balashov > > <[EMAIL PROTECTED] > > >wrote: > > > > > There are no drafts or recommendations mandating that ptime be a > > > particular value because the desired packetisation duration is > > > closely related to the frame size and other > characteristics of particular codecs. > > > > > > However, almost no media gateway equipment out there will support > > > anything other than the usual 10-30 ms for the usual suspects - > > > G.711u/A, G.729A, etc. > > > > > > There are certain recommendations or mandates for ptime > values based > > > on particular codecs. For instance, 20 ms is recommended > when using > > > Speex > > > (http://www.speex.org/docs/manual/speex-manual/node14.html): > > > > > > --- > > > > > > 4.1.1. <http://4.1.1./> Registration of media type audio/speex > > > > > > Media type name: audio > > > > > > Media subtype name: speex > > > > > > Required parameters: > > > > > > None > > > > > > Optional parameters: > > > > > > ptime: see RFC 4566. SHOULD be a multiple of 20 msec. > > > > > > maxptime: see RFC 4566. SHOULD be a multiple of 20 msec. > > > > > > > > > > > > Sachin Rastogi wrote: > > > > > > > Hi All, > > > > Is there any rfc/draft or recommendation which suggests > that 'ptime' > > > > value should multiple of 5 or 10? Can I use 'ptime' > value as 11 or > > > > 12 > > or > > > 18 > > > > or 19? > > > > > > > > > > > > > > > > Thanks > > > > Sachin Rastogi > > > > _______________________________________________ > > > > Sip-implementors mailing list > > > > Sip-implementors@lists.cs.columbia.edu > > > > > https://lists.cs.columbia.edu/cucslists/listinfo/sip-implementors > > > > > > > > > -- > > > Alex Balashov > > > Evariste Systems > > > Web : http://www.evaristesys.com/ > > > Tel : (+1) (678) 954-0670 > > > Direct : (+1) (678) 954-0671 > > > Mobile : (+1) (706) 338-8599 > > > _______________________________________________ > > > Sip-implementors mailing list > > > Sip-implementors@lists.cs.columbia.edu > > > https://lists.cs.columbia.edu/cucslists/listinfo/sip-implementors > > > > > > > > > > > -- > > Aneesh > > _______________________________________________ > > Sip-implementors mailing list > > Sip-implementors@lists.cs.columbia.edu > > https://lists.cs.columbia.edu/cucslists/listinfo/sip-implementors > > > _______________________________________________ > Sip-implementors mailing list > Sip-implementors@lists.cs.columbia.edu > https://lists.cs.columbia.edu/cucslists/listinfo/sip-implementors > -- Aneesh _______________________________________________ Sip-implementors mailing list Sip-implementors@lists.cs.columbia.edu https://lists.cs.columbia.edu/cucslists/listinfo/sip-implementors _______________________________________________ Sip-implementors mailing list Sip-implementors@lists.cs.columbia.edu https://lists.cs.columbia.edu/cucslists/listinfo/sip-implementors _______________________________________________ Sip-implementors mailing list Sip-implementors@lists.cs.columbia.edu https://lists.cs.columbia.edu/cucslists/listinfo/sip-implementors