M2Ktech.com


Bookmark
Page

   TECH FORUM
 
Forum
FORUM
Tips to your desktop
Subscribe to our mailing list:
Email:

Search this site:

<< BACK

PRINT VERSION

The Nuts & Bolts of MPEG Compression

Without video compression, we wouldn’t have video streaming over the Internet. We wouldn’t have HDTV, and we wouldn’t have DVD’s. All three use some form of video compression.

In theory, in order to compress a file you have to discard information. This is true for video files too. However, if we begin to throw out frames, the video gets choppy until finally it’s nothing more than a slideshow. With video compression, rather than throwing out entire frames of information, the compression throws out parts of frames.

A good example of this is a video shot of a news reporter. He stands in front of the camera and talks. He moves only slightly. If the background doesn’t move, why not keep the background from the first frame and discard the background each frame after that? That’s exactly what the video compression MPEG does, and the technology in the past five years has made compression so powerful that we can digitally transmit an entire movie in real-time over cable TV wiring.

THE FRAME GAME

I Frames - Mpeg begins by selecting a reference frame, called the I frame. This frame is complete without any missing data. This frame is the frame that the following P frames will be based on.

P Frames – P frames (or predicted frames) contain only the difference between themselves and the previous P frame or I frame. The P frame cuts out anything that remained the same from the previous frame.

B Frames – B frames (or bidirectional frames) contain the difference between themselves and both frames on either side of themselves. B frames are not used in all MPEG algorithms because both decoder and encoder require more RAM to operate.

THE GOP

Now that we understand the different frames and how they are made to save space when it comes to storage, we need to look at the item that ties them all together, the GOP structure. GOP stands for Group Of Pictures, which is what video essentially is. The GOP structure tells the encoder and decoder how the MPEG file is laid out. A typical GOP structure would look like this:

IPPPPPPPPPPPIPPPPPPPPPPPIPPPPPPPPPPP

The above indicates that for every I frame, you have an additional eleven P frames before getting to the next I frame. The more P frames you have between the I frames, the less accurate frame to frame calculations become and viola….you have artifacts, which we will explain in a moment.

Going a step deeper into the building blocks of each frame, we have the macroblock. A macroblock is a collection of pixels or PELs (picture elements). The pixels in the block are compressed and then the motion of the block is predicted based on the I, P or B frames.

Ever watch a football game on digital cable during a play where the camera zooms past the crowd? If you watch very carefully, you’ll sometimes see people distort and become blocky for a frame or two. Bingo! Artifacts.

While this tech tip probably won’t resurface your hard drive or help you configure an all-new network topography, it gives you a pretty good idea when you watch a DVD or a video file streaming off the web, that there’s a whole lot more going on in the background than you may have thought of.

Disclaimer - The Micro 2000 Tech Tip is a free service providing information only. While we use reasonable care to see that this information is correct, we do not guarantee it for accuracy, completeness or fitness for a particular purpose. Micro 2000, Inc. shall not be liable for damages of any kind in connection with the use or misuse of this information.

Micro-Scope - PC Hardware trouble shooting at your finger tips

Micro2000 PC Diagnostics

Erased the data on your hard drive? Think again!

MicroScope on a Stick





Free translation
   SITEMAP | CONTACT | HOME

Disclaimer - The M2K Tech Tip is a free service providing information only. While we use reasonable care to see that this information is correct, we do not guarantee it for accuracy, completeness or fitness for a particular purpose. M2KTech.com shall not be liable for damages of any kind in connection with the use or misuse of this information.

© 2006 M2Ktech.com All Rights Reserved