RTSP SDP Wireshark Analysis
<ul><li>Real Time Streaming Protocol </li></ul><ul><li>Used for controlling streaming data over the web. </li></ul><ul><li...
<ul><li>Describes the metadata of the stream. </li></ul><ul><li>Mainly used in: SIP, RTSP and other Multicast sessions.  <...
Client Server HTTP GET Stream URI SETUP PLAY RTP Media Stream PAUSE TEARDOWN DESCRIBE OPTIONS RTP Media Stream SDP Informa...
<ul><li>version </li></ul><ul><ul><li>The version of rtsp. (RTSP/1.0) </li></ul></ul><ul><li>URL </li></ul><ul><ul><li>[rt...
<ul><li>Session ID  </li></ul><ul><ul><li>Generated by the server </li></ul></ul><ul><ul><li>Stays constant for the entire...
Initiation Handling Termination
<ul><li>OPTIONS – Request for information about the communication options available by  </li></ul><ul><li>the Request-URI....
<ul><li>All RTSP response codes are divided into 5 ranges  (RFC 2326 7.1.1)  : </li></ul><ul><li>1xx – Informational, 2xx ...
DESCRIBE is used to retrieve the description of the media URL and the session. The description response MUST contain all m...
Description readers SDP The response will always return the details of the media. SDP details will be next… The media URL ...
GET_PARAMETER is used to retrieve information about the stream. The request can be initiated from the Client or from the S...
SETUP is used to specify the transport details used to stream the media. The request/response message body is left to serv...
SETUP response will contain the session ID. For each track ( audio/video ) a different SETUP request will be made After th...
PLAY request tells the server to start send data through the streaming details defined in the SETUP process. PLAY request ...
Stream URL PAUSE request tells the server to pause the streaming. When the user will want to start the stream again he’ll ...
TEARDOWN stops the stream delivery for the URL specified.   Informs the server that the client is disconnecting from it. T...
<ul><li>RECORD:  </li></ul><ul><ul><li>Initiates recording operation given a time information and stream URL. </li></ul></...
Upcoming SlideShare
Loading in …5
×

RTSP Analysis Wireshark

24,194 views

Published on

Analysis and explanation of RTSP/SDP session with wireshark

Published in: Technology

RTSP Analysis Wireshark

  1. 1. RTSP SDP Wireshark Analysis
  2. 2. <ul><li>Real Time Streaming Protocol </li></ul><ul><li>Used for controlling streaming data over the web. </li></ul><ul><li>Designed to efficiently broadcast audio/video-on-demand to large groups. </li></ul><ul><li>Using Directives to control the stream </li></ul><ul><ul><li>Options, Describe, Setup, Play, Pause, Record, Teardown. </li></ul></ul>
  3. 3. <ul><li>Describes the metadata of the stream. </li></ul><ul><li>Mainly used in: SIP, RTSP and other Multicast sessions. </li></ul><ul><li>Sample SDP description: </li></ul><ul><ul><li>v=0 </li></ul></ul><ul><ul><li>o=jdoe 2890844526 2890842807 IN IP4 10.47.16.5 </li></ul></ul><ul><ul><li>s=SDP Seminar </li></ul></ul><ul><ul><li>i=A Seminar on the session description protocol u= http://www.example.com/seminars/sdp.pdf e=j.doe@example.com (Jane Doe) </li></ul></ul><ul><ul><li>c=IN IP4 224.2.17.12/127 </li></ul></ul><ul><ul><li>t=2873397496 2873404696 </li></ul></ul><ul><ul><li>a=recvonly </li></ul></ul><ul><ul><li>m=audio 49170 RTP/AVP 0 </li></ul></ul><ul><ul><li>m=video 51372 RTP/AVP 99 </li></ul></ul><ul><ul><li>a=rtpmap:99 h263-1998/90000 </li></ul></ul>Session ID Protocol Version Session Name Session Info. Description URI Connection Info. Active session time Session Attribute lines Media Name and Transport address Media Attribute lines
  4. 4. Client Server HTTP GET Stream URI SETUP PLAY RTP Media Stream PAUSE TEARDOWN DESCRIBE OPTIONS RTP Media Stream SDP Information Web Browser Media Player Media Server Web Server
  5. 5. <ul><li>version </li></ul><ul><ul><li>The version of rtsp. (RTSP/1.0) </li></ul></ul><ul><li>URL </li></ul><ul><ul><li>[rtsp/rtspu]://host:port/path </li></ul></ul><ul><ul><li>*port – the actual stream will be delivered in other port </li></ul></ul>Reliable protocol (TCP) <ul><ul><ul><li>unreliable protocol (UDP) </li></ul></ul></ul>legal domain name or IP address port used to control the stream the server stream path
  6. 6. <ul><li>Session ID </li></ul><ul><ul><li>Generated by the server </li></ul></ul><ul><ul><li>Stays constant for the entire session </li></ul></ul><ul><li>SMPTE – Relative timestamp </li></ul><ul><ul><li>A relative time from the beginning of the stream. </li></ul></ul><ul><ul><li>Nested types: smpte-range, smpte-type, smpte-time. </li></ul></ul><ul><ul><li>smpte-25=(starttime)-(endtime) </li></ul></ul><ul><li>UTC – Absolute time </li></ul><ul><ul><li>Absolute time using GMT. </li></ul></ul><ul><ul><li>Nested types: utc-range, utc-time. utc-date </li></ul></ul><ul><ul><li>utc-time = (utcdate)T(utctime).(fraction)Z </li></ul></ul><ul><li>NPT - Normal Play Time </li></ul><ul><ul><li>Absolute position from the beginning of the presentation. </li></ul></ul><ul><ul><li>npt=123.45-125 </li></ul></ul>
  7. 7. Initiation Handling Termination
  8. 8. <ul><li>OPTIONS – Request for information about the communication options available by </li></ul><ul><li>the Request-URI. </li></ul><ul><li>CSeq – the request id, a response with the same id will be sent from the server. </li></ul><ul><li>Media URL – the URL of the video. </li></ul><ul><li>Client Player – the user agent of the client. </li></ul>Media URL Client Player Request ID
  9. 9. <ul><li>All RTSP response codes are divided into 5 ranges (RFC 2326 7.1.1) : </li></ul><ul><li>1xx – Informational, 2xx – Success 3xx – Redirection, 4xx – Client Error, 5xx – Server Error. </li></ul><ul><li>CSeq has the same value as the request CSeq field. </li></ul><ul><li>The server response will return the available methods that it supports. </li></ul><ul><li>It May contain any arbitrary data the server want to expose. </li></ul>Response Code Available Options
  10. 10. DESCRIBE is used to retrieve the description of the media URL and the session. The description response MUST contain all media and streaming data needed in order to initialize the session. Fields: Accept - Used to inform the server which description methods the client supports. Session Description Protocol (SDP) is highly used. Notice that CSeq field is increased by one. Description readers
  11. 11. Description readers SDP The response will always return the details of the media. SDP details will be next… The media URL the response is referring to The description method used The length of the SDP message
  12. 12. GET_PARAMETER is used to retrieve information about the stream. The request can be initiated from the Client or from the Server. The request/response message body is left to server/client implementation. The parameters can be: packets received, jitter, bps or any other relevant information about the stream.
  13. 13. SETUP is used to specify the transport details used to stream the media. The request/response message body is left to server/client implementation. The parameters can be: packets received, jitter, bps or any other relevant information about the stream. Transport protocol Unicast/Multicast RTP/RTSP client media port Track ID
  14. 14. SETUP response will contain the session ID. For each track ( audio/video ) a different SETUP request will be made After the response is received, a PLAY request can be made to start receiving the media stream. Transport protocol Unicast/Multicast server option Unicast destination ip Last gateway source ip The client port to receive media data The server port to receive media data
  15. 15. PLAY request tells the server to start send data through the streaming details defined in the SETUP process. PLAY request maybe queued so that a PLAY request arriving while a previous PLAY request is still active is delayed until the first has been completed. Normal Play TIme
  16. 16. Stream URL PAUSE request tells the server to pause the streaming. When the user will want to start the stream again he’ll send a PLAY request to the same URL. The request may contain time information to handle when the pause will take effect.
  17. 17. TEARDOWN stops the stream delivery for the URL specified. Informs the server that the client is disconnecting from it. The response will include only the response code. Description readers
  18. 18. <ul><li>RECORD: </li></ul><ul><ul><li>Initiates recording operation given a time information and stream URL. </li></ul></ul><ul><li>REDIRECT: </li></ul><ul><ul><li>Server to Client request that informs the client he needs to switch the server he connected to. The request will contain the new server URL. </li></ul></ul><ul><li>SET_PARAMETER: </li></ul><ul><ul><li>sends a request to change a value of the presentation stream. The response code will contain the answer. </li></ul></ul><ul><li>ANNOUNCE: </li></ul><ul><ul><li>Can be initiated both by client/server. Informs the recipient that the SDP table of the object has changed. </li></ul></ul>

×