RTP Payload Format for Video Codec 1 (VC-1)
Extracted elements (25)
Repeating the sequence layer header improves robustness against RTP packet loss. When doing so, it is RECOMMENDED to reduce the number of leaky bucket parameters in the sequence and entry-point headers to one (section 4.5) to minimize the overhead of such repetition.
The DTS Delta field is optional and receivers are not required to use it, but it enables buffer management, frame pacing before decoding, and determination of whether lost RTP packets contained reference frames or only B-frames by comparing decode and presentation times.
The 'mode=3' parameter allows the RTP sender to omit entry-point and sequence layer headers from RTP packets when they never change, reducing overhead. The receiver reconstructs them from the 'config' SDP parameter. This optimization is motivated by the significant size of repeated sequence headers especially with multiple HRD leaky bucket parameter sets.
In declarative SDP (RTSP, SAP), the parameters 'config', 'width', 'height', 'bitrate', and 'buffer' MUST be specified, while 'max-width', 'max-height', 'max-framerate', 'max-bitrate', and 'max-buffer' MUST NOT be used.
In the SDP Offer/Answer model, the answerer MUST NOT specify a numerically higher level than offered. The 'profile' parameter MUST be used symmetrically; if the offered profile is not supported the answerer must remove the media format completely. For multicast, parameter values MUST NOT be changed by the answerer.
Each Access Unit MUST start with the AU header defined in section 5.2, and the AU payload MUST contain data belonging to exactly one VC-1 frame. Data from different VC-1 frames will always be in different AUs.
Each AU payload SHOULD contain a complete VC-1 frame. If this would cause the RTP packet to exceed the MTU size, the frame SHOULD be fragmented into multiple AUs to avoid IP-level fragmentation. When an AU contains a fragmented frame, this MUST be indicated by setting the FRAG field in the AU header.
For Simple and Main profiles, decoder initialization parameters MUST be conveyed out-of-band. When this RTP payload format is used with SDP, the decoder initialization parameters MUST be signaled in SDP using the media type parameters specified in section 6.1.
For VC-1 Advanced profile, the AU payload MUST contain VC-1 bit stream data in EBDU format using the byte-stuffing encapsulation mode defined in Annex E of SMPTE 421M. The AU payload MUST start at an EBDU boundary except when containing a fragmented frame.
If best-effort service is used, senders MUST monitor packet loss to ensure the rate is within acceptable parameters, defined as not worse than a TCP flow under the same network conditions. Adaptation may include rate switching at random access point boundaries or discarding non-reference B-frames.
If 'mode=1' is signaled and a sequence layer header is present in the coded bit stream, then it MUST be identical to the sequence layer header specified by the 'config' media type parameter. If the RTP sender removes the sequence layer header, it MUST ensure the resulting bit stream remains compliant with the VC-1 specification.
If the video frame in an AU has a presentation time that differs from the RTP timestamp field, then the presentation time MUST be specified using the PTS Delta field in the AU header. If the decode time of a video frame differs from its presentation time, the decode time MUST be specified using the DTS Delta field.
In 'mode=3', when the RTP receiver receives a complete AU or first fragment where the RA bit is set to 1 but the AU does not begin with an entry-point header, the RTP receiver MUST insert an entry-point header at the beginning of the AU using the one specified by the 'config' media type parameter.
VC-1 video frames MUST be transmitted in the coded order. The RTP timestamp field MUST be set to the presentation time of the video frame contained in the first AU in the RTP packet. A clock rate of 90 kHz MUST be used.
The 'config' media type parameter carries a base16 (hexadecimal) representation of decoder initialization parameters. For Simple/Main profiles this is STRUCT_C; for Advanced profile it is a sequence layer header directly followed by an entry-point header, both in EBDU format with Start Codes.
The 'mode' parameter (Advanced profile only) specifies whether sequence and entry-point headers may change: 0=both may change and will be included in RTP; 1=sequence layer header never changes; 3=both headers never change and may be omitted from RTP packets. Default is 0.
The RA Count field is an 8-bit binary modulo-256 counter that MUST be incremented by 1 each time an AU is transmitted where the RA bit is set to 1. Its initial value is undefined and MAY be chosen randomly. It allows receivers to detect lost RTP packets that contained random access points.
The RTP Marker bit (M) is set to 1 if the RTP packet contains an Access Unit with a complete VC-1 frame or the last fragment of a VC-1 frame. The RTP timestamp uses a clock rate of 90 kHz and is set to the presentation time of the first AU's video frame.
The SL bit in the AU Control field MUST be toggled when an AU contains a sequence layer header that differs from the most recently transmitted sequence layer header. This allows receivers to detect that a lost RTP packet contained a new sequence layer header. The SL bit MUST be 0 for Simple and Main profiles.
IANA registered the media type 'video/vc1' in the Media Types registry and in the RTP Payload Format MIME types registry. Required parameters are 'profile' (0=Simple, 1=Main, 3=Advanced) and 'level'. The SDP encoding name MUST be 'vc1' and the clock rate MUST be 90000.
VC-1 bit streams can carry user-data (e.g., closed captions, content metadata) that could potentially include programmatic content such as scripts. Senders SHOULD ensure user-data is compliant with the SMPTE specification, and receivers SHOULD prevent malfunction from non-compliant user-data.
VC-1 is particularly vulnerable to denial-of-service attacks because an attacker can inject pathological RTP packets containing frames that affect the decoding of many future frames. Therefore, data origin authentication and data integrity protection of at least the RTP packet is RECOMMENDED, for example using SRTP.
VC-1 streams can require up to 135 Mbps bandwidth for HDTV, creating a denial-of-service risk if transmitted on many Internet paths. Users of this payload format MUST comply with the congestion control requirements in section 8.
The AU Control field is 8 bits with the following sub-fields: FRAG (2 bits, fragmentation state: 0=middle, 1=first, 2=last, 3=complete), RA (1 bit, random access point), SL (1 bit, sequence layer counter toggled on new headers), LP (1 bit, AUP Len present), PT (1 bit, PTS Delta present), DT (1 bit, DTS Delta present), R (1 bit, reserved, MUST be 0).
The AU header consists of: AU Control (8 bits), RA Count (8 bits), and three optional fields: AUP Len (16 bits, payload size in bytes), PTS Delta (32 bits, 2's complement presentation time offset from RTP timestamp), and DTS Delta (32 bits, 2's complement decode-time offset from presentation time). All fields MUST be in network byte order.