You are on page 1of 42

CCM 4300 L

Lecture
t
10
Computer Networks, Wireless
and Mobile Communications
Dr Shahedur Rahman
School of Science and Technology

Multimedia Networking

Recap Last Lesson


- Principles of network security:
Definition of security services
Confidentiality
Authentication
Access
A
Control
C t l
What are Security mechanisms
The description of security threats
Firewalls
IDS

Multimedia Networking

Lesson objectives
Principles of Multimedia, QOS, Streaming

Concepts
Real
Real Time Interactive Media and Applications
Multimedia over Internet
Content
Content Distribution Network (CDN)
Real Time Protocols
Multiple
Mult ple Classes of Service
Serv ce
Scheduling

Multimedia Networking

Multimedia and Quality of Service:


Service What is it?
multimedia applications:
network audio and video
(continuous media)

QoS
network provides
application with level of
performance needed for
application to function.
Multimedia Networking

MM Networking
g Applications
pp
Classes of MM appl
applications:
cat ons
1) stored streaming
2) live streaming
3) interactive, real-time

Fundamental
characteristics:
typically delay sensitive
end-to-end delay
delay jitter

Jitter is the
h variability
bl
of packet delays within
the same packet stream

lloss tolerant:
t l
nt: infrequent
inf
nt
losses cause minor
glitches
antithesis of data, which
are loss intolerant but
delay tolerant.

Multimedia Networking

Streaming Stored Multimedia

Stored streaming:
med
media
a stored at source
transmitted to client
streaming: client playout begins
before all data has arrived

timing
m g constraint for
f still-to-be
transmitted data: in time for playout

Multimedia Networking

Streaming Stored Multimedia:


What is it?

1. video
recorded

2. video
2
sent
network
d l
delay

3. video received,
played out at client
time

streaming: at this time, client


playing out early part of video,
while server still sending later
part of video
Multimedia Networking

Streaming
g Stored Multimedia: Interactivity
y

VCR-like functionality: client can


pause, rewind, FF, push slider bar
10 sec initial delay OK
1-2 sec until command effect OK
timing constraint for still-to-be
transmitted data:
data in time for playout
Multimedia Networking

Streaming
g Live Multimedia
Examples:
p
Internet radio talk show
live sporting
p
g event
Streaming (as with streaming stored multimedia)
playback buffer
playback can lag tens of seconds after
transmission
still have timing constraint
Interactivity
y
fast forward impossible
r
rewind,
wn ,p
pause
u p
possible!
Multimedia Networking

Real-Time Interactive Multimedia

applications: IP telephony
telephony,
video conference, distributed
interactive worlds
end-end delay requirements:
audio: < 150 msec good, < 400 msec OK
includes application-level (packetization) and network
delays
higher delays noticeable,
noticeable impair interactivity

session initialization
IP address
address, port number
number, encoding algorithms
Multimedia Networking

10

Multimedia Over Todays


Today s Internet
TCP/UDP/IP: best
best-effort
effort service
service

no guarantees on delay, loss

But you said multimedia apps requires ?


Q S and
QoS
d llevell of
f performance
f m
tto b
be
?
? effective!
?

Todays
y Internet multimedia applications
pp
use application-level techniques to mitigate
(as best possible) effects of delay, loss
Multimedia Networking

11

How should the Internet evolve to better


support multimedia?
Integrated services philosophy:
fundamental changes in
Internet so that apps can
reserve end-to-end
end to end
bandwidth
requires new, complex
software
ft
iin h
hosts
t & routers
t
Laissez-faire
no major changes
more bandwidth when
needed
content distribution,
application-layer multicast
application
pp
layer
y

Differentiated services
philosophy:
fewer changes to Internet
infrastructure yet provide
infrastructure,
1st and 2nd class service

Whats your opinion?


Multimedia Networking

12

A few words about audio compression


p

analog
g signal
g
sampled
p
at constant rate
telephone: 8,000
samples/sec
l /
CD music: 44,100
samples/sec
p

each sample quantized,


i.e., rounded
e.g., 28=256 possible
quantized values

each quantized value


represented by bits
8 bits for 256 values

example:
p 8,000
,
samples/sec, 256
quantized values -->
64 000 b
64,000
bps
receiver converts bits
back to analog signal:
some quality reduction

Example rates
CD: 1.411 Mbps
MP3: 96,
96 128,
128 160 kbps
Internet telephony:
5 3 kbps and up
5.3
Multimedia Networking

13

A few words about video compression


p

video: sequence
q
of
images displayed at
constant rate
e.g. 24 images/sec

digital image: array of


pixels
each pixel represented
by
y bits

redundancy
spatial (within image)
temporal (from one image
to next)

Examples:
p
MPEG 1 (CD-ROM) 1.5
Mbps
MPEG2 (DVD) 3-6 Mbps
MPEG4 (often used in
Internet, < 1 Mbps)
Research:
layered (scalable) video
adapt layers to available
b d idth
bandwidth

Multimedia Networking

14

Streaming
g Stored Multimedia
application-level streaming
techniques for making the
best out of best effort
service:
client-side buffering
use of UDP versus TCP
multiple encodings of
multimedia

Media Player

jitter removal
decompression
error concealment
graphical user interface
w/ controls for
interactivity

Multimedia Networking

15

Internet multimedia: simplest


p
approach
pp

audio or video stored in file


files transferred as HTTP object
rreceived
c
in
n entirety
nt r ty at c
client
nt
then passed to player

audio, video not streamed:


no, pipelining, long delays until playout!
Multimedia Networking

16

Internet multimedia: streaming


g approach
pp

browser GETs metafile


browser launches player,
player passing metafile
player contacts server
server streams audio/video to player
Multimedia Networking

17

Streaming
g from a streaming
g server

allows for non-HTTP p


protocol between server,, media
player
UDP or TCP for step (3)
Multimedia Networking

18

Streaming
g Multimedia: Client Buffering
g

variable
network
d l
delay

client video
reception

constant bit
rate video
playout at client

buffe
ered
video

constant
t t bit
rate video
transmission

time

client playout
delay

client-side buffering, playout delay compensate


for network-added delay, delay jitter
Multimedia Networking

19

Streaming
g Multimedia: UDP or TCP?
UDP

server sends
d att rate
t appropriate
i t f
for client
li t ((oblivious
bli i
tto
network congestion !)
often
f
send rate = encoding
g rate = constant rate
then, fill rate = constant rate - packet loss
short playout delay (2-5 seconds) to remove network jitter
error recover: time permitting

TCP

send
d att maximum
i
possible
ibl rate
t under
d TCP
fill rate fluctuates due to TCP congestion control
larger playout delay: smooth TCP delivery rate
HTTP/TCP passes more easily through firewalls

Multimedia Networking

20

Streaming Multimedia: client rate(s)


1.5 Mbps encoding

28.8 Kbps encoding

Q: how to handle different client receive rate


capabilities?
28.8 Kbps dialup
100 Mbps Eth
Ethernet
n t
A: server stores, transmits multiple copies
of video,
video encoded at different rates
Multimedia Networking

21

Real time interactive applications


Real-time

PC-2-PC
PC
2 PC phone
Skype
PC 2 phone
PC-2-phone
Dialpad
Net2phone
Skype
videoconference
id
nf
n with
ith
webcams
Skype
Polycom
Multimedia Networking

22

Interactive
Interact
ve Mult
Multimedia:
med a Internet Phone
hone
Introduce Internet Phone by
y way
y of an example
p

speakers audio: alternating talk spurts, silent


p
periods.
64 kbps during talk spurt
pkts generated only during talk spurts
20 msec chunks at 8 Kbytes/sec: 160 bytes
data

application-layer header added to each chunk.

chunk+header encapsulated into UDP segment.

application
pp
sends UDP segment
g
into socket every
y
20 msec during talkspurt
Multimedia Networking

23

Internet Phone: Packet Loss and Delay

network loss: IP datagram


g
lost due to network
congestion (router buffer overflow)
delay loss: IP datagram arrives too late for
playout
l
at receiver
delays: processing, queueing in network; endsystem
t
((sender,
d
receiver)
i
)d
delays
l
typical maximum tolerable delay: 400 ms
l
loss
tolerance:
t l
d
depending
di on voice
i encoding,
di
llosses
concealed, packet loss rates between 1% and 10%
can be tolerated
tolerated.

Multimedia Networking

24

Delay
y Jitter

variable
network
d l
delay
(jitter)

client
reception

constant bit
rate p
playout
y
at client

buffe
ered
datta

constant
t t bit
rate
transmission

time

client playout
delay

consider end-to-end delays of two consecutive


packets: difference can be more or less than 20
msec (transmission time difference)
Multimedia Networking

25

Recovery from packet loss


Forward Error Correction
(FEC): simple scheme
(FEC)
for every group of n
chunks create redundant
chunk by exclusive OR-ing
n original chunks
send out n+1 chunks,
increasing bandwidth by
factor 1/n.
1/n
can reconstruct original n
chunks if at most one lost
chunk from n+1 chunks

playout delay: enough


time to receive all n+1
packets
tradeoff:
increase n, less
bandwidth waste
increase n, longer
playout
p
y
delay
y
increase n, higher
probability that 2 or
more chunks will be
lost
Multimedia Networking

26

Content distribution networks (CDNs)


Content replication
p

challenging to stream large


files (e.g., video) from single
origin server in real time
solution: replicate content at
hundreds of servers
throughout Internet
content downloaded to CDN
servers ahead of time
placing content close to
user avoids impairments
(l ss delay)
(loss,
d l ) of
f ssending
di
content over long paths
CDN server typically
yp
y in
edge/access network

origin server
in North America

CDN distribution node

CDN server
in S. America CDN server
in Europe

CDN server
in Asia

Multimedia Networking

27

Content distribution networks (CDNs)


Content replication
p
CDN (e.g., Akamai)
customer is the content
provider (e.g., CNN)
CDN replicates
customers content iin
CDN servers.
when
h provider
id updates
d t s
content, CDN updates
servers

origin server
in North America

CDN distribution node

CDN server
in S. America CDN server
in Europe

CDN server
in Asia

Multimedia Networking

28

CDN example
p

HTTP request for


www foo com/sports/sports html
www.foo.com/sports/sports.html

origin server

1
2

client
3

DNS query for www.cdn.com

CDNs authoritative
DNS server
HTTP request for
www.cdn.com/www.foo.com/sports/ruth.gif

CDN server near client

origin server (www


(www.foo.com)
foo com)
distributes HTML
replaces:
http://www.foo.com/sports.ruth.gif

with
http://www.cdn.com/www.foo.com/sports/ruth.gif
tt //
d
/
f
/
t / th if

CDN company (cdn


(cdn.com)
com)
distributes gif files
uses its authoritative
DNS server to route
redirect requests
Multimedia Networking

29

Summary:
y Internet Multimedia: bagg of tricks

use UDP to avoid TCP congestion control (delays)


f ti
for
time-sensitive
iti ttraffic
ffi
client-side adaptive
p
playout
p y
delay:
y to compensate
p
for delay
server side matches stream bandwidth to available
client-to-server path bandwidth
chose among pre-encoded stream rates
dynamic
d
i sserver encoding
di rate
t

error recovery (on top of UDP)


FEC,
FEC interleaving,
interleaving error concealment
retransmissions, time permitting

CDN: bring content closer to clients


Multimedia Networking

30

Real-Time Protocol (RTP)


(
)

RTP specifies
p
packet
p
structure for packets
carrying audio, video
d t
data
RFC 3550
RTP packet
k provides
id
payload type
id tifi ti
identification
packet sequence
numbering
time stamping

RTP runs in end systems


y
RTP packets
encapsulated in UDP
segments
interoperability: if two
I
Internet
phone
h
applications run RTP,
then they may be able
to work together

Multimedia Networking

31

RTP runs on top of UDP


RTP libraries provide transport
transport-layer
layer interface
that extends UDP:
p
port numbers,, IP addresses
payload type identification
packet sequence numbering
time-stamping
i
i

Multimedia Networking

32

RTP and QoS


Q

RTP does not p


provide any
y mechanism to ensure
timely data delivery or other QoS guarantees.
RTP provides best-effort service, making no
special effort to ensure that RTP packets arrive
at destination in timely manner.

Multimedia Networking

33

Real-Time Control Protocol (RTCP)


(
)

works in conjunction
j
with RTP.
each participant in RTP
session periodically
transmits RTCP control
packets to all other
participants.
each RTCP packet
contains sender and/or
receiver reports
p

feedback can be used


to control
performance
sender
d may modify
dif it
its
transmissions based on
feedback

report statistics useful to


application: # packets
sent # packets lost,
sent,
lost
interarrival jitter, etc.
Multimedia Networking

34

Synchronization
y
of Streams

RTCP can synchronize


different media streams
within a RTP session
consider videoconferencing
app for which each sender
generates one RTP stream
for video
video, one for audio
audio.
timestamps in RTP packets
tied to the video, audio
sampling clocks
not tied to wall-clock
time

each RTCP sender-report


packet contains (for most
recently generated packet
in associated RTP stream):
)
timestamp of RTP packet
wall-clock time for when
packet was created
created.

receivers uses association


to synchronize playout of
audio,
di video
id

Multimedia Networking

35

Providing
g Multiple
p Classes of Service

thus far: making the best of best effort service


one-size fits
f
all
ll service model
d l
alternative: multiple classes of service
partition traffic into classes
network treats different classes of traffic
diff
differently
tl ((analogy:
l
VIP service
i vs regular
l service)
i )
granularity:
differential service
among multiple
0111
classes, not among
g
individual
connections
Multimedia Networking

36

Multiple
p classes of service: scenario

H1

H2

R1

R1 output
interface
queue

H3
R2

1.5 Mbps link

H4

Multimedia Networking

37

Scenario: mixed FTP and audio

Example: 1Mbps IP phone, FTP share 1.5 Mbps link.


b
bursts
sts of
f FTP can congest
st router,
t
cause
s audio
di lloss
ss
want to give priority to audio over FTP

R1

R2

Multimedia Networking

38

Scheduling
g And Policing
g Mechanisms

scheduling:
g choose next p
packet to send on link
FIFO (first in first out) scheduling: send in order of
arrival to queue
real-world example?
discard policy: if packet arrives to full queue: who to discard?
Tail
T il drop:
d
d
drop arriving
i i packet
k t
priority: drop/remove on priority basis
random: drop/remove randomly

Multimedia Networking

39

Scheduling
g Policies: more
Priority scheduling: transmit highest priority queued
packet
multiple classes, with different priorities
class may depend on marking or other header info, e.g. IP
source/dest, port numbers, etc..
Real world example?

Multimedia Networking

40

Scheduling
g Policies: still more
round robin scheduling:
multiple classes
cyclically scan class queues, serving one from each
class
l
(if available)
il bl )
real world example?

Multimedia Networking

41

Summary
The lesson has looked at various aspects of multimedia

principles and applications. The following issues have been


discussed.
Real Time Interactive Media and Applications
Multimedia over Internet
Content
Content Distribution Network (CDN)
Real Time Protocols
Multiple Classes of Service
Scheduling
Please read Chapter 7 from the Kurose book (ed 5/6)

Multimedia Networking

42

You might also like