interoperability: if two VoIP applications run RTP, they may be able to work together
Multimedia Networking
9-14
15 of 25
RTP runs on top of UDP
Multimedia Networking
9-15
RTP libraries provide transport-layer interface
that extends UDP:
port numbers, IP addresses
payload type identification
packet sequence numbering
time-stamping
16 of 25
RTP example
example: sending 64 kbps PCM-encoded voice over RTP
application collects encoded data in chunks, e.g., every 20 msec = 160 bytes in a chunk
audio chunk + RTP header form RTP packet, which is encapsulated in UDP segment
RTP header indicates type of audio encoding in each packet
sender can change encoding during conference
RTP header also contains sequence numbers, timestamps
Multimedia Networking
9-16
17 of 25
RTP and QoS
RTP does not provide any mechanism to ensure timely data delivery or other QoS guarantees
RTP encapsulation only seen at end systems (not by intermediate routers)
routers provide best-effort service, making no special effort to ensure that RTP packets arrive at destination in timely manner
Multimedia Networking
9-17
18 of 25
RTP header
Multimedia Networking
9-18
payload type (7 bits): indicates type of encoding currently being �used. If sender changes encoding during call, sender
informs receiver via payload type field
Payload type 0: PCM mu-law, 64 kbps
Payload type 3: GSM, 13 kbps
Payload type 7: LPC, 2.4 kbps
Payload type 26: Motion JPEG
Payload type 31: H.261
Payload type 33: MPEG2 video
sequence # (16 bits): increment by one for each RTP packet sent
detect packet loss, restore packet sequence
payload type
sequence number type
time stamp
Synchronization
Source ID
Miscellaneous fields
19 of 25
RTP header
timestamp field (32 bits long):sampling instant of first byte in this RTP data packet
for audio, timestamp clock increments by one for each sampling period (e.g., each 125 usecs for 8 KHz sampling clock)
if application generates chunks of 160 encoded samples, timestamp increases by 160 for each RTP packet when source is active. Timestamp clock continues to increase at constant rate when source is inactive.�
SSRC field (32 bits long):identifies source of RTP stream. Each stream in RTP session has distinct SSRC