home *** CD-ROM | disk | FTP | other *** search
/ The Hacker's Encyclopedia 1998 / hackers_encyclopedia.iso / rfc / 3 / rfc2250.txt < prev    next >
Encoding:
Text File  |  2003-06-11  |  33.5 KB  |  900 lines

  1.  
  2.  
  3.  
  4.  
  5.  
  6.  
  7. Network Working Group                                         D. Hoffman
  8. Request for Comments: 2250                                   G. Fernando
  9. Obsoletes: 2038                                   Sun Microsystems, Inc.
  10. Category: Standards Track                                       V. Goyal
  11.                                                   Precept Software, Inc.
  12.                                                              M. Civanlar
  13.                                                     AT&T Labs - Research
  14.                                                             January 1998
  15.  
  16.  
  17.                 RTP Payload Format for MPEG1/MPEG2 Video
  18.  
  19.  
  20. Status of this Memo
  21.  
  22.    This document specifies an Internet standards track protocol for the
  23.    Internet community, and requests discussion and suggestions for
  24.    improvements.  Please refer to the current edition of the "Internet
  25.    Official Protocol Standards" (STD 1) for the standardization state
  26.    and status of this protocol.  Distribution of this memo is unlimited.
  27.  
  28. Copyright Notice
  29.  
  30.    Copyright (C) The Internet Society (1998).  All Rights Reserved.
  31.  
  32. Abstract
  33.  
  34.    This memo describes a packetization scheme for MPEG video and audio
  35.    streams.  The scheme proposed can be used to transport such a video
  36.    or audio flow over the transport protocols supported by RTP.  Two
  37.    approaches are described. The first is designed to support maximum
  38.    interoperability with MPEG System environments.  The second is
  39.    designed to provide maximum compatibility with other RTP-encapsulated
  40.    media streams and future conference control work of the IETF.
  41.  
  42.    This memo is a revision of RFC 2038, an Internet standards track
  43.    protocol.  In this revision, the packet loss resilience mechanisms in
  44.    Section 3.4 were extended to include additional picture header
  45.    information required for MPEG2.  A new section on security
  46.    considerations for this payload type is added.
  47.  
  48.  
  49.  
  50.  
  51.  
  52.  
  53.  
  54.  
  55.  
  56.  
  57.  
  58. Hoffman, et. al.            Standards Track                     [Page 1]
  59.  
  60. RFC 2250            RTP Format for MPEG1/MPEG2 Video        January 1998
  61.  
  62.  
  63. 1. Introduction
  64.  
  65.    ISO/IEC JTC1/SC29 WG11 (also referred to as the MPEG committee) has
  66.    defined the MPEG1 standard (ISO/IEC 11172)[1] and the MPEG2 standard
  67.    (ISO/IEC 13818)[2].  This memo describes a packetization scheme to
  68.    transport MPEG video and audio streams using the Real-time Transport
  69.    Protocol (RTP), version 2 [3, 4].
  70.  
  71.    The MPEG1 specification is defined in three parts: System, Video and
  72.    Audio.  It is designed primarily for CD-ROM-based applications, and
  73.    is optimized for approximately 1.5 Mbits/sec combined data rates. The
  74.    video and audio portions of the specification describe the basic
  75.    format of the video or audio stream.  These formats define the
  76.    Elementary Streams (ES).  The MPEG1 System specification defines an
  77.    encapsulation of the ES that contains Presentation Time Stamps (PTS),
  78.    Decoding Time Stamps and System Clock references, and performs
  79.    multiplexing of MPEG1 compressed video and audio ES's with user data.
  80.  
  81.    The MPEG2 specification is structured in a similar way. However, it
  82.    hasn't been restricted only to CD-ROM applications. The MPEG2 System
  83.    specification defines two system stream formats:  the MPEG2 Transport
  84.    Stream (MTS) and the MPEG2 Program Stream (MPS).  The MTS is tailored
  85.    for communicating or storing one or more programs of MPEG2 compressed
  86.    data and also other data in relatively error-prone environments. The
  87.    MPS is tailored for relatively error-free environments.
  88.  
  89.    We seek to achieve interoperability among 4 types of end-systems in
  90.    the following specification. The 4 types are:
  91.  
  92.         1. Transmitting Interworking Unit (TIU)
  93.  
  94.            Receives MPEG information from a native MTS system for
  95.            distribution over packet networks using a native RTP-based
  96.            system layer (such as an IP-based internetwork). Examples:
  97.            real-time encoder, MTS satellite link to Internet, video
  98.            server with MTS-encoded source material.
  99.  
  100.         2. Receiving Interworking Unit (RIU)
  101.  
  102.            Receives MPEG information in real time from an RTP-based
  103.            network for forwarding to a native MTS environment.
  104.            Examples: Internet-based video server to MTS-based cable
  105.            distribution plant.
  106.  
  107.  
  108.  
  109.  
  110.  
  111.  
  112.  
  113.  
  114. Hoffman, et. al.            Standards Track                     [Page 2]
  115.  
  116. RFC 2250            RTP Format for MPEG1/MPEG2 Video        January 1998
  117.  
  118.  
  119.         3. Transmitting Internet End-System (TAES)
  120.  
  121.            Transmits MPEG information generated or stored within the
  122.            internet end-system itself, or received from internet-based
  123.            computer networks.  Example: video server.
  124.  
  125.         4. Receiving Internet End-System (RAES)
  126.  
  127.            Receives MPEG information over an RTP-based internet for
  128.            consumption at the internet end-system or forwarding to
  129.            traditional computer network.  Example: desktop PC or
  130.            workstation viewing training video.
  131.  
  132.    Each of the 2 types of transmitters must work with each of the 2
  133.    types of receivers.  Because it is probable that the TAES, and
  134.    certain that the RAES, will be based on existing and planned
  135.    internet-connected computers, it is highly desirable for the
  136.    interoperable protocol to be based on RTP.
  137.  
  138.    Because of the range of applications that might employ MPEG streams,
  139.    we propose to define two payload formats.
  140.  
  141.    Much interest in the MPEG community is in the use of one of the MPEG
  142.    System encodings, and hence, in Section 2 we propose encapsulations
  143.    of MPEG1 System streams and MPEG2 Transport and Program Streams with
  144.    RTP.  This profile supports the full semantics of MPEG System and
  145.    offers basic interoperability among all four end-system types.
  146.  
  147.    When operating only among internet-based end-systems (i.e., TAES and
  148.    RAES) a payload format that provides greater compatibility with the
  149.    Internet architecture is desired, deferring some of the system issues
  150.    to other protocols being defined in the Internet community (such as
  151.    the MMUSIC WG).  In Section 3 we propose an encapsulation of
  152.    compressed video and audio data (referred to in MPEG documentation as
  153.    "Elementary Streams" (ES)) complying with either MPEG1 or MPEG2.
  154.    Here, neither of the System standards of MPEG1 or MPEG2 are utilized.
  155.    The ES's are directly encapsulated with RTP.
  156.  
  157.    Throughout this specification, we make extensive use of MPEG
  158.    terminology.  The reader should consult the primary MPEG references
  159.    for definitive descriptions of this terminology.
  160.  
  161. 2. Encapsulation of MPEG System and Transport Streams
  162.  
  163.    Each RTP packet will contain a timestamp derived from the sender's
  164.    90KHz clock reference.  This clock is synchronized to the system
  165.    stream Program Clock Reference (PCR) or System Clock Reference (SCR)
  166.    and represents the target transmission time of the first byte of the
  167.  
  168.  
  169.  
  170. Hoffman, et. al.            Standards Track                     [Page 3]
  171.  
  172. RFC 2250            RTP Format for MPEG1/MPEG2 Video        January 1998
  173.  
  174.  
  175.    packet payload.  The RTP timestamp will not be passed to the MPEG
  176.    decoder.  This use of the timestamp is somewhat different than
  177.    normally is the case in RTP, in that it is not considered to be the
  178.    media display or presentation timestamp. The primary purposes of the
  179.    RTP timestamp will be to estimate and reduce any network-induced
  180.    jitter and to synchronize relative time drift between the transmitter
  181.    and receiver.
  182.  
  183.    For MPEG2 Transport Streams the RTP payload will contain an integral
  184.    number of MPEG transport packets.  To avoid end system
  185.    inefficiencies, data from multiple small MTS packets (normally fixed
  186.    in size at 188 bytes) are aggregated into a single RTP packet.  The
  187.    number of transport packets contained is computed by dividing RTP
  188.    payload length by the length of an MTS packet (188).
  189.  
  190.    For MPEG2 Program streams and MPEG1 system streams there are no
  191.    packetization restrictions; these streams are treated as a packetized
  192.    stream of bytes.
  193.  
  194. 2.1 RTP header usage
  195.  
  196.    The RTP header fields are used as follows:
  197.  
  198.         Payload Type: Distinct payload types should be assigned for
  199.           MPEG1 System Streams, MPEG2 Program Streams and MPEG2
  200.           Transport Streams.  See [4] for payload type assignments.
  201.  
  202.         M bit:  Set to 1 whenever the timestamp is discontinuous
  203.           (such as might happen when a sender switches from one data
  204.           source to another). This allows the receiver and any
  205.           intervening RTP mixers or translators that are synchronizing
  206.           to the flow to ignore the difference between this timestamp
  207.           and any previous timestamp in their clock phase detectors.
  208.  
  209.         timestamp: 32 bit 90K Hz timestamp representing the target
  210.           transmission time for the first byte of the packet.
  211.  
  212. 3. Encapsulation of MPEG Elementary Streams
  213.  
  214.    The following ES types may be encapsulated directly in RTP:
  215.  
  216.         (a) MPEG1 Video (ISO/IEC 11172-2) (b) MPEG2 Video (ISO/IEC
  217.         13818-2) (c) MPEG1 Audio (ISO/IEC 11172-3) (d) MPEG2 Audio
  218.         (ISO/IEC 13818-3)
  219.  
  220.  
  221.  
  222.  
  223.  
  224.  
  225.  
  226. Hoffman, et. al.            Standards Track                     [Page 4]
  227.  
  228. RFC 2250            RTP Format for MPEG1/MPEG2 Video        January 1998
  229.  
  230.  
  231.    A distinct RTP payload type is assigned to MPEG1/MPEG2 Video and
  232.    MPEG1/MPEG2 Audio, respectively. Further indication as to whether the
  233.    data is MPEG1 or MPEG2 need not be provided in the RTP or MPEG-
  234.    specific headers of this encapsulation, as this information is
  235.    available in the ES headers.
  236.  
  237.    Presentation Time Stamps (PTS) of 32 bits with an accuracy of 90 kHz
  238.    shall be carried in the fixed RTP header. All packets that make up a
  239.    audio or video frame shall have the same time stamp.
  240.  
  241. 3.1 MPEG Video elementary streams
  242.  
  243.    MPEG1 Video can be distinguished from MPEG2 Video at the video
  244.    sequence header, i.e. for MPEG2 Video a sequence_header() is followed
  245.    by sequence_extension().  The particular profile and level of MPEG2
  246.    Video (MAIN_Profile@MAIN_Level, HIGH_Profile@HIGH_Level, etc) are
  247.    determined by the profile_and_level_indicator field of the
  248.    sequence_extension header of MPEG2 Video.
  249.  
  250.    The MPEG bit-stream semantics were designed for relatively error-free
  251.    environments, and there is significant amount of dependency (both
  252.    temporal and spatial) within the stream such that loss of some data
  253.    make other uncorrupted data useless.  The format as defined in this
  254.    encapsulation uses application layer framing information plus
  255.    additional information in the RTP stream-specific header to allow for
  256.    certain recovery mechanisms.  Appendix 1 suggests several recovery
  257.    strategies based on the properties of this encapsulation.
  258.  
  259.    Since MPEG pictures can be large, they will normally be fragmented
  260.    into packets of size less than a typical LAN/WAN MTU.  The following
  261.    fragmentation rules apply:
  262.  
  263.         1. The MPEG Video_Sequence_Header, when present, will always
  264.            be at the beginning of an RTP payload.
  265.         2. An MPEG GOP_header, when present, will always be at the
  266.            beginning of the RTP payload, or will follow a
  267.            Video_Sequence_Header.
  268.         3. An MPEG Picture_Header, when present, will always be at the
  269.            beginning of a RTP payload, or will follow a GOP_header.
  270.  
  271.    Each ES header must be completely contained within the packet.
  272.    Consequently, a minimum RTP payload size of 261 bytes must be
  273.    supported to contain the largest single header defined in the ES
  274.    (that is, the extension_data() header containing the
  275.    quant_matrix_extension()).  Otherwise, there are no restrictions on
  276.    where headers may appear within packet payloads.
  277.  
  278.  
  279.  
  280.  
  281.  
  282. Hoffman, et. al.            Standards Track                     [Page 5]
  283.  
  284. RFC 2250            RTP Format for MPEG1/MPEG2 Video        January 1998
  285.  
  286.  
  287.    In MPEG, each picture is made up of one or more "slices," and a slice
  288.    is intended to be the unit of recovery from data loss or corruption.
  289.    An MPEG-compliant decoder will normally advance to the beginning of
  290.    next slice whenever an error is encountered in the stream.  MPEG
  291.    slice begin and end bits are provided in the encapsulation header to
  292.    facilitate this.
  293.  
  294.    The beginning of a slice must either be the first data in a packet
  295.    (after any MPEG ES headers) or must follow after some integral number
  296.    of slices in a packet.  This requirement insures that the beginning
  297.    of the next slice after one with a missing packet can be found
  298.    without requiring that the receiver scan the packet contents.  Slices
  299.    may be fragmented across packets as long as all the above rules are
  300.    met.
  301.  
  302.    An implementation based on this encapsulation assumes that the
  303.    Video_Sequence_Header is repeated periodically in the MPEG bit-
  304.    stream.  In practice (though not required by MPEG standard) this is
  305.    used to allow channel switching and to receive and start decoding a
  306.    continuously relayed MPEG bit-stream at arbitrary points in the media
  307.    stream.  It is suggested that when playing back from an MPEG stream
  308.    from a file format (where the Video_Sequence_Header may only be
  309.    represented at the beginning of the stream) that the first
  310.    Video_Sequence_Header (preceded by an end-of-stream indicator) be
  311.    saved by the packetizer for periodic injection in to the network
  312.    stream.
  313.  
  314. 3.2 MPEG Audio elementary streams
  315.  
  316.    MPEG1 Audio can be distinguished from MPEG2 Audio from the MPEG
  317.    ancillary_data() header.  For either MPEG1 or MPEG2 Audio, distinct
  318.    Presentation Time Stamps may be present for frames which correspond
  319.    to either 384 samples for Layer-I, or 1152 samples for Layer-II or
  320.    Layer-III.  The actual number of bytes required to represent this
  321.    number of samples will vary depending on the encoder parameters.
  322.  
  323.    Multiple audio frames may be encapsulated within one RTP packet.  In
  324.    this case, an integral number of audio frames must be contained
  325.    within the packet and the fragmentation header defined in Section 3.5
  326.    shall be set to 0.
  327.  
  328.    Also, if relatively short packets are to be used, one frame may be so
  329.    large that it may straddle multiple RTP packets.  For example, for
  330.    Layer-II MPEG audio sampled at a rate of 44.1 KHz each frame would
  331.    represent a time slot of 26.1 msec. At this sampling rate if the
  332.    compressed bit-rate is 384 kbits/sec (i.e.  48 kBytes/sec) then the
  333.    average audio frame size would be 1.25 KBytes.  If packets were to be
  334.    500 Bytes long, then each audio frame would straddle 3 RTP packets.
  335.  
  336.  
  337.  
  338. Hoffman, et. al.            Standards Track                     [Page 6]
  339.  
  340. RFC 2250            RTP Format for MPEG1/MPEG2 Video        January 1998
  341.  
  342.  
  343.    The audio fragmentation indicator header (See Section 3.5) shall be
  344.    present for an MPEG1/2 Audio payload type to provide for this
  345.    fragmentation.
  346.  
  347. 3.3 RTP Fixed Header for MPEG ES encapsulation
  348.  
  349.    The RTP header fields are used as follows:
  350.  
  351.         Payload Type: Distinct payload types should be assigned
  352.           for video elementary streams and audio elementary streams.
  353.           See [4] for payload type assignments.
  354.  
  355.         M bit:  For video, set to 1 on packet containing MPEG frame
  356.           end code, 0 otherwise.  For audio, set to 1 on first packet of
  357.           a "talk-spurt," 0 otherwise.
  358.  
  359.         PT:  MPEG video or audio stream ID.
  360.  
  361.         timestamp: 32-bit 90K Hz timestamp representing presentation
  362.           time of MPEG picture or audio frame.  Same for all packets
  363.           that make up a picture or audio frame.  May not be
  364.           monotonically increasing in video stream if B pictures present
  365.           in stream.  For packets that contain only a video sequence
  366.           and/or GOP header, the timestamp is that of the subsequent
  367.           picture.
  368.  
  369. 3.4 MPEG Video-specific header
  370.  
  371.    This header shall be attached to each RTP packet after the RTP fixed
  372.    header.
  373.  
  374.     0                   1                   2                   3
  375.     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
  376.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  377.    |    MBZ  |T|         TR        | |N|S|B|E|  P  | | BFC | | FFC |
  378.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  379.                                    AN              FBV     FFV
  380.  
  381.         MBZ: Unused. Must be set to zero in current
  382.            specification. This space is reserved for future use.
  383.  
  384.         T: MPEG-2 (Two) specific header extension present (1 bit).
  385.            Set to 1 when the MPEG-2 video-specific header extension (see
  386.            Section 3.4.1) follows this header. This extension may be
  387.            needed for improved error resilience; however, its inclusion
  388.            in an RTP packet is optional. (See Appendix 1.)
  389.  
  390.  
  391.  
  392.  
  393.  
  394. Hoffman, et. al.            Standards Track                     [Page 7]
  395.  
  396. RFC 2250            RTP Format for MPEG1/MPEG2 Video        January 1998
  397.  
  398.  
  399.         TR: Temporal-Reference (10 bits). The temporal reference of
  400.            the current picture within the current GOP. This value ranges
  401.            from 0-1023 and is constant for all RTP packets of a given
  402.            picture.
  403.  
  404.         AN: Active N bit for error resilience (1 bit). Set to 1 when
  405.            the following bit (N) is used to signal changes in the
  406.            picture header information for MPEG-2 payloads. It must be
  407.            set to 0 for MPEG-1 payloads or when N bit is not used.
  408.  
  409.         N: New picture header (1 bit). Used for MPEG-2 payloads when
  410.            the previous bit (AN) is set to 1. Otherwise, it must be set
  411.            to zero. Set to 1 when the information contained in the
  412.            previously transmitted Picture Headers can't be used to
  413.            reconstruct a header for the current picture. This happens
  414.            when the current picture is encoded using a different set of
  415.            parameters than the previous pictures of the same type. The N
  416.            bit must be constant for all RTP packets that belong to the
  417.            same picture so that receipt of any packet from a picture
  418.            allows detecting whether information necessary for
  419.            reconstruction was contained in that picture (N = 1) or a
  420.            previous one (N = 0).
  421.  
  422.         S: Sequence-header-present (1 bit). Normally 0 and set to 1 at
  423.            the occurrence of each MPEG sequence header.  Used to detect
  424.            presence of sequence header in RTP packet.
  425.  
  426.         B: Beginning-of-slice (BS) (1 bit). Set when the start of the
  427.            packet payload is a slice start code, or when a slice start
  428.            code is preceded only by one or more of a
  429.            Video_Sequence_Header, GOP_header and/or Picture_Header.
  430.  
  431.         E: End-of-slice (ES) (1 bit). Set when the last byte of the
  432.            payload is the end of an MPEG slice.
  433.  
  434.         P: Picture-Type (3 bits). I (1), P (2), B (3) or D (4). This
  435.            value is constant for each RTP packet of a given picture.
  436.            Value 000B is forbidden and 101B - 111B are reserved to
  437.            support future extensions to the MPEG ES specification.
  438.  
  439.         FBV: full_pel_backward_vector
  440.         BFC: backward_f_code
  441.         FFV: full_pel_forward_vector
  442.         FFC: forward_f_code
  443.            Obtained from the most recent picture header, and are
  444.            constant for each RTP packet of a given picture. For I frames
  445.            none of these values are present in the picture header and
  446.  
  447.  
  448.  
  449.  
  450. Hoffman, et. al.            Standards Track                     [Page 8]
  451.  
  452. RFC 2250            RTP Format for MPEG1/MPEG2 Video        January 1998
  453.  
  454.  
  455.            they must be set to zero in the RTP header.  For P frames
  456.            only the last two values are present and FBV and BFC must be
  457.            set to zero in the RTP header. For B frames all the four
  458.            values are present.
  459.  
  460. 3.4.1 MPEG-2 Video-specific header extension
  461.  
  462.     0                   1                   2                   3
  463.     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
  464.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  465.    |X|E|f_[0,0]|f_[0,1]|f_[1,0]|f_[1,1]| DC| PS|T|P|C|Q|V|A|R|H|G|D|
  466.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  467.  
  468.  
  469.         X: Unused (1 bit). Must be set to zero in current
  470.            specification. This space is reserved for future use.
  471.  
  472.         E: Extensions present (1 bit). If set to 1, this header
  473.            extension, including the composite display extension when D =
  474.            1, will be followed by one or more of the following
  475.            extensions: quant matrix extension, picture display
  476.            extension, picture temporal scalable extension, picture
  477.            spatial scalable extension and copyright extension.
  478.  
  479.            The first byte of these extensions data gives the length of
  480.            the extensions in 32 bit words including the length field
  481.            itself. Zero padding bytes are used at the end if required to
  482.            align the extensions to 32 bit boundary.
  483.  
  484.            Since they may not be vital in decoding of a picture, the
  485.            inclusion of any one of these extensions in an RTP packet is
  486.            optional even when the MPEG-2 video-specific header extension
  487.            is included in the packet (T = 1). (See Appendix 1.) If
  488.            present, they should be copied from the corresponding
  489.            extensions following the most recent MPEG-2 picture coding
  490.            extension and they remain constant for each RTP packet of a
  491.            given picture.
  492.  
  493.            The extension start code (32 bits) and the extension start
  494.            code ID (4 bits) are included. Therefore the extensions are
  495.            self identifying.
  496.  
  497.         f_[0,0]: forward horizontal f_code (4 bits)
  498.         f_[0,1]: forward vertical f_code (4 bits)
  499.         f_[1,0]: backward horizontal f_code (4 bits)
  500.         f_[1,1]: backward vertical f_code (4 bits)
  501.         DC: intra_DC_precision (2 bits)
  502.         PS: picture_structure (2 bits)
  503.  
  504.  
  505.  
  506. Hoffman, et. al.            Standards Track                     [Page 9]
  507.  
  508. RFC 2250            RTP Format for MPEG1/MPEG2 Video        January 1998
  509.  
  510.  
  511.         T: top_field_first (1 bit)
  512.         P: frame_predicted_frame_dct (1 bit)
  513.         C: concealment_motion_vectors (1 bit)
  514.         Q: q_scale type (1 bit)
  515.         V: intra_vlc_format (1 bit)
  516.         A: alternate scan (1 bit)
  517.         R: repeat_first_field (1 bit)
  518.         H: chroma_420_type (1 bit)
  519.         G: progressive frame (1 bit)
  520.         D: composite_display_flag (1 bit). If set to 1, next 32 bits
  521.            following this one contains 12 zeros followed by 20 bits
  522.            of composite display information.
  523.  
  524.         These values are copied from the most recent picture coding
  525.         extension and are constant for each RTP packet of a given
  526.         picture. Their meanings are as explained in the MPEG-2 standard.
  527.  
  528. 3.5 MPEG Audio-specific header
  529.  
  530.    This header shall be attached to each RTP packet at the start of the
  531.    payload and after any RTP headers for an MPEG1/2 Audio payload type.
  532.  
  533.     0                   1                   2                   3
  534.     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
  535.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  536.    |             MBZ               |          Frag_offset          |
  537.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  538.  
  539.            Frag_offset: Byte offset into the audio frame for the data
  540.                         in this packet.
  541.  
  542. 4. Security Considerations
  543.  
  544.    RTP packets using the payload format defined in this specification
  545.    are subject to the security considerations discussed in the RTP
  546.    specification [3], and any appropriate RTP profile (for example [4]).
  547.    This implies that confidentiality of the media streams is achieved by
  548.    encryption. Because the data compression used with this payload
  549.    format is applied end-to-end, encryption may be performed after
  550.    compression so there is no conflict between the two operations.
  551.  
  552.    A potential denial-of-service threat exists for data encodings using
  553.    compression techniques that have non-uniform receiver-end
  554.    computational load. The attacker can inject pathological datagrams
  555.    into the stream which are complex to decode and cause the receiver to
  556.    be overloaded. However, this encoding does not exhibit any
  557.    significant non-uniformity.
  558.  
  559.  
  560.  
  561.  
  562. Hoffman, et. al.            Standards Track                    [Page 10]
  563.  
  564. RFC 2250            RTP Format for MPEG1/MPEG2 Video        January 1998
  565.  
  566.  
  567.    As with any IP-based protocol, in some circumstances a receiver may
  568.    be overloaded simply by the receipt of too many packets, either
  569.    desired or undesired. Network-layer authentication may be used to
  570.    discard packets from undesired sources, but the processing cost of
  571.    the authentication itself may be too high. In a multicast
  572.    environment, pruning of specific sources may be implemented in future
  573.    versions of IGMP [5] and in multicast routing protocols to allow a
  574.    receiver to select which sources are allowed to reach it.
  575.  
  576.    A security review of this payload format found no additional
  577.    considerations beyond those in the RTP specification.
  578.  
  579.  
  580.  
  581.  
  582.  
  583.  
  584.  
  585.  
  586.  
  587.  
  588.  
  589.  
  590.  
  591.  
  592.  
  593.  
  594.  
  595.  
  596.  
  597.  
  598.  
  599.  
  600.  
  601.  
  602.  
  603.  
  604.  
  605.  
  606.  
  607.  
  608.  
  609.  
  610.  
  611.  
  612.  
  613.  
  614.  
  615.  
  616.  
  617.  
  618. Hoffman, et. al.            Standards Track                    [Page 11]
  619.  
  620. RFC 2250            RTP Format for MPEG1/MPEG2 Video        January 1998
  621.  
  622.  
  623. Appendix 1. Error Recovery and Resynchronization Strategies.
  624.  
  625.    The following error recovery and resynchronization strategies are
  626.    intended to be guidelines only.  A compliant receiver is free to
  627.    employ alternative (or no) strategies.
  628.  
  629.    When initially decoding an RTP-encapsulated MPEG Elementary Stream,
  630.    the receiver may discard all packets until the Sequence-header-
  631.    present bit is set to 1.  At this point, sufficient state information
  632.    is contained in the stream to allow processing by an MPEG decoder.
  633.  
  634.    Loss of packets containing the GOP_header and/or Picture_Header are
  635.    detected by an unexpected change in the Temporal-Reference and
  636.    Picture-Type values.  Consider the following example GOP sequence:
  637.  
  638.         In display order: 0B 1B 2I 3B 4B 5P 6B 7B 8P GOP_HDR 0B ...
  639.         In stream order:  2I 0B 1B 5P 3B 4B 8P 6B 7B GOP_HDR 2I ...
  640.  
  641.    Consider also two counters:
  642.  
  643.         ref_pic_temp (Reference Picture (I,P) Temporal Reference)
  644.         dep_pic_temp (Dependent Picture (B) Temporal Reference)
  645.  
  646.    At each GOP beginning, set these counters to the temporal reference
  647.    value of the corresponding picture type. For our example GOP
  648.    sequence, ref_pic_temp = 2 and dep_pic_temp = 0. Keep incrementing
  649.    BOTH counters by unity with each following picture. Ref_pic_temp
  650.    should match the temporal references of the I and P frames, and
  651.    dep_pic_temp should match the temporal references of the B frames.
  652.  
  653.        dep_pic_temp: -  0  1  2  3  4  5  6  7        8  9
  654.    In stream order:  2I 0B 1B 5P 3B 4B 8P 6B 7B GOP_H 2I 0B 1B ...
  655.        ref_pic_temp: 2  3  4  5  6  7  8  9  10  ^    11
  656.                      --------------------------  |    ^
  657.                                 Match            Drop |
  658.                                                       Mismatch
  659.                                                        in ref_pic_temp
  660.  
  661.    The loss of a GOP header can be detected by matching the appropriate
  662.    counter (based on picture type) to the temporal reference value. A
  663.    mismatch indicates a lost GOP header. If desired, a GOP header can be
  664.    re-constructed using a "null" time_code, repeating the closed_gop
  665.    flag from previous GOP headers, and setting the broken_link flag to
  666.    1.
  667.  
  668.    The loss of a Picture_Header can also be detected by a mismatch in
  669.    the Temporal Reference contained in the RTP packet from the
  670.    appropriate dep_pic_temp or ref_pic_temp counters at the receiver.
  671.  
  672.  
  673.  
  674. Hoffman, et. al.            Standards Track                    [Page 12]
  675.  
  676. RFC 2250            RTP Format for MPEG1/MPEG2 Video        January 1998
  677.  
  678.  
  679.    For MPEG-1 payloads, after scanning to the next Beginning-of-slice
  680.    the Picture_Header is reconstructed from the P, TR, FBV, BFC, FFV and
  681.    FFC contained in that packet, and from stream-dependent default
  682.    values.
  683.  
  684.    For MPEG-2, additional information is needed for the reconstruction.
  685.    This information is provided by the MPEG-2 video specific header
  686.    extension contained in that packet if the T bit is set to 1, or the
  687.    Picture Header for the current picture may be available from previous
  688.    packets belonging to the same picture. The transmitter's strategy for
  689.    inclusion of the MPEG-2 video specific header extension may depend
  690.    upon a number of factors. This header may not be needed when:
  691.  
  692.       1. the information has been transmitted a sufficient number of
  693.       times in previous packets to assure reception with the desired
  694.       probability, or
  695.  
  696.       2. the information is transmitted over a separate reliable
  697.       channel, or
  698.  
  699.       3. expected loss rates are low enough that missed frames are not a
  700.       concern, or
  701.  
  702.       4. conserving bandwidth is more important than error resilience,
  703.       etc.
  704.  
  705.    If T=1 and E=0, there may be extensions present in the original video
  706.    bitstream that are not included in the current packet. The
  707.    transmitter may choose not to include extensions in a packet when
  708.    they are not necessary for decoding or if one of the cases listed
  709.    above for not including the MPEG-2 video specific header extension in
  710.    a packet applies only to the extension data.
  711.  
  712.    If N=0, then the Picture Header from a previous picture of the same
  713.    type (I,P or B) may be used so long as at least one packet has been
  714.    received for every intervening picture of the same type and that the
  715.    N bit was 0 for each of those pictures. This may involve:
  716.  
  717.       1. Saving the relevant picture header information that can be
  718.       obtained from the MPEG-2 video specific header extension or
  719.       directly from the video bitstream for each picture type,
  720.  
  721.       2. Keeping validity indicators for this saved information based on
  722.       the received N bits and lost packets, and,
  723.  
  724.       3. Updating the data whenever a packet with N=1 is received.
  725.  
  726.  
  727.  
  728.  
  729.  
  730. Hoffman, et. al.            Standards Track                    [Page 13]
  731.  
  732. RFC 2250            RTP Format for MPEG1/MPEG2 Video        January 1998
  733.  
  734.  
  735.    If the necessary information is not available from any of these
  736.    sources, data deletion until a new picture start code is advised.
  737.  
  738.    Any time an RTP packet is lost (as indicated by a gap in the RTP
  739.    sequence number), the receiver may discard all packets until the
  740.    Beginning-of-slice bit is set.  At this point, sufficient state
  741.    information is contained in the stream to allow processing by an MPEG
  742.    decoder starting at the next slice boundary (possibly after
  743.    reconstruction of the GOP_header and/or Picture_Header as described
  744.    above).
  745.  
  746. References
  747.  
  748.    [1] ISO/IEC International Standard 11172; "Coding of moving pictures
  749.        and associated audio for digital storage media up to about 1,5
  750.        Mbits/s", November 1993.
  751.  
  752.    [2] ISO/IEC International Standard 13818; "Generic coding of moving
  753.        pictures and associated audio information", November 1994.
  754.  
  755.    [3] Schulzrinne, H., Casner, S., Frederick, R., and V. Jacobson,
  756.        "RTP: A Transport Protocol for Real-Time Applications", RFC 1889,
  757.        January 1996.
  758.  
  759.    [4] Schulzrinne, H., "RTP Profile for Audio and Video Conferences
  760.        with Minimal Control", RFC 1890, January 1996.
  761.  
  762.    [5] Deering, S., "Host Extensions for IP Multicasting", STD 5,
  763.        RFC 1112, August 1989.
  764.  
  765. Authors' Addresses
  766.  
  767.    Gerard Fernando
  768.    Sun Microsystems, Inc.
  769.    Mail-stop UMPK14-305
  770.    2550 Garcia Avenue
  771.    Mountain View, California 94043-1100
  772.    USA
  773.  
  774.    Phone: +1 415-786-6373
  775.    EMail: gerard.fernando@eng.sun.com
  776.  
  777.  
  778.  
  779.  
  780.  
  781.  
  782.  
  783.  
  784.  
  785.  
  786. Hoffman, et. al.            Standards Track                    [Page 14]
  787.  
  788. RFC 2250            RTP Format for MPEG1/MPEG2 Video        January 1998
  789.  
  790.  
  791.    Vivek Goyal
  792.    Precept Software, Inc.
  793.    1072 Arastradero Rd,
  794.    Palo Alto, CA 94304
  795.    USA
  796.  
  797.    Phone: +1 415-845-5200
  798.    EMail: goyal@precept.com
  799.  
  800.  
  801.    Don Hoffman
  802.    Sun Microsystems, Inc.
  803.    Mail-stop UMPK14-305
  804.    2550 Garcia Avenue
  805.    Mountain View, California 94043-1100
  806.    USA
  807.  
  808.    Phone: +1 503-297-1580
  809.    EMail: don.hoffman@eng.sun.com
  810.  
  811.  
  812.    M. Reha Civanlar
  813.    AT&T Labs - Research
  814.    100 Schutlz Drive, 3-213
  815.    Red Bank, NJ 07701-7033
  816.    USA
  817.  
  818.    Phone: +1 732-345-3305
  819.    EMail: civanlar@research.att.com
  820.  
  821.  
  822.  
  823.  
  824.  
  825.  
  826.  
  827.  
  828.  
  829.  
  830.  
  831.  
  832.  
  833.  
  834.  
  835.  
  836.  
  837.  
  838.  
  839.  
  840.  
  841.  
  842. Hoffman, et. al.            Standards Track                    [Page 15]
  843.  
  844. RFC 2250            RTP Format for MPEG1/MPEG2 Video        January 1998
  845.  
  846.  
  847. Full Copyright Statement
  848.  
  849.    Copyright (C) The Internet Society (1998).  All Rights Reserved.
  850.  
  851.    This document and translations of it may be copied and furnished to
  852.    others, and derivative works that comment on or otherwise explain it
  853.    or assist in its implementation may be prepared, copied, published
  854.    and distributed, in whole or in part, without restriction of any
  855.    kind, provided that the above copyright notice and this paragraph are
  856.    included on all such copies and derivative works.  However, this
  857.    document itself may not be modified in any way, such as by removing
  858.    the copyright notice or references to the Internet Society or other
  859.    Internet organizations, except as needed for the purpose of
  860.    developing Internet standards in which case the procedures for
  861.    copyrights defined in the Internet Standards process must be
  862.    followed, or as required to translate it into languages other than
  863.    English.
  864.  
  865.    The limited permissions granted above are perpetual and will not be
  866.    revoked by the Internet Society or its successors or assigns.
  867.  
  868.    This document and the information contained herein is provided on an
  869.    "AS IS" basis and THE INTERNET SOCIETY AND THE INTERNET ENGINEERING
  870.    TASK FORCE DISCLAIMS ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING
  871.    BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE INFORMATION
  872.    HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED WARRANTIES OF
  873.    MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
  874.  
  875.  
  876.  
  877.  
  878.  
  879.  
  880.  
  881.  
  882.  
  883.  
  884.  
  885.  
  886.  
  887.  
  888.  
  889.  
  890.  
  891.  
  892.  
  893.  
  894.  
  895.  
  896.  
  897.  
  898. Hoffman, et. al.            Standards Track                    [Page 16]
  899.  
  900.