rtsp analysis wireshark
Post on 21-May-2015
16.726 Views
Preview:
DESCRIPTION
TRANSCRIPT
www.dsp-ip.comFast Forward Your Development
RTSP SDP Wireshark Analysis
www.dsp-ip.comFast Forward Your Development
•Real Time Streaming Protocol
•Used for controlling streaming data over the web.
•Designed to efficiently broadcast audio/video-on-demand to large groups.
•Using Directives to control the stream▫Options, Describe, Setup, Play, Pause,
Record, Teardown.
www.dsp-ip.comFast Forward Your Development
• Describes the metadata of the stream.• Mainly used in: SIP, RTSP and other Multicast
sessions. • Sample SDP description:
▫ v=0 ▫ o=jdoe 2890844526 2890842807 IN IP4 10.47.16.5 ▫ s=SDP Seminar ▫ i=A Seminar on the session description protocol u=
http://www.example.com/seminars/sdp.pdf e=j.doe@example.com (Jane Doe)
▫ c=IN IP4 224.2.17.12/127 ▫ t=2873397496 2873404696 ▫ a=recvonly ▫ m=audio 49170 RTP/AVP 0 ▫ m=video 51372 RTP/AVP 99 ▫ a=rtpmap:99 h263-1998/90000
Session IDSession ID
Protocol VersionProtocol Version
Session NameSession Name
Session Info.Session Info.
Description URI Description URI
Connection Info.Connection Info.
Active session timeActive session time
Session Attribute linesSession Attribute lines
Media Name and Transport addressMedia Name and Transport address
Media Attribute linesMedia Attribute lines
www.dsp-ip.comFast Forward Your Development
Web
Browser
Media
Player
Media
Server
Web
Server
ClientClient ServerServer
HTTP GETHTTP GET
Stream URIStream URI
SETUPSETUP
PLAYPLAY
RTP Media Stream
RTP Media Stream
PAUSEPAUSE
TEARDOWNTEARDOWN
DESCRIBEDESCRIBE
OPTIONSOPTIONS
RTP Media Stream
RTP Media Stream
SDP InformationSDP Information
www.dsp-ip.comFast Forward Your Development
•version▫The version of rtsp. (RTSP/1.0)
•URL[rtsp/rtspu]://host:port/path
*port – the actual stream will be delivered in other port
Reliable protocol (TCP)
Reliable protocol (TCP)
unreliable protocol (UDP)
unreliable protocol (UDP)
legal domain
name or IP address
legal domain
name or IP address
port used to control the stream
port used to control the stream
the server stream path
the server stream path
www.dsp-ip.comFast Forward Your Development
• Session ID ▫ Generated by the server▫ Stays constant for the entire session
• SMPTE – Relative timestamp▫ A relative time from the beginning of the stream.▫ Nested types: smpte-range, smpte-type, smpte-time.▫ smpte-25=(starttime)-(endtime)
• UTC – Absolute time▫ Absolute time using GMT.▫ Nested types: utc-range, utc-time. utc-date▫ utc-time = (utcdate)T(utctime).(fraction)Z
• NPT - Normal Play Time▫ Absolute position from the beginning of the presentation.▫ npt=123.45-125
www.dsp-ip.comFast Forward Your Development
InitiationInitiation
HandlingHandling
TerminationTermination
www.dsp-ip.comFast Forward Your Development
OPTIONS – Request for information about the communication options available by
the Request-URI.
• CSeq – the request id, a response with the same id will be sent from the server.
•Media URL – the URL of the video.
•Client Player – the user agent of the client.
Media URLMedia URL
Client PlayerClient Player
Request IDRequest ID
www.dsp-ip.comFast Forward Your Development
• All RTSP response codes are divided into 5 ranges (RFC 2326 7.1.1) :
1xx – Informational, 2xx – Success 3xx – Redirection, 4xx – Client Error, 5xx – Server Error.
CSeq has the same value as the request CSeq field.
• The server response will return the available methods that it supports.
It May contain any arbitrary data the server want to expose.
Response CodeResponse Code
Available Options
Available Options
www.dsp-ip.comFast Forward Your Development
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 readersDescription readers
www.dsp-ip.comFast Forward Your Development
Description readersDescription readers
SDPSDP
The response will always return the details of the media.
SDP details will be next…
The media URL the response is referring toThe media URL the response is referring to
The description method usedThe description method used
The length of the SDP messageThe length of the SDP message
www.dsp-ip.comFast Forward Your Development
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.
www.dsp-ip.comFast Forward Your Development
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 protocolTransport protocol Unicast/MulticastUnicast/Multicast RTP/RTSP client media port
RTP/RTSP client media port
Track IDTrack ID
www.dsp-ip.comFast Forward Your Development
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
Transport protocol
Unicast/Multicastserver option
Unicast/Multicastserver option
Unicast destination ip
Unicast destination ip
Last gateway source ip
Last gateway source ip
The client port to receive
media data
The client port to receive
media data
The server port to receive
media data
The server port to receive
media data
www.dsp-ip.comFast Forward Your Development
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
Normal Play TIme
www.dsp-ip.comFast Forward Your Development
Stream URLStream 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.
www.dsp-ip.comFast Forward Your Development
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 readersDescription readers
www.dsp-ip.comFast Forward Your Development
• RECORD: ▫ Initiates recording operation given a time
information and stream URL.
• REDIRECT: ▫ 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.
• SET_PARAMETER: ▫ sends a request to change a value of the
presentation stream.The response code will contain the answer.
• ANNOUNCE: ▫ Can be initiated both by client/server. Informs the
recipient that the SDP table of the object has changed.
top related