Upload
christian-keele
View
216
Download
2
Tags:
Embed Size (px)
Citation preview
CE80NCE80NIntroduction to NetworksIntroduction to Networks
&&The InternetThe Internet
Dr. Chane L. Fullmer
UCSC
Winter 2002
February 28, 2002 CE80N -- Lecture #16, 2002 2
Class InformationClass InformationWeb page tutorial available on-lineWeb page submission:
– Email to [email protected]• Subject: cmpe080n-assgn4
Final Exam – Last class session
• March 14, 2002
February 28, 2002 CE80N -- Lecture #16, 2002 3
Personal Web Page of the DayPersonal Web Page of the Day
A few brave souls….Presenting:
AKA: Multimedia Networking
February 28, 2002 CE80N -- Lecture #16, 2002 5
Description of FunctionalityDescription of Functionality
Internet audio and video services make it possible to:– Send voice– Send live television images– Broadcast audio or video
signals– Allow viewing and editing a
document simultaneously
February 28, 2002 CE80N -- Lecture #16, 2002 6
Audio And Video Require Audio And Video Require Special HardwareSpecial Hardware
Live audio or video require high bandwidth.– Requires a computer with:
• A microphone• A speaker• A camera• A high-speed processor
– Controls all devices electronically
February 28, 2002 CE80N -- Lecture #16, 2002 7
Multimedia NetworkingMultimedia NetworkingOur goals: principles: network,
application-level support for multimedia– different forms of
network multimedia, requirements
– making the best of best effort service
– mechanisms for providing QoS
specific protocols, architectures for QoS
Overview: multimedia applications
and requirements– Audio– Video
making the best of today’s best effort service
Examples– RealPlayer– ISDN Videoconferencing
February 28, 2002 CE80N -- Lecture #16, 2002 8
Digital Audio and VideoDigital Audio and Video
Audio: Air pressure converted
by microphone to voltage.– Magnitude represents
loudness or softness– Frequency
represents pitch, timbre.
Sampled: Voltage saved at discrete points in time
Quantized: Rounded off to a discrete value (x).
Video: Light converted by camera
into chemical deposition– Magnitude represents
brightness– Frequency represents edges,
contrast Sampled: Values saved at
each horizontal/vertical (x,y) position in time
Quantized: Rounded off to a discrete value (z) for each point (x,y).
February 28, 2002 CE80N -- Lecture #16, 2002 9
Digital Audio numbersDigital Audio numbers Sample Size: 16 bit (2 byte) data representation Channels: 2 channels (stereo) Sampling Rate: 44,100 Samples Per Second
(CD quality) One Channel: 2 bytes per sample x 44,100
samples per second = 88,200 bytes per second Total Data Rate: 88,200 bytes per second x 2
channels = 176,400 bytes per second Total Bit Rate = 1,411,200 bits per second
– This is DS1 rate!.. ADSL is typically a 384K downlink
February 28, 2002 CE80N -- Lecture #16, 2002 10
ImagesImages
YCC encoding scheme– Luminance = brightness (Y)– Chrominance = amount of color
• Cb = amount of blue• Cr = amount of red
Source: Peter Bourke http://astronomy.swin.edu.au/pbourke/colour/ycc/
February 28, 2002 CE80N -- Lecture #16, 2002 11
Color Representation in YCCColor Representation in YCC
Luminance = brightness (Y)
Source: Peter Bourkehttp://astronomy.swin.edu.au/pbourke/colour/ycc/
February 28, 2002 CE80N -- Lecture #16, 2002 12
Color Representation in YCCColor Representation in YCC
Chrominance–Cr = amount of red
Source: Peter Bourkehttp://astronomy.swin.edu.au/pbourke/colour/ycc/
February 28, 2002 CE80N -- Lecture #16, 2002 13
Color Representation in YCCColor Representation in YCC
Chrominance–Cb = amount of blue
Source: Peter Bourkehttp://astronomy.swin.edu.au/pbourke/colour/ycc/
February 28, 2002 CE80N -- Lecture #16, 2002 14
YCCYCCEncodingEncoding
Luminance stored for each pixel Chrominance stored for each 4x4 block of
pixelsSource: Peter Bourkehttp://astronomy.swin.edu.au/pbourke/colour/ycc/
February 28, 2002 CE80N -- Lecture #16, 2002 15
Digital Video numbersDigital Video numbers 720 x 486 pixels per frame 29.97 frames per second (Fps) Sample Size - 8 bits per pixel data representation Sampling - 4:2:2 (Every two horizontal pixels = 2 Y : 1
Cr : 1 Cb) – Luminance (Y)
• 720 x 486 x 29.97 x 8 = 83,896,819.2 bits per second
– Chrominance R (Cr) • 360 x 486 x 29.97 x 8 = 41,948,409.6 bits per second
– Chrominance B (Cb) • 360 x 486 x 29.97 x 8 = 41,948,409.6 bits per second
Total = ~20 Megabytes per second– Phew…… !! Ethernet is only 1.25 Mbyte/s…
February 28, 2002 CE80N -- Lecture #16, 2002 16
Compression Coding MethodsCompression Coding MethodsCompression:
– Transmission of the same information in fewer bits. Run-length coding: Encode as symbol followed by
number of symbols in a row.– “0,0,0,0,0,0,0,0,0 ….0” replaced by “0 256”
Huffman coding: (David Huffman, 1952)– Builds a tree of symbols, assigning shorter bit codes to the
more common symbols Arithmetic coding:
– Converts input symbols to a single real number Standards
– Images - JPEG (Joint Picture Experts Group)– Video - MPEG (Moving Picture Experts Group)
• MP3 for audio
February 28, 2002 CE80N -- Lecture #16, 2002 17
Audio and Video CompressionAudio and Video Compression
Compression: Transmission of the same information in fewer bits.
Audio:– Silence is transmitted as blank space in run-
length coding.Video:
– Most objects stay fixed from frame to frame.– Differences between frames transmitted.
February 28, 2002 CE80N -- Lecture #16, 2002 18
Image CompressionImage Compression
Can save a lot of bits!– Left-most picture: 24 bits per pixel– Right-most picture: 9 bits per pixel
Can you tell the difference?
Source: Peter Bourkehttp://astronomy.swin.edu.au/pbourke/colour/ycc/
February 28, 2002 CE80N -- Lecture #16, 2002 19
Image CompressionImage Compression
Can be lossy– Left-most picture: Original– Center: 10:1 compression– Right-most picture: 45:1 compression
Can you tell the difference?
Source: Steven Smith http://www.dspguide.com/datacomp.htm
February 28, 2002 CE80N -- Lecture #16, 2002 20
Audio quality and Transmission Audio quality and Transmission RatesRatesSound quality Bandwidth Mode Bitrate Reduction
ratio
Telephone 2.5 kHz Mono 8 kbps 96:1
Shortwave 4.5 kHz Mono 16 kbps 48:1
AM radio 7.5 kHz Mono 32 kbps 24:1
FM 11 kHz Stereo 56…64 kbps 26…24:1
Near-CD 15 kHz Stereo 96 kbps 16:1
CD >15 KHz Stereo 112..128kbps 14:12:1
February 28, 2002 CE80N -- Lecture #16, 2002 21
Video quality and Transmission RatesVideo quality and Transmission Rates
February 28, 2002 CE80N -- Lecture #16, 2002 22
Transmission RatesTransmission Rates
• Useful chart of transmission rates:http://the-mid-west-web.com/thespeed.htm
February 28, 2002 CE80N -- Lecture #16, 2002 23
Multimedia, Quality of Service: Multimedia, Quality of Service: What is it?What is it?
Multimedia applications: network audio and video
network provides application with level of performance needed for application to function.
QoS
Source: http://www-net.cs.umass.edu/cs591/Professor Jim KuroseUsed with permissionSlides 18-31, 34-51
February 28, 2002 CE80N -- Lecture #16, 2002 24
Multimedia Performance Multimedia Performance RequirementsRequirements
Requirement: deliver data in “timely” manner interactive multimedia: short end-end delay
– e.g., IP telephony, telecon, virtual worlds– excessive delay impairs human interaction
streaming (non-interactive) multimedia:– data must arrive in time for “smooth” playout– late arriving data introduces gaps in rendered
audio/video
reliability: 100% reliability not always required
February 28, 2002 CE80N -- Lecture #16, 2002 25
Interactive, Real-Time Interactive, Real-Time Multimedia Multimedia
end-end delay requirements:– video: < 150 msec acceptable– audio: < 150 msec good, < 400 msec OK– includes application-level (packetization) and network
delays– higher delays noticeable, impair interactivity
applications: IP telephony, video conference, distributed interactive worlds
February 28, 2002 CE80N -- Lecture #16, 2002 26
InteractiveInteractive Multimedia: Multimedia: VideoconferencingVideoconferencingIntroduce Internet Phone by way of an example
(note: there is no “standard” yet): speaker’s audio: alternating talk spurts and silent
periods. pkts generated only during talk spurts
– E.g., 20 msec chunks at 8 Kbytes/sec: 160 bytes data
application-layer header added to each chunk. Chunk+header encapsulated into UDP segment. application sends UDP segment into the network
every 20 msec during talkspurt.
February 28, 2002 CE80N -- Lecture #16, 2002 27
Internet Phone: Packet Loss and Internet Phone: Packet Loss and DelayDelay network loss: IP datagram lost due to
network congestion (router buffer overflow) delay loss: IP datagram arrives too late for
playout at receiver– delays: processing, queueing in network; end-
system (sender, receiver) delays– typical maximum tolerable delay: 400 ms
loss tolerance: depending on voice encoding, losses can be concealed, packet loss rates between 1% and 10% can be tolerated.
February 28, 2002 CE80N -- Lecture #16, 2002 28
constant bit ratetransmission
Cum
ula
tive
data
time
variablenetwork
delay(jitter)
clientreception
constant bit rate playout at client
client playoutdelay
bu
ffere
ddata
Delay JitterDelay Jitter
Client-side buffering, playout delay compensate for network-added delay, delay jitter
February 28, 2002 CE80N -- Lecture #16, 2002 29
Internet Phone: Fixed Playout DelayInternet Phone: Fixed Playout Delay
Receiver attempts to playout each chunk exactly q msecs after chunk was generated.– chunk has time stamp t: play out chunk at
t+q .– chunk arrives after t+q: data arrives too
late for playout, data “lost” Tradeoff for q:
– large q: less packet loss– small q: better interactive experience
February 28, 2002 CE80N -- Lecture #16, 2002 30
Fixed Playout DelayFixed Playout Delay
packets
tim e
packetsgenerated
packetsreceived
loss
r
p p '
playout schedulep' - r
playout schedulep - r
• Sender generates packets every 20 msec during talk spurt.• First packet received at time r• First playout schedule: begins at p• Second playout schedule: begins at p’
February 28, 2002 CE80N -- Lecture #16, 2002 31
Recovery From Packet LossRecovery From Packet Loss
loss: pkt never arrives or arrives too late real-time constraints: little (no) time for
retransmissions!– What to do?
Forward Error Correction (FEC): add error correction bits (recall parity bits?)– e.g.,: add redundant chunk made up of exclusive OR of n
chunks; redundancy is 1/n; can reconstruct if at most one lost chunk
Interleaving: spread loss evenly over received data to minimize impact of loss
February 28, 2002 CE80N -- Lecture #16, 2002 32
InterleavingInterleaving
Has no redundancy, but can cause delay in playout beyond Real Time requirements
Divide 20 msec of audio data into smaller units of 5 msec each and interleave
Upon loss, have a set of partially filled chunks
February 28, 2002 CE80N -- Lecture #16, 2002 33
Piggybacking Lower Quality Piggybacking Lower Quality StreamStream
February 28, 2002 CE80N -- Lecture #16, 2002 34
Streaming MultimediaStreaming Multimedia
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
February 28, 2002 CE80N -- Lecture #16, 2002 35
Streaming: what is it?Streaming: what is it?
1. videorecorded
2. videosent
3. video received,played out at client
Cum
ula
tive
data
streaming: at this time, client playing out early part of video, while server still sending laterpart of video
networkdelay
time
February 28, 2002 CE80N -- Lecture #16, 2002 36
Streaming MultimediaStreaming Multimedia (more) (more)
Types of interactivity: none: like broadcast radio, TV
– initial startup delays of < 10 secs OK VCR-functionality: client can pause, rewind,
FF– 1-2 sec until command effect OK
timing constraint for still-to-be transmitted data: in time for playout
February 28, 2002 CE80N -- Lecture #16, 2002 37
Multimedia Over Today’s Multimedia Over Today’s InternetInternetTCP/UDP/IP: “best-effort service” no guarantees on delay, loss
Today’s Internet multimedia applications use application-level techniques to mitigate
(as best possible) effects of delay, loss
But you said multimedia apps requiresQoS and level of performance to be
effective!
?? ???
?
? ??
?
?
February 28, 2002 CE80N -- Lecture #16, 2002 38
Streaming Internet MultimediaStreaming Internet Multimedia
Application-level streaming techniques for making the best out of best effort service:– what is streaming?– client side buffering– multiple rate encodings of multimedia
….. let’s look at these …..
February 28, 2002 CE80N -- Lecture #16, 2002 39
Internet multimedia: simplest Internet multimedia: simplest approachapproach
audio or video stored in file files transferred as HTTP
object– received in entirety at
client– then passed to player
audio, video not streamed: no, “pipelining,” long delays until playout!
February 28, 2002 CE80N -- Lecture #16, 2002 40
Internet multimedia: streaming Internet multimedia: streaming approachapproach
browser GETs metafile browser launches player, passing metafile player contacts server server streams audio/video to player
February 28, 2002 CE80N -- Lecture #16, 2002 41
Downloadable vs. StreamingDownloadable vs. StreamingDownloadable: Download and save Listen later or send
to others Standards-based Better quality Bandwidth burden
on user Downloading takes
time
Streaming: Disposable Listen “on-the-fly” live Proprietary Lower quality Bandwidth burden on the
developer More resources/time/cost No time lost in
downloading Live broadcasting
February 28, 2002 CE80N -- Lecture #16, 2002 42
constant bit rate videotransmission
Cum
ula
tive
data
time
variablenetwork
delay
client videoreception
constant bit rate video playout at client
client playoutdelay
bu
ffere
dvid
eo
Streaming Multimedia: Client Streaming Multimedia: Client BufferingBuffering
Client-side buffering, playout delay compensate for network-added delay, delay jitter
February 28, 2002 CE80N -- Lecture #16, 2002 43
Streaming Multimedia: Client Streaming Multimedia: Client BufferingBuffering
Client-side buffering, playout delay compensate for network-added delay, delay jitter
bufferedvideo
variable fillrate, x(t)
constant drainrate, d
February 28, 2002 CE80N -- Lecture #16, 2002 44
Streaming Multimedia:Streaming Multimedia: client rate(s) client rate(s)
Q: how to handle different client receive rate capabilities?– 28.8 Kbps dialup– 100Mbps Ethernet
A: server stores, transmits multiple copies of video, encoded at different rates
1.5 Mbps encoding
28.8 Kbps encoding
February 28, 2002 CE80N -- Lecture #16, 2002 45
User control of streaming multimediaUser control of streaming multimedia
Real Time Streaming Protocol (RTSP): RFC 2326 user control: rewind, FF, pause, resume, etc… out-of-band protocol:
– one port (544) for control msgs– one port for media stream
TCP or UDP for control msg connection
Scenario: metafile communicated to web browser browser launches player player sets up an RTSP control connection, data
connection to server
February 28, 2002 CE80N -- Lecture #16, 2002 46
Metafile ExampleMetafile Example<title>Twister</title>
<session>
<group language=en lipsync>
<switch>
<track type=audio
e="PCMU/8000/1"
src = "rtsp://audio.example.com/twister/audio.en/lofi">
<track type=audio
e="DVI4/16000/2" pt="90 DVI4/8000/1" src="rtsp://audio.example.com/twister/audio.en/hifi">
</switch>
<track type="video/jpeg"
src="rtsp://video.example.com/twister/video">
</group>
</session>
February 28, 2002 CE80N -- Lecture #16, 2002 47
RTSP OperationRTSP Operation
February 28, 2002 CE80N -- Lecture #16, 2002 48
Summary: Summary: Internet Multimedia: bag Internet Multimedia: bag of tricksof tricks
use UDP to avoid TCP congestion control (delays) for time-sensitive traffic
client-side playout delay: to compensate for network delay/jitter
server side matches stream bandwidth to available client-to-server path bandwidth– chose among pre-encoded stream rates– dynamic server encoding rate
error recovery (on top of UDP)– FEC– retransmissions, time permitting– mask errors: repeat nearby data
February 28, 2002 CE80N -- Lecture #16, 2002 49
Example: RealPlayerExample: RealPlayer
RealNetworks1995, first streaming Internet audio
(Progressive Networks)1997
– RealSystem (RealVideo, RealAudio, and RealFlash)
– RealServer (client/server software)Uses RTSP
February 28, 2002 CE80N -- Lecture #16, 2002 50
Example: RealPlayerExample: RealPlayer
Applications: Internet server
– Wide audience (most complex/expensive)– video commercials/e-commerce capabilities
Intranet server – Internal to business– desk-top training for employees
Commerce Solution – Secure transmissions to small groups– B2B, distance-learning, briefings
February 28, 2002 CE80N -- Lecture #16, 2002 51
Radio Programs On The InternetRadio Programs On The Internet
A radio station uses computer equipment that converts the audio signal to digital form.– Requires software that
contacts the station– Extracts digitized audio
from the packets– Converts the data to sound– Plays the sound
KPIG Radio on the Internet
February 28, 2002 CE80N -- Lecture #16, 2002 52
Real-Time Transmission Is Real-Time Transmission Is Called WebcastingCalled Webcasting
To enable a browser to play real-time audio or video, the browser must be extended with a plugin.– Consists of software
• Ie, Real Audio, M$ Media Player
– Keeps a list of packets in memory– Enables the browser to receive and play
audio/videoMonterey Bay Aquarium live videocast
February 28, 2002 CE80N -- Lecture #16, 2002 53
Software for CollaborationSoftware for Collaboration
Software exists that permits a group of users to examine and edit a single document.– Called a
whiteboard service
February 28, 2002 CE80N -- Lecture #16, 2002 54
Marking A DocumentMarking A Document
A participant uses a mouse to control interaction with the whiteboard service.– Allows all users to see changes on their
own screens, as well as reflected on the screens of others
February 28, 2002 CE80N -- Lecture #16, 2002 55
The Participants Discuss And The Participants Discuss And Mark A DocumentMark A Document
Usually participants may also engage in an audio teleconference at the same time.
Changes:– Can be noted in colors– Saved to a word processing document
February 28, 2002 CE80N -- Lecture #16, 2002 56
Video TeleconferencingVideo Teleconferencing
Video teleconferencing enables face-to-face communication.– Requires software to
start a video session• M$ NetMeeting• Vic/vat for Unix
– Incorporates both video and audio technology
February 28, 2002 CE80N -- Lecture #16, 2002 57
Video Teleconference Among Video Teleconference Among Groups Of PeopleGroups Of People
The screen cannot hold individual images from many cameras.– Gather people in smaller
groups with a:• Camera• Large screen monitor or TV• Microphones for audio
February 28, 2002 CE80N -- Lecture #16, 2002 58
A Combined Audio, Video, And A Combined Audio, Video, And Whiteboard ServiceWhiteboard Service
Teleconferencing becomes more interesting when combined with a whiteboard service.– Provides the most flexibility
February 28, 2002 CE80N -- Lecture #16, 2002 59
ConclusionConclusion
How do you think telephone companies view Internet telephone service? (What!? Free long distance?)
Would you be willing to watch the evening news on your computer?
February 28, 2002 CE80N -- Lecture #16, 2002 61
GlossaryGlossary
Audio Teleconference – A service that allows a group of users to
exchange audio information over the Internet similar to a telephone conference call.
Whiteboard Service – A service that permits a group of users to
establish a session that enables all of them to see and modify the same display.
February 28, 2002 CE80N -- Lecture #16, 2002 62
GlossaryGlossary
Bandwidth – The capacity of a network, usually measured in
bits per second. Video Teleconference Service
– A service that allows a group of users to exchange video information over the Internet.
Delay Jitter– The variance in delay seen at the receiver of an
audio/video stream