rfc-4588

RTP Retransmission Payload Format

J. Rey, D. Leon, A. Miyazaki, V. Varsa, R. Hakenberg
date2006-07 streamIETF arearai wgavt statusPROPOSED STANDARD pages35 canonicalhttps://www.rfc-editor.org/rfc/rfc4588 doi10.17487/RFC4588
RTP retransmission is an effective packet loss recovery technique for real-time applications with relaxed delay bounds. This document describes an RTP payload format for performing retransmissions. Retransmitted RTP packets are sent in a separate stream from the original RTP stream. It is assumed that feedback from receivers to senders is available. In particular, it is assumed that Real-time Transport Control Protocol (RTCP) feedback as defined in the extended RTP profile for RTCP-based feedback (denoted RTP/AVPF) is available in this memo. [STANDARDS-TRACK]

Extracted elements (27)

design-rationale §3.1

Both session-multiplexing and SSRC-multiplexing are defined. Session-multiplexing allows multicast receivers to subscribe selectively to the retransmission session and enables differential network treatment; SSRC-multiplexing minimizes port usage for servers handling many concurrent sessions.

rtp, realtime, multicast

design-rationale §3

Retransmitting with the original sequence number in the same RTP stream was rejected because it corrupts RTCP statistics, which require each packet in a stream to increment the sequence number by one. Payload-type multiplexing in the same stream was also rejected because it violates sequence number preservation: receivers cannot infer which original packets were lost when original and retransmission packets share a sequence number space.

rtp, realtime

design-rationale §3

The retransmission stream is sent separately from the original stream and includes the original sequence number (OSN) in a 2-octet payload header. This design satisfies all six requirements: compatibility with RTCP, support for unicast and small multicast, interoperability with mixers/translators, support for all payload types, multiple payload types per session, and sequence number preservation.

rtp, realtime

interoperability-note §9.2

For RTSP with session-multiplexing, the presentation SHOULD support aggregate control with a session-level RTSP URL, and the receiver SHOULD use aggregate control for the original and retransmission sessions together. Without this, two separate session-id values would prevent the sender from associating them.

rtp, realtime

interoperability-note §5.3

For session-multiplexing, a receiver associates the two streams sharing the same SSRC across the two sessions (sessions are associated out-of-band via SDP FID grouping). For SSRC-multiplexing, the receiver uses CNAME matching and correlates retransmission packets against outstanding NACK requests to determine the SSRC-to-original-stream mapping.

rtp, realtime

interoperability-note §8.7

For session-multiplexing, SDP MUST use FID (Flow Identification) semantics from RFC 3388 to group the original and retransmission session "m" lines. The exception is when there is exactly one original/retransmission pair, in which case FID grouping MAY be omitted.

rtp, realtime

normative-requirement §5.2 MUST

A sender MUST use the same RTCP CNAME for an original stream and its associated retransmission stream, in both session-multiplexing and SSRC-multiplexing cases.

rtp, realtime

normative-requirement §3.1 MUST

Both session-multiplexing and SSRC-multiplexing SHOULD be supported by senders and receivers in unicast sessions to maximize interoperability. For multicast sessions, session-multiplexing MUST be used because SSRC-multiplexing creates an unresolvable association ambiguity when multiple receivers may request the same sequence number from different streams.

rtp, realtime, multicast

normative-requirement §4 SHOULD

If the original RTP header carried profile-specific extensions or an RTP header extension, the retransmission packet SHOULD include the same extensions immediately after the fixed RTP header. The retransmission payload header MUST be placed after any such extensions.

rtp, realtime

normative-requirement §4 MUST

If the original RTP packet contained RTP padding, that padding MUST be removed before constructing the retransmission packet. If padding of the retransmission packet is needed, it MUST be applied fresh and the padding bit MUST be set. The marker bit (M), CSRC count (CC), and CSRC list MUST be copied as-is from the original RTP header.

rtp, realtime

normative-requirement §7 SHOULD NOT

In a best-effort network, the sender SHOULD NOT send retransmission packets without reducing the packet rate and bitrate of the original stream (e.g., by encoding at a lower rate), ensuring that total bitrate including retransmissions does not exceed the fair share a TCP flow would achieve. If congestion cannot be controlled, retransmission SHOULD NOT be used.

rtp, realtime, congestion

normative-requirement §5.1 MUST

In session-multiplexing, a retransmission session MUST map to exactly one original session; the same retransmission session MUST NOT be used for multiple original sessions, as receivers would otherwise receive retransmissions for sessions they did not join.

rtp, realtime

normative-requirement §4 MUST

In session-multiplexing, the same SSRC value MUST be used for the original stream and the retransmission stream. In the event of SSRC collision, an RTCP BYE MUST be sent in the colliding session and also for the associated stream in its own session; both streams MUST then adopt the new SSRC.

rtp, realtime

normative-requirement §5.3 MUST NOT

In SSRC-multiplexing, the receiver MUST NOT have two outstanding NACK requests for the same packet sequence number in two different original streams before the SSRC association is resolved, to avoid ambiguity. SSRC-multiplexing MUST NOT be used in multicast sessions for the same reason.

rtp, realtime, multicast

normative-requirement §4 MUST

In SSRC-multiplexing, two different SSRC values MUST be used for the original and retransmission streams. On collision, an RTCP BYE MUST be sent only for the affected stream; MUST NOT be sent for the associated stream.

rtp, realtime

normative-requirement §6.3 MUST

NACKs (retransmission requests) MUST be sent only for the original RTP stream, not for the retransmission stream, because the receiver cannot determine the original sequence number or estimate the timestamp for a packet lost in the retransmission stream.

rtp, realtime

normative-requirement §4 MUST

The retransmission packet timestamp MUST be set to the original timestamp of the associated original RTP packet, not a new or random value. Consequently, the initial RTP timestamp of the retransmission stream equals the original timestamp of the first retransmitted packet.

rtp, realtime

normative-requirement §4 MUST

The timestamp clockrate used by the retransmission payload type MUST be the same as that used by the associated original payload type, since the retransmission timestamp carries the original media timestamp.

rtp, realtime

protocol-element §4

OSN (Original Sequence Number) is a 16-bit field occupying the first 2 octets of the retransmission payload header. It MUST be set to the RTP sequence number of the associated original packet, enabling the receiver to identify and reconstruct the original packet sequence.

rtp, realtime

protocol-element §8.1

The "apt" (associated payload type) parameter is a REQUIRED SDP/MIME parameter that maps a retransmission payload type number to the corresponding original stream payload type. Multiple "apt" parameters MUST be included when the original stream uses multiple payload types.

rtp, realtime

protocol-element §8.1

The "rtx-time" parameter is an OPTIONAL SDP/MIME parameter specifying in milliseconds (from first transmission) how long a sender keeps an original RTP packet in its retransmission buffer. Absence of this parameter means the maximum retransmission time is undefined.

rtp, realtime

registry §11

RFC 4588 registers the MIME subtype "rtx" for four media types: audio/rtx, video/rtx, text/rtx, and application/rtx. Each registration defines a required "apt" parameter and an optional "rtx-time" parameter. The MIME subtype name "rtx" is used in SDP rtpmap attributes to bind retransmission payload type numbers.

rtp, realtime, registry

security-consideration §12

Absence of authentication enables man-in-the-middle and replay attacks with severe consequences: tampered RTCP packets can trigger inappropriate retransmissions that starve the original stream, tampered retransmission packets can crash decoders, tampered NACK requests can invalidate SSRC association, and replayed packets can cause false RTT measurements and receiver buffer overflow.

rtp, realtime, security

security-consideration §12 MUST

If cryptography is used to provide security on the original RTP stream, the same security services with equivalent cryptographic strength MUST be provided on the retransmission stream.

rtp, realtime, security, crypto

security-consideration §12

The retransmission stream's initial RTP timestamp is not random (it equals the original media timestamp of the first retransmitted packet), deviating from the RTP recommendation to use a random initial timestamp. However, if the original stream is encrypted, the first retransmitted packet's timestamp is still effectively random to an attacker, so confidentiality is not compromised.

rtp, realtime, security

security-consideration §12

Using the same encryption key for both the original and retransmission streams risks two-time pad attacks, since the same plaintext media payload appears in both streams. Implementers are referred to SRTP (RFC 3711) Section 9.1 for mitigations. At time of publication, SRTP did not fully support this payload format due to two-time pad issues and its lack of support for the RTP/AVPF profile.

rtp, realtime, security, crypto

wire-format §4

A retransmission packet consists of a standard RTP header, followed by a 2-octet retransmission payload header containing the OSN (original sequence number) field, followed by the payload of the original RTP packet (including any original payload-specific headers).

rtp, realtime