Send the link below via email or IMCopy
Present to your audienceStart remote presentation
- Invited audience members will follow you as you navigate and present
- People invited to a presentation do not need a Prezi account
- This link expires 10 minutes after you close the presentation
- A maximum of 30 users can follow your presentation
- Learn more about this feature in our knowledge base article
Do you really want to delete this prezi?
Neither you, nor the coeditors you shared it with will be able to recover it again.
Make your likes visible on Facebook?
Connect your Facebook account to Prezi and let your likes appear on your timeline.
You can change this under Settings & Account at any time.
Digital Video Compression
Transcript of Digital Video Compression
mpeg-2 vs H.264
What is Video Compression?
The practice of reducing file size whilst maintaining as much of the original quality as possible
Eliminating redundancy or unimportant elements of the source (Bovik, 2009)
MPEG 2 - Encoding
by Robert Graver
Mpeg-2 is an extension of Mpeg-1
Defines coding methods to compress progressively scanned video as well as interlaced scanned video
Commonly used in broadcast format such as standard TV (SD) and High Definition TV (HD)
More advanced version of Mpeg-4
Not as commonly used in broadcast due to longer render times and high processing power
More often known to be used with Blu-Ray
Bit Rate Control
When we compress an image heavily we start to get very visible edges, due to the fact that we remove colour information, and so larger areas of colour are averaged out to be the same. This creates a stark difference between two regions and we start to see pixilation. 
Macro Block Motion Vectors
1. Bovik, A. C. 2009. The essential guide to video processing. Amsterdam: Academic Press/Elsevier. 
2. ↠, V. 2013. H.264 for Dummies – and why is it so popular? | ROOT6 Technology Blog. [online] Available at: http://www.root6technology.com/blog/index.php/2013/11/h-264-for-dummie/ [Accessed: 6 Mar 2014]. 
3. Slideshare.net. 2014. Video Compression Basics - MPEG2. [online] Available at: http://www.slideshare.net/VijayKumarArya/video-compression-basics-mpeg2 [Accessed: 6 Mar 2014]. 
How it works!
Video Compression relies on two main factors-
The data in frames is often redundant in space and time. eg.
Time Based Redundancy
In a frame, adjacent pixels are usually correlated. Eg the grass is green in the background of the frame.
In a video, adjacent frames are usually correlated. Eg. The green background is persisting frame after frame.
The human eye can resolve brightness details better than colour details, so due to this it is possible to delete some data from the frame without any noticeable deterioration in image quality.
MPEG-2 video encoding can be broadly categorized into – Intra Frame Encoding and Non-Intra Frame Encoding.
Intra Frame Encoding
Takes the advantage of spatial redundancy.
Compression techniques are applied using the data of the current frame only.
It uses combination of various lossless and lossy compression techniques. Such as –
Bit Rate Control
Non-Intra Frame Encoding
Takes the advantage of time-based redundancy as well as spatial redundancy.
Compression techniques are applied using the data of the current frame as well as preceding and/ or succeeding frames.
It mainly uses lossy compression techniques. Such as –
Video filtering is a lossy compression technique and is used to compress the spatial redundancies on a macro-block basis within the current frame.
Macro blocks are created by dividing a raw frame into 8x8 pixel blocks.
Bit Rate control is a mechanism to prevent the underflow or overflow of buffer used for temporary storage of encoded bit streams within the encoder. Bit Rate control is necessary in applications that require fixed bit rate transmission of encoded bit streams.
The quantization process may affect relative
buffer fullness which in turn affects the output bit rate.
The encoder has to pass these two parameters to the bit rate control mechanism in order to control the relative buffer fulness and constant bit rate.
Buffer underflow/overflow can be prevented by repeating or dropping of entire video frames.
Mostly, consecutive video frames are similar except for the differences induced by the objects moving within the frames.
Temporal Prediction uses both motion estimation and motion vector techniques to predict these changes in the future frames.
H.264 has the same qualities as MPEG-2 but it also has two neat tricks up its sleeve in order that we can further reduce the bit-rate of our video stream, whilst maintaining the quality of our image – these are:
Macro Block Motion Vectors
Let’s say that the macro block that’s moved from one frame to the next is identical in how it looks – it’s just in a different place. Here, we can keep the information about how the macro block looks i.e colour and structure of the pixels, and we only transmit a vector (this is essentially a mathematical arrow) which tells us where the macro block has moved to. This saves loads of data as we don’t have to reconstruct the macro block each time, and only the location.
Whilst certain implementations of MPEG support this feature also, H.264 is able to make use of much bigger and smaller macro blocks (up to 16×16 pixels and down to 4×4 pixels), meaning we can divide our image up very precisely, whilst still keeping bit rate low.
To improve our perception of quality of the image, we run a process called deblocking. This looks at the colour of two neighbouring macro blocks, and averages the colours at the borders to create a smoother transition – that is to say if we had a black macro block, neighbouring a white macro block, we would put in a border between the two that is grey (an average of the two colours), smoothing the transition to the eye and greatly increasing our perception of quality of the image. This also allows us to reduce the bit-rate of the image even further, whilst still retaining image quality. 
With Mpeg-2 leading the way into the future many years ago it would seem that it would only be a matter of time before something better came along and with H.264 having those hidden tricks up its sleeve, it allows high quality images to be maintained whilst keeping the bit rate low. This is why H.264 has become so popular with internet streaming services.
Mpeg-2 and H.264 both use similar techniques to compress video
H.264 uses more advanced versions of these
Both are still very popular
H.264 used widely for uploading to the internet