Lecture9 PDF
Lecture9 PDF
Lecture 9:
Media over IP
Announcement
! No class this Wed.
" Prepare for Mid-term
" Work on Lab 2
! Lab 2 assigned
" Due May 11 (part I)
" Due May 18 (part II)
" 2 students per group, find your partner now.
1
4/26/10
multimedia applications:
network audio and video
(“continuous media”)
QoS
network provides
application with level of
performance needed for
application to function.
Roadmap
! Multimedia networking applications
! RTP & RTCP
! Streaming stored audio & video (RTSP)
! Internet video phone (SIP, H.323)
! Recovery from loss
2
4/26/10
MM Networking Applications
Classes of MM applications: Fundamental characteristics:
1) Streaming stored audio & video ! typically delay sensitive
2) Streaming live audio & video " end-to-end delay
3) Interactive, real-time audio & video " delay jitter
! loss tolerant: infrequent
losses cause minor
glitches
! antithesis of data, which
are loss intolerant but
delay tolerant.
Jitter is the variability
of packet delays within
the same packet stream
Stored streaming:
! media stored at source
! transmitted to client
! streaming: client playout begins before all
data has arrived
! timing constraint for still-to-be transmitted data: in
time for playout
3
4/26/10
2. video
sent
1. video 3. video received,
recorded network played out at client
delay
time
streaming: at this time, client
playing out early part of video,
while server still sending later
part of video
4
4/26/10
5
4/26/10
? ? ?
? ? ?
But you said multimedia apps requires ?
QoS and level of performance to be
? ? effective! ? ?
Roadmap
! Multimedia networking applications
! Transport level: RTP & RTCP
! App level: Streaming stored audio & video (RTSP)
! App level: Internet video phone (SIP, H.323)
! App level: Recovery from loss
6
4/26/10
7
4/26/10
RTP Example
! consider sending 64 kbps PCM-encoded voice over RTP.
! application collects encoded data in chunks, e.g., every
20 msec = 160 bytes in a chunk.
! audio chunk + RTP header form RTP packet, which is
encapsulated in UDP segment
RTP Header
Sequence Number (16 bits): Increments by one for each RTP packet
sent, and may be used to detect packet loss and to restore packet
sequence.
8
4/26/10
9
4/26/10
RTCP - Continued
! RTP,
RTCP packets distinguished from each other via distinct port
numbers.
! to
limit traffic, each participant reduces RTCP traffic as number of
conference participants increases
RTCP Packets
Receiver report packets:
! fraction of packets lost, last sequence number, average
interarrival jitter
Sender report packets:
! SSRC of RTP stream, current time, number of packets
sent, number of bytes sent
10
4/26/10
Synchronization 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, one for audio.
! timestamps in RTP packets tied to the video, audio
sampling clocks
" not tied to wall-clock time
11
4/26/10
Roadmap
! Multimedia networking applications
! RTP & RTCP
! Streaming stored audio & video (RTSP)
! Internet video phone (SIP, H.323)
Next
! Recovery from loss
Application
Media Player!
! jitter removal
! decompression
! error concealment
! graphical user interface w/ controls for interactivity
12
4/26/10
13
4/26/10
constant bit
rate video client video constant bit
Cumulative data
delay
14
4/26/10
constant
variable fill drain
rate, x(t) rate, d
buffered
video
15
4/26/10
16
4/26/10
RTSP Example
Scenario:
! metafile communicated to web browser
! browser launches player
! player sets up an RTSP control connection, data connection to
streaming server
17
4/26/10
RTSP Implementation
Server
! QuickTime Streaming Server: Apple's closed-source streaming
server that ships with Mac OS X Server
! Darwin Streaming Server: Open-sourced version of QuickTime
Streaming Server maintained by Apple
! pvServer: Formerly called PacketVideo Streaming Server, this is
Alcatel-Lucent's streaming server product.
! Helix DNA Server: RealNetworks' streaming server. Comes in both
open-source and proprietary flavors.
! Live555: Open source C++ server and client libraries used in well
known clients like VLC and mplayer.
! VideoLAN: Open source media player and streaming server
! Windows Media Services: Microsoft's streaming server included
with Windows Server.
RTSP Implementation
Client
! QuickTime
! RealPlayer
! VLC media player
! Windows Media Player
18
4/26/10
Roadmap
! Multimedia networking applications
! RTP & RTCP
! Streaming stored audio & video (RTSP)
! Internet video phone (SIP, H.323)
! Recovery from loss
19
4/26/10
20
4/26/10
Delay Jitter
constant bit
rate client constant bit
Cumulative data
buffered
data
delay
(jitter)
21
4/26/10
22
4/26/10
SIP Services
! Setting up a call, SIP provides mechanisms ..
" for caller to let callee know she wants to establish a call
" so caller, callee can agree on media type, encoding
" to end call
! call management:
" add new media streams during call
" change encoding during call
" invite others
" transfer, hold calls
! Bob’s200 OK message
indicates his port number,
IP address, preferred
encoding (GSM)
! SIP messages
can be sent
over TCP or UDP; here sent
over RTP/UDP.
23
4/26/10
! rejecting a call
" Bob can reject with replies “busy,” “gone,”
“payment required,” “forbidden”
! media can be sent over RTP or some other protocol
24
4/26/10
SIP Registrar
! when Bob starts SIP client, client sends SIP REGISTER
message to Bob’s registrar server
(similar function needed by Instant Messaging)
Register Message:
SIP Proxy
! Alice sends invite message to her proxy server
" contains address sip:[email protected]
25
4/26/10
Example
Caller [email protected]
with places a
call to [email protected]
H.323
! A protocol suite that defines multimedia
conferencing over internet
" Control & data channels sent using TCP
" Audio and video streams sent via RTP/UDP
" Specifies the operation of registra, gateway ….
26
4/26/10
27
4/26/10
Roadmap
! Multimedia networking applications
! RTP & RTCP
! Streaming stored audio & video (RTSP)
! Internet video phone (SIP, H.323)
! Recovery from loss
28
4/26/10
Unequal FEC
2nd FEC scheme
! “piggyback lower
quality stream”
! send lower resolution
audio stream as
redundant information
! e.g., nominal
stream PCM at 64 kbps
and redundant stream
GSM at 13 kbps.
Interleaving
Interleaving
! chunks divided into smaller units
! for example, four 5 msec units per chunk
! packet contains small units from different chunks
29
4/26/10
30