1
Real-Time Traffic
over the Internet
Chuan-Ming Liu
CSIE,NTUT
Spring ’04,TAIWAN
2
Real-time multimedia traffic
3
Real-Time Transport Protocol
Real-time traffic v.s,multimedia traffic
Real-time communication is the almost
simultaneous production and use of the
data,ignoring the short delay in
transmission.
4
Example 1
An example of non-real-time multimedia
traffic is the downloading of a video from
the Interne which has already been made.
5
Example 2
Consider a video conference in which a
camera is connected to a server that
transmits video information as it is produced.
6
Streaming Services
Unlike applications that transfer a fixed
amount of data in each request or
response,a streaming service provides a
continuous,arbitrarily long stream of data
The stream of data is neither limited in
size nor in the time it takes to transfer
The stream is theoretically infinite,or
persists for a long time (hours)
7
Real-Time Delivery
An application is classified as real-time
if the data must be delivered with
exactly the same time relationship as it
was created
Streaming is often linked to real-time
delivery because applications such as
audio and video that are appropriate for
streaming require real-time delivery
8
Real-Time Delivery (cont.)
Two aspects to real-time delivery that
protocol software is required to handle:
Order,Incoming data must be played in exactly
the same order it was created
Time,To create an exact reproduction of the
input signal,a receiver must know the exact
time at which each packet was produced; the
receiver converts the data back to analog forms,
and plays each piece of analog output at exactly
the time that piece occurred in the input
9
Contents
Characteristics
RTP
RTCP
10
Characteristics
Time relationship:
real-time data requires the preservation
of the time relationship between packets
of a session
Jitter is introduced in real-time data by
the delay between packets and can be
solved using
Timestamp
Playback buffer
11
Time Relationship
12
Jitter
13
Timestamp
Each packet has a timestamp that shows
the time it was produced relative to the
first (or previous) packet
The receiver can add this time to the time
it starts the playback (playing the stream)
14
Timestamp
15
Figure 28-7 Playback buffer
16
Playback Buffer
A buffer to store the data until they are played
back
The receiver delays playing the data until a
threshold is reached
Data are stored at a possibly variable rate
Data are played back at a fixed rate
Whenever the buffer is not empty,there is no
jitter
17
Ordering
Each packet also has a sequence number
Only using the timestamp is not enough
18
Why Sequence No,and Timestamp
Separates packet handling from data
playback timing
Two successive packets can have the same
timestamp (e.g.,sending stereo by
alternating between sending samples from
the left channel and samples from the right
channel)
Helps when the data encodings that do
not transmit data when the input is idle
19
Stream Translation and Mixing
RTP allows two or more streams of data to
be mixed (i.e.,combined into a single
stream) or a stream to be translated (i.e.,
have the encoding changed)
Translation means changing the encoding
of a payload to a lower quality to match the
bandwidth of the receiving network
20
Support from Transport Layer
Protocol
RTP does not use the IP directly but is
via the transport layer protocol
TCP is not suitable for real-time
multimedia traffic because we cannot
allow retransmission of packets
UDP is more suitable
For real-time transport,we need the
services of RTP,another transport layer
protocol to make up the deficiencies of
UDP.
21
RTP
22
Real-Time Transport Protocol
In the Internet,the Real-time Transport
Protocol (RTP ) handles the problems of
order and time
To remain general to support a variety of
applications,RTP defines a small,fixed
header that must be present at the
beginning of each packet,and then
allows each application to specify the
remaining packet details,data encoding,
and semantics
23
Real-Time Transport Protocol
(cont.)
The initial sequence number for a session
is chosen at random for two reasons:
To avoid replay,a problem in which packets
delayed in the network from one session are
accepted as part of a later session
To increase security by making it difficult
for attackers to guess sequence information
24
Header Format
25
Real-Time Transport Protocol
(cont.)
Synchronization Source Identifier:
If there is only one source,this 32-bit field
defines the source
If there are several sources,the mixer is the
synchronization source and the other sources are
contributors
Contributor Identifiers:
Each of these 32-bit identifiers defines a source
Maximum of 15 identifiers
RTP uses a temporary even-numbered UDP
port.
26
RTP Control Protocol (RTCP)
Although RTP provides information that a
receiver needs to recreate real-time output,the
header does not contain fields that allow
endpoints to control the transmission or
communicate meta-information
Meta-information is important when some
real-time encodings are adaptive (e.g.,an
alterative encoding is used when the
underlying network experiences high packet
loss)
27
RTP Control Protocol (RTCP)
(cont.)
RTP uses a separate,companion protocol
for all communication about the session,
known as RTCP
When using RTCP,receivers monitor the
performance of the underlying network,
and communication back to the sender
In addition,RTCP allows senders to
provide information about each session
28
RTP Control Protocol (RTCP)
(cont.)
Each RTCP packet begins with a fixed header
and the format of the rest of the packet is
determined by PTYPE (packet type)
The Data Area of the packet consists of a
sequence of report records,and the 5-bit RC
contains a Report Count that specifies the
number of reports following the header
RTCP uses an odd-numbered UDP port
number that follows the port number selected
for RTP
29
RTCP Header
30
RTCP Message Types
Real-Time Traffic
over the Internet
Chuan-Ming Liu
CSIE,NTUT
Spring ’04,TAIWAN
2
Real-time multimedia traffic
3
Real-Time Transport Protocol
Real-time traffic v.s,multimedia traffic
Real-time communication is the almost
simultaneous production and use of the
data,ignoring the short delay in
transmission.
4
Example 1
An example of non-real-time multimedia
traffic is the downloading of a video from
the Interne which has already been made.
5
Example 2
Consider a video conference in which a
camera is connected to a server that
transmits video information as it is produced.
6
Streaming Services
Unlike applications that transfer a fixed
amount of data in each request or
response,a streaming service provides a
continuous,arbitrarily long stream of data
The stream of data is neither limited in
size nor in the time it takes to transfer
The stream is theoretically infinite,or
persists for a long time (hours)
7
Real-Time Delivery
An application is classified as real-time
if the data must be delivered with
exactly the same time relationship as it
was created
Streaming is often linked to real-time
delivery because applications such as
audio and video that are appropriate for
streaming require real-time delivery
8
Real-Time Delivery (cont.)
Two aspects to real-time delivery that
protocol software is required to handle:
Order,Incoming data must be played in exactly
the same order it was created
Time,To create an exact reproduction of the
input signal,a receiver must know the exact
time at which each packet was produced; the
receiver converts the data back to analog forms,
and plays each piece of analog output at exactly
the time that piece occurred in the input
9
Contents
Characteristics
RTP
RTCP
10
Characteristics
Time relationship:
real-time data requires the preservation
of the time relationship between packets
of a session
Jitter is introduced in real-time data by
the delay between packets and can be
solved using
Timestamp
Playback buffer
11
Time Relationship
12
Jitter
13
Timestamp
Each packet has a timestamp that shows
the time it was produced relative to the
first (or previous) packet
The receiver can add this time to the time
it starts the playback (playing the stream)
14
Timestamp
15
Figure 28-7 Playback buffer
16
Playback Buffer
A buffer to store the data until they are played
back
The receiver delays playing the data until a
threshold is reached
Data are stored at a possibly variable rate
Data are played back at a fixed rate
Whenever the buffer is not empty,there is no
jitter
17
Ordering
Each packet also has a sequence number
Only using the timestamp is not enough
18
Why Sequence No,and Timestamp
Separates packet handling from data
playback timing
Two successive packets can have the same
timestamp (e.g.,sending stereo by
alternating between sending samples from
the left channel and samples from the right
channel)
Helps when the data encodings that do
not transmit data when the input is idle
19
Stream Translation and Mixing
RTP allows two or more streams of data to
be mixed (i.e.,combined into a single
stream) or a stream to be translated (i.e.,
have the encoding changed)
Translation means changing the encoding
of a payload to a lower quality to match the
bandwidth of the receiving network
20
Support from Transport Layer
Protocol
RTP does not use the IP directly but is
via the transport layer protocol
TCP is not suitable for real-time
multimedia traffic because we cannot
allow retransmission of packets
UDP is more suitable
For real-time transport,we need the
services of RTP,another transport layer
protocol to make up the deficiencies of
UDP.
21
RTP
22
Real-Time Transport Protocol
In the Internet,the Real-time Transport
Protocol (RTP ) handles the problems of
order and time
To remain general to support a variety of
applications,RTP defines a small,fixed
header that must be present at the
beginning of each packet,and then
allows each application to specify the
remaining packet details,data encoding,
and semantics
23
Real-Time Transport Protocol
(cont.)
The initial sequence number for a session
is chosen at random for two reasons:
To avoid replay,a problem in which packets
delayed in the network from one session are
accepted as part of a later session
To increase security by making it difficult
for attackers to guess sequence information
24
Header Format
25
Real-Time Transport Protocol
(cont.)
Synchronization Source Identifier:
If there is only one source,this 32-bit field
defines the source
If there are several sources,the mixer is the
synchronization source and the other sources are
contributors
Contributor Identifiers:
Each of these 32-bit identifiers defines a source
Maximum of 15 identifiers
RTP uses a temporary even-numbered UDP
port.
26
RTP Control Protocol (RTCP)
Although RTP provides information that a
receiver needs to recreate real-time output,the
header does not contain fields that allow
endpoints to control the transmission or
communicate meta-information
Meta-information is important when some
real-time encodings are adaptive (e.g.,an
alterative encoding is used when the
underlying network experiences high packet
loss)
27
RTP Control Protocol (RTCP)
(cont.)
RTP uses a separate,companion protocol
for all communication about the session,
known as RTCP
When using RTCP,receivers monitor the
performance of the underlying network,
and communication back to the sender
In addition,RTCP allows senders to
provide information about each session
28
RTP Control Protocol (RTCP)
(cont.)
Each RTCP packet begins with a fixed header
and the format of the rest of the packet is
determined by PTYPE (packet type)
The Data Area of the packet consists of a
sequence of report records,and the 5-bit RC
contains a Report Count that specifies the
number of reports following the header
RTCP uses an odd-numbered UDP port
number that follows the port number selected
for RTP
29
RTCP Header
30
RTCP Message Types