RTP principles of operation

RTP is used for carrying the media. Preceding RTP, we have various types of codec for voice and video compression. The following is the sample packet format of an RTP packet:

The RTP header carries details specific to the flow and the direction that can be used for session identification, resiliency and real-time jitter/delay measurement. RTP provides mechanisms for timing recovery, loss detection and correction, payload and source identification, and media synchronization.

RTP uses UDP as the transport layer protocol. In the following diagram, you see the RTP packet structure:

The fields in the header are as follows:

  • Version (V): This field indicates the RTP version
  • Padding (P): This field indicates that the packet contains one or more additional padding bytes at the end that are not part of the payload
  • Extension bit (X): This field indicates a fixed header that follows the standard header
  • CSRC count (CC): This field contains the number of CSRC fields that follow the fixed header
  • Marker (M): This field is used to indicate application events, for example video frame boundaries
  • Payload type: This field identifies the format of the RTP payload to be interpreted by the receiving application
  • Sequence number: This field is incremented by one for each RTP packet sent. Used by the receiver to detect packet losses
  • Timestamp: This field reflects the sampling rate of octets in the RTP data stream
  • Synchronization source (SSRC): This field is the stream identifier that is chosen randomly so that no two synchronization sources within the same RTP session will have the same SSRC identifier
  • Contributing source identifiers list (CSRC): This field identifies the contributing sources (that is, the stream source) for the payload contained in this packet

In the following diagram, you can see how the sequence and timestamps mechanisms work:

As we can see in the diagram, the sequence numbers are increased by one for each RTP packet transmitted, while timestamps increase by the time covered by a packet. Packet number 1, for example, will have both set to 1; packet 2 will have a sequence number of 2 and a timestamp of 12; and it goes on in this manner for the other packets. The receiver will receive the sequence numbers that tell him the order of the packets and timestamps that tell him the time at which they left the receiver. The receiver will use both to play back the received data.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.225.57.126