Presentation is loading. Please wait.

Presentation is loading. Please wait.

Multimedia Networking Quality of Services Hongli Luo, IPFW.

Similar presentations


Presentation on theme: "Multimedia Networking Quality of Services Hongli Luo, IPFW."— Presentation transcript:

1 Multimedia Networking Quality of Services Hongli Luo, IPFW

2 Topics r Multimedia networking applications m Stored, live, interactive multimedia applications r How should Internet better support QoS r Internet multimedia streaming m Web server or streaming server m TCP or UDP r Packet loss, delay and jitter m How to alleviate it

3 Multimedia and Quality of Service: What is it? multimedia applications: network audio and video (“continuous media”) network provides application with level of performance needed for application to function. QoS

4 MM Networking Applications Fundamental characteristics: r typically delay sensitive m end-to-end delay m delay jitter r loss tolerant: infrequent losses cause minor glitches r Elastic applications m Web, e-mail, FTP, telnet m loss intolerant but delay tolerant. Classes of MM applications: 1) stored streaming 2) live streaming 3) interactive, real-time Jitter is the variability of packet delays within the same packet stream

5 Streaming Stored Multimedia Stored streaming: r Applications: CNN, Microsoft Video, YouTube r media stored at source r transmitted to client streaming: client playout begins before all data has arrived r timing constraint for still-to-be transmitted data: in time for playout r Continuous playout r Streaming multimedia clients: RealPlayer, QuickTime, Windows Media

6 Streaming Stored Multimedia: What is it? 1. video recorded 2. video sent 3. video received, played out at client Cumulative data streaming: at this time, client playing out early part of video, while server still sending later part of video network delay time

7 Streaming Stored Multimedia: Interactivity r VCR-like functionality: client can pause, rewind, FF, push slider bar m 10 sec initial delay OK m 1-2 sec until command effect OK r timing constraint for still-to-be transmitted data: in time for playout

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

9 Streaming Live Multimedia r Live, broadcast like applications often have many clients who are receiving the same audio/video program r How to efficiently deliver the contents m Multiple separate server-to-client unicast streams m IP multicast m Application-layer multicast – multicast overlay networks m Content Distribution Networks (CDNs) m Peer-to-peer networks

10 Real-Time Interactive Multimedia r end-end delay requirements: m audio: < 150 msec good, < 400 msec OK includes application-level (packetization) and network delays higher delays noticeable, impair interactivity r session initialization m how does callee advertise its IP address, port number, encoding algorithms? r applications: IP telephony, video conference, distributed interactive worlds

11 Requirements for Data Transport r Delay m Some small delay at the beginning is acceptable m E.g., start-up delays of a few seconds are okay r Jitter m Variability of packet delay within the same packet stream m Client cannot tolerate high variation if the buffer starves r Loss m Small amount of missing data does not disrupt playback m Retransmitting a lost packet might take too long anyway

12 Multimedia Over Today’s Internet TCP/UDP/IP: “best-effort service” r 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 requires QoS and level of performance to be effective! ? ? ?? ? ? ? ? ? ? ?

13 Challenges to the Current Internet (1) r TCP/UDP/IP suite provides best-effort, no guarantees on expectation or variance of packet delay r Streaming applications delay of 5 to 10 seconds is typical and has been acceptable, but performance deteriorate if links are congested (transoceanic) r Most router implementations use only First-Come- First-Serve (FCFS) packet processing and transmission scheduling

14 Challenges to the Current Internet (2) r To mitigate impact of “best-effort” protocols, we can: m Use UDP to avoid TCP and its slow-start phase… m Buffer content at client and delay playback to remedy jitter m Prefetch data during playback when client storage and extra bandwidth are available m Adapt compression level to available bandwidth m Different treatment of packets at the router Different classes of packets

15 How should the Internet evolve to better support multimedia? Integrated services philosophy: r fundamental changes in Internet so that apps can reserve end-to-end bandwidth r Applications receive a guarantee on its end-to-end performance m Hard guarantee – received QoS with certainty m Soft guarantee – received QoS with high probability r requires new, complex software in hosts & routers m Application makes reservation m Modify scheduling policies at the router m Description of traffic m Admission control

16 How should the Internet evolve to better support multimedia? Laissez-faire r no major changes r more bandwidth when needed r content distribution, m Replicate stored content and put the replicated contents at the edges of the Internet r application-layer multicast m Multicast Overlay networks can be deployed m Application layer Differentiated services philosophy: r fewer changes to Internet infrastructure, yet provide 1st and 2nd class service

17 A few words about audio compression r analog signal sampled at constant rate m telephone: 8,000 samples/sec m CD music: 44,100 samples/sec r each sample quantized, i.e., rounded m e.g., 2 8 =256 possible quantized values r each quantized value represented by bits m 8 bits for 256 values r example: 8,000 samples/sec, 256 quantized values --> 64,000 bps r receiver converts bits back to analog signal: m some quality reduction Example rates r CD: 1.411 Mbps r MP3: 96, 128, 160 kbps r Internet telephony: 5.3 kbps and up

18 A few words about video compression r video: sequence of images displayed at constant rate m e.g. 24 images/sec r digital image: array of pixels m each pixel represented by bits r redundancy m spatial (within image) m temporal (from one image to next) Examples: r MPEG 1 (CD-ROM) 1.5 Mbps r MPEG2 (DVD) 3-6 Mbps r MPEG4 (often used in Internet, < 1 Mbps) Research: r layered (scalable) video m adapt layers to available bandwidth

19 Streaming Stored Multimedia r Client-server system m Server stores the audio and video files m Clients request files, play them as they download, and perform VCR-like functions (e.g., rewind and pause) r Playing data at the right time m Server divides the data into segments m labels each segment with timestamp or frame id m so the client knows when to play the data r Avoiding starvation at the client m The data must arrive quickly enough m otherwise the client cannot keep playing

20 Streaming Stored Multimedia application-level streaming techniques for making the best out of best effort service: m client-side buffering m use of UDP versus TCP m multiple encodings of multimedia r jitter removal r decompression r error concealment r graphical user interface w/ controls for interactivity Media Player Streaming stored multimedia m Through a Web server Deliver the video/audio to the client over HTTP m Through a streaming server Using HTTP or some other protocol m HTTP popular – pass through firewall while proprietary protocols are blocked

21 Internet multimedia: simplest approach – through a Web Server r audio or video stored in file r files transferred as HTTP object m TCP connection between client and server m received in entirety at client m then passed to player r Client invokes the media player m Content-type indicates the encoding m Browser launches the media player m Media player then renders the file

22 Internet multimedia: through a Web Server r User clicks on a hyperlink for an audio/video file r browser GETs metafile describing the object r browser launches player, passing metafile r player sets up its own connection to the Web server r server streams audio/video to player

23 Streaming from a streaming server r Web server returns a meta file describing the object via HTTP r Player requests the data using a different protocol r allows for non-HTTP protocol between server, media player r To control playback, protocol is needed to exchange playback control information – RTSP protocol

24 Streaming Multimedia: Client Buffering How to deliver media from the streaming server to the media player r Media is sent over UDP at a constant rate equal to the drain rate m As soon as the client receives media, it decompresses it and plays it back m The media player delays playout for 2 to 5 seconds in order to eliminate network-induced jitter. r Media is sent over TCP m Fill rate x(t) fluctuates with time – due to TCP congestion control and window flow control m X(t) may be less that d for long periods because of congestion m Empty client buffer - starvation/underflow m Introduces undesirable pause during the playback m X(t) very much depends on the size of the client buffer Large client buffer – TCP make use of the available bandwidth to prfetch, less likely starvation Small client buffer – more client starvation

25 constant bit rate video transmission Cumulative data time variable network delay client video reception constant bit rate video playout at client client playout delay buffered video Streaming Multimedia: Client Buffering r client-side buffering, playout delay compensate for network-added delay, delay jitter

26 Streaming Multimedia: Client Buffering r client-side buffering, m Store the data as it arrives from the server m Play data for the user in a continuous fashion r playout delay m Client typically waits a few seconds to start playing m Allow some data to build up in the buffer m compensate for network-added delay, delay jitter

27 Streaming Multimedia: UDP or TCP? TCP r send at maximum possible rate under TCP r fill rate fluctuates due to TCP congestion control m Slow down after a packet loss, m May cause starvation at the client r HTTP/TCP passes more easily through firewalls r TCP’s Reliable delivery not needed for multimedia m Retransmission of lost packets even though retransmission may not be useful m Late packet can be thrown away r Protocol overhead m TCP header of 20 bytes in every packet

28 Streaming Multimedia: UDP or TCP? UDP r server sends at rate appropriate for client (oblivious to network congestion !) m often send rate = encoding rate = constant rate m then, fill rate = constant rate - packet loss m No automatic adaptation of sending rate r short playout delay (2-5 seconds) to remove network jitter r error recover: time permitting m No automatic retransmission of lost packets m Retransmit if packet deadline not past r Smaller packet header

29 Streaming Multimedia: UDP or TCP? UDP r Do not respond to congestion m Not sharing bandwidth fairly m Possible to cause congestion collapse m Put flow control, congestion control into application r UDP leaves many things to the application m When to transmit data m How to encapsulate the data m Whether to retransmit lost data m Whether to adapt the sending rate m Whether to adapt the quality of the audio/video encoding

30 Streaming Multimedia: UDP or TCP? UDP r Even when using UDP, applications should respond to congestion end-to-end. r Need to promote “TCP-friendly” behavior. Rate-based Adaptation  adjust rate to avoid congestion  reduce rate before packet loss or at the detection of packet loss.

31 TCP-Friendly r Throughput of a TCP connection m P: the packet size m p: the lost probability of a packet r Limit flows to TCP-style BW r Don’t know RTT exactly

32 YouTube: HTTP, TCP, and Flash r Flash videos m All uploaded videos converted to Flash format m Nearly every browser has a Flash plug-in m avoids need for users to install players r HTTP/TCP m Implemented in every browser m Easily gets through most firewalls r Keep It Simple, Stupid m Simplicity more important than video quality

33 Real-time interactive applications r PC-2-PC phone m Skype r PC-2-phone m Dialpad, Net2phone, Skype r videoconference with webcams m Skype, Polycom r Video game r QoS requirements: m Strict delay constraints m Much harder than streaming applications m Receiver can not introduce much playback delay Going to now look at a PC-2-PC Internet phone example in detail

34 Interactive Multimedia: Internet Phone Introduce Internet Phone by way of an example r speaker’s audio: alternating talk spurts, silent periods. m 64 kbps during talk spurt m pkts generated only during talk spurts m 20 msec chunks at 8 Kbytes/sec: 160 bytes data r application-layer header added to each chunk. r chunk+header encapsulated into UDP segment. r application sends UDP segment into socket every 20 msec during talkspurt

35 Internet Phone: Packet Loss and Delay r network loss: IP datagram lost due to network congestion (router buffer overflow) r delay loss: IP datagram arrives too late for playout at receiver r loss tolerance: depending on voice encoding, losses concealed, packet loss rates between 1% and 10% can be tolerated. r Most Internet phone applications that run over UDP do not retransmit lost packets.

36 Recovering From Packet Loss r Loss is defined in a broader sense m Does a packet arrive in time for playback? m A packet that arrives late is as good as lost m Retransmission is not useful if deadline passed r Selective retransmission m Sometimes retransmission is acceptable m E.g., if client has not already started playing data m Data can be retransmitted within time constraint r Could do Forward Error Correction (FEC) m Send redundant info so receiver can reconstruct

37 Internet Phone: Packet Loss and Delay r Packet delay m delays: processing, queueing in network; end- system (sender, receiver) delays m For highly interactive audio applications, e.g., Internet phone End-to-end delays smaller than 150 ms are not perceived by a human listener Delays between 150 and 400 ms acceptable but not ideal typical maximum tolerable delay: 400 ms

38 Removing Jitter at the Receiver for Audio r Provide synchronous playout of voice chunks in the presence of random network jitter r To alleviate the jitter m Sequence number is added to each chunk m Timestamp – sender stamps each chunk with the time at which the chunk was generated m Delaying playout Playout delay must be long enough so that most of the packets are received before the scheduled playout times Fixed playout delay Adaptive playout delay

39 Internet Phone: Fixed Playout Delay r receiver attempts to playout each chunk exactly q msecs after chunk was generated. m chunk has time stamp t: play out chunk at t+q. m chunk arrives after t+q: data arrives too late for playout, data “lost” r tradeoff in choosing q: m large q: less packet loss When large variations in end-to-end delay m small q: better interactive experience Delay and variations in delay are small.e.g., < 150 ms

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

41 Fixed Playout Delay 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’

42 Adaptive Playout Delay r Goal: minimize playout delay, keeping late loss rate low r Approach: adaptive playout delay adjustment: m estimate network delay, adjust playout delay at beginning of each talk spurt. m silent periods compressed and elongated. m chunks still played out every 20 msec during talk spurt.

43 Recovery from packet loss (1) Forward Error Correction (FEC): simple scheme r for every group of n chunks create redundant chunk by exclusive OR-ing n original chunks r send out n+1 chunks, increasing bandwidth by factor 1/n. r can reconstruct original n chunks if at most one lost chunk from n+1 chunks r playout delay: enough time to receive all n+1 packets r tradeoff: m increase n, less bandwidth waste m increase n, longer playout delay m increase n, higher probability that 2 or more chunks will be lost

44 Recovery from packet loss (2) 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.  whenever there is non-consecutive loss, receiver can conceal the loss.  can also append (n-1)st and (n-2)nd low-bit rate chunk

45 Recovery from packet loss (3) Interleaving r chunks divided into smaller units r for example, four 5 msec units per chunk r packet contains small units from different chunks r if packet lost, still have most of every chunk r no redundancy overhead, but increases playout delay


Download ppt "Multimedia Networking Quality of Services Hongli Luo, IPFW."

Similar presentations


Ads by Google