Adaptive Playout.

Slides:



Advertisements
Similar presentations
Streaming Video over the Internet
Advertisements

Streaming Protocol Suite
Comp Spring 2003 Delay Jitter Ketan Mayer-Patel.
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.
LOGO Video Packet Selection and Scheduling for Multipath Streaming IEEE TRANSACTIONS ON MULTIMEDIA, VOL. 9, NO. 3, APRIL 2007 Dan Jurca, Student Member,
RTP: A Transport Protocol for Real-Time Applications Provides end-to-end delivery services for data with real-time characteristics, such as interactive.
NUS.SOC.CS Roger Zimmermann (based on slides by Ooi Wei Tsang) MPEG + RTP.
1 NUS.SOC.CS5248 OOI WEI TSANG Playout Buffer Management.
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.
Measurements of Congestion Responsiveness of Windows Streaming Media (WSM) Presented By:- Ashish Gupta.
2001/02/15Chin-Kai Wu, CS, NTHU1 Adaptive Playout Mechanisms for Packetized Audio Applications in Wide-Area Networks Ramachandran Ramjee, Jim Kurose, Don.
Supporting Stored Video: Reducing Rate Variability and End-toEnd Resource Requirements through Optimal Smoothing By James D. salehi, Zhi-Li Zhang, James.
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.
Proxy-based TCP over mobile nets1 Proxy-based TCP-friendly streaming over mobile networks Frank Hartung Uwe Horn Markus Kampmann Presented by Rob Elkind.
Ch. 28 Q and A IS 333 Spring Q1 Q: What is network latency? 1.Changes in delay and duration of the changes 2.time required to transfer data across.
Nus.soc.cs5248 Ooi Wei Tsang 1 Intermedia Synchronization Ooi Wei Tsang.
CS 218 F 2003 Nov 3 lecture:  Streaming video/audio  Adaptive encoding (eg, layered encoding)  TCP friendliness References: r J. Padhye, V.Firoiu, D.
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.
CS Spring 2012 CS 414 – Multimedia Systems Design Lecture 29 – Buffer Management (Part 2) Klara Nahrstedt Spring 2012.
Quality of Service in the Internet The slides of part 1-3 are adapted from the slides of chapter 7 published at the companion website of the book: Computer.
Chapter 5: Summary r principles behind data link layer services: m error detection, correction m multiple access protocols m link layer addressing, ARP.
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.
RANI NALAMARU DEPARTMENT OF COMPUTER SCIENCE BALL STATE UNIVERSITY RANI NALAMARU DEPARTMENT OF COMPUTER SCIENCE BALL STATE UNIVERSITY Efficient Transmission.
NUS.SOC.CS5248 Ooi Wei Tsang Previously, on CS5248..
NUS.SOC.CS Roger Zimmermann (based on slides by Ooi Wei Tsang) Systems Support for Continuous Media.
03/11/2015 Michael Chai; Behrouz Forouzan Staffordshire University School of Computing Streaming 1.
Advanced Technology Laboratories Practical Considerations for Smoothing Multimedia Traffic over Packet- Switched Networks Christos Tryfonas
NUS.SOC.CS Roger Zimmermann (based in part on slides by Ooi Wei Tsang) 1 Proxy Caching for Streaming Media.
Internet multimedia: simplest approach audio, video not streamed: r no, “pipelining,” long delays until playout! r audio or video stored in file r files.
NUS.SOC.CS Roger Zimmermann (based on slides by Ooi Wei Tsang) Systems Support for Continuous Media.
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.
3GPP2 Evolution Workshop Multimedia Codecs and Protocols 3GPP2 TSG-C SWG1.2.
NUS.SOC.CS Roger Zimmermann (based on slides by Ooi Wei Tsang) Project Packetize MP3 audio into RTP Packets.
Managing VBR Videos. The VBR Problem Constant quality Burstiness over multiple time scales Difference within and between scenes Frame structure of encoding.
RTP and playout delay compensation Henning Schulzrinne Dept. of Computer Science Columbia University Fall 2003.
CS Spring 2011 CS 414 – Multimedia Systems Design Lecture 24 – Client-Server Buffer Management Klara Nahrstedt Spring 2011.
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.
March 15, 2001Mark Kalman - ee368c Analysis of Adaptive Media Playout for Stochastic Channel Models Mark Kalman Class Project EE368c.
The Transport Layer Congestion Control & UDP
Media Compression.
Chapter 29 Multimedia Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
Topics discussed in this section:
CS5248: Systems Support for Continuous Media
Proxy Caching for Streaming Media
Klara Nahrstedt Spring 2009
Rate Adaptations.
Klara Nahrstedt Spring 2012
RTP: A Transport Protocol for Real-Time Applications
Project Proposal Due Next Mon. Submit by
Error Recovery.
Rate Adaptations.
MPEG + RTP.
Video On Demand.
Chapter 25 Multimedia TCP/IP Protocol Suite
Multimedia networking: outline
Taxonomy of network applications
Lecture 19 – TCP Performance
CprE 458/558: Real-Time Systems
Multimedia networking: outline
Presentation transcript:

Adaptive Playout

You are Here Encoder Decoder Middlebox Sender Receiver Network NUS.SOC.CS5248-2010 Roger Zimmermann (based in part on slides by Ooi Wei Tsang)

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-2010 Roger Zimmermann (based in part on slides by Ooi Wei Tsang)

What’s Wrong? packet ordering packet loss next packet arrive in-time? Especially bad for audio applications NUS.SOC.CS5248-2010 Roger Zimmermann (based in part on slides by Ooi Wei Tsang)

Overview Decode RTP Classifier Network NUS.SOC.CS5248-2010 Roger Zimmermann (based in part on slides by Ooi Wei Tsang)

Implementation Single Thread Multi-Threads using select() NUS.SOC.CS5248-2010 Roger Zimmermann (based in part on slides by Ooi Wei Tsang)

Packet Buffer Sorted by sequence number When ADU is complete, send to decoder RTP Classifier NUS.SOC.CS5248-2010 Roger Zimmermann (based in part on slides by Ooi Wei Tsang)

Playout Buffer Stored decoded data in playout order Post-processing/Mixing may happen Decode NUS.SOC.CS5248-2010 Roger Zimmermann (based in part on slides by Ooi Wei Tsang)

Why Buffer?

Sending Packets Packet Time NUS.SOC.CS5248-2010 Roger Zimmermann (based in part on slides by Ooi Wei Tsang)

Receiving Packets Packet Time NUS.SOC.CS5248-2010 Roger Zimmermann (based in part on slides by Ooi Wei Tsang)

With Jitter Packet Time NUS.SOC.CS5248-2010 Roger Zimmermann (based in part on slides by Ooi Wei Tsang)

With Jitter Packet Time NUS.SOC.CS5248-2010 Roger Zimmermann (based in part on slides by Ooi Wei Tsang)

What causes Jitter? Network delay = Transmission Delay (fixed) + Propagation Delay (fixed) + Queuing Delay (variable) Delay jitter is caused by variable queuing delay NUS.SOC.CS5248-2010 Roger Zimmermann (based in part on slides by Ooi Wei Tsang)

Delay Jitter Transit Time small jitter large jitter Time NUS.SOC.CS5248-2010 Roger Zimmermann (based in part on slides by Ooi Wei Tsang)

Spike Transit Time Time NUS.SOC.CS5248-2010 Roger Zimmermann (based in part on slides by Ooi Wei Tsang)

Today’s Question How big is the playout buffer? When to play back? NUS.SOC.CS5248-2010 Roger Zimmermann (based in part on slides by Ooi Wei Tsang)

Types of Applications Non-interactive Interactive Buffer can be large As small as possible NUS.SOC.CS5248-2010 Roger Zimmermann (based in part on slides by Ooi Wei Tsang)

Types of Applications Video Audio Frames are discrete (easier problem) Samples are “continuous” NUS.SOC.CS5248-2010 Roger Zimmermann (based in part on slides by Ooi Wei Tsang)

Naive Answer How big is a buffer? When to playback? Fixed at a small value, to reduce latency When to playback? Playback as soon as possible, to reduce latency NUS.SOC.CS5248-2010 Roger Zimmermann (based in part on slides by Ooi Wei Tsang)

Client Buffer Management Bandwidth Smoothing for Non-interactive Applications

Multi-Threshold Flow Control R. Zimmermann, K. Fu, M. Jahangiri, C. Shahabi MTAP 2006

Video-on-Demand (VoD) High-quality playback required Buffer can be large Encoding may be VBR for high visual quality Playback time may be very long (2+ hours) NUS.SOC.CS5248-2010 Roger Zimmermann (based in part on slides by Ooi Wei Tsang)

Two Approaches (1) Server-controlled Pre-compute transmission schedule Piece-wise linear approximation: compute a number of constant-rate segments Different optimization criteria Minimize: # of rate changes, # utilization of client buffer, peak rate, etc. NUS.SOC.CS5248-2010 Roger Zimmermann (based in part on slides by Ooi Wei Tsang)

Two Approaches (2) Client-controlled Client adaptively informs server Advantages: No rate history necessary (VBR) Can adjust to network conditions Works easily with interactive commands such as FF, FR, Pause NUS.SOC.CS5248-2010 Roger Zimmermann (based in part on slides by Ooi Wei Tsang)

Robust Stream Delivery Smoothing of VBR media traffic has the following quality benefits: Better resource utilization (less bursty) More streams with the same network capacity NUS.SOC.CS5248-2010 Roger Zimmermann (based in part on slides by Ooi Wei Tsang)

Objectives Multi-Threshold Flow Control (MTFC) algorithm objectives: Online operation Content independence Minimizing feedback control signaling Rate smoothing NUS.SOC.CS5248-2010 Roger Zimmermann (based in part on slides by Ooi Wei Tsang)

Example NUS.SOC.CS5248-2010 Roger Zimmermann (based in part on slides by Ooi Wei Tsang)

MTFC Buffer Management Multiple Thresholds: goal is middle of buffer Send rate adjust command to server whenever threshold is crossed NUS.SOC.CS5248-2010 Roger Zimmermann (based in part on slides by Ooi Wei Tsang)

How to Set Thresholds? Simple: equi-distant m: number of thresholds Overflow and underflow thresholds NUS.SOC.CS5248-2010 Roger Zimmermann (based in part on slides by Ooi Wei Tsang)

How to Calculate Sending Rate? NUS.SOC.CS5248-2010 Roger Zimmermann (based in part on slides by Ooi Wei Tsang)

Threshold Spacing Strategies Linear vs. arithmetic vs. geometric NUS.SOC.CS5248-2010 Roger Zimmermann (based in part on slides by Ooi Wei Tsang)

Threshold Spacing Strategies Geometric and arithmetic spacing: NUS.SOC.CS5248-2010 Roger Zimmermann (based in part on slides by Ooi Wei Tsang)

Sending Rate Computation Relevant factors: Target buffer level (i.e., 50%): THN Current buffer level: bwobsv Predicted duration to reach target level Data consumed during predicted duration NUS.SOC.CS5248-2010 Roger Zimmermann (based in part on slides by Ooi Wei Tsang)

MTFC Results NUS.SOC.CS5248-2010 Roger Zimmermann (based in part on slides by Ooi Wei Tsang)

MTFC Results: # of Thresholds NUS.SOC.CS5248-2010 Roger Zimmermann (based in part on slides by Ooi Wei Tsang)

MTFC Results: # of Thresholds Number of Thresholds 3 5 9 17 Number Of Rate Changes 100 90 80 70 60 50 40 30 20 10 8MB 16MB 32MB NUS.SOC.CS5248-2010 Roger Zimmermann (based in part on slides by Ooi Wei Tsang)

A Brief Introduction to Audio Conferencing

Audio Conferencing Live, interactive application Latency is important Each packet contains 20-30ms of audio NUS.SOC.CS5248-2010 Roger Zimmermann (based in part on slides by Ooi Wei Tsang)

Silence Suppression Silence Detection Talk spurt if no sound, no need to send Talk spurt consecutive audio packets (between silence) hundreds of ms NUS.SOC.CS5248-2010 Roger Zimmermann (based in part on slides by Ooi Wei Tsang)

Recall: RTP Header marker bit: depends on payload e.g. beginning of frame NUS.SOC.CS5248-2010 Roger Zimmermann (based in part on slides by Ooi Wei Tsang)

RTP and Talkspurt First packet of a talkspurt will have marker bit set to 1 NUS.SOC.CS5248-2010 Roger Zimmermann (based in part on slides by Ooi Wei Tsang)

RTP and Talkspurt Deduce talkspurt from sequence number and timestamp 1 20 2 40 3 60 5 190 SeqNo TimeStamp NUS.SOC.CS5248-2010 Roger Zimmermann (based in part on slides by Ooi Wei Tsang)

Consequences of Talkspurt Opportunity to adjust playout delay if jitter is large, increase delay if jitter is small, decrease delay NUS.SOC.CS5248-2010 Roger Zimmermann (based in part on slides by Ooi Wei Tsang)

Fixed Playout Delay SEND RECV PLAY NUS.SOC.CS5248-2010 Roger Zimmermann (based in part on slides by Ooi Wei Tsang)

Adaptive Playout Delay SEND RECV PLAY NUS.SOC.CS5248-2010 Roger Zimmermann (based in part on slides by Ooi Wei Tsang)

Adaptive Playout Delay SEND RECV PLAY NUS.SOC.CS5248-2010 Roger Zimmermann (based in part on slides by Ooi Wei Tsang)

Latency vs. Packet Loss Trade-Off NUS.SOC.CS5248-2010 Roger Zimmermann (based in part on slides by Ooi Wei Tsang)

Latency vs Loss-Rate Loss Rate Latency NUS.SOC.CS5248-2010 Roger Zimmermann (based in part on slides by Ooi Wei Tsang)

Adaptive Playout Mechanisms for Packetized Audio Applications in WAN R. Ramjee, J. Kurose, D. Towsley, H. Schulzrinne INFOCOM 1995

Variables and Notations NUS.SOC.CS5248-2010 Roger Zimmermann (based in part on slides by Ooi Wei Tsang)

Variables and Notations Tnet(i) Tbuf(i) Tarrive(i) Tplay(i) Tdelay(i) Tsend(i) NUS.SOC.CS5248-2010 Roger Zimmermann (based in part on slides by Ooi Wei Tsang)

1st Packet in Talkspurt We can estimate as NUS.SOC.CS5248-2010 Roger Zimmermann (based in part on slides by Ooi Wei Tsang)

How to estimate Vnet(i) NUS.SOC.CS5248-2010 Roger Zimmermann (based in part on slides by Ooi Wei Tsang)

How to estimate Enet(i) Method 1: Jacobson’s Method NUS.SOC.CS5248-2010 Roger Zimmermann (based in part on slides by Ooi Wei Tsang)

Spike Tnet Time NUS.SOC.CS5248-2010 Roger Zimmermann (based in part on slides by Ooi Wei Tsang)

Problems Does not react to spike fast enough NUS.SOC.CS5248-2010 Roger Zimmermann (based in part on slides by Ooi Wei Tsang)

How to estimate Enet(i) Ramjee’s Method SPIKE NORMAL NUS.SOC.CS5248-2010 Roger Zimmermann (based in part on slides by Ooi Wei Tsang)

Ramjee’s Idea if Tnet(i) suddenly increase if “slope” is small enough SPIKE NORMAL if “slope” is small enough NUS.SOC.CS5248-2010 Roger Zimmermann (based in part on slides by Ooi Wei Tsang)

In Spike Mode Tnet i SPIKE NUS.SOC.CS5248-2010 Roger Zimmermann (based in part on slides by Ooi Wei Tsang)

In Normal Mode Tnet i NORMAL NUS.SOC.CS5248-2010 Roger Zimmermann (based in part on slides by Ooi Wei Tsang)

Evaluations Loss Rate Delay NUS.SOC.CS5248-2010 Roger Zimmermann (based in part on slides by Ooi Wei Tsang)

Problems with Ramjee’s Method Transit Time Time NUS.SOC.CS5248-2010 Roger Zimmermann (based in part on slides by Ooi Wei Tsang)

S. Moon, J Kurose, D. Towsley Multimedia Systems 1998 Packet Audio Playout Delay Adjustment: Performance Bounds and Algorithms S. Moon, J Kurose, D. Towsley Multimedia Systems 1998

Recall Previous Methods NUS.SOC.CS5248-2010 Roger Zimmermann (based in part on slides by Ooi Wei Tsang)

How to Set Tdelay(i) Moon’s Method Collect statistics on packets that have arrived. Find t such that q% of last w packets have Tnet(i) < t. NUS.SOC.CS5248-2010 Roger Zimmermann (based in part on slides by Ooi Wei Tsang)

Example (w =50, q = 90%) num of packets 1 2 3 4 5 6 7 8 9 10 11 12 1 2 3 4 5 6 7 8 9 10 11 12 delay NUS.SOC.CS5248-2010 Roger Zimmermann (based in part on slides by Ooi Wei Tsang)

Setting Tdelay(i) NORMAL SPIKE NUS.SOC.CS5248-2010 Roger Zimmermann (based in part on slides by Ooi Wei Tsang)

Setting Tdelay(i) Transit Time Time NUS.SOC.CS5248-2010 Roger Zimmermann (based in part on slides by Ooi Wei Tsang)

Performance Bound Given a trace of packets, and a loss rate, find the minimum average playout delay. Use Dynamic Programming NUS.SOC.CS5248-2010 Roger Zimmermann (based in part on slides by Ooi Wei Tsang)

A Packet Trace Tnet 13 15 10 … k M talkspurts 1,k 2,k 3,k j,k nk,k NUS.SOC.CS5248-2010 Roger Zimmermann (based in part on slides by Ooi Wei Tsang)

More Notations M: Npacket(k) or nk Ntotal Number of Talkspurt Number of packets in talkspurt k Ntotal Total number of packets NUS.SOC.CS5248-2010 Roger Zimmermann (based in part on slides by Ooi Wei Tsang)

Definition minimum average playout delay for choosing i packets to be played out from k-th talkspurt k M talkspurts NUS.SOC.CS5248-2010 Roger Zimmermann (based in part on slides by Ooi Wei Tsang)

How to find NUS.SOC.CS5248-2010 Roger Zimmermann (based in part on slides by Ooi Wei Tsang)

Definition minimum average playout delay for choosing i packets to be played out from k-th to M-th talkspurt k .. M M talkspurts NUS.SOC.CS5248-2010 Roger Zimmermann (based in part on slides by Ooi Wei Tsang)

Base Case D(k, 0) = D(M, i) = minimum average playout delay for choosing i packets to be played out from k-th to M-th talkspurt NUS.SOC.CS5248-2010 Roger Zimmermann (based in part on slides by Ooi Wei Tsang)

Recursive Case j .. k .. M 1,k 2,k 3,k .. nk,k NUS.SOC.CS5248-2010 Roger Zimmermann (based in part on slides by Ooi Wei Tsang)

Performance Bound Given a trace of M talkspurts and n packets, and a loss rate e, find the minimum average playout delay. Answer: Minimum possible average playout delay is D(1, (1-e)n) minimum average playout delay for choosing i packets to be played out from k-th to M-th talkspurt NUS.SOC.CS5248-2010 Roger Zimmermann (based in part on slides by Ooi Wei Tsang)

Evaluations Loss Rate Delay NUS.SOC.CS5248-2010 Roger Zimmermann (based in part on slides by Ooi Wei Tsang)

Summary Playout Adjustment for Audio Conferencing Weighted Average Methods vs. Statistical Methods An Analysis of Minimum Playout Delay NUS.SOC.CS5248-2010 Roger Zimmermann (based in part on slides by Ooi Wei Tsang)

Practical Complications Clock Drifts Route Change NUS.SOC.CS5248-2010 Roger Zimmermann (based in part on slides by Ooi Wei Tsang)

Advanced Techniques Speed-up Playback NUS.SOC.CS5248-2010 Roger Zimmermann (based in part on slides by Ooi Wei Tsang)