1 NUS.SOC.CS5248 OOI WEI TSANG Playout Buffer Management.

Slides:



Advertisements
Similar presentations
Comp Spring 2003 Delay Jitter Ketan Mayer-Patel.
Advertisements

NUS.SOC.CS5248 Ooi Wei Tsang 1 Adaptive Playout. NUS.SOC.CS5248 Ooi Wei Tsang 2 You are Here Network Encoder Sender Middlebox Receiver Decoder.
NUS.SOC.CS Roger Zimmermann (based on slides by Ooi Wei Tsang) MPEG + RTP.
Ahmed Mansy, Mostafa Ammar (Georgia Tech) Bill Ver Steeg (Cisco)
MPEG + RTP.
NUS.SOC.CS Roger Zimmermann (based in part on slides by Ooi Wei Tsang) 1 Adaptive Playout.
Chapter 6 outline r 6.1 Multimedia Networking Applications r 6.2 Streaming stored audio and video m RTSP r 6.3 Real-time, Interactive Multimedia: Internet.
Voice Over Internet- Issues Dr. Abhay Karandikar Department of Electrical Engineering Indian Institute of Technology, Bombay. Dr. Abhay Karandikar Department.
Speech codecs and DCCP with TFRC VoIP mode Magnus Westerlund
Voice over the Internet (the basics) CS 7270 Networked Applications & Services Lecture-2.
IP Telephony Project By: Liane Lewin Shahar Eytan Guided By: Ran Cohen - IBM Vitali Sokhin - Technion.
2001/02/15Chin-Kai Wu, CS, NTHU1 Adaptive Playout Mechanisms for Packetized Audio Applications in Wide-Area Networks Ramachandran Ramjee, Jim Kurose, Don.
NUS.SOC.CS Roger Zimmermann (based on slides by Ooi Wei Tsang) Systems Support for Continuous Media.
Packet audio playout delay adjustment Performance bounds and algorithms Moon, Kurose, Towsley.
Adaptive Playout Scheduling Using Time-scale Modification Yi Liang, Nikolaus Färber Bernd Girod, Balaji Prabhakar.
An Empirical Study of Delay Jitter Management Policies D. Stone and K. Jeffay Computer Science Department University of North Carolina, Chapel Hill ACM.
Adaptive Delay Concealment for Internet Voice Applications with Packet-Based Time-Scale Modification Fang Liu, JongWon Kim, C.-C. Jay Kuo IEEE ICASSP 2001.
Streaming Media. Unicast Redundant traffic Multicast One to many.
Yi Liang July 12, 2000 Adaptive Playout Time Control with Time-scale Packet Modification.
CSc 461/561 CSc 461/561 Multimedia Systems Part C: 1. RTP/RTCP.
Nov. 3, 2000 Adaptive Playout Scheduling in Packet Voice Communications.
Adaptive Playout Scheduling Using Time- scale Modification in Packet Voice Communications Yi J. Liang, Nikolaus Farber, Bernd Girod Information Systems.
CS335 Principles of Multimedia Systems Multimedia Over IP Networks -- II Hao Jiang Computer Science Department Boston College Nov. 8, 2007.
FreeBSD Network Stack Performance Srinivas Krishnan University of North Carolina at Chapel Hill.
An Adaptive Predictor for Media Playout Buffering Phillip DeLeon New Mexico State University Cormac J. Sreenan AT&T Labs ICASSP 99’
Nus.soc.cs5248 Ooi Wei Tsang 1 Intermedia Synchronization Ooi Wei Tsang.
Voice Over IP Developing IPHONE Jeremy Stanley CS 460 section 1.
Voice Over Packet Networks Getting the most from your voice codec Philippe Gournay VoiceAge Corp. 750 Lucerne Road, Suite 250 Montreal (Quebec) H3R 2H6.
1 Cache Me If You Can. NUS.SOC.CS5248 OOI WEI TSANG 2 You Are Here Network Encoder Sender Middlebox Receiver Decoder.
Computer Networks: Multimedia Applications Ivan Marsic Rutgers University Chapter 3 – Multimedia & Real-time Applications.
1 Dude, Where is My Packet?. NUS.SOC.CS5248 OOI WEI TSANG 2 Overview Characteristics of the Internet General techniques Error recovery for audio Effect.
CS Spring 2012 CS 414 – Multimedia Systems Design Lecture 29 – Buffer Management (Part 2) Klara Nahrstedt Spring 2012.
1 Multimedia Communication Multimedia Systems(Module 5 Lesson 2) Summary: r Internet Phone Example m Making the Best use of Internet’s Best-Effort Service.
1 Lecture 17 – March 21, 2002 Content-delivery services. Multimedia services Reminder  next week individual meetings and project status report are due.
NUS.SOC.CS5248 Ooi Wei Tsang Previously, on CS5248..
Network Instruments VoIP Analysis. VoIP Basics  What is VoIP?  Packetized voice traffic sent over an IP network  Competes with other traffic on the.
NUS.SOC.CS Roger Zimmermann (based on slides by Ooi Wei Tsang) Systems Support for Continuous Media.
Computer Networks with Internet Technology William Stallings
New Models for Perceived Voice Quality Prediction and their Applications in Playout Buffer Optimization for VoIP Networks University of Plymouth United.
Data and Computer Communications Chapter 11 – Asynchronous Transfer Mode.
Queueing and Active Queue Management Aditya Akella 02/26/2007.
NUS.SOC.CS5248 Ooi Wei Tsang Systems Support for Continuous Media OOI WEI TSANG.
NUS.SOC.CS Roger Zimmermann (based on slides by Ooi Wei Tsang) Systems Support for Continuous Media.
CS640: Introduction to Computer Networks Aditya Akella Lecture 15 TCP – III Reliability and Implementation Issues.
NUS.SOC.CS5248 Ooi Wei Tsang Rate Adaptations. NUS.SOC.CS5248 Ooi Wei Tsang You are Here Network Encoder Sender Middlebox Receiver Decoder.
NUS.SOC.CS5248 Ooi Wei Tsang 1 Proxy Caching for Streaming Media.
NUS.SOC.CS Roger Zimmermann (based in part on slides by Ooi Wei Tsang) Rate Adaptations.
Ch 6. Multimedia Networking Myungchul Kim
RTP and playout delay compensation Henning Schulzrinne Dept. of Computer Science Columbia University Fall 2003.
Congestion Avoidance Created by M Bateman, A Ruddle & C Allison As part of the TCP View project.
Building A Network: Cost Effective Resource Sharing
Chapter 5 Peer-to-Peer Protocols and Data Link Layer Timing Recovery.
NUS.SOC.CS5248 OOI WEI TSANG 1 Previously, on CS5248..
NUS.SOC.CS5248 Ooi Wei Tsang Systems Support for Continuous Media.
NUS.SOC.CS Roger Zimmermann (based in part on slides by Ooi Wei Tsang) Rate Adaptations.
Media Compression.
Topics discussed in this section:
CS5248: Systems Support for Continuous Media
Project Proposal Due Next Mon. Submit by
Error Recovery.
Rate Adaptations.
MPEG + RTP.
Adaptive Playout.
Video On Demand.
Kouhei Fujimoto Graduate School of Engineering Science
VoIP Models for System Performance Evaluation
VoIP Models for System Performance Evaluation
Building A Network: Cost Effective Resource Sharing
Project proposal Multi-stream and multi-path audio transmission
Presentation transcript:

1 NUS.SOC.CS5248 OOI WEI TSANG Playout Buffer Management

NUS.SOC.CS5248 OOI WEI TSANG 2 You are Here Network Encoder Sender Middlebox Receiver Decoder

NUS.SOC.CS5248 OOI WEI TSANG 3 How to recv and play? open socket while not done if socket is readable read packet from socket remove RTP header decode play back

NUS.SOC.CS5248 OOI WEI TSANG 4 What’s Wrong? packet ordering packet loss next packet arrive in-time? Especially bad for audio applications

5 NUS.SOC.CS5248 OOI WEI TSANG Detour: A Brief Intro to Audio Conferencing

NUS.SOC.CS5248 OOI WEI TSANG 6 Audio Compression Normally uncompressed Telephone quality: 8-bit audio 8Khz 20-30ms per packet

NUS.SOC.CS5248 OOI WEI TSANG 7 Common Technique Silence Detection No need to send if there is no sound at the input Talkspurt Sequence of consecutive audio packets (in between silence)

NUS.SOC.CS5248 OOI WEI TSANG 8 Detecting Talkspurt in RTP Marker bit Not reliable as packet with marker bit could be lost Deduce from timestamp and sequence number

9 NUS.SOC.CS5248 OOI WEI TSANG Delay Jitter

NUS.SOC.CS5248 OOI WEI TSANG 10 What causes Jitter? Network delay = Propagation Delay (fixed) + Queueing Delay (variable) Delay jitter is caused by variable queueing delay

NUS.SOC.CS5248 OOI WEI TSANG 11 Delay Jitter Time Transit Time small jitter large jitter

NUS.SOC.CS5248 OOI WEI TSANG 12 Spike Time Transit Time

13 NUS.SOC.CS5248 OOI WEI TSANG Buffer: The Jitter Absorber

NUS.SOC.CS5248 OOI WEI TSANG 14 If Zero Jitter Time

NUS.SOC.CS5248 OOI WEI TSANG 15 With Jitter Time LOSS

NUS.SOC.CS5248 OOI WEI TSANG 16 With Jitter + Buffer Time Buffer Size Playout Delay

17 NUS.SOC.CS5248 OOI WEI TSANG Q: How to set playout delay?

NUS.SOC.CS5248 OOI WEI TSANG 18 Adapting Playout Delay When jitter is low, reduce delay When jitter is high, increase delay

NUS.SOC.CS5248 OOI WEI TSANG 19 Fundamental Trade-off Latency vs Packet Loss

NUS.SOC.CS5248 OOI WEI TSANG 20 Playout Delay Once you set the playout delay, cannot change! NOT true: can change at beginning of talkspurt

NUS.SOC.CS5248 OOI WEI TSANG 21 Adapting Playout Delay SEND RECV PLAY

22 NUS.SOC.CS5248 OOI WEI TSANG Adaptation Algorithm

NUS.SOC.CS5248 OOI WEI TSANG 23 Variables and Notations T send (i) T play (i) T buffer (i) T arrive (i) T delay (i) T net (i)

NUS.SOC.CS5248 OOI WEI TSANG 24 First Packet in the Talkspurt T delay (i) = E net (i) + 4 V net (i) T play (i) = T send (i) + T delay (i) T send (i) T play (i) T buffer (i) T arrive (i) T delay (i) T net (i)

NUS.SOC.CS5248 OOI WEI TSANG 25 Subsequent Packets T play (j) = T play (i) + T send (j) – T send (i) T send (i) T play (i) T buffer (i) T arrive (i) T delay (i) T net (i)

26 NUS.SOC.CS5248 OOI WEI TSANG How to estimate E net (i)

NUS.SOC.CS5248 OOI WEI TSANG 27 Algorithm 1 (Jacobson’s) E net (i) = aE net (i-1) + (1-a)T net (i)

NUS.SOC.CS5248 OOI WEI TSANG 28 Algorithm 2 if T net (i) > E net (i) E net (i) = bE net (i-1) + (1-b)T net (i) else E net (i) = aE net (i-1) + (1-a)T net (i)

NUS.SOC.CS5248 OOI WEI TSANG 29 Algorithm 3 E net (i) = min { T net (j) } (over all packets in previous talkspurt)

NUS.SOC.CS5248 OOI WEI TSANG 30 Algorithm 4 (Ramjee’s) Ramjee’s Proposal Observation: Algorithm 1-3 take too long to react to spike.

NUS.SOC.CS5248 OOI WEI TSANG 31 Spike

NUS.SOC.CS5248 OOI WEI TSANG 32 Ramjee’s Idea Works in 2 modes SPIKENORMAL

NUS.SOC.CS5248 OOI WEI TSANG 33 Three Questions When to switch from normal to spike mode? When to switch from spike back to normal? How to estimate during spike mode?

NUS.SOC.CS5248 OOI WEI TSANG 34 Normal to Spike if difference in delays is large

NUS.SOC.CS5248 OOI WEI TSANG 35 Normal to Spike if difference in delays is large difference in delays: T net (i) – T net (i-1) large: V net (i)

NUS.SOC.CS5248 OOI WEI TSANG 36 Another View of Spike (ZOOM) T net (i) T arrive (i)

NUS.SOC.CS5248 OOI WEI TSANG 37 Spike to Normal slope = slope/2 + |2T net (i) – T net (i-1) – T net (i-2)|/8 if slope < 64 switch to normal

NUS.SOC.CS5248 OOI WEI TSANG 38 Estimation in Spike Mode E net (i) = E net (i-1) + T net (i) – T net (i-1)

NUS.SOC.CS5248 OOI WEI TSANG 39 First Packet in the Talkspurt T delay (i) = E net (i) + 4 V net (i) T play (i) = T send (i) + T delay (i)

NUS.SOC.CS5248 OOI WEI TSANG 40 First Packet in the Talkspurt T delay (i) = E net (i) + 4 V net (i) T play (i) = T send (i) + T delay (i) T send (i) T prop (i) T play (i) T buffer (i) T arrive (i) T q (i) T delay (i) T net (i)

41 NUS.SOC.CS5248 OOI WEI TSANG How to estimate V net (i)

NUS.SOC.CS5248 OOI WEI TSANG 42 Variation of Delay V net (i) = aV net (i-1) + (1-a)|E net (i) – T net (i)|

43 NUS.SOC.CS5248 OOI WEI TSANG Comparisons of 4 Algorithms

NUS.SOC.CS5248 OOI WEI TSANG 44 Playout Delay vs Loss Rate T delay (i) Loss Rate

45 NUS.SOC.CS5248 OOI WEI TSANG Algorithm 5 (Moon’s)

NUS.SOC.CS5248 OOI WEI TSANG 46 Problems of Existing Algorithms Jacobson’s react too slowly Ramjee’s follow the delay too closely

NUS.SOC.CS5248 OOI WEI TSANG 47 Moon’s Idea Collect statistics on packets that have arrived Find t such that q% of last w packets has T net (i) < t T delay (i) = t

NUS.SOC.CS5248 OOI WEI TSANG 48 Example (w =50, q = 90%) num of packets delay

NUS.SOC.CS5248 OOI WEI TSANG 49 Spike Mode T delay (i) = E net (1) SPIKENORMAL

NUS.SOC.CS5248 OOI WEI TSANG 50 Spike Mode

NUS.SOC.CS5248 OOI WEI TSANG 51 Switching Mode Normal to Spike if (T net (i) > k*T delay (i)) Spike to Normal if (T net (i) < k’ * OLDT delay (i))

NUS.SOC.CS5248 OOI WEI TSANG 52 Loss Rate vs. Delay T delay (i) Loss Rate

53 NUS.SOC.CS5248 OOI WEI TSANG Theoretical Lower Bound

NUS.SOC.CS1102 OOI WEI TSANG 54 Dynamic Programming

NUS.SOC.CS1102 OOI WEI TSANG 55 Fibonacci Numbers 01… 012 … i-2i-1i +

NUS.SOC.CS1102 OOI WEI TSANG 56 Fibonacci Numbers fib(n) x[0] = 0 x[1] = 1 for (i = 2; i < n; i++) x[i] = x[i-1] + x[i-2] return x[i]

NUS.SOC.CS1102 OOI WEI TSANG 57 Binomial Coefficient k n

NUS.SOC.CS1102 OOI WEI TSANG 58 Change-Making Problem  [Weiss] 7.6 For a currency with coin C1, C2,.. Cn (cents), what is the min number of coins needed to make K cents of change?

NUS.SOC.CS1102 OOI WEI TSANG 59 Example  C = {1, 5, 10, 20, 50}  K = 76 cents  Give 4 coins = 76

NUS.SOC.CS1102 OOI WEI TSANG 60 Formulation  To make a change of K cents, either make a change of (K-50) cents, or make a change of (K-20) cents, or make a change of (K-10) cents, or make a change of (K-5) cents, or make a change of (K-1) cents  Number of coins for K = 1 + minimum of all the above choices

NUS.SOC.CS1102 OOI WEI TSANG 61 Dynamic Programming …… min+1 K K-5K-10K-20

62 NUS.SOC.CS5248 OOI WEI TSANG Theoretical Lower Bound

NUS.SOC.CS5248 OOI WEI TSANG 63 Goal Input: A packet trace A number of packet losses What is the minimum average playout delay T delay (.) ?

NUS.SOC.CS5248 OOI WEI TSANG 64 Trace k M talkspurts 1,k2,k3,kj,kn k,k

NUS.SOC.CS5248 OOI WEI TSANG 65 New Notations M: Number of Talkspurt N packet (k) or n k Number of packets in talkspurt k N total Total number of packets

NUS.SOC.CS5248 OOI WEI TSANG 66 Define.. d(k, i) minimum average playout delay for choosing i packets to be played out from k-th talkspurt k.. M 1,k2,k3,kj,kn k,k

NUS.SOC.CS5248 OOI WEI TSANG 67 Define.. D(k, i) minimum average playout delay for choosing i packets to be played out from k-th to M-th talkspurt k.. M

NUS.SOC.CS5248 OOI WEI TSANG 68 Dynamic Programming M 012N

NUS.SOC.CS5248 OOI WEI TSANG 69 Formulation for Base Case if i = 0 then D(k,i) = 0 if k = M if i ≤ N packet (M) then D(k,i) = d(k,i) else D(k,i) = ∞

NUS.SOC.CS5248 OOI WEI TSANG 70 Formulation for Recursive Case k.. M

NUS.SOC.CS5248 OOI WEI TSANG 71 Loss Rate vs. Delay T delay (i) Loss Rate 1%

72 NUS.SOC.CS5248 OOI WEI TSANG Video Playout

NUS.SOC.CS5248 OOI WEI TSANG 73 Two Methods I-Policy Display at fixed playout delay Drop late frames E-Policy Display late frame at next period Playout delay increase

NUS.SOC.CS5248 OOI WEI TSANG 74 I-Policy a b c d e f g h ace fh

NUS.SOC.CS5248 OOI WEI TSANG 75 E-Policy a b c d e f g h abdfgceh

NUS.SOC.CS5248 OOI WEI TSANG 76 I-Policy a b c d e f g h abefhg

NUS.SOC.CS5248 OOI WEI TSANG 77 E-Policy a b c d e f g h abcdfe

NUS.SOC.CS5248 OOI WEI TSANG 78 Pro and Cons I-Policy: Fixed latency E-Policy: No Loss Frame or Gap

NUS.SOC.CS5248 OOI WEI TSANG 79 Idea if queue length > L for T seconds drop incoming frames long queue -> small T short queue -> large T

NUS.SOC.CS5248 OOI WEI TSANG 80 Queue Monitoring queue length threshold waiting time

NUS.SOC.CS5248 OOI WEI TSANG 81 Queue Monitoring queue length threshold waiting time

NUS.SOC.CS5248 OOI WEI TSANG 82 Queue Monitoring queue length threshold waiting time

NUS.SOC.CS5248 OOI WEI TSANG 83 Queue Monitoring queue length threshold waiting time

NUS.SOC.CS5248 OOI WEI TSANG 84 Queue Monitoring queue length threshold waiting time

NUS.SOC.CS5248 OOI WEI TSANG 85 Summary Preliminary work by Stone and Jeffay on Video Playout Ramjee’s and Moon’s adaptive audio playout algorithm

86 NUS.SOC.CS5248 OOI WEI TSANG Possible Survey and Project Topic

NUS.SOC.CS5248 OOI WEI TSANG 87 Adapting Playback Besides adapting buffering time, we can adapt playback time Estimating and eliminating clock drift