220 likes | 234 Views
This study focuses on optimizing the quality of video streams on P2P networks by using layered coding and fine-grained scalable coding. The goal is to support live streaming while dealing with varying bandwidth and ensuring high-quality video playback.
E N D
Optimizing the quality of scalable video streams on p2p networks Raj Kumar Rajendran Dan Rubenstein DNA Group, Columbia University
Motivation • Multimedia Streams on P2P networks are growing in popularity • P2P streams account for large fraction of TCP traffic! • Our Goal: support live streaming. However bandwidth • Varies widely with time • Is often insufficient for high-quality video raj@ee.columbia.edu, DNA Lab, Columbia University
Known Solutions • Use buffering (pre-fetching) • Divide stream into layers • Facilitates multiple-peer downloads raj@ee.columbia.edu, DNA Lab, Columbia University
Using Layered Coding Bitrate • Use Fine-Grained Scalable coding • Required small base-layer • Optional large enhancement layers • Divide stream into M equally sized layers Video bitrate M Enhancement Layers 2 1 Base Layer Time t raj@ee.columbia.edu, DNA Lab, Columbia University
Question Present • Viewer’s available bandwidth fluctuates • How do we download? • The two extremes: • Emphasize present quality • Ensure future first • The tradeoff • Bandwidth utilization vs • Variation in quality Bandwidth Video layers Future New Bandwidth Current time raj@ee.columbia.edu, DNA Lab, Columbia University
Structure • Model • Problem Formulation • Ideal solution (offline) • Online Solutions • Naïve Solutions • Hill-climbing Solutions • Results raj@ee.columbia.edu, DNA Lab, Columbia University
Discretizing the Video Playback Bitrate • Like to deal with video in constant sized units • But video is variable rate • Divide time into variable-length epochs • Size epochs to have same number of video bits S • Each layer of each epoch is termed a chunk • All chunks are of the same size (S/M bits) Epoch 0 Epoch 1 Equal Areas (S bits) Equal Areas (S/M bits) M=3 C1 C2 C3 Time t Pre-fetch Epoch raj@ee.columbia.edu, DNA Lab, Columbia University
The Model(2) Available Bandwidth (3 chunks) • The number of chunks of video downloaded in each epoch varies • Epoch lengths vary • Bandwidth varies • Bandwidth of current epoch is used to download video chunks for future epochs 2 3 7 4 Downloaded chunks 6 1 5 Current Epoch Time t raj@ee.columbia.edu, DNA Lab, Columbia University
Playback Output: A=<a1,a2,…aT> the allocation vector ai is the total #chunks allocated to epoch i 0 ≤ ai ≤ M Bandwidth Input: W=<w0,w1,…,wT-1> the bandwidth vector wi is the #chunks of bandwidth available at epoch i Discrete Model W=<3,5,1,4,2> A=<1,2,2,4,4> Bandwidth Allocation raj@ee.columbia.edu, DNA Lab, Columbia University 0 1 2 3 4 1
waste An Example • Which future chunk should be downloaded with a chunk of bandwidth currently available ? Bandwidth 0 1 2 3 4 Example 1 Example 2 M=3 Good Even quality, Little waste Bad Varying quality, wasted bandwidth raj@ee.columbia.edu, DNA Lab, Columbia University 1 2 3 4 5 1
Metrics of Performance • Waste • Unused bandwidth (all future chunks already downloaded) • Σwi-Σ ai • Variability • Variance from maximum possible quality (layers) • Σ(M – ai)2 • Smoothness • Absolute change in quality • ΣAbs(ai-1-ai) • Goal: Minimize these metrics Waste Variability Smoothness raj@ee.columbia.edu, DNA Lab, Columbia University
Needed • Given: • Bandwidth vector <w0,w1,…,wT-1> • Produce: • Allocation vector <a1,a2,…,aT> that • Minimizes Waste, Smoothness, Variability • Under Constraints • Quality: • Bandwidth/Time: • Online: wi needs to be allocated before wi+1 raj@ee.columbia.edu, DNA Lab, Columbia University
Structure • Model • Problem Formulation • Ideal solution (offline) • Online Solutions • Naïve Solutions • Hill-climbing Solutions • Results raj@ee.columbia.edu, DNA Lab, Columbia University
Bandwidth 0 1 2 The optimal solution (offline) 5 • Is Given all of W • Allocates bandwidth of last epoch wT first and works its way back to epoch 1 • Allocates wi to the smallest, latest non-full (aj<M) epoch • Proved to minimize waste, smoothness and variability in paper 4 3 2 1 3 4 4 M=3 3 2 1 1 2 3 4 5 raj@ee.columbia.edu, DNA Lab, Columbia University
Structure • Model • Problem Formulation • Ideal solution (offline) • Online Solutions • Naïve Solutions • Hill-climbing Solutions • Results raj@ee.columbia.edu, DNA Lab, Columbia University
Online algorithms make decisions about wi purely based on wj,0≤j<i Same-Index Allocates all bandwidth to earliest future epoch Non-smooth, high-variability, low-waste Smallest Bin Allocates all bandwidth to most empty epoch Downloads all of layer-1, then all of layer-2, etc. Smoother, high-waste Online Solutions (naïve) W:<3,5,1,4,2> M=4 Waste(2) M=4 1 2 3 4 5 raj@ee.columbia.edu, DNA Lab, Columbia University
Hill-climbing online solutions • Solution: smooth and low-waste • Guideline • Experiments: Viewers extremely sensitive to abrupt lowering of video quality. • Solution: algorithms that • Bound the downhill slope of allocations (decrease in quality) • Then maximize current quality raj@ee.columbia.edu, DNA Lab, Columbia University
Largest-Hill Bandwidth • Maximize current quality but ensure gentle fall in quality • Allocates such that aj-aj+1<C • Produces hills with gentle downhill slopes 0 1 2 4 4 C=1 M=4 1 2 3 4 4 raj@ee.columbia.edu, DNA Lab, Columbia University
Structure • Model • Problem Formulation • Ideal solution (offline) • Online Solutions • Naïve Solutions • Hill-climbing Solutions • Results raj@ee.columbia.edu, DNA Lab, Columbia University
Results from simulation • How do the algorithms perform under strain • Video bitrate approach bandwidth • Bandwidth fluctuation increases • Draw bandwidth from Uniform and Normal distributions • 600 epochs • 100 runs raj@ee.columbia.edu, DNA Lab, Columbia University
Results from bandwidth traces • Bandwidth traces from DSL Line • Trace lasted 11,682 secs • Downloaded 80 Mb video • 1,2 or more servers • Performance as function of epoch-lengths (1,2,4,..,128) secs raj@ee.columbia.edu, DNA Lab, Columbia University
Conclusion • A solution that allows live video streaming on P2P networks • Uses scalable-coding to overcome insufficient-bandwidth problem • slice stream into lower-bandwidth streams • Clever pre-fetching ensures consistent high-quality • Provide optimal offline solution • Our online-algorithms performs close to optimal raj@ee.columbia.edu, DNA Lab, Columbia University