Real-Time Transport Protocol (RTP) Payload Format for the Variable-Rate Multimode Wideband (VMR-WB) Audio Codec
updated by
- rfc-4424 — Real-Time Transport Protocol (RTP) Payload Format for the Variable-Rate Multimode Wideband (VMR-WB) Extension Audio Codec
Extracted elements (30)
A single fixed 16 kHz RTP clock rate was chosen even though VMR-WB can process 8 kHz input because the VMR-WB decoder does not require a priori knowledge of encoder input sampling frequency and always outputs 16 kHz by default. This avoids the need to renegotiate the RTP clock rate mid-session when narrowband media is injected.
The FEC redundancy scheme (retransmitting prior frame-blocks alongside current ones using a sliding window) was designed to require no signaling at session setup, because a packet with redundant frames is indistinguishable from one with only new frames. This is simpler than RFC 2198 for spreads of up to 5 frame times.
The multimode capability of VMR-WB provides an advantage for congestion control over single-rate codecs: bandwidth demand can be adjusted by selecting a different operating mode, and the number of frame-blocks per RTP payload can also be tuned to reduce header overhead at the expense of increased delay.
The header-free payload format is not compatible with AMR-WB RTP payload; only non-interoperable VMR-WB modes may use it. For interoperable interconnection with AMR-WB, only the octet-aligned payload format may be used.
To maintain interoperability with AMR-WB, a VMR-WB-enabled terminal SHOULD also declare itself capable of AMR-WB with a limited mode set (AMR-WB codec modes 0, 1, and 2 only) and octet-aligned operation in SDP offer-answer exchanges.
VMR-WB mode 3 is interoperable with AMR-WB (RFC 3267) at 6.60, 8.85, and 12.65 kbps (FT=0, 1, 2). The octet-aligned VMR-WB payload format in interoperable mode is identical to that of AMR-WB, enabling Transcoder-Free (TrFO) interconnection between CDMA2000 and GSM/WCDMA networks.
A fixed RTP clock rate of 16000 Hz MUST always be used for VMR-WB, regardless of whether the encoder input is 8 kHz or 16 kHz sampled media. This allows injection and processing of 8-kHz narrowband media without changing the RTP clock rate during a session.
Congestion control for RTP SHALL be used in accordance with RFC 3550 and any applicable RTP profile (e.g., RFC 3551). This is required for any transmission over unmanaged best-effort networks.
Each speech frame MUST be octet-aligned: the last octet MUST be padded with zeroes at the end if not all bits are used. When multiple speech frames are present, they MUST be arranged one whole frame after another.
Frame types FT=0, 1, 2, and 9 (the AMR-WB interoperable and CNG types) SHALL NOT be used with the header-free payload format, because the header-free format is not compatible with AMR-WB RTP payload.
If a payload with an invalid FT value is received, the payload MUST be discarded. For ToC entries with FT=14 (Erasure) or FT=15 (Blank), there will be no corresponding speech frame data in the payload.
If ILP is found greater than ILL in a received payload, the payload SHOULD be discarded. ILL and ILP fields MUST be present in every packet in a session if interleaving is signaled for the session.
If the calculated payload length based on session information and payload header field values does not match the received packet size, the receiver SHOULD discard the packet to avoid speech quality degradation and invoke the VMR-WB built-in frame error concealment mechanism. Invalid packets SHALL be treated as lost packets.
Implementations SHALL support both header-free and octet-aligned payload formats. Support for interleaving is optional. An implementation using SDP is required to understand all payload parameters in SDP-mapped form.
In offer-answer negotiation, rate, channel, and payload configuration parameters (octet-align and interleaving) SHALL be used symmetrically—offer and answer must use the same values. Only operating modes supported by both endpoints SHALL be used.
Reserved R bits in the payload header MUST be set to zero by the sender. The receiver MUST ignore all R bits.
The CMR field MUST be set to 15 (no preference) for packets sent to a multicast group. The encoder SHOULD ignore mode requests when sending to a multicast session but MAY use RTCP feedback as a hint.
The RTP clock rate in the SDP a=rtpmap attribute MUST be 16000 for VMR-WB. The parameter 'channels', if present, is specified subsequent to the MIME subtype and clock rate in the a=rtpmap attribute.
The RTP header marker bit SHALL be set to 0 during continuous transmission. During DTX, it SHALL be set to 1 if the first frame-block in the packet is the first speech frame of a talkspurt; otherwise it SHALL be set to 0.
The sender MUST only apply interleaving if the receiver has signaled its support through out-of-band means. The number of frame-blocks per payload (N) and ILL MUST NOT change inside an interleave group; all payloads in a group MUST contain the same number of speech frame-blocks.
Table 3 defines 16 VMR-WB frame types (FT 0–15): FT 0–2 are AMR-WB interoperable rates (132, 177, 253 bits); FT 3–6 are native VMR-WB rates (266, 124, 54, 20 bits); FT 9 is CNG/SID (40 bits); FT 14 is Erasure and FT 15 is Blank (both 0 bits); others are reserved.
The CMR (Codec Mode Request) field is a 4-bit value in the payload header indicating the desired VMR-WB operating mode for the encoder at the receiver. CMR=15 means no preference; CMR values 7–14 are reserved. The mode request remains valid until overridden by a new CMR.
IANA registered the MIME subtype audio/VMR-WB for the Variable-Rate Multimode Wideband audio codec, allocated from the IETF tree. Optional parameters include mode-set, channels, octet-align, interleaving, ptime, maxptime, and dtx.
The VMR-WB RTP payload format has no built-in security mechanisms. For confidentiality, all audio data bits MUST be encrypted; external mechanisms such as SRTP MAY be used. The payload header and ToC need less protection as they only carry frame type metadata.
To authenticate the sender, an external mechanism MUST be used. It is RECOMMENDED that such a mechanism protect both the complete RTP header and the payload. Tampering with the CMR field by a man-in-the-middle attacker may result in speech of a different quality than desired.
Using interleaving in conjunction with encryption can compromise confidentiality: because frame-blocks are distributed across multiple packets, changing an encryption key at a given timestamp does not prevent earlier-keyed packets from supplying frames that extend past the key-change boundary.
Each ToC entry in the octet-aligned format is 8 bits: F (1 bit, more-frames flag), FT (4 bits, frame type index per Table 3), Q (1 bit, frame quality indicator; 0=corrupted), and 2 padding P bits (MUST be zero, MUST be ignored).
The header-free payload format contains exactly one speech data frame with no payload header fields or ToC entries. The encoding rate is determined solely from the length of the speech data frame.
The octet-aligned payload header consists of a 4-bit CMR field, 4 reserved (R) bits, and an optional 8-bit interleaving header composed of ILL (4-bit interleaving length) and ILP (4-bit interleaving index) fields, present only when interleaving is signaled out-of-band.
The RTP timestamp for VMR-WB is incremented by 320 per 20 ms frame-block (at 16 kHz, 320 samples per frame), and this increment applies to both 8 kHz and 16 kHz sampled media.