NUS.SOC.CS5248-2009 Roger Zimmermann (based in part on slides by Ooi Wei Tsang) Media Compression.

Slides:



Advertisements
Similar presentations
T.Sharon-A.Frank 1 Multimedia Compression Basics.
Advertisements

MPEG: A Video Compression Standard for Multimedia Applications Václav Hlaváč CTU Prague, Initial material were slides of Didier.
Video Compression - MPEG
Basics of MPEG Picture sizes: up to 4095 x 4095 Most algorithms are for the CCIR 601 format for video frames Y-Cb-Cr color space NTSC: 525 lines per frame.
A Brief Overview of the MPEG2 Standard Dr. David Corrigan.
NUS.SOC.CS Roger Zimmermann (based on slides by Ooi Wei Tsang) MPEG + RTP.
1 Video Coding Concept Kai-Chao Yang. 2 Video Sequence and Picture Video sequence Large amount of temporal redundancy Intra Picture/VOP/Slice (I-Picture)
Source Coding for Video Application
NUS.SOC.CS Roger Zimmermann (based in part on slides by Ooi Wei Tsang) Media Compression.
MPEG: A Video Compression Standard for Multimedia Applications Didier Le Gall Communications of the ACM Volume 34, Number 4 Pages 46-58, 1991.
NUS.SOC.CS Roger Zimmermann (based on slides by Ooi Wei Tsang) Systems Support for Continuous Media.
Department of Computer Engineering University of California at Santa Cruz Video Compression Hai Tao.
MPEG: A Video Compression Standard for Multimedia Applications Didier Le Gall Communications of the ACM Volume 34, Number 4 Pages 46-58, 1991.
CSc 461/561 Multimedia Systems Part B: 2. Lossy Compression
CS :: Fall 2003 MPEG Video (Part 2) Ketan Mayer-Patel.
CS :: Fall 2003 MPEG-1 Video (Part 1) Ketan Mayer-Patel.
Fundamentals of Multimedia Chapter 11 MPEG Video Coding I MPEG-1 and 2
1 Image and Video Compression: An Overview Jayanta Mukhopadhyay Department of Computer Science & Engineering Indian Institute of Technology, Kharagpur,
©Brooks/Cole, 2003 Chapter 15 Data Compression. ©Brooks/Cole, 2003 Realize the need for data compression. Differentiate between lossless and lossy compression.
Multimedia Compression John Hall SMDC Training June, 2006.
Image Formation and Digital Video
CSE679: MPEG r MPEG-1 r MPEG-2. MPEG r MPEG: Motion Pictures Experts Group r Standard for encoding videos/movies/motion pictures r Evolving set of standards.
Image and Video Compression
Video Streaming via Transcoding Jianping Fan Department of Computer Science University of North Carolina at Charlotte Charlotte, NC 28223
EE 5359 H.264 to VC 1 Transcoding Vidhya Vijayakumar Multimedia Processing Lab MSEE, University of Arlington Guided.
NUS.SOC.CS Roger Zimmermann (based in part on slides by Ooi Wei Tsang) Media Compression.
ECE472/572 - Lecture 12 Image Compression – Lossy Compression Techniques 11/10/11.
What are the common format for video files?
MPEG: A Video Compression Standard for Multimedia Applications Didier Le Gall Communications of the ACM Volume 34, Number 4 Pages 46-58, 1991.
MPEG MPEG-VideoThis deals with the compression of video signals to about 1.5 Mbits/s; MPEG-AudioThis deals with the compression of digital audio signals.
Multimedia Data Video Compression The MPEG-1 Standard
MPEG-1 and MPEG-2 Digital Video Coding Standards Author: Thomas Sikora Presenter: Chaojun Liang.
MPEG: (Moving Pictures Expert Group) A Video Compression Standard for Multimedia Applications Seo Yeong Geon Dept. of Computer Science in GNU.
Video Compression Techniques By David Ridgway.
Irfan Ullah Department of Information and Communication Engineering Myongji university, Yongin, South Korea Copyright © solarlits.com.
Video Processing Dinesh Ganotra. Terminologies Frames = Images frame size : WxH Color depth : Pixel represented by fixed amount of bits Duration: T FPS:
NUS.SOC.CS Roger Zimmermann (based on slides by Ooi Wei Tsang) Systems Support for Continuous Media.
Data Compression. Compression? Compression refers to the ways in which the amount of data needed to store an image or other file can be reduced. This.
MPEG MPEG : Motion Pictures Experts Group MPEG : ISO Committee Widely Used Video Compression Standard.
June, 1999 An Introduction to MPEG School of Computer Science, University of Central Florida, VLSI and M-5 Research Group Tao.
Image Compression Supervised By: Mr.Nael Alian Student: Anwaar Ahmed Abu-AlQomboz ID: IT College “Multimedia”
8. 1 MPEG MPEG is Moving Picture Experts Group On 1992 MPEG-1 was the standard, but was replaced only a year after by MPEG-2. Nowadays, MPEG-2 is gradually.
Compression video overview 演講者:林崇元. Outline Introduction Fundamentals of video compression Picture type Signal quality measure Video encoder and decoder.
NUS.SOC.CS5248 Ooi Wei Tsang Systems Support for Continuous Media OOI WEI TSANG.
Image/Video Coding Techniques for IPTV Applications Wen-Jyi Hwang ( 黃文吉 ) Department of Computer Science and Information Engineering, National Taiwan Normal.
NUS.SOC.CS Roger Zimmermann (based on slides by Ooi Wei Tsang) Systems Support for Continuous Media.
MPEG.
NUS.SOC.CS Roger Zimmermann (based in part on slides by Ooi Wei Tsang) Rate Adaptations.
(B1) What are the advantages and disadvantages of digital TV systems? Hint: Consider factors on noise, data security, VOD etc. 1.
MPEG CODING PROCESS. Contents  What is MPEG Encoding?  Why MPEG Encoding?  Types of frames in MPEG 1  Layer of MPEG1 Video  MPEG 1 Intra frame Encoding.
Introduction to MPEG Video Coding Dr. S. M. N. Arosha Senanayake, Senior Member/IEEE Associate Professor in Artificial Intelligence Room No: M2.06
1 Part A Multimedia Production Chapter 2 Multimedia Basics Digitization, Coding-decoding and Compression Information and Communication Technology.
6/9/20161 Video Compression Techniques Image, Video and Audio Compression standards have been specified and released by two main groups since 1985: International.
Principles of Video Compression Dr. S. M. N. Arosha Senanayake, Senior Member/IEEE Associate Professor in Artificial Intelligence Room No: M2.06
Compression System Optimization. Introduction Compression The reasons behind video compression. Common types of video compressions. The detail of I,P-frame.
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.
1 Introduction to Video Compression תשס"ט – 2009 דחיסת מולטימדיה – הנדסת מערכות תקשורת Part A Introduction to Video Compression תשס"ט – 2009 דחיסת מולטימדיה.
Or, how to make it all fit! DIGITAL VIDEO FILES AND COMPRESSION STANDARDS.
H. 261 Video Compression Techniques 1. H.261  H.261: An earlier digital video compression standard, its principle of MC-based compression is retained.
Media Compression.
Media Compression.
CS5248: Systems Support for Continuous Media
Rate Adaptations.
MPEG + RTP.
MPEG-1 Video Coding Standard
"Digital Media Primer" Yue-Ling Wong, Copyright (c)2013 by Pearson Education, Inc. All rights reserved.
Media Compression.
Video Compression - MPEG
Standards Presentation ECE 8873 – Data Compression and Modeling
Presentation transcript:

NUS.SOC.CS Roger Zimmermann (based in part on slides by Ooi Wei Tsang) Media Compression

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

NUS.SOC.CS Roger Zimmermann (based in part on slides by Ooi Wei Tsang) Why compress? “Bandwidth Not Enough” “Disk Space Not Enough” Size of Uncompressed DVD Movie =

NUS.SOC.CS Roger Zimmermann (based in part on slides by Ooi Wei Tsang) Why compress? “Bandwidth Not Enough” “Disk Space Not Enough” Size of Uncompressed DVD Movie = 720 x 576 x 3 x 25 x 60 x 120 = 208.6GB

NUS.SOC.CS Roger Zimmermann (based in part on slides by Ooi Wei Tsang) Optical Disc Formats (1) CD: ~650 MB DVD: 4.7 (4.38) GB (single layer) 8.5 (7.92) GB (dual layer) Single and dual sided (up to 18 GB) 1X max. read speed: ~10 Mb/s Video codec: MPEG-2

NUS.SOC.CS Roger Zimmermann (based in part on slides by Ooi Wei Tsang) JPEG Compression

Original Image (1153KB) 1:1

Original Image (1153KB) 3.5:1

Original Image (1153KB) 17:1

Original Image (1153KB) 27:1

Original Image (1153KB) 72:1

Original Image (1153KB) 192:1

NUS.SOC.CS Roger Zimmermann (based in part on slides by Ooi Wei Tsang) Compression Ratio QualitySizeRatio Raw TIFF1153KB1:1 Zipped TIFF982KB1.2:1 Q=100331KB3.5:1 Q=7067KB17:1 Q=4043KB27:1 Q=1016KB72:1 Q=16KB192:1

NUS.SOC.CS Roger Zimmermann (based in part on slides by Ooi Wei Tsang) Magic of JPEG Throw away information we cannot see Color information “High frequency signals” Rearrange data for good compression Use standard compression

NUS.SOC.CS Roger Zimmermann (based in part on slides by Ooi Wei Tsang) Discard color information Y VU

NUS.SOC.CS Roger Zimmermann (based in part on slides by Ooi Wei Tsang) Color Sub-sampling 4:4:4 4:2:2 4:2:0 4:1:1

NUS.SOC.CS Roger Zimmermann (based in part on slides by Ooi Wei Tsang) 4:2:2 Sub-sampling Y VU

Original Image (1153KB) 4:2:0

Original Image (1153KB) “4:1:0”

NUS.SOC.CS Roger Zimmermann (based in part on slides by Ooi Wei Tsang) Discrete Cosine Transform Demo

NUS.SOC.CS Roger Zimmermann (based in part on slides by Ooi Wei Tsang) Quantization /= Quantization Table DC AC

NUS.SOC.CS Roger Zimmermann (based in part on slides by Ooi Wei Tsang) Differential Coding

NUS.SOC.CS Roger Zimmermann (based in part on slides by Ooi Wei Tsang) Zig-zag ordering , 3, 2, 4, 1, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0

NUS.SOC.CS Roger Zimmermann (based in part on slides by Ooi Wei Tsang) Run-Length Encoding , 3, 2, 4, 1, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0 (27, 1) (3, 1) (2, 1), (4, 1), (1, 2), (0, 5), (1, 1), (0, 4)

NUS.SOC.CS Roger Zimmermann (based in part on slides by Ooi Wei Tsang) Idea: Motion JPEG Compress every frame in a video as JPEG DVD-quality video = 208.6GB Reduction ratio = 27:1 Final size = 7.7GB

NUS.SOC.CS Roger Zimmermann (based in part on slides by Ooi Wei Tsang) Video Compression

NUS.SOC.CS Roger Zimmermann (based in part on slides by Ooi Wei Tsang) Temporal Redundancy

NUS.SOC.CS Roger Zimmermann (based in part on slides by Ooi Wei Tsang) Motion Estimation

NUS.SOC.CS Roger Zimmermann (based in part on slides by Ooi Wei Tsang) Bi-directional Prediction

NUS.SOC.CS Roger Zimmermann (based in part on slides by Ooi Wei Tsang) Watch for Motion Vectors Demo

NUS.SOC.CS Roger Zimmermann (based in part on slides by Ooi Wei Tsang) H.261 I-Frame P-Frame

NUS.SOC.CS Roger Zimmermann (based in part on slides by Ooi Wei Tsang) MPEG-1 B-Frame

NUS.SOC.CS Roger Zimmermann (based in part on slides by Ooi Wei Tsang) MPEG Frame Pattern Example display sequence: IBBPBBP … Example encoding sequence: IPBBPBB

NUS.SOC.CS Roger Zimmermann (based in part on slides by Ooi Wei Tsang) Compression Ratio Frame TypeTypical Ratio I10:1 P20:1 B50:1

NUS.SOC.CS Roger Zimmermann (based in part on slides by Ooi Wei Tsang) Sequence sequence header: width height frame rate bit rate :

NUS.SOC.CS Roger Zimmermann (based in part on slides by Ooi Wei Tsang) GOP: Group of Picture gop header: time :

NUS.SOC.CS Roger Zimmermann (based in part on slides by Ooi Wei Tsang) Picture pic header: number type (I,P,B) :

NUS.SOC.CS Roger Zimmermann (based in part on slides by Ooi Wei Tsang) Picture

NUS.SOC.CS Roger Zimmermann (based in part on slides by Ooi Wei Tsang) Slice

NUS.SOC.CS Roger Zimmermann (based in part on slides by Ooi Wei Tsang) Macroblock

NUS.SOC.CS Roger Zimmermann (based in part on slides by Ooi Wei Tsang) Block YY YY U V 1 Macroblock =

NUS.SOC.CS Roger Zimmermann (based in part on slides by Ooi Wei Tsang) Structure Summary

NUS.SOC.CS Roger Zimmermann (based in part on slides by Ooi Wei Tsang) For I-Frame Every macroblock is encoded independently (“I-macroblock”)

NUS.SOC.CS Roger Zimmermann (based in part on slides by Ooi Wei Tsang) For P-Frame Every macroblock is either I-macroblock a motion vector + error terms wrt a prev I/P-frame (“P-macroblock”)

NUS.SOC.CS Roger Zimmermann (based in part on slides by Ooi Wei Tsang) For B-Frame Every macroblock is either I-macroblock P-macroblock a motion vector + error terms wrt a future I/P-frame 2 motion vectors + error terms wrt a prev/future I/P-frame

NUS.SOC.CS Roger Zimmermann (based in part on slides by Ooi Wei Tsang) MPEG-1/2 File Formats (Packetized) Elementary streams, ES & PES Program streams PS (reliable mediums, e.g., DVD) Transport streams TS (for lossy mediums, e.g., on-air broadcast) MPEG-2 Elementary Encoder Packetizer Systems Layer MUX Transport Stream Video Source Audio Source MPEG encoded streams Data Source Packetizer Flow chart © Manish Karir PES: *.m2v PES: *.m2a TS: *.ts *.m2t *.mpg

NUS.SOC.CS Roger Zimmermann (based in part on slides by Ooi Wei Tsang) Review: MPEG structure ES, PS, TS Sequence GOP Picture Slice Macroblock Block

NUS.SOC.CS Roger Zimmermann (based in part on slides by Ooi Wei Tsang) MPEG Decoding (I-Frame) Entropy Decoding Dequantize IDCT

NUS.SOC.CS Roger Zimmermann (based in part on slides by Ooi Wei Tsang) MPEG Decoding (P-Frame) Entropy Decoding Dequantize IDCT Prev Frame +

NUS.SOC.CS Roger Zimmermann (based in part on slides by Ooi Wei Tsang) Future Frame MPEG Decoding (B-Frame) Entropy Decoding Dequantize IDCT Prev Frame + AVG

NUS.SOC.CS Roger Zimmermann (based in part on slides by Ooi Wei Tsang) There is more.. Half-pel Motion Prediction Skipped Macroblock etc.

NUS.SOC.CS Roger Zimmermann (based in part on slides by Ooi Wei Tsang) MPEG in Daily Life MPEG Standards Bit-rateUsage MPEG-11.5MbpsVCD MPEG Mbps DVD, SVCD, HDTV MPEG-4Scalable QuickTime, DivX, AVCHD

NUS.SOC.CS Roger Zimmermann (based in part on slides by Ooi Wei Tsang) Camcorders in Daily Life Different formats used DV25 (MiniDV, DVCAM, DVCPRO) Capacity: 1 hour ~ 13 GB Speed: 25 Mb/s (user data) Color sampling: 4:1:1 Compression ratio: ~10:1

NUS.SOC.CS Roger Zimmermann (based in part on slides by Ooi Wei Tsang) Codec Comparison “M-JPEG” (e.g., DV) versus “MPEG” No “perfect” codec -> application dependent Compression Technique “M-JPEG” (I-frames only) “MPEG” (Temporal compression) Compression ratioLow (10:1 to 30:1)High (>100:1) Editing (frame-accurate)EasyDifficult Encoding/decoding complexity SymmetricAsymmetric Processing latencyLow to MediumHigh Multi-generation lossMediumHigh

NUS.SOC.CS Roger Zimmermann (based in part on slides by Ooi Wei Tsang) High-Definition Standard by ATSC 18 different sub-formats 720p and 1080i are the most interesting 1280x720x60p, 1920x1080x60i (30p) 1080p is non-standard, but available 1.4 Gb/s raw bandwidth 10 – 20 Mb/s compressed (distribution, broadcast) 100 – 135 Mb/s compressed (pro tapes: DVCPROHD, HDCAM; for editing)

NUS.SOC.CS Roger Zimmermann (based in part on slides by Ooi Wei Tsang) Consumer HD HDV: MPEG-2 19 (720p) / 25 Mb/s (1080i) Tape format AVCHD: H to 20 Mb/s Hard disk format

NUS.SOC.CS Roger Zimmermann (based in part on slides by Ooi Wei Tsang) Optical Disc Formats (2) HD DVD (now dead) Capacity: 15 GB and 30 GB 1X speed: 36 Mb/s Video codec: VC-1, H.264, MPEG-2 Blu-ray Capacity: 25 GB and 50 GB 1X speed: 36 Mb/s Video codec: VC-1, H.264, MPEG-2

NUS.SOC.CS Roger Zimmermann (based in part on slides by Ooi Wei Tsang) Recent Codec: H.264 Same quality at half the rate Encoding complexity: ~4X How: Variable block size motion compensation Multiple reference frames Deblocking filter... Also called MPEG-4 Part 10 or AVC

NUS.SOC.CS Roger Zimmermann (based in part on slides by Ooi Wei Tsang) Hands-On Download source code, compile and play with ffmpeg mpeg_stat Video ‘Surfing_short.m2t’ from course web site (98 MB, HDV, transport stream) Try different MPEG-1/2 encoding parameter

NUS.SOC.CS Roger Zimmermann (based in part on slides by Ooi Wei Tsang) Impact on Systems Design How to package data into packets? How to deal with packet loss? How to deal with bursty traffic? How to predict decoding time? : :