Network Working Group                                           P. Luthi
Request for Comments: 3047                                    PictureTel
Category: Standards Track                                   January 2001
        
Network Working Group                                           P. Luthi
Request for Comments: 3047                                    PictureTel
Category: Standards Track                                   January 2001
        

RTP Payload Format for ITU-T Recommendation G.722.1

ITU-T建议G.722.1的RTP有效载荷格式

Status of this Memo

本备忘录的状况

This document specifies an Internet standards track protocol for the Internet community, and requests discussion and suggestions for improvements. Please refer to the current edition of the "Internet Official Protocol Standards" (STD 1) for the standardization state and status of this protocol. Distribution of this memo is unlimited.

本文件规定了互联网社区的互联网标准跟踪协议,并要求进行讨论和提出改进建议。有关本协议的标准化状态和状态,请参考当前版本的“互联网官方协议标准”(STD 1)。本备忘录的分发不受限制。

Copyright Notice

版权公告

Copyright (C) The Internet Society (2001). All Rights Reserved.

版权所有(C)互联网协会(2001年)。版权所有。

Abstract

摘要

International Telecommunication Union (ITU-T) Recommendation G.722.1 is a wide-band audio codec, which operates at one of two selectable bit rates, 24kbit/s or 32kbit/s. This document describes the payload format for including G.722.1 generated bit streams within an RTP packet. Also included here are the necessary details for the use of G.722.1 with MIME and SDP.

国际电信联盟(ITU-T)建议G.722.1是一种宽带音频编解码器,以24kbit/s或32kbit/s两种可选比特率之一运行。本文档描述了在RTP数据包中包含G.722.1生成的比特流的有效负载格式。这里还包括将G.722.1与MIME和SDP一起使用的必要细节。

1. Conventions used in this document
1. 本文件中使用的公约

The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in RFC-2119 [6].

本文件中的关键词“必须”、“不得”、“要求”、“应”、“不应”、“应”、“不应”、“建议”、“可”和“可选”应按照RFC-2119[6]中所述进行解释。

2. Overview of ITU-T Recommendation G.722.1
2. ITU-T建议G.722.1概述

G.722.1 is a low complexity coder, it compresses 50Hz - 7kHz audio signals into one of two bit rates, 24 kbit/s or 32 kbit/s.

G.722.1是一种低复杂度编码器,它将50Hz-7kHz音频信号压缩为两种比特率之一,即24kbit/s或32kbit/s。

The coder may be used for speech, music and other types of audio.

编码器可用于语音、音乐和其他类型的音频。

Some of the applications for which this coder is suitable are:

本编码器适用的一些应用包括:

o Real-time communications such as videoconferencing and telephony. o Streaming audio o Archival and messaging

o 实时通信,如视频会议和电话。o流媒体音频o存档和消息传递

A fixed frame size of 20 ms is used, and for any given bit rate the number of bits in a frame is a constant.

使用20 ms的固定帧大小,并且对于任何给定的比特率,帧中的比特数是恒定的。

3. RTP payload format for G.722.1
3. G.722.1的RTP有效负载格式

G.722.1 uses 20 ms frames and a sampling rate clock of 16 kHz, so the RTP timestamp MUST be in units of 1/16000 of a second. The RTP payload for G.722.1 has the format shown in Figure 1. No additional header specific to this payload format is required.

G.722.1使用20毫秒帧和16 kHz的采样率时钟,因此RTP时间戳必须以1/16000秒为单位。G.722.1的RTP有效负载的格式如图1所示。不需要特定于此有效负载格式的附加标头。

       0                   1                   2                   3
       0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |                      RTP Header [3]                           |
      +=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+
      |                                                               |
      +                 one or more frames of G.722.1                 |
      |                             ....                              |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
        
       0                   1                   2                   3
       0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |                      RTP Header [3]                           |
      +=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+
      |                                                               |
      +                 one or more frames of G.722.1                 |
      |                             ....                              |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
        

Figure 1: RTP payload for G.722.1

图1:G.722.1的RTP有效载荷

The encoding and decoding algorithm can change the bit rate at any 20ms frame boundary, but no bit rate change notification is provided in-band with the bit stream. Therefore, a separate out-of-band method is REQUIRED to indicate the bit rate (see section 6 for an example of signaling bit rate information using SDP). For the payload format specified here, the bit rate MUST remain constant for a particular payload type value. An application MAY switch bit rates from packet to packet by defining two payload type values and switching between them.

编码和解码算法可以在任何20ms帧边界处更改比特率,但在比特流所在的频带内不提供比特率更改通知。因此,需要单独的带外方法来指示比特率(关于使用SDP发送比特率信息的示例,参见第6节)。对于此处指定的有效负载格式,特定有效负载类型值的比特率必须保持恒定。应用程序可以通过定义两个有效负载类型值并在它们之间切换来在分组之间切换比特率。

The assignment of an RTP payload type for this new packet format is outside the scope of this document, and will not be specified here. It is expected that the RTP profile for a particular class of applications will assign a payload type for this encoding, or if that is not done then a payload type in the dynamic range shall be chosen.

此新数据包格式的RTP有效负载类型的分配超出了本文档的范围,此处将不进行指定。预计特定类别应用的RTP配置文件将为此编码分配有效负载类型,或者如果未分配有效负载类型,则应选择动态范围内的有效负载类型。

The number of bits within a frame is fixed, and within this fixed frame G.722.1 uses variable length coding (e.g., Huffman coding) to represent most of the encoded parameters [2]. All variable length codes are transmitted in order from the left most (most significant - MSB) bit to the right most (least significant - LSB) bit, see [2] for more details.

一个帧内的位数是固定的,在这个固定的帧内,G.722.1使用可变长度编码(例如,哈夫曼编码)来表示大多数编码参数[2]。所有可变长度代码都是按从最左边(最高有效位-MSB)位到最右边(最低有效位-LSB)位的顺序传输的,有关详细信息,请参见[2]。

The use of Huffman coding means that it is not possible to identify the various encoded parameters/fields contained within the bit stream without first completely decoding the entire frame.

哈夫曼编码的使用意味着在没有首先对整个帧进行完全解码的情况下,不可能识别包含在比特流中的各种编码参数/字段。

For the purposes of packetizing the bit stream in RTP, it is only necessary to consider the sequence of bits as output by the G.722.1 encoder, and present the same sequence to the decoder. The payload format described here maintains this sequence.

为了将RTP中的比特流打包,仅需要考虑由G.722.1编码器输出的比特序列,并将相同的序列呈现给解码器。此处描述的有效负载格式维护此序列。

When operating at 24 kbit/s, 480 bits (60 octets) are produced per frame, and when operating at 32 kbit/s, 640 bits (80 octets) are produced per frame. Thus, both bit rates allow for octet alignment without the need for padding bits.

当以24 kbit/s运行时,每帧产生480位(60个八位字节),当以32 kbit/s运行时,每帧产生640位(80个八位字节)。因此,两种比特率都允许八位组对齐,而不需要填充比特。

Figure 2 illustrates how the G.722.1 bit stream MUST be mapped into an octet aligned RTP payload.

图2说明了G.722.1比特流必须如何映射到八位组对齐的RTP有效负载。

An RTP packet SHALL only contain G.722.1 frames of the same bit rate.

RTP数据包应仅包含相同比特率的G.722.1帧。

      first bit                                          last bit
      transmitted                                     transmitted
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |                                                         |
      + sequence of bits (480 or 640) generated by the          |
      |            G.722.1 encoder for transmission             |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
        
      first bit                                          last bit
      transmitted                                     transmitted
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |                                                         |
      + sequence of bits (480 or 640) generated by the          |
      |            G.722.1 encoder for transmission             |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
        
      |           |           |                     |           |
      |           |           |     ...             |           |
      |           |           |                     |           |
        
      |           |           |                     |           |
      |           |           |     ...             |           |
      |           |           |                     |           |
        
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+ ... +-+-+-+-+-+-+-+-+-+-+-+-+
      |MSB...  LSB|MSB...  LSB|                     |MSB...  LSB|
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+ ... +-+-+-+-+-+-+-+-+-+-+-+-+
        RTP         RTP                               RTP
        octet 1     octet 2                           octet
                                                      60 or 80
        
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+ ... +-+-+-+-+-+-+-+-+-+-+-+-+
      |MSB...  LSB|MSB...  LSB|                     |MSB...  LSB|
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+ ... +-+-+-+-+-+-+-+-+-+-+-+-+
        RTP         RTP                               RTP
        octet 1     octet 2                           octet
                                                      60 or 80
        

Figure 2: The G.722.1 encoder bit stream is split into a sequence of octets (60 or 80 depending on the bit rate), and each octet is in turn mapped into an RTP octet.

图2:G.722.1编码器比特流被分成一系列八位字节(60或80,取决于比特率),每个八位字节依次映射成一个RTP八位字节。

The ITU-T standardized bit rates for G.722.1 are 24 kbit/s and 32kbit/s. However, the coding algorithm itself has the capability to run at any user specified bit rate (not just 24 and 32kbit/s) while maintaining an audio bandwidth of 50 Hz to 7 kHz. This rate change is accomplished by a linear scaling of the codec operation, resulting in frames with size in bits equal to 1/50 of the corresponding bit rate.

G.722.1的ITU-T标准化比特率为24kbit/s和32kbit/s。然而,编码算法本身能够以任何用户指定的比特率(不仅仅是24和32kbit/s)运行,同时保持50 Hz到7 kHz的音频带宽。这种速率变化是通过编解码器操作的线性缩放来实现的,从而产生以比特为单位的帧大小等于相应比特率的1/50。

When operating at non-standard rates the payload format MUST follow the guidelines illustrated in Figure 2. It is RECOMMENDED that values in the range 16000 to 32000 be used, and that any value MUST be a multiple of 400 (this maintains octet alignment and does not then require (undefined) padding bits for each frame if not octet aligned). For example, a bit rate of 16.4 kbit/s will result in a frame of size 328 bits or 41 octets which are mapped into RTP per Figure 2.

当以非标准速率运行时,有效载荷格式必须遵循图2所示的指南。建议使用16000到32000范围内的值,并且任何值都必须是400的倍数(这将保持八位字节对齐,如果没有八位字节对齐,则不需要为每个帧使用(未定义的)填充位)。例如,16.4 kbit/s的比特率将产生328位或41个八位字节的帧,这些帧按照图2映射到RTP中。

3.1 Multiple G.722.1 frames in a RTP packet
3.1 RTP数据包中的多个G.722.1帧

More than one G.722.1 frame may be included in a single RTP packet by a sender.

发送方可以在单个RTP分组中包括多个G.722.1帧。

Senders have the following additional restrictions:

发件人具有以下附加限制:

o SHOULD NOT include more G.722.1 frames in a single RTP packet than will fit in the MTU of the RTP transport protocol.

o 单个RTP数据包中包含的G.722.1帧不应超过RTP传输协议的MTU中的G.722.1帧。

o All frames contained in a single RTP packet MUST be of the same length, that is they MUST have the same bit rate (octets per frame).

o 单个RTP数据包中包含的所有帧必须具有相同的长度,即它们必须具有相同的比特率(每帧八位字节)。

o Frames MUST NOT be split between RTP packets.

o 帧不能在RTP数据包之间分割。

It is RECOMMENDED that the number of frames contained within an RTP packet be consistent with the application. For example, in a telephony application where delay is important, then the fewer frames per packet the lower the delay, whereas for a delay insensitive streaming or messaging application, many frames per packet would be acceptable.

建议RTP数据包中包含的帧数与应用程序一致。例如,在延迟非常重要的电话应用程序中,每个数据包的帧数越少,延迟就越低,而对于延迟不敏感的流式传输或消息传递应用程序,每个数据包的帧数就可以接受。

3.2 Computing the number of G.722.1 frames
3.2 计算G.722.1帧的数量

Information describing the number of frames contained in an RTP packet is not transmitted as part of the RTP payload. The only way to determine the number of G.722.1 frames is to count the total number of octets within the RTP packet, and divide the octet count by the number of expected octets per frame (either 60 or 80 per frame, for 24 kbit/s and 32 kbit/s respectively).

描述RTP分组中包含的帧数的信息不作为RTP有效载荷的一部分传输。确定G.722.1帧数的唯一方法是计算RTP数据包内的八位字节总数,并将八位字节数除以每帧的预期八位字节数(每帧60或80,分别为24 kbit/s和32 kbit/s)。

4. MIME registration of G.722.1
4. G.722.1的MIME注册

MIME media type name: audio

MIME媒体类型名称:音频

MIME subtype: G7221

MIME子类型:G7221

Required parameters:

所需参数:

bitrate: the data rate for the audio bit stream. This parameter is necessary because the bit rate is not signaled within the G.722.1 bit stream. At the standard G.722.1 bit rates, the value MUST be either 24000 or 32000. If using the non-standard bit rates, then it is RECOMMENDED that values in the range 16000 to 32000 be used, and that any value MUST be a multiple of 400 (this maintains octet alignment and does not then require (undefined) padding bits for each frame if not octet aligned).

比特率:音频比特流的数据速率。该参数是必需的,因为G.722.1比特流中没有发送比特率信号。在标准G.722.1比特率下,该值必须为24000或32000。如果使用非标准比特率,则建议使用16000到32000范围内的值,并且任何值必须是400的倍数(这将保持八位字节对齐,如果没有八位字节对齐,则不需要为每个帧使用(未定义的)填充位)。

Optional parameters:

可选参数:

ptime: RECOMMENDED duration of each packet in milliseconds.

ptime:每个数据包的建议持续时间(毫秒)。

Encoding considerations: This type is only defined for transfer via RTP as specified in a Work in Progress.

编码注意事项:此类型仅为通过RTP传输而定义,如正在进行的工作中所指定。

Security Considerations: See Section 6 of RFC 3047.

安全注意事项:见RFC 3047第6节。

Interoperability considerations: none

互操作性注意事项:无

Published specification: See ITU-T Recommendation G.722.1 [2] for encoding algorithm details.

已发布的规范:有关编码算法的详细信息,请参见ITU-T建议G.722.1[2]。

Applications which use this media type: Audio and video streaming and conferencing tools

使用此媒体类型的应用程序:音频和视频流以及会议工具

Additional information: none

其他信息:无

Person & email address to contact for further information: Patrick Luthi Luthip@pictel.com

联系人和电子邮件地址,以获取更多信息:Patrick LuthiLuthip@pictel.com

Intended usage: COMMON

预期用途:普通

Author/Change controller: Author: Patrick Luthi Change controller: IETF AVT Working Group

作者/变更负责人:作者:Patrick Luthi变更负责人:IETF AVT工作组

5. SDP usage of G.722.1
5. G.722.1的SDP使用

When conveying information by SDP [5], the encoding name SHALL be "G7221" (the same as the MIME subtype). An example of the media representation in SDP for describing G.722.1 at 24000 bits/sec might be:

当通过SDP[5]传输信息时,编码名称应为“G7221”(与MIME子类型相同)。SDP中用于以24000位/秒的速度描述G.722.1的媒体表示示例可能是:

         m=audio 49000 RTP/AVP 121
         a=rtpmap:121 G7221/16000
         a=fmtp:121 bitrate=24000
        
         m=audio 49000 RTP/AVP 121
         a=rtpmap:121 G7221/16000
         a=fmtp:121 bitrate=24000
        

where "bitrate" is a variable that may take on values of 24000 or 32000 at the standard rates, or values from 16000 to 32000 (and MUST be an integer multiple of 400) at the non-standard rates.

其中,“比特率”是一个变量,在标准速率下可取值为24000或32000,或在非标准速率下取值为16000到32000(且必须是400的整数倍)。

6. Security Considerations
6. 安全考虑

RTP packets using the payload format defined in this specification are subject to the security considerations discussed in the RTP specification [3], and any appropriate RTP profile. This implies that confidentiality of the media streams is achieved by encryption. Because the data compression used with this payload format is applied end-to-end, encryption may be performed after compression so there is no conflict between the two operations.

使用本规范中定义的有效负载格式的RTP数据包受RTP规范[3]和任何适当RTP配置文件中讨论的安全注意事项的约束。这意味着媒体流的机密性是通过加密实现的。由于与此有效负载格式一起使用的数据压缩是端到端应用的,因此可以在压缩之后执行加密,因此两个操作之间没有冲突。

A potential denial-of-service threat exists for data encodings using compression techniques that have non-uniform receiver-end computational load. The attacker can inject pathological datagrams into the stream which are complex to decode and cause the receiver to be overloaded. However, this encoding does not exhibit any significant non-uniformity.

使用压缩技术的数据编码存在潜在的拒绝服务威胁,这种压缩技术具有非均匀的接收端计算负载。攻击者可以向流中注入病理数据报,这些数据报解码复杂,并导致接收器过载。然而,这种编码并没有表现出任何显著的非均匀性。

As with any IP-based protocol, in some circumstances a receiver may be overloaded simply by the receipt of too many packets, either desired or undesired. Network-layer authentication may be used to discard packets from undesired sources, but the processing cost of the authentication itself may be too high. In a multicast environment, pruning of specific sources may be implemented in future versions of IGMP [7] and in multicast routing protocols to allow a receiver to select which sources are allowed to reach it.

与任何基于IP的协议一样,在某些情况下,接收机可能仅仅因为接收了太多的数据包而过载,不管是想要的还是不想要的。网络层认证可用于丢弃来自不希望的源的数据包,但认证本身的处理成本可能过高。在多播环境中,可以在IGMP[7]的未来版本和多播路由协议中实现特定源的修剪,以允许接收机选择允许哪些源到达它。

7. References
7. 工具书类

1. Bradner, S., "The Internet Standards Process -- Revision 3", BCP 9, RFC 2026, October 1996.

1. Bradner,S.,“互联网标准过程——第3版”,BCP 9,RFC 2026,1996年10月。

2. ITU-T Recommendation G.722.1, available online from the ITU bookstore at http://www.itu.int.

2. ITU-T建议G.722.1,可从ITU书店在线获取,网址为http://www.itu.int.

3. Schulzrinne, H., Casner, S., Frederick, R. and V. Jacobson, "RTP: A Transport Protocol for real-time applications", RFC 1889, January 1996. (Updated by a Work in Progress.)

3. Schulzrinne,H.,Casner,S.,Frederick,R.和V.Jacobson,“RTP:实时应用的传输协议”,RFC 1889,1996年1月。(由正在进行的工作更新。)

4. Freed, N. and N. Borenstein, "Multipurpose Internet Mail Extensions (MIME) Part One: Format of Internet Message Bodies", RFC 2045, November 1996.

4. Freed,N.和N.Borenstein,“多用途互联网邮件扩展(MIME)第一部分:互联网邮件正文格式”,RFC 20451996年11月。

5. Handley, M. and V. Jacobson, "SDP: Session Description Protocol", RFC 2327, April 1998.

5. Handley,M.和V.Jacobson,“SDP:会话描述协议”,RFC 2327,1998年4月。

6. Bradner, S., "Key words for use in RFCs to Indicate Requirement Levels", BCP 14, RFC 2119, March 1997.

6. Bradner,S.,“RFC中用于表示需求水平的关键词”,BCP 14,RFC 2119,1997年3月。

7. Deering, S., "Host Extensions for IP Multicasting", STD 5, RFC 1112, August 1989.

7. Deering,S.,“IP多播的主机扩展”,STD 5,RFC 1112,1989年8月。

8. Acknowledgments
8. 致谢

The author wishes to thank Tony Crossman for starting this work on G.722.1 packetization and for authoring the initial draft. The author also wishes to thank Steve Casner and Colin Perkins for their valuable feedback and helpful comments.

作者希望感谢Tony Crossman开始了这项关于G.722.1打包的工作,并编写了初稿。作者还要感谢Steve Casner和Colin Perkins的宝贵反馈和有用的评论。

9. Author's Address
9. 作者地址

Patrick Luthi PictureTel Corporation 100 Minuteman Road Andover, MA 01810 USA

Patrick Luthi PictureTel Corporation美国马萨诸塞州安多弗市民民路100号01810

   Phone: +1 (978) 292 4354
   EMail: luthip@pictel.com
        
   Phone: +1 (978) 292 4354
   EMail: luthip@pictel.com
        
10. Full Copyright Statement
10. 完整版权声明

Copyright (C) The Internet Society (2001). All Rights Reserved.

版权所有(C)互联网协会(2001年)。版权所有。

This document and translations of it may be copied and furnished to others, and derivative works that comment on or otherwise explain it or assist in its implementation may be prepared, copied, published and distributed, in whole or in part, without restriction of any kind, provided that the above copyright notice and this paragraph are included on all such copies and derivative works. However, this document itself may not be modified in any way, such as by removing the copyright notice or references to the Internet Society or other Internet organizations, except as needed for the purpose of developing Internet standards in which case the procedures for copyrights defined in the Internet Standards process must be followed, or as required to translate it into languages other than English.

本文件及其译本可复制并提供给他人,对其进行评论或解释或协助其实施的衍生作品可全部或部分编制、复制、出版和分发,不受任何限制,前提是上述版权声明和本段包含在所有此类副本和衍生作品中。但是,不得以任何方式修改本文件本身,例如删除版权通知或对互联网协会或其他互联网组织的引用,除非出于制定互联网标准的需要,在这种情况下,必须遵循互联网标准过程中定义的版权程序,或根据需要将其翻译成英语以外的其他语言。

The limited permissions granted above are perpetual and will not be revoked by the Internet Society or its successors or assigns.

上述授予的有限许可是永久性的,互联网协会或其继承人或受让人不会撤销。

This document and the information contained herein is provided on an "AS IS" basis and THE INTERNET SOCIETY AND THE INTERNET ENGINEERING TASK FORCE DISCLAIMS ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE INFORMATION HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.

本文件和其中包含的信息是按“原样”提供的,互联网协会和互联网工程任务组否认所有明示或暗示的保证,包括但不限于任何保证,即使用本文中的信息不会侵犯任何权利,或对适销性或特定用途适用性的任何默示保证。

Acknowledgement

确认

Funding for the RFC Editor function is currently provided by the Internet Society.

RFC编辑功能的资金目前由互联网协会提供。