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.