System Optimization Compression Introduction Compression The reasons behind
System Optimization Compression
Introduction Compression • The reasons behind video compression. • Common types of video compressions. • The detail of I, P-frame. • How does H. 264 compress video to smaller data? • The common scenario of different compression type to use.
Agenda • • • Compressions I-frame, P-frame MJPEG (Motion JPEG) MPEG-4 / H. 264 Scenario Compression Comparison
Compressions Reasoning behind Video Compression • Reduce the amount of storage needed • Increases the amount of recorded time • Reduces the network bandwidth 3 most common types of Video Compressions: • MJPEG • MPEG-4 • H. 264
Mainly 2 types of Frames, I & P • I-frame is a self-containing frame that does not need references to other frames. • P-frame uses reference to previous I- or P-frame, and will contain only information about the content that is different compared to previous frame. I P P P P I
Procedure of I-frame, P-frame • Step 1: Capture the I-frame as a reference frame. • Step 2: Capture the P-frame. Compare with I-frame and only store the difference in image. • Step 3: Capture the next P-frame. Compare with previous P-frame and only store the difference in image. • The number of P-frame is defined by GOP (Group of Pictures) I P P P P P
MJPEG (Motion JPEG) • Each image frame as an individual picture and compresses them one by one into a JPEG image • Consists of I-frames only • JPEG format can compress 4 MB image data (BMP format) to 180 KB
MPEG-4 / H. 264 • Capture one full image as a reference first. • Take next images compare with the reference one and only compress and transmit the difference parts for data size saving. Original: Compression: I-frame P-frame
H. 264 -H. 264 uses multi-types of block (macroblock) to be a unit for doing the comparison accurately with object and reducing data size. -H. 264 supports 4 x 4, 8 x 4, 4 x 8 and 8 x 8 blocks - MPEG-4 only supports 16 x 16 blocks. 4 x 4 8 x 8 4 x 4 8 x 4 4 x 8 8 x 4 Analysis image by H. 264 4 x 8
Example 1 MPEG-4 H. 264 16 16 : Saving space
Scenario 1 Transmit Data Capturing Video Storage Live View/Playback Data Size Compression Type Raw Data Compressed Data Stored Data (Compressed) Decompressed Data (Raw) MJPEG 10 7 7 10 MPEG 4 10 5 5 10 H. 264 10 3 3 10
Scenario 1 MJPEG MPEG-4 H. 264 • Commonly Used In • Plays in what Market • Judicial Systems • Access Control • Mobile Applications • Gas stations • Retail Stores • Corporate Offices • Large system installations • Schools and Colleges • Cloud Monitoring
Compression Comparison H. 264 MPEG-4 MJPEG High Medium Low Data Size Small (Same image quality) (50% of MPEG-4 20% of MJPEG) Medium Big Network bandwidth requirement Low Medium High Calculating power requirement to decompress for live view and playback High Medium Low Image quality (Same bit rate)
- Slides: 13