RTP can be used fro transporting common formats for sound and MPEG and H.263 for video. It can also
be used for transporting proprietary sound and video formats. RTP enjoys widespread inplementation in hundreds of products
and research prototypes. It is also complementary to other important real-time interactive protocols.
RTP Basics
RTP typically runs on top of UDP. The sending side encapsulates a media chunk within an RTP packet,
then encapsulates the packet in a UDP segment, and then hands the segment to IP. The receiving side extracts the RTP
packet from the UDP segment, then extracts the media chunck from the RTP packet, and then passes the chunk to the media player
for decoding and rendering.
If an application incorporate RTP--instead of a proprietary scheme to provide payload type, sequence numbers,
of timestamps--then the application will more easily interoperate with other networked multimedia applications.
It should be emphasized that RTP does not provide any mechanism to ensure timely delivery of data or provide
other quality-of-service (QoS) guarantwws; it does not even g;uarantee delivery of packets or prevent out-of-order delivery
of packets. RTP encapsulation is seen only at the end systems. Routers do not distinguish between IP datagrams
that carry RTP packets and IP datagrams that don't.
RTP allows each source to be assigned its own independent RTP stream of packets.
RTP packets are not limited to unicast applications. They can also be sent over one-to-many and many-to-many
multicast trees. For a many-to-many multicast session, all of the session's senders and sources typically use the
same multicast group for sending their RTP streams. RTP multicast streams belonging together belong to an RTP
session.
RTP Packet Header Fields
The four main RTP packet header fields are the payload type, sequence number, timestamp, and the source
identifier fields.
The payload-type field in the RTP packet is 7 bits long. For an audio stream, the payload-type field
is used to indicate the type of audio encoding that is being used. If a sender decides to change the encoding in the
middle of a session, the sender can inform the receiver of the change through this payload-type field. The sender may
want to change the encoding in order to increase the audio quality or to decrease the RTP stream bit rate.
Important fileds
- Sequence numbers-The sequence number field is 16 bits long. The sequence number increments by one for
each RTP packet sent, and may be used by the receiver to detect packet loss and to restore packet sequence.
- Timestamp field-The timestamp field is 32 bits long. It reflects the sampling instant of the first
byte in the RTP data packet.