What is Video Compression?
If you’ve ever recorded video for the Web, you’ve probably had to deal with video compression in some way. Often, video compression is handled by an editing program using pre-defined options so you don’t need to be bothered with all the details involved in compressing video down to a size and file structure suitable for distribution over the Web. While many programs make the basic process of compressing your videos down easy, or even invisible, the science behind video compression is extremely complex. In fact, as quickly as things are evolving, it’s impossible to say whether or not anyone truly has a firm grasp on all of the possible options. So, what is video compression?
Video compress is an often-lossy method of taking a raw video file and reducing its size and file structure down to a more reasonable level. Because raw video (especially in HD) is so complex, the files are typically extremely large. What seems like a few minutes of video can fill gigabytes of space on a drive. This makes these files impractical to distribute as it would require a lot more bandwidth than most people can currently handle. For this reason, video is typically compressed before it’s sent out to the Web.
YouTube, Hulu, Netflix, and even your local cable provider all use compressed video formats. When you’re watching your favorite show on TV, there is a good chance that you’re actually watching a digital file that has been compressed using a specific codec that is then decoded by your television and presented to you. These codecs determine how a file is compressed, and how changes in the moving image are interpreted by the media player.
When you think of a raw video file, consider that each frame of the video is a separate image, much like a photo. Each image contains a massive amount of information including a defined assignment for each pixel in the picture. A video shot at thirty frames per second for a full minute includes 1,800 of these pictures. These pictures are accompanied by an audio track, which itself has a lot of information in it. This is why raw video files are so large.
Video compression helps the situation in several different ways, depending on how the specific codec works. Lossy codecs (H.264, WMV, mpeg-2, etc.) are designed to wipe out excessive information and reduce the overall file size. For example, if a video is shot using a still camera and a relatively constant background, the process of compression might keep the background constant, throwing out the need for each frame to include a new background. Objects in the frame that move are then adjusted with each frame, so instead of very second consisting of 30 full images, it might contain a single image of the stationary parts of the video and new images for the areas that are moving.
Other compression methods can work in different ways. If an object maintains a constant shape, but is moved around the screen, the process might take all the information stored about that object and simply shift it to the new position as it moves in the video. In this case, one still frame can be duplicated multiple times as with the subject simply moving from one space to the other.
In any case, a video that would normally be 5 GB could be compressed down using a lossy codec to several megabytes, depending on how much movement is present in the video. Screencasts, where the vast majority of the image is typically absolutely still, can result in surprisingly small file sizes compared to outdoor action shots with grass and tree leaves swaying in the breeze.
One of the biggest advantages to video compression is a reduction in file size. This allows the video to be easily transferred between systems and distributed in many different ways. Players can be optimized for specific codecs, making them more efficient at decoding videos that come in these formats, resulting in longer battery life and a better overall viewing experience. Raw video rarely plays well on consumer media players, as they often have limited buffering capabilities and lack the processing power to handle massive amounts of continuous information.
Not every media player can decode every type of video compression format. For example, WMV video files compressed using Windows Movie Maker may not be compatible with an iPod. On the same note, a .MOV file compressed using the H.264 codec may not play on a Zune or other non-supporting media player.
You’re also unable to restore a video’s quality once it’s been compressed. If you have a pixelated video that doesn’t look right, no amount of processing or compression will truly improve how it looks after the fact. You’ll need the source files to do that. You can slightly blur the video, which removes the obvious pixelation, but this is just an illusion and not a true quality increase of the data.
Video compression is an extremely complex science to tackle. Different codecs, bit rates, and various other factors are constantly being debated by industry professionals as they seek out improved ways to make their digital videos look better.