Forward-Shifted RTP Redundancy Payload Support
updates
Extracted elements (19)
Anti-shadow loss concealment can be readily applied to pre-recorded media. For live media, a delay equal to or greater than the forward-shift amount must be inserted at the source, which is a significant constraint.
Forward-shifted redundancy is motivated by wireless 'shadow' scenarios where a mobile receiver can be blocked for seconds or tens of seconds. Traditional backward-shifted redundancy (RFC 2198) and most FEC schemes are ineffective against such consecutive frame losses.
Inband redundancy (single RTP session) offers simpler setup, easier NAT/firewall traversal, and lower overhead, while out-of-band (separate RTP sessions) offers flexibility for middleboxes to add/remove redundancy without requiring a special payload format.
RFC 2198 defines the timestamp offset as a 14-bit unsigned value, implying redundant data must be sent after primary data. This prevents RFC 2198 from supporting forward-shifted redundant blocks, which motivated a new media type.
The amount of forward-shifting, which should remain constant for the duration of the session, determines the maximum length of shadows that can be completely concealed at the receiver. A shadow longer than the forward-shift amount will exhaust the buffer and cause service interruption.
The 'forwardshift' SDP parameter is declarative in Offer/Answer; all reasonable values are expected to be supported. No special negotiation logic is required.
Using 'fwdred' with forwardshift=0 is equivalent to RFC 2198 'red' behavior, providing a backwards-compatible mode within the new media type.
A 'forwardshift' value of 0 indicates the sender will not use forward-shifting, giving the same behavior as defined in RFC 2198.
The 'fwdred' media type depends on RTP framing and is only defined for transfer via RTP (RFC 3550); transfer within other framing protocols is not defined.
The sender MUST NOT change the contents of a packet that appears in a forward-shifted stream when it is time to send it in the main stream.
The anti-shadow buffer stores forward-shifted redundant frames at the receiver. In normal mode it is continuously filled with incoming AS data and purged of frames older than the last primary frame played out, keeping it full with the next 'forwardshift' amount of redundant frames.
The 'fwdred' media type requires parameters: 'rate' (as in RFC 4102), 'pt' (as in RFC 4102), and 'forwardshift' (unsigned integer, RTP timestamp units). Optional parameters are 'ptime' and 'maxptime'.
The media type 'fwdred' extends RFC 2198's 'red' type with a required 'forwardshift' parameter (unsigned integer in RTP timestamp units) indicating the base value of timestamp forward-shifting used by the sender.
IANA added 'fwdred' to both the 'Audio Media Types' registry and the 'Text Media Types' registry, referencing RFC 6354.
Security considerations from RFC 2198 Section 6, RFC 4856 Section 4, and RFC 3550 Sections 9 and 14 all apply to this specification.
To prevent denial-of-service attacks, a receiver SHOULD be prepared to ignore a 'forwardshift' parameter declaration if it considers the offset value excessive. In such a case, the receiver SHOULD also ignore the redundant stream in the resultant RTP session.
The anti-shadow receiver operates in two modes: 'normal mode' (when new data is being received, primary data goes directly to the decoder and AS data is buffered) and 'AS mode' (when in a shadow, play-out continues from the anti-shadow buffer). The trigger to switch to AS mode is loss of new incoming data; the trigger to return to normal mode is resumption of new data arrival.
In SDP, 'fwdred' maps as: media type in 'm=', encoding name in 'a=rtpmap', and 'forwardshift=value' in the 'a=fmtp' attribute. Example: 'a=fmtp:121 0/5 forwardshift=40800' indicates 5.1 seconds of forward-shifting at 8000 Hz.
The timestamp of a redundant block in a forward-shifted session is computed as: timestamp_in_RTP_header minus timestamp_offset_in_additional_header plus forwardshift_base_value. Typically the timestamp offset in the additional header is set to 0.