Published on

This defined Real Time Streaming Protocol

  • Very good, thank you.
    Are you sure you want to  Yes  No
    Your message goes here
  • This is very useful for students
    Are you sure you want to  Yes  No
    Your message goes here
  • Really good explanation.
    Are you sure you want to  Yes  No
    Your message goes here
  • good explanations about RTSP and HTTP, useful for all
    Are you sure you want to  Yes  No
    Your message goes here
No Downloads
Total views
On SlideShare
From Embeds
Number of Embeds
Embeds 0
No embeds

No notes for slide


  1. 1. Real Time Streaming Protocol Prasanti Adusumilli Swathi Borra
  2. 2. <ul><li>TOPICS </li></ul><ul><li>Introduction </li></ul><ul><li>RTSP and Streaming </li></ul><ul><li>Role of RTSP </li></ul><ul><li>RTP and RTSP </li></ul><ul><li>Working of RTSP </li></ul><ul><li>RTSP Methods </li></ul><ul><li>Applications of RTSP </li></ul><ul><li>RTSP Vulnerabilities </li></ul>
  3. 3. Introduction <ul><li>RTSP is an application-level protocol for the control of real-time streaming data. </li></ul><ul><li>IEFT Standard </li></ul><ul><ul><li> RFC 2326 </li></ul></ul><ul><li>It uses RTP as the underlying data delivery protocol and offers a VCR-like control to the user: Play, Stop, Pause, FF and REW, as well as random access to any part of the media clip. </li></ul>
  4. 4. (Introduction…contd) <ul><li>RTSP also helps the server to adjust the media bandwidth to the network congestion in order to suit the available capacity. </li></ul><ul><li>Another important function of RTSP is its ability to choose the optimum delivery channel to the client. For instance, if UDP cannot be used (some corporate firewalls </li></ul><ul><li>will not pass UDP), the streaming server has to offer a choice of delivery protocols – multicast UDP or TCP to suit different clients. </li></ul>
  5. 5. RTSP and HTTP <ul><li>RTSP is similar to HTTP/1.1 in terms of syntax and operation but differs in several important aspects. </li></ul><ul><li>With RTSP, both the client and the server can issue requests during interaction, as opposed to HTTP where the client always issues the requests (for documents). </li></ul>
  6. 6. (RTSP and HTTP…contd) <ul><li>RTSP maintains a state by default which happens to be very important in streaming media files. </li></ul><ul><li>The HTTP protocol is a stateless protocol . This simply means that HTTP is unable to retain a memory of the identity of each client that connects to a web site and therefore treats each request for a web page as a unique and independent connection, with no relationship whatsoever to the connections that preceded it. </li></ul>
  7. 7. RTSP and Streaming <ul><li>RTSP is the central protocol of a streaming framework. </li></ul><ul><li>Streaming is the process of playing a file while it is still downloading. </li></ul><ul><li>The innovation of streaming </li></ul><ul><li> No need to entirely store it locally before playing </li></ul>
  8. 8. (…contd) <ul><li>Large audio and video files need not be downloaded to your computer . </li></ul><ul><li>Streaming media technology allows the client to see or hear the content in just a few seconds instead of waiting. </li></ul>
  9. 9. <ul><li>Streaming media will usually take the form of: </li></ul><ul><li>pre-stored media Its already been recorded and archived somewhere, when the user wants to access it we serve it as a stream </li></ul><ul><li>live broadcast media The content is streamed as its produced (there may be a small editing / safety delay, as with traditional broadcasting) straight to the user </li></ul><ul><li>live interactive media Such as videoconferencing - each user might produce their own stream, and there isn't control by one broadcaster </li></ul>
  10. 10. <ul><li>The transmission of the stream can be : </li></ul><ul><li>one-to-one or point to point - in networking terms, unicast . The stream travels directly from the source (server) to the user (client). </li></ul><ul><li>one-to-many or multicast . One stream will be (literally) broadcast to many users. </li></ul>
  11. 11. Kinds of streaming audio or video available <ul><li>Real Networks (with RealMedia, Real Video and RealAudio) </li></ul><ul><li>Microsoft (with Windows Media - audio and video) </li></ul><ul><li>Apple (with QuickTime) </li></ul><ul><li>Null soft Streaming Video (.nsv) and Shoutcast, IceCast (GNU GPL/Open Source version of Shoutcast), Live365 streaming audio </li></ul>
  12. 12. Protocols used in Streaming Technology <ul><li> Session Description Protocol (SDP) </li></ul><ul><li> Real Time Transport Protocol (RTP)  Real-time Control Protocol (RTCP) </li></ul><ul><li> Hypertext Transfer Protocol (HTTP) </li></ul><ul><li> Real Time Streaming Protocol (RTSP) </li></ul>
  13. 14. Role of RTSP <ul><li>Controlling and processing the interactive control functions such as pause/resume, fast forward, rewind is an important aspect of streaming and RTSP takes up this major role. </li></ul><ul><li>Delivery mechanisms are based solely on RTP. </li></ul><ul><li>RTSP is designed to be on top of RTP to both control and deliver real-time content . </li></ul>
  14. 15. <ul><li>RTSP implementations will be able to take advantage of RTP improvements such as RTP header compression </li></ul><ul><li>Here we need to know the differences between RTP and RTSP to know that both have their own specific functions in streaming. </li></ul>
  15. 16. RTP and RTSP <ul><li>It’s important to distinguish between RTP and Real-Time Streaming Protocol (RTSP), another transfer protocol. RTSP is used when viewers communicate with a unicast server. </li></ul><ul><li>RTSP allows two-way communication; that is, viewers can communicate with the streaming server and do things like rewind the movie, go to a chapter, and so on. </li></ul>
  16. 17. <ul><li>QuickTime automatically translates the viewer interaction with the on-screen movie controller into the proper RTSP requests. </li></ul><ul><li>By contrast, RTP is a one-way protocol used to send live or stored streams from the server to the client. </li></ul>
  17. 18. Streaming from a streaming server to a media player
  18. 19. Working of RTSP <ul><li>FIGURE </li></ul>
  19. 20. RTSP Media Player-Server Sequence Chart User Interface RTSP Player RTSP Server OpenURL SETUP response1 PLAY response2 audio PAUSE response3 Quit TEARDOWN response10 Activate RTP Activate RTP
  20. 21. Explanation – Working of RTSP <ul><li>Before a client can establish the streaming session it some how has to get the session description from the web server using the HTTP protocol. </li></ul><ul><li>According to the information in the session description the client sends a RTSP SETUP request to the streaming server. </li></ul>
  21. 22. Example of a RTSP Description File <ul><li><title>Twister/title> </li></ul><ul><li><session> </li></ul><ul><li><group language=en lipsync> </li></ul><ul><li><switch> </li></ul><ul><li> <track type=audio </li></ul><ul><li>e=”PCMU/8000/1” </li></ul><ul><li>src= ”rtsp://audio.example.com/twister/ </li></ul><ul><li> audio.en/lofi”> </li></ul><ul><li> <track type=audio </li></ul><ul><li>e=”DVI4/16000/2” pt=”90 DVI4/8000/1” </li></ul><ul><li>scr=”rtsp://audio.example.com/twister/ </li></ul><ul><li> audio.en/hifi”> </li></ul><ul><li></switch> </li></ul><ul><li><track type=”video/jpeg” </li></ul><ul><li>scr=”rtsp://video.example.com/twister/video”> </li></ul><ul><li></group> </li></ul><ul><li></session> </li></ul>
  22. 23. Explanation of the Description File <ul><li>The RTSP Content Markup Language document can be defined using an XML DTD (Document Type Definition), and is HTML-like. Most of it is self-explanatory. The ’group’ includes two audio tracks and a video track, and the ’group’ tag includes the language parameter (en =English) and a requirement that the sound shall be lip-synchronised with the video. The ’swich’ tag indicates that we can swich between two sound tracks. The coding schemes for the audio are given by the parameters ’e’ and ’pt’. To locate resources, RTSP defines a variant of URL, see ’src’. The parameter ’lofi’ indicates ’low fidelity’ sound. The RTSP URL may include a port number . </li></ul>
  23. 24. (working of RTSP …contd) <ul><li>The server informs the client with an OK (ack) response to indicate that the stream has been prepared successfully. </li></ul><ul><li>The client starts the streaming with a RTSP PLAY request and ends the streaming session with a RTSP TEARDOWN request. </li></ul>
  24. 25. RTSP Message Format <ul><li>The RTSP message formats share a similar syntax to HTTP The general syntax for an RTSP method is: </li></ul><ul><li>{method name} {URL} {protocol version}CRLF {parameters} </li></ul><ul><li>An example of an RTSP request follows: </li></ul><ul><li>DESCRIBE http://foo.com/bar.rm RTSP/1.0 </li></ul><ul><li>CSeq: 312 </li></ul><ul><li>Accept: application/sdp, application/mheg </li></ul><ul><li>This is a request for an RTSP server to send a description of the media </li></ul><ul><li>content, http://foo.com/bar.rm, using either Session Description Protocol </li></ul><ul><li>(SDP) or Multimedia and Hypermedia Experts Group (MHEG) formats. </li></ul><ul><li>An RTSP message may also contain a body. The general syntax for a method with a body is: </li></ul><ul><li>{method name} {URL} {protocol version}CRLF </li></ul><ul><li>{MIME header field}CRLF </li></ul><ul><li>... </li></ul><ul><li>{MIME header field}CRLF </li></ul><ul><li>CRLF </li></ul><ul><li>{optional body, depending on the presence of a &quot;Content-length&quot;} </li></ul><ul><li>The following example contains a description of the media referenced by the request URL, rtsp://foo.bar.com/bar.rm, using the SDP format. </li></ul><ul><li>ANNOUNCE rtsp://foo.bar.com/bar.rm RTSP/1.0 </li></ul><ul><li>CSeq: 312 </li></ul><ul><li>Date: 9 Sep 1998 13:00:00 GMT </li></ul><ul><li>Session: 45991232 </li></ul><ul><li>Content-Type: application/sdp </li></ul><ul><li>Content-Length: 332 </li></ul><ul><li>v=0 </li></ul><ul><li>o=efutz 1928384477 1928386879 IN IP4 </li></ul><ul><li>s=A Short Story </li></ul><ul><li>i=A short narrative depicting the early days of the Internet </li></ul><ul><li>u=http://www.yo.com/efutz/sdp.04.ps </li></ul><ul><li>e=efutz@yo.com (Elmer Futz) </li></ul><ul><li>c=IN IP4 </li></ul><ul><li>t=3928384899 3928493389 </li></ul><ul><li>a=recvonly </li></ul><ul><li>m=audio 8756 RTP/AVP 0 </li></ul><ul><li>m=video 3487 RTP/AVP 31 </li></ul><ul><li>Each RTSP request is followed by a response message. Syntax: {protocol version} {status code} {reason-phrase}CRLF </li></ul><ul><li>{parameters} </li></ul><ul><li>A typical response message may look like the following: </li></ul><ul><li>RTSP/1.0 200 OK </li></ul><ul><li>CSeq: 312 </li></ul>
  25. 26. Streaming in Mobile Environments
  26. 27. RTSP Methods Description Retrieves the description of a presentation Posts the description of a presentation Retrieves the value of a parameter Queries the available methods Streams delivery is halted temporarily Starts sending data Starts receiving data Informs to connect another server location Specifies the transport mechanism Requests to set the value of a parameter Stops the stream delivery and frees the resources Method DESCRIBE ANNOUNCE GET_PARAMETER OPTIONS PAUSE PLAY RECORD REDIRECT SETUP SET_ PARAMETER TEARDOWN
  27. 28. RTSP Applications <ul><li>Streaming of multi-media via Internet </li></ul><ul><li>Video conferencing & lectures. </li></ul><ul><li>Broadcasting of entertainment. </li></ul><ul><li>Remote digital editing </li></ul><ul><li>Voice mail </li></ul>
  28. 29. RTSP Vulnerabilities <ul><li>Vulnerability VU#329561 </li></ul><ul><li>Real Networks Helix Universal server Vulnerable to buffer overflow when supplied an overly long string within the &quot;Transport&quot; field of a SETUP RTSP request. </li></ul><ul><li>Impact </li></ul><ul><li>A remote attacker may be able to execute arbitrary code on the vulnerable system. This attacker-supplied code would be run with the privileges of the user running the Helix Server. </li></ul>
  29. 30. <ul><li>Vulnerability Note VU#934932 </li></ul><ul><li>Real Networks media server RTSP protocol parser buffer overflow. </li></ul><ul><li>Impact </li></ul><ul><li>A remote attacker can either execute arbitrary code with privileges of the running service or cause it to crash. </li></ul>
  30. 31. <ul><li>Vulnerability Note VU#485057 </li></ul><ul><li>Real Networks Helix Universal Server vulnerable to buffer overflow when supplied an overly long string for the &quot;Describe&quot; field </li></ul><ul><li>Impact </li></ul><ul><li>A remote attacker may be able to execute arbitrary code on the vulnerable system. This attacker-supplied code would be run with the privileges of the user running the Helix Server. </li></ul>
  31. 32. <ul><li>Vulnerability Note VU#460350 </li></ul><ul><li>Apple QuickTime/Darwin Streaming Server fails to properly parse DESCRIBE requests. </li></ul><ul><li>Impact </li></ul><ul><li>An unauthenticated, remote attacker could prevent legitimate users from accessing the streamed content. </li></ul>
  32. 33. Solution to the Vulnerabilities <ul><li>Here all the problems can be resolved by applying a patch from the vendor. </li></ul>
  33. 34. References <ul><li>www.ietf.org </li></ul><ul><li>http://www.kb.cert.org/vuls </li></ul><ul><li>http://www.cswl.com/whiteppr/tech/StreamingTechnology.html </li></ul><ul><li>http://www.javvin.com/protocolRTSP.html </li></ul><ul><li>http://www.cisco.com/univercd/cc/td/doc/product/software/ios120/120newft/120t/120t7/fw_rtsp.htm </li></ul>
  34. 35. Questions <ul><li>#1. What is the transport protocol being used by RTSP? </li></ul><ul><li>Ans. An RTSP client may use reliable transport connection such as TCP or alternatively use UDP.(So could be on top of UDP/IP or TCP/IP) </li></ul><ul><li>#2. Where is RTSP used? </li></ul><ul><li>Ans. It is used by streaming media players ,to control the media streams. </li></ul><ul><li>#3. What is main difference between RTSP and HTTP? </li></ul><ul><li>Ans. HTTP is a stateless protocol ,where as RTSP maintains the state through out. </li></ul>
  35. 36. <ul><li>THANK YOU </li></ul>