Κεφάλαιο 7 Δικτύωση πολυμέσων A note on the use of these ppt slides:

38 Slides2.73 MB

Κεφάλαιο 7 Δικτύωση πολυμέσων A note on the use of these ppt slides: We’re making these slides freely available to all (faculty, students, readers). They’re in PowerPoint form so you see the animations; and can add, modify, and delete slides (including this one) and slide content to suit your needs. They obviously represent a lot of work on our part. In return for use, we only ask the following: If you use these slides (e.g., in a class) that you mention their source (after all, we’d like people to use our book!) If you post any slides on a www site, that you note that they are adapted from (or perhaps identical to) our slides, and note our copyright of this material. Thanks and enjoy! JFK/KWR Computer Networking: A Top Down Approach 6th edition Jim Kurose, Keith Ross Addison-Wesley March 2012 All material copyright 1996-2012 J.F Kurose and K.W. Ross, All Rights Reserved Multmedia Networking 7-1

Δικτύωση πολυμέσων: περίγραμμα 7.1 Δικτυακές εφαρμογές πολυμέσων 7.2 Ροή αποθηκευμένου βίντεο 7.3 voice-over-IP 7.4 πρωτόκολλα για εφαρμογές συνομιλίας σε πραγματικό χρόνο 7.5 Υποστήριξη δικτύου για πολυμέσα Multmedia Networking 7-2

Multimedia: audio analog audio signal sampled at constant rate telephone: 8,000 samples/sec CD music: 44,100 samples/sec each sample quantized, i.e., rounded e.g., 28 256 possible quantized values each quantized value represented by bits, e.g., 8 bits for 256 values quantization error audio signal amplitude quantized value of analog value analog signal time sampling rate (N sample/sec) Multmedia Networking 7-3

Multimedia: audio example: 8,000 samples/sec, 256 quantized values: 64,000 bps receiver converts bits back to analog signal: some quality reduction example rates CD: 1.411 Mbps MP3: 96, 128, 160 kbps Internet telephony: 5.3 kbps and up quantization error audio signal amplitude quantized value of analog value analog signal time sampling rate (N sample/sec) Multmedia Networking 7-4

Multimedia: video video: sequence of images displayed at constant rate e.g. 24 images/sec digital image: array of pixels each pixel represented by bits coding: use redundancy within and between images to decrease # bits used to encode image spatial (within image) temporal (from one image to next) spatial coding example: instead of sending N values of same color (all purple), send only two values: color value (purple) and number of repeated values (N) . . frame i temporal coding example: instead of sending complete frame at i 1, send only differences from frame i frame i 1 Multmedia Networking 7-5

Multimedia: video CBR: (constant bit rate): video encoding rate fixed VBR: (variable bit rate): video encoding rate changes as amount of spatial, temporal coding changes examples: MPEG 1 (CD-ROM) 1.5 Mbps MPEG2 (DVD) 3-6 Mbps MPEG4 (often used in Internet, 1 Mbps) spatial coding example: instead of sending N values of same color (all purple), send only two values: color value (purple) and number of repeated values (N) . . frame i temporal coding example: instead of sending complete frame at i 1, send only differences from frame i frame i 1 Multmedia Networking 7-6

Multimedia networking: 3 application types streaming, stored audio, video streaming: can begin playout before downloading entire file stored (at server): can transmit faster than audio/video will be rendered (implies storing/buffering at client) e.g., YouTube, Netflix, Hulu conversational voice/video over IP interactive nature of human-to-human conversation limits delay tolerance e.g., Skype streaming live audio, video e.g., live sporting event (futbol) Multmedia Networking 7-7

Multimedia networking: outline 7.1 multimedia networking applications 7.2 streaming stored video 7.3 voice-over-IP 7.4 protocols for real-time conversational applications 7.5 network support for multimedia Multmedia Networking 7-8

Cumulative data Streaming stored video: 1. video recorded (e.g., 30 frames/sec ) 2. video sent network delay (fixed in this example) 3. video received, played out at client (30 frames/sec) time streaming: at this time, client playing out early part of video, while server still sending later part of video Multmedia Networking 7-9

Streaming stored video: challenges continuous playout constraint: once client playout begins, playback must match original timing but network delays are variable (jitter), so will need client-side buffer to match playout requirements other challenges: client interactivity: pause, fast-forward, rewind, jump through video video packets may be lost, retransmitted Multmedia Networking 7-10

Streaming stored video: revisted client video reception variable network delay client playout delay constant bit rate video playout at client buffered video Cumulative data constant bit rate video transmission time client-side buffering and playout delay: compensate for network-added delay, delay jitter Multmedia Networking 7-11

Streaming multimedia: UDP server sends at rate appropriate for client often: send rate encoding rate constant rate transmission rate can be oblivious to congestion levels short playout delay (2-5 seconds) to remove network jitter error recovery: application-level, timeipermitting RTP [RFC 2326]: multimedia payload types UDP may not go through firewalls Multmedia Networking 7-12

Streaming multimedia: HTTP multimedia file retrieved via HTTP GET send at maximum possible rate under TCP variable rate, x(t) video file TCP send buffer server TCP receive buffer application playout buffer client fill rate fluctuates due to TCP congestion control, retransmissions (in-order delivery) larger playout delay: smooth TCP delivery rate HTTP/TCP passes more easily through firewalls Multmedia Networking 7-13

Streaming multimedia: DASH DASH: Dynamic, Adaptive Streaming over HTTP server: divides video file into multiple chunks each chunk stored, encoded at different rates manifest file: provides URLs for different chunks client: periodically measures server-to-client bandwidth consulting manifest, requests one chunk at a time chooses maximum coding rate sustainable given current bandwidth can choose different coding rates at different points in time (depending on available bandwidth at time) Multmedia Networking 7-14

Content distribution networks challenge: how to stream content (selected from millions of videos) to hundreds of thousands of simultaneous users? option 1: single, large “mega-server” single point of failure point of network congestion long path to distant clients multiple copies of video sent over outgoing link .quite simply: this solution doesn’t scale Multmedia Networking 7-15

Content distribution networks challenge: how to stream content (selected from millions of videos) to hundreds of thousands of simultaneous users? option 2: store/serve multiple copies of videos at multiple geographically distributed sites (CDN) enter deep: push CDN servers deep into many access networks close to users used by Akamai, 1700 locations bring home: smaller number (10’s) of larger clusters in POPs near (but not within) access networks used by Limelight Multmedia Networking 7-16

CDN: “simple” content access scenario ob (client) requests video http://netcinema.com/6Y7B2 video stored in CDN at http://KingCDN.com/NetC6y&B23V 1. Bob gets URL for for video http://netcinema.com/6Y7B23V 2. resolve http://netcinema.com/6Y7B23V from netcinema.com 2 via Bob’s local DNS web page 1 6. request video from 5 4&5. Resolve KINGCDN server, http://KingCDN.com/NetC6y&B23 streamed via HTTP via KingCDN’s authoritative DNS, 3. netcinema’s DNS returns URL netcinema.com 4 which returns IP address of KIingCDN http://KingCDN.com/NetC6y&B23V server with video 3 netcinema’s authorative DNS KingCDN.com KingCDN authoritative DNS Multmedia Networking 7-17

Case study: Netflix 30% downstream US traffic in 2011 owns very little infrastructure, uses 3rd party services: own registration, payment servers Amazon (3rd party) cloud services: Netflix uploads studio master to Amazon cloud create multiple version of movie (different endodings) in cloud upload versions from cloud to CDNs Cloud hosts Netflix web pages for user browsing three 3rd party CDNs host/stream Netflix content: Akamai, Limelight, Level-3 Multmedia Networking 7-18

Case study: Netflix Amazon cloud Netflix registration, accounting servers 2. Bob browses Netflix video 2 upload copies of multiple versions of video to CDNs 3. Manifest file returned for requested video Akamai CDN Limelight CDN 3 1 1. Bob manages Netflix account 4. DASH streaming Level-3 CDN Multmedia Networking 7-19

Multimedia networking: outline 7.1 multimedia networking applications 7.2 streaming stored video 7.3 voice-over-IP 7.4 protocols for real-time conversational applications 7.5 network support for multimedia Multmedia Networking 7-20

Voice-over-IP (VoIP) VoIP end-end-delay requirement: needed to maintain “conversational” aspect higher delays noticeable, impair interactivity 150 msec: good 400 msec bad includes application-level (packetization,playout), network delays session initialization: how does callee advertise IP address, port number, encoding algorithms? value-added services: call forwarding, screening, recording emergency services: 911 Multmedia Networking 7-21

VoIP characteristics speaker’s audio: alternating talk spurts, silent periods. 64 kbps during talk spurt pkts generated only during talk spurts 20 msec chunks at 8 Kbytes/sec: 160 bytes of data application-layer header added to each chunk chunk header encapsulated into UDP or TCP segment application sends segment into socket every 20 msec during talkspurt Multmedia Networking 7-22

VoIP: packet loss, delay 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, loss concealment, packet loss rates between 1% and 10% can be tolerated Multmedia Networking 7-23

Delay jitter variable network delay (jitter) client reception constant bit rate playout at client buffered data Cumulative data constant bit rate transmission time client playout delay end-to-end delays of two consecutive packets: difference can be more or less than 20 msec (transmission time difference) Multmedia Networking 7-24

VoIP: 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 in choosing q: large q: less packet loss small q: better interactive experience Multmedia Networking 7-25

VoIP: fixed playout delay sender generates packets every 20 msec during talk spur first packet received at time r first playout schedule: begins at p second playout schedule: begins at p’ p a c k e ts lo s s p a c k e ts g e n e ra te d p a c k e ts r e c e iv e d p la y o u t s c h e d u le p' - r p la y o u t s c h e d u le p - r tim e r p p' Multmedia Networking 5-26

Adaptive playout delay (1) goal: low playout delay, low late loss rate approach: adaptive playout delay adjustment: estimate network delay, adjust playout delay at beginning of each talk spurt silent periods compressed and elongated chunks still played out every 20 msec during talk spurt di (1 )di-1 packet (ri – tidelay: ) adaptively estimate (EWMA - exponentially weighted moving average, recallsmall TCP RTT estimate): delay estimate constant, time received - time sent after ith packet e.g. 0.1 (timestamp) measured delay of ith packet Multmedia Networking 7-27

Adaptive playout delay (2) also useful to estimate average deviation of delay, v vi (1 )vi-1 ri – ti – di estimates di, vi calculated for every received packet, but used only at start of talk spurt for first packet in talk spurt, playout time is: playout-timei ti di Kvi remaining packets in talkspurt are played out periodically Multmedia Networking 5-28

Adaptive playout delay (3) Q: How does receiver determine whether packet is first in a talkspurt? if no loss, receiver looks at successive timestamps difference of successive stamps 20 msec - talk spurt begins. with loss possible, receiver must look at both time stamps and sequence numbers difference of successive stamps 20 msec and sequence numbers without gaps -- talk spurt begins. Multmedia Networking 7-29

Multimedia networking: outline 7.1 multimedia networking applications 7.2 streaming stored video 7.3 voice-over-IP 7.4 protocols for real-time conversational applications: RTP, SIP 7.5 network support for multimedia Multmedia Networking 7-30

Real-Time Protocol (RTP) RTP specifies packet structure for packets carrying audio, video data RFC 3550 RTP packet provides payload type identification packet sequence numbering time stamping RTP runs in end systems RTP packets encapsulated in UDP segments interoperability: if two VoIP applications run RTP, they may be able to work together Multmedia Networking 7-31

RTP runs on top of UDP RTP libraries provide transport-layer interface that extends UDP: port numbers, IP addresses payload type identification packet sequence numbering time-stamping Multmedia Networking 5-32

RTP example example: 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 indicates type of audio encoding in each packet sender can change encoding during conference RTP header also contains sequence numbers, timestamps Multmedia Networking 7-33

RTP and QoS RTP does not provide any mechanism to ensure timely data delivery or other QoS guarantees RTP encapsulation only seen at end systems (not by intermediate routers) routers provide best-effort service, making no special effort to ensure that RTP packets arrive at destination in timely matter Multmedia Networking 7-34

Real-Time Control Protocol (RTCP) works in conjunction with RTP each participant in RTP session periodically sends RTCP control packets to all other participants each RTCP packet contains sender and/or receiver reports report statistics useful to application: # packets sent, # packets lost, interarrival jitter feedback used to control performance sender may modify its transmissions based on feedback Multmedia Networking 7-35

SIP: Session Initiation Protocol [RFC 3261] long-term vision: all telephone calls, video conference calls take place over Internet people identified by names or e-mail addresses, rather than by phone numbers can reach callee (if callee so desires), no matter where callee roams, no matter what IP device callee is currently using Multmedia Networking 7-36

SIP services SIP provides mechanisms for call setup: for caller to let callee know she wants to establish a call so caller, callee can agree on media type, encoding to end call determine current IP address of callee: maps mnemonic identifier to current IP address call management: add new media streams during call change encoding during call invite others transfer, hold calls Multmedia Networking 7-37

Multimedia networking: outline 7.1 multimedia networking applications 7.2 streaming stored video 7.3 voice-over-IP 7.4 protocols for real-time conversational applications 7.5 network support for multimedia Multmedia Networking 7-38

Back to top button