Title: Streaming, RTP, RTSP ITEM, 26feb02, Leif Arne Rnningen
1Streaming, RTP, RTSPITEM, 26feb02, Leif Arne
Rønningen
2Streaming from a Streaming Server to a Media
player
ITEM, 1nov00 Leif Arne Rønningen
3Media Player
- The Media Player shown is a plug-in to the
browser (running native code) or a stand-alone
application, and provides the following - Decompression
- Jitter removal
- Error correction
- GUI Graphical User Interface
4Best-effort Quality of Service - QoS
- Internet today, best-effort delivery service
- No guarantee of
- End-to-end delay
- Delay jitter
- Packet loss
- Packet sequence
- No traffic control
- No admission control
5RTP - Real-time Transport Protocol
- One-way streaming, unicast or multicast of audio
and video in general - The media stream is sent as chunks of data, put
into RTP packets - Each RTP packet header includes stream
identifier, time stamp and sequence number (error
correction) - On top of UDP/IP
- Application and transport layer
- Does not provide Quality of service guarantee
6RTCP RTP Control Protocol
- Used with RTP to monitor the Quality of Service
- Feedback information can be used for adaptive
control of senders output data rates (adaptive
scaling of service profile and level) - On top of UDP/IP
- Does not provide Quality of Service guarantee
7RTSP - Real-time Streaming Protocol
- Application-level protocol for control over the
delivery of data with real-time properties - Media on-demand control, player-server
interaction - Requests and Responses, not memoryless,
HTTP-friendly, supports most HTTP features
new - RTP used for the actual delivery of data (sound,
video) - On top of UDP/IP or TCP/IP
- Does not provide Quality of Service guarantee
8RTSP, example
HTTP GET
Web Browser
Web Server
Description file
SETUP
Media Player
Media Server
PLAY
Media stream
PAUSE
TEARDOWN
9RTSP, description file
lttitlegtTwister/titlegt ltsessiongt ltgroup
languageen lipsyncgt ltswitchgt lttrack
typeaudio ePCMU/8000/1 src
rtsp//audio.example.com/twister/
audio.en/lofigt lttrack typeaudio eDVI4
/16000/2 pt90 DVI4/8000/1 scrrtsp//audio
.example.com/twister/
audio.en/hifigt lt/switchgt lttrack
typevideo/jpeg scrrtsp//video.example.com/
twister/videogt lt/groupgt lt/sessiongt
10Explanation 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.
11RTSP, player-server interaction
Player SETUP rtsp//audio.example.com/twister/aud
io RTSP/1.0 Cseq 1 Transport rtp/udp
compression port3056 modePLAY Server RTSP/1.0
200 OK Cseq 1 Date 23 Jan 2001 174505
GMT Session 42311234 Transport rtp/udp
compression port3056 modePLAY P PLAY
rtsp//audio.example.com/twister/audio.en/lofi
RTSP/1.0 Cseq 2 Session 42311234 Range
npt0- S RTSP/1.0 200 OK Cseq 3 Date 23
Jan 2001 174605 GMT Range npt0-
12RTSP, player-server interaction
P PAUSE rtsp//audio.example.com/twister/audio.en
/lofi RTSP/1.0 Cseq 4 Session
42311234 Range npt37 S RTSP/1.0 200 OK Cseq
4 Date 23 Jan 2001 174705 GMT P TEARDOWN
rtsp//audio.example.com/twister/audio.en/
lofi RTSP/1.0 Cseq 10 Session
42311234 S RTSP/1.0 200 OK Cseq 10
13Explanation The request-response interaction
between Player and Server are HTTP-like, but not
memoryless. A setup has to be performed before
data transfer can take place. The SETUP method is
followed by the RTSP URL (universal resource
locator). Cseq is a sequence number that uniquely
identifies each request-response. The session
number identifies the setup session. The RTP
protocol shall be used, over UDP. The npt
parameter indicates the normal play time in
seconds. The rest should be self-explanatory.
14QuickTime streaming media
- QuickTime
- Browser plug-in, or stand-alone QuickTime Player
- Retrieve streams from QuckTime Streaming Server
- Handles multimedia components like
- video, sound, animation, graphics, text, music,
360-degree virtual reality (VR) scenes - stored in every major format
- Timecode tracks
- RTP and RTSP application protocols
- See www.apple.com/quicktime/ for more details
- QuckTime demo
- rtsp//129.241.26.182/stud/arne/ice_age_hint.mov
15RTSP Media Player-Server, Message Sequence Chart
User Interface
RTSP Player
RTSP Server
OpenURL
SETUP
response1
PLAY
Activate RTP
Activate RTP
response2
audio
PAUSE
response3
Quit
TEARDOWN
response10
16Media Player State-transition diagram
y
x
Wait S2
O
Passive
O
Response2 / Activate RTP
OpenURL / SETUP
Play, RTP
Wait S1
O
O
response1
/ PAUSE
Wait S3
Wait UI1
O
O
response3
/ PLAY
z
y
17Media Player State-transition diagram
z
Wait UI2
O
Quit / TEARDOWN
Wait S10
O
response10
Transition message in / message out, task
x
O other message continue
z
18State Machine Implementation
RTP
State descripton table
Task or method
Queue
State Interpreter
Message out
Message in
State
Software Process (entity)
Note RTP could be implementet as a separate
entity, not as a task
table
19State Interpreter behaviour
- waituntil (at least one message in queue)
- get message from queue
- check message name
- read present state
- read state table (state, message in)
- set next state
- send out message (state, message in)
- activate task or function
20State Description Table
State message in next state message
out task/function Wait UI2 Quit Wait
S10 TEARDOWN ,,, ,,, ,,, ,,, Wait
S2 response2 Play, RTP activate RTP
21Timeouts, retry-counters
Timer
RTSP Player
OpenURL(N3)
SETUP
Set-timer(2, N)
(response1 is lost)
2 sec.
Timeout(2,N)
SETUP
Set-timer(2, N)
(response1 delayed)
2 sec.
Timeout(2,N)
Countdown If N0 then begin N3
StatePassive end else NN-1
response1
22Extended state machine
State descripton table
xyz
xyz
Tasks or methods
Queue
State Interpreter
Message out
Message in
State, Variable N
Next state dependent on value of N
software
table
Note The Timer can be implemented as a task or
as a separate entity
23Other streaming media systems
- RealPlayer
- Sun Java Media Framework
- Microsoft Streaming Media
- MPEG-21 (coming)
- Other
-
-
24QoS guarantee
- Packets have to be classified in different
traffic classes - It is desireable to minimise interference between
traffic flows - Resources like link capacity, storage and
processing units should be utilised efficiently - Call admission control is needed. Admission
requestes from flows have to include QoS
requirements