Lecture 17 – March 21, 2002
description
Transcript of Lecture 17 – March 21, 2002
![Page 1: Lecture 17 – March 21, 2002](https://reader036.fdocuments.in/reader036/viewer/2022062421/56812a5d550346895d8dc776/html5/thumbnails/1.jpg)
1
Lecture 17 – March 21, 2002
Content-delivery services.
Multimedia services
Reminder next week individual meetings and project status report are due.
![Page 2: Lecture 17 – March 21, 2002](https://reader036.fdocuments.in/reader036/viewer/2022062421/56812a5d550346895d8dc776/html5/thumbnails/2.jpg)
2
EdgeRouter
EdgeRouter
EdgeRouter
EdgeRouter
EdgeRouter
EdgeRouter
Local ISP Local ISP
Local ISP
Local ISPLocal ISP
Local ISP
ContentProvider
ContentDelivery
ContentDelivery
ContentDelivery
ContentDelivery
ContentDelivery
Content-delivery services
![Page 3: Lecture 17 – March 21, 2002](https://reader036.fdocuments.in/reader036/viewer/2022062421/56812a5d550346895d8dc776/html5/thumbnails/3.jpg)
3
Multimedia Services
Voice over IP
Still images
Audio broadcast
Video broadcast
Video on demand
Teleconferencing
Videoconferencing
Remote instrumentation
Telemedicine
![Page 4: Lecture 17 – March 21, 2002](https://reader036.fdocuments.in/reader036/viewer/2022062421/56812a5d550346895d8dc776/html5/thumbnails/4.jpg)
4
Analog and Digital Information
Sampling – Nyquist theoremQuantization – quantization noiseExamples:
voice – sampling rate 8,000 samples/sec 8 bits/sample-256 quantization levels music – sampling rate 48,000 samples/sec 16 bits/sample color video – 10,000,000 samples/sec 24 bits/sample
![Page 5: Lecture 17 – March 21, 2002](https://reader036.fdocuments.in/reader036/viewer/2022062421/56812a5d550346895d8dc776/html5/thumbnails/5.jpg)
5
Timing requirements for data streaming
Interactive service – voice over IP, teleconferencing delay and jitter sensitive but loss tolerant
Video streaming rate sensitive and to some extent loss tolerant. 25 frames/sec
Telemedicine and remote instrument control delay and loss sensitive
Stored media applications – video on demand less strict/demanding
![Page 6: Lecture 17 – March 21, 2002](https://reader036.fdocuments.in/reader036/viewer/2022062421/56812a5d550346895d8dc776/html5/thumbnails/6.jpg)
6
Delay and JitterPlay-out delay
End-to-end delay Delay at the sender Data transmission and propagation delay Delay at the receiver
Jitter – variability of end to end delay
For a normal conversation – play out delay < 100 msec not noticeable < 400 msec acceptable > 400 msec not acceptable
![Page 7: Lecture 17 – March 21, 2002](https://reader036.fdocuments.in/reader036/viewer/2022062421/56812a5d550346895d8dc776/html5/thumbnails/7.jpg)
7
Delay and Jitter
agt
ast b
gtapt
art
generationtime
receptiontime
playbacktime
bst
sending time
packets
b
a
brt
bpt
time
![Page 8: Lecture 17 – March 21, 2002](https://reader036.fdocuments.in/reader036/viewer/2022062421/56812a5d550346895d8dc776/html5/thumbnails/8.jpg)
8
Removing the Jitter in Voice over IP
Fixed play-out delay
Adaptive play-out delay takes advantage of silent periods between talk spurts
Fill in a buffer at a variable rate and drain it at a constant rate.
![Page 9: Lecture 17 – March 21, 2002](https://reader036.fdocuments.in/reader036/viewer/2022062421/56812a5d550346895d8dc776/html5/thumbnails/9.jpg)
9
Data Streaming
Data stream – sequence of bytes flowing out or into a process.
Media server
Media player
Often they require a Web browser to connect to the server and download a metafile describing the media player.
![Page 10: Lecture 17 – March 21, 2002](https://reader036.fdocuments.in/reader036/viewer/2022062421/56812a5d550346895d8dc776/html5/thumbnails/10.jpg)
10
WebBrowser
MediaPlayer
Http server
Multimedia database
HTTP request
HTTP response - metadata
Commands - TCP connection
Data stream - UDP
Client
ServerThread
ServerCache
![Page 11: Lecture 17 – March 21, 2002](https://reader036.fdocuments.in/reader036/viewer/2022062421/56812a5d550346895d8dc776/html5/thumbnails/11.jpg)
11
Error Recovery Schemes
Forward error correction – sender adds redundant information.Packet (i) contains the original information and
a low-quality version of packet (i-1)
Interleaving the stream is scrambled. Packet (i) does not contain samples adjacent
to each other.
![Page 12: Lecture 17 – March 21, 2002](https://reader036.fdocuments.in/reader036/viewer/2022062421/56812a5d550346895d8dc776/html5/thumbnails/12.jpg)
12
Real-time Protocol (RTP)
RTP – application layer protocol
Uses UDP; TCP congestion control and error control prevent delay or rate guarantees.
RTP supports several audio formats including PCM, GSM, G.722,
MPEG audio – MP3video formats – JPEG, MPEG 1, and MPEG 2.
![Page 13: Lecture 17 – March 21, 2002](https://reader036.fdocuments.in/reader036/viewer/2022062421/56812a5d550346895d8dc776/html5/thumbnails/13.jpg)
13
RTP
One may have multiple RTP connections; one for audio and one for video
RTP supports unicast and multicast
RTP packet: Header + PayloadHeader
Payload typeMagic number to identify the audio or video formatSequence number of the packetTime stampRandom number associated with the RTP session
![Page 14: Lecture 17 – March 21, 2002](https://reader036.fdocuments.in/reader036/viewer/2022062421/56812a5d550346895d8dc776/html5/thumbnails/14.jpg)
14
RTCP – RTP control protocol
Senders – periodic source reportsRTP session identifierApplication generating the streamAddress of source
Receivers periodic reciver reportsNumber of packets lostJitterNumber of packets Received
![Page 15: Lecture 17 – March 21, 2002](https://reader036.fdocuments.in/reader036/viewer/2022062421/56812a5d550346895d8dc776/html5/thumbnails/15.jpg)
15
RTCP
An application may use may use the data provided by RTCP toModify transmission ratesSynchronize multiple streamsDiagnostics
For multicast RTCP limits the frequency of receiver reports.
![Page 16: Lecture 17 – March 21, 2002](https://reader036.fdocuments.in/reader036/viewer/2022062421/56812a5d550346895d8dc776/html5/thumbnails/16.jpg)
16
Real-time Streaming Protocol (RTSP)
Supports interactive applications
Out-of-band channel
![Page 17: Lecture 17 – March 21, 2002](https://reader036.fdocuments.in/reader036/viewer/2022062421/56812a5d550346895d8dc776/html5/thumbnails/17.jpg)
17
100-Mbps Ethernet
100-Mbps Ethernet
Variable fill rate x(t)Buffer
Constant drain rate d
Stored Media Server
UncompressRemove Jitter
Forward Error CorrectionGUI
Multimedia Client
Multimedia Player
MultimediaDatabase
ServerThread(one per
clientprocess
)
DatabaseAccess
DataStreaming
RTSP
Multimedia Server Process
Setup PlayMedia Stream Pause Teardown
Out-of-Band Client-Server Interactions UsingRTSP
In-BandCommunication
Using RTP
![Page 18: Lecture 17 – March 21, 2002](https://reader036.fdocuments.in/reader036/viewer/2022062421/56812a5d550346895d8dc776/html5/thumbnails/18.jpg)
18
Data compression
Sender
CompressionInformation
Source
Receiver
Uncompression Player
![Page 19: Lecture 17 – March 21, 2002](https://reader036.fdocuments.in/reader036/viewer/2022062421/56812a5d550346895d8dc776/html5/thumbnails/19.jpg)
19
Data compression
Text compression
Still image compression
Audio and Video compression
![Page 20: Lecture 17 – March 21, 2002](https://reader036.fdocuments.in/reader036/viewer/2022062421/56812a5d550346895d8dc776/html5/thumbnails/20.jpg)
20
Loseless compression
Differential encoding – amplitudes of consecutive samples differ only slightly.
Entropy encoding – removes the redundancy based upon the entropyRun Length EncodingStatistical Encoding
![Page 21: Lecture 17 – March 21, 2002](https://reader036.fdocuments.in/reader036/viewer/2022062421/56812a5d550346895d8dc776/html5/thumbnails/21.jpg)
21
Text Compression
Huffman EncodingProduces optimal results only if the probability of
occurrence of individual characters is a power of ½.
Static Huffman EncodingAdaptive Huffman Encoding
Lemplel-Ziv
![Page 22: Lecture 17 – March 21, 2002](https://reader036.fdocuments.in/reader036/viewer/2022062421/56812a5d550346895d8dc776/html5/thumbnails/22.jpg)
22
A (0.5)B (0.25)C (0.125)D (0.0625)E (0.0156)F (0.0156)G (0.0156) 1H (0.0156) 0
A (0.5)B (0.25)C (0.125)D (0.0625) (0.0312)E (0.0156) 1F (0.0156) 0
A (0.5)B (0.25)C (0.125)D (0.0625) (0.0312) 1 (0.0312) 0
A (0.5)B (0.25)C (0.125)D (0.0625) 1 (0.0625) 0
L8 L7
L6
L5
A (0.5)B (0.25)C (0.125) 1 (0.125) 0
L3
A (0.5)B (0.25) 1 (0.25) 0 L4
A (0.5) 1 (0.5) 0
L2
ABCDEFGH
1010010001000001000000000011000010
0 1
1.0
0.5 A 0.5
B 0.250.25
0 1
0 1
C 0.1250.125
D 0.061250.06125
0
0
1
1
0.030625
H 0.01565 G 0.01565
0.030625
1100
E 0.01565F 0.01565
![Page 23: Lecture 17 – March 21, 2002](https://reader036.fdocuments.in/reader036/viewer/2022062421/56812a5d550346895d8dc776/html5/thumbnails/23.jpg)
23
0Ef 0
Ef 0
0 1
a 1
send a
1
11
0
0a 1
Ef 0 l 1
send l
Ef 0 ; a 1
Ef 0; l 1; 1; a 1
l
a
e0
0
0
Ef 0 e 1
l 1
a 11
1
11
2
send e
Ef 0; e 1; 1; l 1; 2; a 1
Ef 0; e 1; 1; l 1; a 1; 2
sort list by count
Ef 0 e 1
11
1
12a 1
0
0
0l 1
a send " "
a 2 2
Ef 0 e 1
1
1
1
1l 1
0
0
0
Ef 0; e 1; 1; l 1; a 2; 2
j
Ef 0
e 1
j 1
0
0
0
01
1
1
1
13a 2
l 12
send j
Ef 0; j 1; 1; e 1; 2; l 1; a 2; 3
Ef 0; j 1; 1; e 1; l 1; 2; a 2; 3
sort list by count
Ef 0 j 1
1
3a 2
l 1 2
1 e 1
1
1
1
0
0
0
0
![Page 24: Lecture 17 – March 21, 2002](https://reader036.fdocuments.in/reader036/viewer/2022062421/56812a5d550346895d8dc776/html5/thumbnails/24.jpg)
24
Lempel-Ziv
Construct a dictionary consisting of all the substrings in the input string
Instead of transmitting a substring we transmit the index of the substring in the dictionary.
Lempel-Ziv-Welsh the dictionary is constructed dynamically.
![Page 25: Lecture 17 – March 21, 2002](https://reader036.fdocuments.in/reader036/viewer/2022062421/56812a5d550346895d8dc776/html5/thumbnails/25.jpg)
25
Compression factor for LZ
N # of characters in the text
n bits/character
L average length of a substring
D # of entries in the dictionary D=2d
compression = (N x n) / (N/L x d) = ( n x L) / d
![Page 26: Lecture 17 – March 21, 2002](https://reader036.fdocuments.in/reader036/viewer/2022062421/56812a5d550346895d8dc776/html5/thumbnails/26.jpg)
26
Still image compression
GIF – Graphics Interchange FormatReduces the number of colors in the image from
224 to 28
Selects the 256 colors that match best the colors in the picture and builds a local color table
Instead of sending 24- bit pixels we send 8-bit pixels that are indexes in the local color table
JPEG – Joint Photographic Experts Group
![Page 27: Lecture 17 – March 21, 2002](https://reader036.fdocuments.in/reader036/viewer/2022062421/56812a5d550346895d8dc776/html5/thumbnails/27.jpg)
27
JPEG
SourceImage
CompressedImage
Entropy Encoding
Vectoring
RLE
DiffEncoding
HuffmanEncoding
BlockPreparation
DCT Quantization