Download presentation
Presentation is loading. Please wait.
1
Klara Nahrstedt Spring 2012
CS 414 – Multimedia Systems Design Lecture 30 – Buffer Management (Part 3) Klara Nahrstedt Spring 2012 CS Spring 2012
2
Administrative MP2 posted MP2 Deadline – April 7, Saturday, 5pm.
CS Spring 2012
3
Covered Aspects of Multimedia
Audio/Video Presentation Playback Image/Video Capture Audio/Video Perception/ Playback Image/Video Information Representation Transmission Transmission Compression Processing Audio Capture Media Server Storage Audio Information Representation A/V Playback CS Spring 2012 ORCHID Research Group Department of Computer Science, University of Illinois at Urbana-Champaign
4
Outline VoD Client Buffering Techniques MinBuf MaxBuf
CS Spring 2012
5
Client/Server Video-on-Demand System
CS Spring 2012
6
Buffering Strategies at VOD Client
Minbuf - minimum buffering strategy Minbuf minimizes buffering requirements at VOD client, but makes more demands on network (throughput and delay guarantees) Maxbuf – maximum buffering strategy Maxbuf buffers more than one unit of information and eases QoS guarantees demands on network Buffering only up to a limit (Bufmax) CS Spring 2012
7
Buffering Model ZOi(t) – amount of bits in multimedia object (e.g., Video frame) Oi displayed at time t Cr(t) – amount of bits received at receiver at time t Two buffer states in each buffering strategy: Starvation if Cr(t) ≤ ZOi(t) If Cr(t) > ZOi(t), no starvation at VOD client Overflow if Cr(t) ≥ ZOi(t) + Bufmax CS Spring 2012
8
Client Buffer Constraints (Received amount of data Cr(t) should always be between ZOi (t) and ZOi (t) + Bufmax) CS Spring 2012
9
Implications of Minbuf Strategy
With minbuf strategy – delivery time of a unit of information is the display time of previous unit Minimum Throughput (Th) in bits per time unit required is Delivery time instant of the first unit before start of display: CS Spring 2012
10
Example (1) Question: Given Video Stream with Answer:
320x240 pixels, 20 fps, 8bits per pixel, uncompressed What is the minimal buffer size if Minbuf technique is used? Answer: Buffer Size is of the application frame Z = bytes if receiving and display operations are done sequentially One can also deploy a dual buffering scheme of 2* Z if receiving and display operations are done concurrently ZOi ZOi+1 ti+1 ti ti-1 Display Thread Receiving Thread Receiving Thread Display Thread Phase 1 ZOi ZOi-1 Phase 2 ti ti-1 ti-2 CS Spring 2012
11
Example (2) Question: What is the throughput under the above given video characteristics and minbuf strategy? Answer: MinBuf Throughput needed in end-to-end fashion Z = bytes, 20 fps (50 ms period) ti – ti-1 = 50 ms = 50/1000 sec Throughput = Z/ti – ti-1 = bytes/ (50/1000 sec) = bytes/sec = bits/sec = kbps = Mbps CS Spring 2012
12
Implication of Maxbuf Strategy
Delivery schedule of VOD server and network may cause that Bufmax bits will be delivered every K seconds, where K = Bufmax/Th, Th – throughput of network Minimum Throughput required ∑ZOi – total size in bits of all objects that will be presented in stream: CS Spring 2012
13
Example (1) Question: Given Video frame 320x240 pixels, 8bits/pixel; Video frame rate 20 fps, uncompressed, and Network throughput 8 Mbps What is the worst case arrival time of frames if Bufmax is 10 frames (holds ½ second of video frames)? Answer: arrival time every k = Bufmax/Throughput = Mbits/8 Mbps = seconds What is the Bufmax size if frames arrive on average every k = 1 second? Answer: Bufmax = k*Throughput = 8 Mbits = bits = bytes = video frames ; round up to 14 frames; Bufmax should be 14 frames if throughput is 8 Mbps and arrival of frames is approximately every 1 second CS Spring 2012
14
Example (2) Question: Given video characteristics of 320x240 pixels, 8 bpp, 20 fps, uncompressed, length of the move is 1 minute, Bufmax holds 1 second of frames, what is the minimum throughput we would need if we use MaxBuf strategy? CS Spring 2012
15
Example (3) Given video characteristics of 320x240 pixels, 8bpp, 20fps, MJPEG compressed with I frames 50% compression (1:2) of each frame; Question: what would be the arrival time (k) of frames if we have buffer size, holding 1 second frames, and network throughput of 10 Mbps? Question: what would be the minimal throughput needed from the network under above conditions if the video clip would be 30 seconds long? CS Spring 2012
16
Example (4) Given MPEG-2 compressed video with GOP of IPBBPBBPBBI, average I frame size of 10KB, average P frame size of 6 KB, and average B frame size of 2 KBytes. Question: What would be the buffer size (express it in bytes and time duration) if network throughput is 4 Mbps and arrival time of each compressed frame is on average every 500 ms? CS Spring 2012
17
Standard Video Buffering
Video delivered over “deterministic” channel (satellite, cable, digital TV broadcasting) simple Small buffer (minbuf technique) Data arrives to the media player with deterministic delay and rate and infrequent data drops Video delivered over IP networks problematic Big buffers (maxbuf technique) No guarantees in IP networks Streaming servers manage simple buffering Data sent as quickly as possible; when buffer full, (reached predefined threshold), video playback starts and server continues to send data CS Spring 2012
18
Implementation Issues
Buffers for Uncompressed Periodic Streams Use circular buffers as prefetch buffers with maxbuf strategy Buffers for Compresses Periodic Streams Use circular buffers, but carefully consider the size of buffer unit (depending on MPJEG or MPEG) with maxbuf strategy For MPEG may consider dynamic buffer allocation Buffers for Control Information Use priority queues or FIFO Buffers for Non-RT Data Use maxbuf strategy with static buffer allocation CS Spring 2012
19
Implementation Issues
Dual-Threshold Buffering (in Flash Media Server) Buffer has two thresholds: When buffer filled with data up to first threshold, start playback After that continue buffering until second, higher threshold Advantage: assures fast start, and at the same time provides fairly high resilience to bandwidth fluctuation CS Spring 2012
20
Conclusion Will talk about media server in next lectures
CS Spring 2012
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.