NUS.SOC.CS5248-2011 Roger Zimmermann Project Packetize MP3 audio into RTP Packets.

Slides:



Advertisements
Similar presentations
Lecture # 7. Topics Storage Techniques of Bits Storage Techniques of Bits Mass Storage Mass Storage Disk System Performance Disk System Performance File.
Advertisements

T.Sharon-A.Frank 1 Multimedia Compression Basics.
                      Digital Audio 1.
Storing Data: Disks and Files: Chapter 9
Continuous Media 1 Differs significantly from textual and numeric data because of two fundamental characteristics: –Real-time storage and retrieval –High.
Multimedia Systems As Presented by: Craig Tomastik.
Chapter 20: Multimedia Systems Silberschatz, Galvin and Gagne ©2005 Operating System Concepts Chapter 20: Multimedia Systems What is Multimedia.
Silberschatz, Galvin and Gagne ©2009 Operating System Concepts – 8 th Edition Chapter 20: Multimedia Systems.
NUS.SOC.CS Roger Zimmermann (based on slides by Ooi Wei Tsang) MPEG + RTP.
1 Multimedia Chapter Introduction to multimedia 7.2 Multimedia files 7.3 Video compression 7.4 Multimedia process scheduling 7.5 Multimedia file.
Audiovisual digital documents Adolf Knoll National Library of the Czech Republic
EE442—Multimedia Networking Jane Dong California State University, Los Angeles.
SWE 423: Multimedia Systems Chapter 7: Data Compression (1)
1 Chapter 6 Storage and Multimedia: The Facts and More.
SECTIONS 13.1 – 13.3 Sanuja Dabade & Eilbroun Benjamin CS 257 – Dr. TY Lin SECONDARY STORAGE MANAGEMENT.
Statistical Multiplexer of VBR video streams By Ofer Hadar Statistical Multiplexer of VBR video streams By Ofer Hadar.
CPSC 231 Secondary storage (D.H.)1 Learning Objectives Understanding disk organization. Sectors, clusters and extents. Fragmentation. Disk access time.
Multimedia Information Systems Shahram Ghandeharizadeh Computer Science Department University of Southern California.
Introduction to Database Systems 1 The Storage Hierarchy and Magnetic Disks Storage Technology: Topic 1.
+ Video Compression Rudina Alhamzi, Danielle Guir, Scott Hansen, Joe Jiang, Jason Ostroski.
Video Streaming © Nanda Ganesan, Ph.D..
Using Multimedia on the Web
CS 218 F 2003 Nov 3 lecture:  Streaming video/audio  Adaptive encoding (eg, layered encoding)  TCP friendliness References: r J. Padhye, V.Firoiu, D.
CIS679: RTP and RTCP r Review of Last Lecture r Streaming from Web Server r RTP and RTCP.
Computer Networking From LANs to WANs: Hardware, Software, and Security Chapter 14 Multimedia Networking.
Lecture 11: DMBS Internals
E0262 MIS - Multimedia Playback Systems Anandi Giridharan Electrical Communication Engineering, Indian Institute of Science, Bangalore – , India.
I/O – Chapter 8 Introduction Disk Storage and Dependability – 8.2 Buses and other connectors – 8.4 I/O performance measures – 8.6.
Topic: Disks – file system devices. Rotational Media Sector Track Cylinder Head Platter Arm Access time = seek time + rotational delay + transfer time.
MPEG: (Moving Pictures Expert Group) A Video Compression Standard for Multimedia Applications Seo Yeong Geon Dept. of Computer Science in GNU.
MODERN OPERATING SYSTEMS Third Edition ANDREW S
Silberschatz, Galvin and Gagne ©2009 Operating System Concepts – 8 th Edition, Chapter 19/20: Real-time and Multimedia Systems Inclusions from Tanenbaum,
Data Compression and Network Video by Mark Pelley Navin Dodanwela.
1 Seminar Presentation Multimedia Audio / Video Communication Standards Instructor: Dr. Imran Ahmad By: Ju Wang November 7, 2003.
XE33OSA Chapter 20: Multimedia Systems. 20.2XE33OSA Silberschatz, Galvin and Gagne ©2005 Chapter 20: Multimedia Systems What is Multimedia Compression.
Dr. M. Munlin Real-Time and Multimedia Systems 1 NETE0516 Operating Systems Instructor: ผ. ศ. ดร. หมัดอามีน หมัน หลิน Faculty of Information Science and.
Overview of Physical Storage Media
MULTIMEDIA TECHNOLOGY SMM 3001 MEDIA - VIDEO. In this chapter How digital video differs from conventional analog video How digital video differs from.
Media. Media Compact Disk A Compact Disc (CD) is an optical disc used to store digital data, originally developed for storing digital audio. The CD, introduced.
DMBS Internals I. What Should a DBMS Do? Store large amounts of data Process queries efficiently Allow multiple users to access the database concurrently.
Infrastructure for Data Warehouses. Basics Of Data Access Data Store Machine Memory Buffer Memory Cache Data Store Buffer Bus Structure.
NUS.SOC.CS Roger Zimmermann (based on slides by Ooi Wei Tsang) Project Packetize MP3 audio into RTP Packets.
NUS.SOC.CS Roger Zimmermann Project Packetize MP3 audio into RTP Packets.
DMBS Internals I February 24 th, What Should a DBMS Do? Store large amounts of data Process queries efficiently Allow multiple users to access the.
DMBS Internals I. What Should a DBMS Do? Store large amounts of data Process queries efficiently Allow multiple users to access the database concurrently.
CPSC 231 Secondary storage (D.H.)1 Learning Objectives Understanding disk organization. Sectors, clusters and extents. Fragmentation. Disk access time.
CS Spring 2009 CS 414 – Multimedia Systems Design Lecture 27 – Media Server (Part 2) Klara Nahrstedt Spring 2009.
COSC 6340: Disks 1 Disks and Files DBMS stores information on (“hard”) disks. This has major implications for DBMS design! » READ: transfer data from disk.
Lecture 3 Secondary Storage and System Software I
AMCOM Digital Archive Design Review - Week 4.
Multimedia Systems Operating System Presentation On
Project Create a DASH-compliant (Dynamic Adaptive Streaming over HTTP) live streaming system.
Lecture 16: Data Storage Wednesday, November 6, 2006.
Database Management Systems (CS 564)
MPEG + RTP.
Video Compression - MPEG
Lecture 11: DMBS Internals
Multimedia networking: outline
Sanuja Dabade & Eilbroun Benjamin CS 257 – Dr. TY Lin
Overview What is Multimedia? Characteristics of multimedia
Chapter 7 Multimedia 7.1 Introduction to multimedia
Chapter 7 Multimedia 7.1 Introduction to multimedia
Judith Molka-Danielsen, Oct. 02, 2000
Chapter 7 Multimedia 7.1 Introduction to multimedia
Chapter 7 Multimedia 7.1 Introduction to multimedia
Multimedia networking: outline
Chapter 7 Multimedia 7.1 Introduction to multimedia
Presentation transcript:

NUS.SOC.CS Roger Zimmermann Project Packetize MP3 audio into RTP Packets

NUS.SOC.CS Roger Zimmermann Goals (1) Encode audio into streamable MP3 format according to RFC 2250 and RFC Use the Yima Personal Edition (Yima PE) streaming media server code, running under Linux. (1) Modify the yimasplit utility, which creates data blocks containing pre- computed RTP packets with appropriate RTP headers.

NUS.SOC.CS Roger Zimmermann Goals (2) Server reads data blocks, schedules and sends out RTP packets. (2) Modify the Yima PE MP3 Player client to accept, de-packetize and play audio. This player works under Windows. (3) Design experiments to show the benefits of RFC 5219 over RFC Use a packet loss model to simulate congestion.

NUS.SOC.CS Roger Zimmermann Project Homepage Descriptions Yima Personal Edition Source Codes Documentation (RFCs, etc.) IVLE Forums TA: Shen Zhijie

NUS.SOC.CS Roger Zimmermann Advice Form team (1 or 2 persons). Note: The Yima PE source code is not very well documented. Start early!

NUS.SOC.CS Roger Zimmermann Introduction to Yima PE Personal Edition Streaming Media System

NUS.SOC.CS Roger Zimmermann Overview Command line server GUI client “Split” utility to prepare media files RTSP communication (port 5xxxx) #./yimaserver begin scheduler begin rtsps

NUS.SOC.CS Roger Zimmermann Software Source Directories Server Server code Client Client code and GUI library Splitter Media preparation utility Streams Sample media (WAV file) Remove all object files (*.o) before building the executables

NUS.SOC.CS Roger Zimmermann Yima PE Server RTSP front and backend (one process) Scheduler + FLIB (one process) Qpthread v1.3.1 library for multi-threading Must set LP_LIBRARY_PATH to include Qpthread Server configuration file: config Where are the media files located Name, size [bytes] and duration [sec]

NUS.SOC.CS Roger Zimmermann Splitter Input: yimaintro.wav (for example) Output: BLOCKS sub-directory Data block files: yimaintro.wav_1, yimaintro.wav_2, … Each block is 256,000 bytes and contains 500 RTP packets (of 512 bytes each) A sample config file is created; must copy contents to the main config file

NUS.SOC.CS Roger Zimmermann Server + Splitter Server does not care about block contents, i.e., it does not know what kind of media data is stored (MPEG-1/2, WAVE, …) Server sends RTP packets based on config info: BW = size / duration Packet-level scheduling Need only modify splitter for MP3 media!

NUS.SOC.CS Roger Zimmermann Linux Client Operation: [List] button: reads media entries from local Yima.cfg file [Play], [Pause], [Stop] buttons execute RTSP commands to server GUI was built with XForms library; it is message-driven, with callback functions for buttons, etc. Plays uncompressed audio (PCM).

Windows Client Operation: [List] button: reads media entries from local Yima.cfg file [Play], [Pause], [Stop] buttons execute RTSP commands to server GUI was built with Visual Studio C/C++ (MFC library); it is message-driven, with callback functions for buttons. Includes MP3 decoder. NUS.SOC.CS Roger Zimmermann

NUS.SOC.CS Roger Zimmermann Client Structure 3 threads State machine GUI “C” Player “P” Network “N” /dev/dsp Buffer RTP RTSP Command Message Queues, e.g., put_cmd(CtoN, …);

Continuous Media Servers Introduction Continuous Media Magnetic Disk Drives Display of CM (single disk, multi-disks ) Optimization Techniques Additional Issues Case Study (Yima)

What is a CM Server? Storage Manager Network Memory Multiple streams of audio and video should be delivered to many users simultaneously.

Some Applications Video-on-demand News-on-demand News-editing Movie-editing Interactive TV Digital libraries Distance Learning Medical databases NASA databases

Challenge: Continuous Media CM object consists of a sequence of media quanta (e.g., audio samples or video frames), which convey meaning only when presented in time. S torage & Retrieval Continuous display Retrieval may require a specific bandwidth for a long period of time Data types are large (megabytes and gigabytes) Communications End-user (display and interface) Content-based querying for pictures, audio and video streams

Multimedia Database Issues Challenges: Store non-textual, non-numerical data: audio, video, multi-dimensional data, pictures Data types are large (megabytes and gigabytes) Retrieval may require a specific bandwidth for a long period of time Data may not be very well structured -- querying becomes more difficult Content-based querying for pictures, audio and video streams

Continuous Display Data should be transferred from the storage device to the memory (or display) at a pre-specified rate. Otherwise: frequent disruptions & delays, termed hiccups. NTSC quality: 270 Mb/s uncompressed; 3-8 Mb/s compressed (MPEG-2). Memory Disk

Challenge: Real-Time Media  Bandwidth requirements for different media types: 1 Mb/s 4-6 Mb/s 31 Mb/s 50 Mb/s 20 Mb/s 100 Mb/s

High Bandwidth & Large Size HDTV quality ~ 1.4 Gb/s Uncompressed! Standard: SMPTE 292M 2-hr HDTV ~ 1260 GB

Streaming Media Servers Streaming media servers require a different “engine” than traditional databases because of: Real-time retrieval and storage Large media objects The performance metrics for streaming media servers are: The number of simultaneous displays: throughput N The amount of time that elapses until a display starts: startup latency L The overall cost of the system: cost per stream, C

Media Types Examples of continuous media are: Audio Video Haptics Continuous media are often compressed. There are many different compression algorithms, for example: Motion Picture Experts Group: MPEG-1, MPEG-2, MPEG-4 Joint Photographic Expert Group: Motion-JPEG Digital Video: DV, MiniDV Microsoft Video 9, DivX, … MP3: MPEG-1 layer 3 audio Above codecs are based on discrete cosine transform (DCT) Others: – Wavelet-based codecs – Lossless compression

Compression MPEG-1 180:1 reduction in both size and bandwidth requirement (SMPTE 259M, NTSC 270 Mb/s is reduced to 1.5 Mb/s). MPEG-2 30:1 to 60:1 reduction. (NTSC ~ 4, DVD ~ 8, HDTV ~ 20 Mb/s) Problem: loose information (cannot be tolerated by some applications: medical, NASA)

Media Characteristics Data requires a specific bandwidth: Constant bitrate (CBR) CM Variable bitrate (VBR) CM Easier case: CBR Data is partitioned into equi-sized blocks which represent a certain display time of the media E.g.: 176,400 bytes represent 1 second of playtime for CD audio (44,100 samples per second, stereo, 16-bits per sample)

Assumed Hardware Platform Multiple magnetic disk drives: Not too expensive (as compared to RAM) Not too slow (as compared to tape) Not too small (as compared to CD-ROM) And it ’ s already everywhere! Memory

Magnetic Disk Drives An electro-mechanical random access storage device Magnetic head(s) read and write data from/to the disk Disk Drive Internals

Disk Device Comparison

Disk Seek Characteristic

If d < z cylinders If d >= z cylinders Disk Seek Time Model

Disk Service Time The disk service time is dependent on several factors: Seek time Platter diameter (e.g., 3.5”, 2.5”, 1”) Rotational latency Spindle speed Data transfer time Zone-bit recording Read versus write bandwidth

–T Transfer : data transfer time [s] –T AvgRotLatency : average rotational latency [s] –T Service : service time [s] –B: block size [MB] –BW Effective : effective bandwidth [MB/s] Disk Service Time Model

Data Retrieval Overhead

Assumptions: –T Seek = 10 ms –BW Max = 20 MB/s –Spindle speed: 10,000 rpm Sample Calculations

Summary Average rotational latency depends on the spindle speed of the disk platters (rpm). Seek time is a non-linear function of the number of cylinders traversed. Average rotational latency + seek time = overhead (wasteful). Average rotational latency and seek time reduce the maximum bandwidth of a disk drive to the effective bandwidth

Traditional production/consumption problem RC = Consumption Rate, e.g., MPEG-1: 1.5 Mb/s. RD = Production Rate, Seagate Cheetah X15: MB/s. For now: RC < RD Partition video X into n blocks: X1, X2,..., Xn (to reduce the buffer requirement) X2X3 X1 Retrieve from disk Display from memory Display X1Display X2Display X3 Time Continuous Display (1 disk)

Time period: time to display a block (is fixed). System Throughput (N): number of streams. Assuming random assignment of the blocks: Maximum seek time between block retrievals Waste of disk bandwidth ==> lower throughput Tp=?, N=?, Memory=?, max-latency=? X2X3 X1 Display from Memory Display X1Display X2Display X3 Retrieve from Disk Y3Y4Y5 Display Y3Display Y4Display Y5 Seek Time Time Round-robin Display

Using disk scheduling techniques Less seek time ==> Less disk bandwidth waste ==> Higher throughput Larger buffer requirement Tp=?, N=?, Memory=?, max-latency=? X2X3 X1 Display from Memory Display X1, Y3, Z5 Retrieve from Disk Z5 Y3 Z6 Y4 Z7 Y5 Display X2, Y4, Z6 Time Cycle-based Display

Group Sweeping Schema (GSS) Can shuffle order of blocks retrievals within a group Cannot shuffle the order of groups GSS when g=1 is cycle-based GSS when g=N is round-robin Optimal value of g can be determined to minimize memory buffer requirements Tp=?, N=?, Memory=?, max-latency=? X2X3 X1 Display X1, W1 Z5 Y3 Z6 Y4 Z7 Y5 Display X2, W2 W1W2W3 Subcycle 1 Subcycle 2 Group 1Group 2

System Issues Movie is cut into equi-sized blocks: X0, X1, …, Xn-1. Time required to display one block is called time period Tp. Note: Tp is usually longer than the disk retrieval time of a block; this allows multiplexing of a disk among different displays. X0 X1 X2 X0X1X2 Server Retrieval Network Buffer Display Time Time period Buffer empty Hiccup

Constrained Data Placement Partition the disk into R regions. During each time period only blocks reside in the same region are retrieved. Maximum seek time is reduced almost by a factor of R. Introduce startup latency time Tp=?, N=?, Memory=?, max-latency=?

Hybrid For the blocks retrieved within a region, use GSS schema. This is the most general approach; Tp=?, N=?, Memory=?, max-latency=? By varying R and g all the possible display techniques can be achieved. Round-robin (R=1, g=N). Cycle-based (R=1, g=1). Constrained placement (R>0, g=1),... A configuration planner calculates the optimal values of R & g for certain application.

Mix of media types: different RC ’ s: audio, video; e.g.: Rc(Y) < Rc(X) < Rc(Z) Different block sizes: Rc(X)/B(X)=Rc(Y)/B(Y)=... Display time of a block (time period) is still fixed. X2X3 X1 Display from Memory Display X1, Y3, Z5 Retrieve from Disk Z5 Y3 Display X2, Y4, Z6 Z6 Y4 Z7 Y5 Time Display of Mix of Media

Multiple-disks Single disk: even in the best case with 0 seek time, 240/1.5 = 160 MPEG-1 streams. Typical applications (MOD): 1000 ’ s of streams. Solution: aggregate bandwidth and storage space of multiple disk drives. How to place a video? Memory

RAID Striping All disks take part in the transmission of a block. Can be conceptualized as a single disk. Even distribution of display load. Efficient admission. Is not scalable in throughput. d1d2d3 X1.1X1.2X1.3 X2.1X2.2X2.3 X1

Display Time d1d2d3 Retrieval Schedule X1,Y1,W1,Z1 X2,Y2,W2,Z2 X3,Y3,W3,Z3 d1d2d3 X1X2X3 Y1 Y2Y3 Z3 Z1Z2 W1 W2W3 Only a single disk takes part in the transmission of each block. Retrieval schedule Round-robin retrieval of the blocks. Even distribution of display load. Efficient admission. Not scalable in latency. Round-robin Retrieval

Hybrid Striping Partition D disks into clusters of d disks. Each block is declustered across the d disks that constitute a cluster (each cluster is a logical disk drive). RAID striping within a cluster. Round-robin retrieval across the clusters. RAID striping (d=D), Round-robin retrieval (d=1).