RTCP & amp; RTP protocol format Analysis 2: RTP

Source: Internet
Author: User
Tags cc domain

RTCP & RTP protocol format Analysis 2: the RTP Header has the following format: 0 1 2 3 0 1 2 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 4 5 6 7 8 9 0 1 +- +- +-+ | V = 2 | P | X | CC | M | PT | sequence number | + -+ -+ | timestamp | +-+ -+ -+ | synchronization source (SSRC) identifier | + = + = + | Contributing source (CSRC) identifiers | .... | +-+ -+ the first 12 bytes appear in each RTP packet, the CSRC list is displayed only after being inserted by the mixer. ~~~~~~~~~ The following describes the meaning of each field: Version Number: 2 bits; Value: 2. fill P: 1 bit: If the fill bit is set, this package contains one or more fill bits appended to the end, the fill bit is not counted as part of the load. The last byte to be filled indicates the number of filled bits that can be ignored (including its own ). Padding may be used for certain encryption algorithms with fixed lengths, or for transmitting multiple RTP packets in the underlying data unit. ~~~~~~~ X: Extension bit. If this parameter is set, the fixed header is followed by a header extension. CC: 4-bit CSRC count contains the number of CSRC identifiers following the Fixed Header. Flag (M): 1-bit flag is interpreted by specific protocols. It is used to allow marking of important events in bit streams, such as frame boundaries. ~~~~~~~~ Load type (7 bits): defines the load format, serial number: sequence number, 16 bits. Each time a RTP packet is sent, the serial number is added with 1. Timestamp: indicates the sampling time of the first byte of the data. The initial value is random. That is, the RTP timestamp records the number of sampled data currently, the NTP timestamp records the absolute time of the current data packet relative to the reference clock (counted from on January 1, January 1, 1900, the current time is relative to the number of seconds passed by this time point ~~~~~~~~~~~~ SSRC: 32-bit, randomly generated. CSRC list: 0 to 15 items, each of which is 32 bits. The number is determined by the CC domain.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.