1 / 32

What is RTP?

What is RTP? what RTP consist of? What is RTP Header? What is RSTP?

totitarek
Télécharger la présentation

What is RTP?

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. RTP: Real-timeTransport Protocol Presented by: 1- AbdElrahman Mohamed Amer 2-Tarek Nader Esmat

  2. Presentation Outline Introduction History of streaming media Overview of RTP What is RTP? Why RTP? How RTP work? RTP Features (Advantages) RTP Disadvantages RTP Header Real-time streaming protocol (RTSP)

  3. Brief history of streaming media

  4. Origin of Protocol(RTP) Developed by the Audio-Video Transport Working Group of the IETF “Internet Engineering Task Force”: H. Schulzrinne (Columbia University) S. Casner (Packet Design) R. Frederick (Blue Coat Systems Inc.) V. Jacobson (Packet Design) First published as RFC 1889 in the year 1996 Superseded by RFC 3550 in the year 2003

  5. Real-Time Transport Protocol • End-to-end delivery services for applications transmitting real-time data, such as audio and video over multicast and unicast networks. • Application layer protocol • Typically used on top of IP and UDP • Layer 4 – UDP or TCP • Layer 3 – Internet Protocol IP • Layer 7 – RTP • Applications that use RTP are: • Less sensitive to packet loss. • Very sensitive to packet delays. • E.x:- • Video teleconferencing • Internet Telephony (VoIP) • Internet audio, video streaming

  6. RTP Features • All RTP and RTCP PDUs are sent to same multicast group (by all participants) • RTPsupports several file formats like MPEG and MJPEG but you can add extra formats. • RTP also has jitter compensation, multimedia streaming (tolerates packet loss) and detection of out of sequence arrival in data attributes. How RTP work?

  7. Streaming performance requirements • Sequencing – to report PDU loss • to report PDU reordering • to perform out-of-order decoding • Time stamping and Buffering • for play out • for jitterand delay calculation • Payload type identification • for media interpretation • Error concealment –covers up errors from lost PDU by using redundancy in most-adjacent-frame • Quality of Service (QoS) feedback – from receiver to sender for operation adjustment • Rate control –sender reduces sending rate adaptively to network congestion

  8. Ideal Timing – no jitter 30 seconds 00.00.00 00.00.10 First RTP-PDU application 00.00.11 00.00.20 Second RTP-PDU 00.00.21 00.00.30 Third RTP-PDU 00.00.31 Send time Play time

  9. Reality – jitter delay 00.00.00 00.00.10 First RTP-PDU 00.00.11 00.00.20 Second RTP-PDU 00.00.21 00.00.30 00.00.25 Third RTP-PDU 00.00.40 00.00.35 00.00.37 Fourth RTP-PDU 00.00.41 00.00.47 Send time 00.00.51 Play time

  10. Jitter (contd.) 00.00.00 00.00.10 First RTP-PDU(0) 00.00.11 00.00.20 Second RTP-PDU(10) 00.00.21 00.00.30 00.00.18 00.00.25 00.00.28 Third RTP-PDU(20) 00.00.40 00.00.35 00.00.37 00.00.38 Fourth RTP-PDU (30) 00.00.41 00.00.47 Send time 00.00.48 00.00.51 Play time 00.00.58

  11. Jitter (contd.) Playback buffer At time 00:00:18 At time 00:00:28 At time 00:00:38

  12. Support from transport layers • Why not only RTP? RTP Does Not • Assume the underlying network is reliable and delivers PDUs in sequence. • Uses sequence number. • Provide timely delivery or other QoS guarantees. • However, it does provide necessary data to application to order packets and adjust signal quality. • Relies on other protocols like RTCP and lower layers (e.g. UDP, TCP) to do so. • Handle connection setups or tear-downs. • Need other protocols like SIP or H.323 • Handle resource reservation . • Need other protocols like RSVP • Define media data formats or encodings. • Need media specific profiles.

  13. Why not TCP? • TCP does retransmissions  unbounded delays due to (Acks, Flow control, windowing) • No provision for time stamping • TCP does not support multicast • TCP congestion control (slow-start) unsuitable for real-time transport (A-V media) • Why not UDP? • UDP offers datagram-like service • Connectionless , Unreliable , Unordered • No Flow , Error , Congestion control • Port numbers RTCP RTP + UDP usually used for multimedia services

  14. RTP Packets

  15. RTP PDU Header Sampling instant of first data octet • multiple PDUs can have same timestamp • not necessarily monotonic • used to synchronize different media streams Incremented by one for each RTP PDU: • PDU loss detection • Restore PDU sequence Payload type Identifies synchronization source Identifies contributing sources (used by mixers)

  16. V - Version. 2 bits. • P- padding .1bit • X - Extension. 1 bit. • CC - CSRC count. 4 bits. • M - Marker.1 bit. • PT - Payload Type. 7 bits. • Sequence Number. 16 bits. • Timestamp. 32 bits. • SSRC, Synchronization source. 32 bits. RTP Data Transfer Protocol : Synchronization • CSRC, Contributing source. 32 bits. • SSRC, Synchronization source. 32 bits. • Sequence Number. 16 bits. (packet count) • - gap in sequence #: packet loss • Timestamp. 32 bits. • e.g., audio@8KHz, 20ms samples/packet • - timestamp increment per packet: 160 • 90KHz used for video • - a video frame may be encapsulated in a few packets • gap in timestamp: silence RTP Data Transfer Protocol : RTP profiles • Media specific (e.g., audio) • M - Marker.1 bit.e.g., the start of a talk spurt • PT - Payload Type. 7 bits.e.g., specific audio codec • PT=0: PCM 64Kbpz; PT=3: GSM 13Kbps • timestamp: e.g., sampling rate, 8KHz PCM • packet size: e.g., about 20ms samples in PCM • - packets independent as much as possible: ALF

  17. Basic header Ethereal capture for RTP-PDU

  18. RTP Session • RTP sessionis sending and receiving of RTP data by a group of participants • Foreach participant, a session is a pair of transport addresses used to communicate with the group • If multiple media types are communicated by the group, the transmission of each medium constitutes a session.

  19. RTP Synchronization Source • synchronization source - each source of RTP PDUs • Identified by a unique,randomly chosen 32-bit ID (theSSRC) • A host generating multiple streams within a single RTP must use a different SSRC per stream

  20. RTP Basics of Data Transmission RTP PDUs

  21. Seq no.1, Tmpst 100 Seq no.2, Tmpst 200 Seq no.3, Tmpst 300 sender receiver silence Seq no.4, Tmpst 600 Seq no.5, Tmpst 700 How does Sequence number and Timestamp help ? Audio silenceexample: • Consider audio data • What should the sender do during silence? Not send anything • Why might this cause problems? • Receiver cannot distinguish between loss and silence Solution: • After receiving no PDUs for a while, next PDU received at the receiver will reflect a big jump in timestamp, but have the correct next seq. no. Thus, receiver knows what happened.

  22. Real-Time Streaming Protocol (RTSP) • Application layer protocol (default port 554) • Usually runs on RTP for stream & TCP for control • Provides the control channel • Uses out-of-band signaling • Usable for Live broadcasts / multicast Also known as “Network remote control” for multi-media servers.

  23. Web Server web browser HTTP presentation descriptor Presentation descriptor Web Server/Media server RTSP media player pres. desc,streaming commands RTP/RTCP audio/video content RTSP Overview

  24. RTSP Methods

  25. RTSP server TCP get UDP port data source UDP RTCP media server media player RTSP Session Default port 554 RTSP SETUP RTSP OK RTSP PLAY RTSP client RTSP OK RTSP TEARDOWN RTSP OK choose UDP port RTP VIDEO AV subsystem RTP AUDIO

  26. Media server A audio.example.com Media server V video.example.com Client C Web server W -holds the media descriptors Example:Media on demand (Unicast)

  27. C -> W : GET/Twister.sdp HTTP/1.1 Host: www.example.com Accept: application/sdp W-> C : HTTP/1.0 200 OK Content-Type: application/sdp W V C-> A : SETUP rtsp://audio.example.com/twister/audio.en RTSP/1.0 Cseq:1 Transport : RTP/AVP/UDP;unicast;client_port=3056-3057 A-> C : RTSP/1.0 200 OK Cseq:1 Session: 12345678 Transport : RTP/AVP/UDP;unicast;client_port=3056-3057 server_port=5000-5001 C A C->V: SETUP rtsp://video.example.com/twister/video.en RTSP/1.0 Cseq:1 Transport : RTP/AVP/UDP;unicast;client_port=3058-3059 A-> C : RTSP/1.0 200 OK Cseq:1 Session: 23456789 Transport : RTP/AVP/UDP;unicast;client_port=3058-3059 server_port=5002-5003 RTSP Message sequence

  28. C->V: PLAY rtsp://video.example.com/twister/video RTSP/1.0 Cseq: 2 Session: 23456789 V->C: RTSP/1.0 200 OK Cseq: 2 Session: 23456789 RTP-Info: url=rtsp://video.example.com/twister/video; seq=12312232; W V C A C->A: PLAY rtsp://audio.example.com/twister/audio.en RTSP/1.0 Cseq: 2 Session: 12345678 A->C: RTSP/1.0 200 OK Cseq: 2 Session: 12345678 RTP-Info: url=rtsp://audio.example.com/twister/audio.en; seq=876655; RTSP Message sequence (contd.)

  29. C->A: TEARDOWN rtsp://audio.example.com/twister/audio.en RTSP/1.0 Cseq: 3 Session: 12345678 A->C: RTSP/1.0 200 OK Cseq: 3 W V C->V: TEARDOWN rtsp://video.example.com/twister/video RTSP/1.0 Cseq: 3 Session: 23456789 V->C: RTSP/1.0 200 OK Cseq: 3 C A RTSP Message sequence (contd.)

  30. References [1] B. A. Forouzan, “TCP/IP Protocol Suite”, Third edition, [2] H. Schulzrinne, S. Casner, R. Frederick and V. Jacobson, "RTP: a transport protocol for real-time applications", RFC 3550, July 2003. [3] H. Schulzrinne, A. Rao and R. Lanphier, "Real Time Streaming Protocol (RTSP)", RFC 2326, April 1998.

  31. Thank you for your attention! Questions?

More Related