3 RTP RTCP
3 RTP RTCP
3 RTP RTCP
RTP/RTCP
Overview
History of streaming media
Streaming performance requirements
Protocol stack for multimedia services
Real-time transport protocol(RTP)
RTP control protocol (RTCP)
30 seconds
00.00.00
00.00.10
00.00.20
00.00.30
First RTP-PDU
Second RTP-PDU
application
00.00.11
00.00.21
Third RTP-PDU
00.00.31
Send time
Play time
Reality jitter
delay
00.00.00
00.00.10
First RTP-PDU
00.00.20
Second RTP-PDU
00.00.21
00.00.30
00.00.40
Third RTP
-PDU
Fourth
RTP-P
DU
Send time
00.00.11
00.00.25
00.00.35
00.00.37
00.00.41
00.00.47
00.00.51
Play time
Jitter
(contd.)
00.00.00
00.00.10
First RTP-PDU(0)
00.00.20
Second RTP-PDU(1
0)
00.00.21
00.00.30
00.00.40
Third RTP
-PDU(20)
Fourth
RTP-P
DU
Send time
00.00.11
(30)
00.00.25
00.00.35
00.00.37
00.00.41
00.00.47
00.00.18
00.00.28
00.00.38
00.00.48
00.00.51
Play time
00.00.58
Jitter
(contd.)
Playback buffer
At time 00:00:18
At time 00:00:28
At time 00:00:38
sender
Seq no
.1, Tmp
st 1 0 0
Seq no
.2, Tmp
st 2 0 0
Seq no
.3, Tmp
st 3 0 0
silence
Solution:
Seq no
.4, Tmp
st 6 0 0
Seq no
.5, Tmp
st 700
receiver
RTSP
RTP
RTCP
TCP
(till now)
RTP: Introduction
All RTP and RTCP PDUs are sent to same multicast group
(by all participants)
All RTP PDUs sent to an even-numbered UDP port, 2p
All RTCP PDUs sent to UDP port 2p+1
Transport
layer
Application
RTP RTCP
UDP
IP
Data Link
Physical
RTP Session
(used by mixers)
Mixer
RTP mixer - an intermediate system that receives & combines
RTP PDUs of one or more RTP sessions into a new RTP PDU
Translator
An intermediate system that
Connects two or more networks
Multicasting through a firewall
Modifies stream encoding, changing the streams timing
Transparent to participants
SSRCs remain intact
end system 1
from ES1: SSRC=6
from ES2: SSRC=23
end system 2
transl.1
authorized tunnel
firewall
transl.2
from ES1: SSRC=6
from ES2: SSRC=23
diagnostics purposes
RC
PT=200/201 SR/RR
SSRC of Sender
Header
Sender
Info
Report
Block 1
Last SR (LSR)
Delay Since Last SR (DLSR)
SSRC_2 (SSRC of the 2nd Source)
Profile-Specific Extensions
Report
Block 2
Basic header
header of SR report
sender info
SDES items
Internetwork
Timestamps in RTP PDUs are tied to the individual video and audio sampling clocks
timestamps are not tied to the wall-clock time, or each other!
Each RTCP sender-report PDU contains (for most recently generated PDU in
associated RTP stream):
The timestamp of RTP PDU
The wall-clock time for when PDU was created
Receivers can use this association to synchronize the playout of audio and video
Example
Suppose one sender, sending
video at a rate of 2 Mbps. Then
RTCP attempts to limit its traffic
to 100 Kbps.
The 75 kbps is equally shared
among receivers:
With R receivers, each
receiver gets to send RTCP
traffic at 75/R kbps.
Sender gets to send RTCP traffic
at 25 kbps.
RTSP Overview
Web Server
web
browser
HTTP
presentation descriptor
Presentation
descriptor
media
player
RTP/RTCP
audio/video content
RTSP Methods
OPTIONS
CS
CS
DESCRIBE
CS
ANNOUNCE
CS
SETUP
CS
RECORD
CS
PLAY
CS
PAUSE
CS
REDIRECT
CS
TEARDOWN
CS
immediate teardown
SET_PARAMETER
CS
GET_PARAMETER
CS
RTSP Session
Default port
554
RTSP SETUP
RTSP OK
RTSP
server
RTSP PLAY
RTSP OK
RTSP TEARDOWN
RTSP OK
TCP
RTSP
client
data
source
RTP VIDEO
RTP AUDIO
RTCP
media server
choose
UDP port
UDP
AV
subsyste
m
media player
Media server A
audio.example.com
Media server V
video.example.com
Client C
Web server W
-holds the media descriptors
W
V
C
(contd.)
W
V->C: RTSP/1.0 200 OK
Cseq: 2
Session: 23456789
RTP-Info: url=rtsp://video.example.com/twister/video;
seq=12312232;
V
C
(contd.)
V
C->V: TEARDOWN rtsp://video.example.com/twister/video RTSP/1.0
Cseq: 3
Session: 23456789
V->C: RTSP/1.0 200 OK
Cseq: 3
References
[1] B. A. Forouzan, TCP/IP Protocol Suite,
Third edition,
[2] H. Schulzrinne, S. Casner, R. Frederick and V.
Jacobson, "RTP: a transport protocol for real-time
applications", RFC 3550, July 2003.
[3] H. Schulzrinne, A. Rao and R. Lanphier, "Real Time
Streaming Protocol (RTSP)", RFC 2326, April 1998.
receiver
report
source 3
SDES
compound PDU
(single UDP datagram)
SSRC
receiver
report
source 2
RTCP PDU 2
SSRC
sender
report
SSRC
SR
SSRC
RTCP PDU 1
CNAME PHONE
Example
source 1 reports, there are 2 other sources
receiver
report
source 2
receiver
report
source 3
SSRC
sender
report
SSRC
SR
SSRC
RTCP PDU
CNAME=1
length
Value
1
2
3
4
5
6
7
8