real time streaming protocol l.
Download
Skip this Video
Loading SlideShow in 5 Seconds..
Real Time Streaming Protocol PowerPoint Presentation
Download Presentation
Real Time Streaming Protocol

Loading in 2 Seconds...

play fullscreen
1 / 21

Real Time Streaming Protocol - PowerPoint PPT Presentation


  • 199 Views
  • Uploaded on

Real Time Streaming Protocol. Akshat Sikarwar Columbia University November 12, 2008. Overview. Introduction Protocol properties RTSP messages Important messages. Introduction. RTSP is like a network remote control for multimedia servers

loader
I am the owner, or an agent authorized to act on behalf of the owner, of the copyrighted work described.
capcha
Download Presentation

PowerPoint Slideshow about 'Real Time Streaming Protocol' - ting


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.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.


- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -
Presentation Transcript
real time streaming protocol

Real Time Streaming Protocol

Akshat Sikarwar

Columbia University

November 12, 2008

overview
Overview
  • Introduction
  • Protocol properties
  • RTSP messages
  • Important messages
introduction
Introduction
  • RTSP is like a network remote control for multimedia servers
  • RTSP establishes and controls streams of continuous media
  • Streaming data is carried out of band (interleaving is possible)
protocol properties
Protocol Properties
  • RTSP is text based and HTTP like
  • Transport independent (can use UDP or TCP)
  • Unlike HTTP commands can be sent in either direction
  • RTSP is a stateful protocol. Server maintains session state.
rtsp connections
RTSP Connections
  • RTSP messages can be sent over:
    • One persistent transport connection for several request-response transactions
    • One connection per transaction
    • Connectionless mode
  • Transport connection != Session
  • Server can send message to client only in persistent connection
rtsp reliability
RTSP Reliability
  • If using reliable transport message is sent just once.
  • If using unreliable transport, RTSP will retransmit if it does not receive ACK
  • Timeout is initially set to 500 ms
  • Can re-compute timeout based on RTT like TCP
  • For retransmission CSeq is not incremented
  • Timestamp is used to overcome retransmission ambiguity problem
rtsp uri
RTSP URI

rtsp://media.example.com:554/twister/audio

  • rtspidentifies reliable protocol
  • rtspuidentifies unreliable protocol
  • Default port is 554
  • Presentation: twister
  • Stream: audio
rtsp message
RTSP Message
  • Text based messages
  • Messages use Unicode (ISO 10646) character set encoded using UTF-8
  • Lines are terminated by CRLF
  • Messages can be request or response by either client or server
  • Message structure is HTTP like
request message
Request Message

Method URI Version CRLF

Header1:Value CRLF

Header2:Value CRLF

CRLF

Body

  • First line is Request line
  • URI is always absolute (unlike HTTP)
  • URI can be *
    • Example OPTIONS * RTSP/1.0
response message
Response Message

Version Status-Code Reason-Phrase CRLF

  • Status-Codes are HTTP like
    • 1xx: Informational
    • 2xx: Success
    • 3xx: Redirection
    • 4xx: Client error
    • 5xx: Server error
  • Reason-Phrase is the textual description
rtsp at work
RTSP at Work

HTTP GET

Client

Web server

Session description

Media server

PLAY

RTP

RTCP

PAUSE

CLOSE

From http://www.cs.columbia.edu/~hgs/teaching/ais/slides/2003/RTSP.pdf

rtsp methods
RTSP Methods
  • DESCRIBE Get (low level) description of media object
  • OPTIONS Get available methods
  • SETUP Establish transport
  • PLAY Start playback, reposition
  • PAUSE Halt delivery, but keep state
  • RECORD Start recording
  • ANNOUNCE Change description of media object
  • REDIRECT Redirect client to new server
  • GET_PARAMETER Retrieves presentation parameter value
  • SET_PARAMETER Sets presentation parameter value
  • TEARDOWN Remove state

From http://www.cs.columbia.edu/~hgs/teaching/ais/slides/2003/RTSP.pdf

method summary
Method Summary

From RFC 2326

messages in action
Messages in Action

Following messages play central role:

  • SETUP
  • PLAY
  • PAUSE
  • TEARDOWN
setup
SETUP
  • Specifies the transport mechanism to be used for the streamed media
  • Transport header specifies the transport parameters acceptable to the client
  • Response contains transport parameters selected by the server
  • Server generates session identifiers in response to SETUP requests
  • Client can issue SETUP to change parameters for already streaming media
setup message
SETUP Message

Client -> Server:

SETUP rtsp://example.com/foo/bar/baz.rm RTSP/1.0

CSeq: 302

Transport: RTP/AVP;unicast;client_port=4588-4589

Server -> Client:

RTSP/1.0 200 OK

Cseq: 302

Date: 23 Jan 1997 15:35:06 GMT

Session: 47112344

Transport: RTP/AVP;unicast;

client_port=4588-4589;server_port=6256-6257

From RFC 2326

slide17
PLAY
  • Tells server to start sending data via mechanism specified in SETUP
  • Plays from beginning to end of range specified
  • Pauses at end as if PAUSE has been issued
  • Requests may be pipelined
  • Range header can have time parameter
  • Legal to have PLAY without Range header
  • Scale header can be used to change viewing rate
    • Can be used for fast forward or rewind
play message
PLAY Message

Client -> Server:

PLAY rtsp://audio.example.com/twister.en RTSP/1.0

CSeq: 833

Session: 12345678

Range: smpte=0:10:20-;time=19970123T153600Z

Server -> Client:

RTSP/1.0 200 OK

CSeq: 833

Date: 23 Jan 1997 15:35:06 GMT

Range: smpte=0:10:22-;time=19970123T153600Z

From RFC 2326

pause
PAUSE
  • Causes stream delivery to halt
  • Can pause entire presentation or selected stream
  • Server resources continue to be reserved
  • Server will terminate session after timeout period expires (specified in SETUP)
  • Can contain Range header with one value to specify when to pause
  • Must fall in one of the PLAY ranges
teardown
TEARDOWN
  • Stops delivery of stream
  • Frees up resources on the server
  • Can stop single stream or entire presentation
  • Example

Client -> Server:

TEARDOWN rtsp://example.com/fizzle/foo RTSP/1.0

CSeq: 892

Session: 12345678

Server -> Client:

RTSP/1.0 200 OK

CSeq: 892

references
References
  • RFC 2326
  • Internet Media on Demand : The Real Time Streaming Protocol: http://www.cs.columbia.edu/~hgs/teaching/ais/slides/2003/RTSP.pdf
  • RTSP: FAQ http://www.cs.columbia.edu/~hgs/rtsp/faq.html