Real Time Streaming Protocol - PowerPoint PPT Presentation

1 / 21
About This Presentation
Title:

Real Time Streaming Protocol

Description:

Lines are terminated by CRLF. Messages can be request or response by either client or server ... Status-Code Reason-Phrase CRLF. Status-Codes are HTTP like ... – PowerPoint PPT presentation

Number of Views:59
Avg rating:3.0/5.0
Slides: 22
Provided by: akshats
Category:

less

Transcript and Presenter's Notes

Title: Real Time Streaming Protocol


1
Real Time Streaming Protocol
  • Akshat Sikarwar
  • Columbia University
  • November 12, 2008

2
Overview
  • Introduction
  • Protocol properties
  • RTSP messages
  • Important messages

3
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)

4
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.

5
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

6
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

7
RTSP URI
  • rtsp//media.example.com554/twister/audio
  • rtsp identifies reliable protocol
  • rtspu identifies unreliable protocol
  • Default port is 554
  • Presentation twister
  • Stream audio

8
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

9
Request Message
  • Method URI Version CRLF
  • Header1Value CRLF
  • Header2Value CRLF
  • CRLF
  • Body
  • First line is Request line
  • URI is always absolute (unlike HTTP)
  • URI can be
  • Example OPTIONS RTSP/1.0

10
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

11
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
12
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
13
Method Summary
From RFC 2326
14
Messages in Action
  • Following messages play central role
  • SETUP
  • PLAY
  • PAUSE
  • TEARDOWN

15
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

16
SETUP Message
  • Client -gt Server
  • SETUP rtsp//example.com/foo/bar/baz.rm RTSP/1.0
  • CSeq 302
  • Transport RTP/AVPunicastclient_port4588-4589
  • Server -gt Client
  • RTSP/1.0 200 OK
  • Cseq 302
  • Date 23 Jan 1997 153506 GMT
  • Session 47112344
  • Transport RTP/AVPunicast
  • client_port4588-4589server_port6256-6257

From RFC 2326
17
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

18
PLAY Message
  • Client -gt Server
  • PLAY rtsp//audio.example.com/twister.en RTSP/1.0
  • CSeq 833
  • Session 12345678
  • Range smpte01020-time19970123T153600Z
  • Server -gt Client
  • RTSP/1.0 200 OK
  • CSeq 833
  • Date 23 Jan 1997 153506 GMT
  • Range smpte01022-time19970123T153600Z

From RFC 2326
19
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

20
TEARDOWN
  • Stops delivery of stream
  • Frees up resources on the server
  • Can stop single stream or entire presentation
  • Example
  • Client -gt Server
  • TEARDOWN rtsp//example.com/fizzle/foo RTSP/1.0
  • CSeq 892
  • Session 12345678
  • Server -gt Client
  • RTSP/1.0 200 OK
  • CSeq 892

21
References
  • RFC 2326
  • Internet Media on Demand The Real Time
    Streaming Protocol http//www.cs.columbia.edu/hg
    s/teaching/ais/slides/2003/RTSP.pdf
  • RTSP FAQ http//www.cs.columbia.edu/hgs/rtsp/faq
    .html
Write a Comment
User Comments (0)
About PowerShow.com