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

Slides:



Advertisements
Similar presentations
MPEG: A Video Compression Standard for Multimedia Applications Václav Hlaváč CTU Prague, Initial material were slides of Didier.
Advertisements

Chapter 6 Review.
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)
Audiovisual digital documents Adolf Knoll National Library of the Czech Republic
Source Coding for Video Application
MPEG: A Video Compression Standard for Multimedia Applications Didier Le Gall Communications of the ACM Volume 34, Number 4 Pages 46-58, 1991.
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-1 Video (Part 1) Ketan Mayer-Patel.
ATSC Digital Television
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,
Image Formation and Digital Video
MPEG-2 Digital Video Coding Standard
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.
+ Video Compression Rudina Alhamzi, Danielle Guir, Scott Hansen, Joe Jiang, Jason Ostroski.
Image and Video Compression
Video Streaming via Transcoding Jianping Fan Department of Computer Science University of North Carolina at Charlotte Charlotte, NC 28223
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.
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.
Page 19/15/2015 CSE 40373/60373: Multimedia Systems 11.1 MPEG 1 and 2  MPEG: Moving Pictures Experts Group for the development of digital video  It is.
M P E G A Presentation by Sebastian Graf and Thomas Winterscheid.
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.
MPEG Motion Picture Expert Group Moving Picture Encoded Group Prateek raj gautam(725/09)
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:
Q G Dave MacCarn, WGBH. Q G From Analog to Digital to HD  Explosion of new formats with the start of standard-definition digital video and an even broader.
Videos Mei-Chen Yeh. Outline Video representation Basic video compression concepts – Motion estimation and compensation Some slides are modified from.
Image Processing and Computer Vision: 91. Image and Video Coding Compressing data to a smaller volume without losing (too much) information.
Recording Options: Codecs and Containers 1 Dave MacCarn, WGBH.
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.
NUS.SOC.CS Roger Zimmermann (based in part on slides by Ooi Wei Tsang) Media Compression.
Compression video overview 演講者:林崇元. Outline Introduction Fundamentals of video compression Picture type Signal quality measure Video encoder and decoder.
Q G NETA Quality Workshop 1 Dave MacCarn, WGBH. Q G From Analog to Digital to HD  Explosion of new formats with the start of standard-definition digital.
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.
MPEG-1Standard By Alejandro Mendoza. Introduction The major goal of video compression is to represent a video source with as few bits as possible while.
MPEG.
NUS.SOC.CS Roger Zimmermann (based in part on slides by Ooi Wei Tsang) Rate Adaptations.
JPEG Image Compression Standard Introduction Lossless and Lossy Coding Schemes JPEG Standard Details Summary.
Block-based coding Multimedia Systems and Standards S2 IF Telkom University.
(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.
Q G Boston Public Television Quality Workshop 1 Dave MacCarn, WGBH.
Introduction to MPEG Video Coding Dr. S. M. N. Arosha Senanayake, Senior Member/IEEE Associate Professor in Artificial Intelligence Room No: M2.06
V ENUS INTERNATIONAL COLLEGE OF TECHNOLOGY Guided by : Rinkal mam.
6/9/20161 Video Compression Techniques Image, Video and Audio Compression standards have been specified and released by two main groups since 1985: International.
1 Introduction to Video Compression תשס"ט – 2009 דחיסת מולטימדיה – הנדסת מערכות תקשורת Part A Introduction to Video Compression תשס"ט – 2009 דחיסת מולטימדיה.
MPEG Video Coding I: MPEG-1 1. Overview  MPEG: Moving Pictures Experts Group, established in 1988 for the development of digital video.  It is appropriately.
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.
MPEG + RTP.
"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
MPEG-1 MPEG is short for the ‘Moving Picture Experts Group‘.
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) pixels x 3 bytes x 25 fps x 60 sec/min x 120 min = GB NTSC: fps (30/1.001); PAL 25 fps

NUS.SOC.CS Roger Zimmermann (based in part on slides by Ooi Wei Tsang) Optical Disc Formats (1) CD: ~650 MB VideoCD: codec MPEG-1 1X max. read speed: 1.5 Mb/s 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) Optical Disc Formats (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) 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 The subsampling scheme is commonly expressed as a three part ratio (e.g. 4:2:2). The parts are (in their respective order): Luma (Y) horizontal sampling reference (originally, as a multiple of MHz in the NTSC television system). Cr (U) horizontal factor (relative to first digit). Cb (V) horizontal factor (relative to first digit), except when zero. Zero indicates that Cb horizontal factor is equal to second digit, and, in addition, both Cr and Cb are subsampled 2:1 vertically. Zero is chosen for the bandwidth calculation formula to remain correct. To calculate required bandwidth factor relative to 4:4:4, one needs to sum all the factors and divide the result by 12.

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

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

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

MPEG Frame Pattern (1) HDV GOP example NUS.SOC.CS Roger Zimmermann (based in part on slides by Ooi Wei Tsang)

NUS.SOC.CS Roger Zimmermann (based in part on slides by Ooi Wei Tsang) MPEG Frame Pattern (2) 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

Slices are important in the handling of errors. If the bitstream contains an error, the decoder can skip to the start of the next slice. Having more slices in the bitstream allows better error concealment, but uses bits that could otherwise be used to improve picture quality (worse compression). NUS.SOC.CS Roger Zimmermann (based in part on slides by Ooi Wei Tsang)

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 with respect to a previous 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 previous/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: elementary stream, program stream, transport stream Sequence GOP: group of pictures 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 much more … Half-pel motion prediction Skipped macroblock Different sizes of macroblocks Motion vectors across multiple frames etc.

NUS.SOC.CS Roger Zimmermann (based in part on slides by Ooi Wei Tsang) Codecs in Daily Life MPEG Standards Bit-rateUsage MPEG-11.5MbpsVCD MPEG Mbps DVD, SVCD, HDTV MPEG-4ScalableQuickTime, DivX H.264/AVC Scalable, ½ orig. MPEG-4 AVCHD, Cable TV, YouTube, … H.265/HEVC Scalable, ½ H.264 Next generation, 4K content

NUS.SOC.CS Roger Zimmermann (based in part on slides by Ooi Wei Tsang) Camcorders in Daily Life Tape-based: DV25 (MiniDV, DVCAM, DVCPRO) Capacity: 1 hour ~ 13 GB Bitrate: 25 Mb/s (user data) Color sampling: 4:1:1 Compression ratio: ~10:1 Disk/Flash-based: AVCHD 1.0 & 2.0 H.264: 24 Mb/s, HD, high compression

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 25 Mb/s Hard disk format

NUS.SOC.CS Roger Zimmermann (based in part on slides by Ooi Wei Tsang) Current Popular 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 or MPEG-4/AVC

Current Codec: VP8 Google bought On2 Technologies in 2010, which developed VP8 Open-source license (H.264 needs to be licensed for use) Similar coding efficiency and quality as H.264 Uses the WebM file format NUS.SOC.CS Roger Zimmermann (based in part on slides by Ooi Wei Tsang)

NUS.SOC.CS Roger Zimmermann (based in part on slides by Ooi Wei Tsang) Next Generation Codec: H.265 High Efficiency Video Coding (HEVC) “Same quality at half the rate” (over H.264/MPEG-4 AVC) Very high encoding complexity Supports progressive scanned frame rates and display resolutions from QVGA (320x240) up to 1080p (1920x1080) and Ultra HDTV (7680x4320)

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? : :