RTP working mechanism: When an application establishes a RTP session, the application determines a pair of destination transport addresses. Destination transfer address consists of a network address and a pair of port groups
Into, there are two ports: one to the RTP packet, one to the RTCP packet, so that the RTP/RTCP data can be sent correctly.
RTP data is sent to even-numbered UDP ports, and the corresponding control signal RTCP data to the adjacent odd UDP port (even UDP port +1), which constitutes a
UDP port pair. The sending process for RTP is as follows, and the receiving process is the opposite.
1) The RTP protocol receives the streaming media information stream (such as H.263) from the upper layer, encapsulates the RTP packet, and RTCP receives the control information from the upper layer and encapsulates the RTCP control package.
2) RTP sends the RTP packet to the UDP port pair even port, and RTCP sends the RTCP control packet to the odd port in the UDP port pair.
RTP packets contain only RTP data, and control is provided by the RTCP protocol. RTP selects an unused even UDP port number between 1025 and 65535, and at the same time it
The RTCP in the conversation uses the next odd UDP port number. Port numbers 5004 and 5005 are used as the default port numbers for RTP and RTCP, respectively. RTP Packet Header Format 3
The first 12 bytes are required.