Thursday, July 31, 2014

RTP basics - Part 1


RTP provides end to end delivery services for data (such as interactive audio and video) with real time characteristics. It is primarily designed to support multi party multimedia conferences. RTP is standard defined in RFC 1889, but more recent versions are RFC 3550 and RFC 3551. 

Now what is meant by real time? CAn the transmission be realtime considering the latencies applied by the network components such as routers , switches etc? The real time just referred to make sure the delivery is fast no matter whether it is correct. in short, RTP provides suitable mechanism for transferring real time content such as voice applicable for conferences. 

Another important fact about RTP is that it doesn't ensure timely delivery. i.e. RTP doesn't provide any mechanism to ensure timely delivery or provide other quality of service guarantees. It relies on lower layer services such as UDP or TCP to do so. 

RTP is intact combination of two parts 

RTP  - Real time transfer protocol, which carries the data
RTCP - Real Time Control protocol. This monitors the quality of services and conveys the information about the participants. 

There are multiple use cases for the RTP

Simple Multicast Audio conference
Initially the owner of the conference through some allocation mechanism obtains the a multicast group address and a pair of ports. One port is used for RTP data and the other is used for RTCP control packets. The address and port information is distributed to the intended participants. IF privacy is desired, the data and the control packets may be encrypted in which case, an encryption key is generated and distributed. 

Each participant sends the audio data in small chunks say 20ms. Each instance of the conference periodically multicasts a reception report plus name of the user on the rtcp port. This helps to monitor the quality of transmission  and also determine who the present participants are. 

Audio And Video Conference
If both audio and video is present in the conference, they are transmitted as separate RTP sessions. RTCP packets are transited for each medium as two different UDP port pairs. The canonical name or CNAME of each participant is used to match the audio and video sessions of of individual participants. 

The sessions are divided so the client may choose one of them without really having to use both. Say for e.g. we can choose only audio if don't want to see the video. 

Mixers in RTP 

So far, we have assumed that all site want to receive the media data in same format. However, this is not always appropriate. For users having connections of different bandwidth or those working behind the wall, which don't allow IP packets to pass will need some extra processing. This is done in the form of Mixers and translators. 

Reference: 
http://www.siptutorial.net/RTP/application.html

No comments:

Post a Comment