In visual recording and transmission, video compression is a technique used to reduce the amount of data in a video file, to limit the amount of storage space or bandwidth it requires. It is common in online mediums and in broadcasting. Video compression works on the same theoretical basis as other types of file compression, and even cryptography, which is that one piece of data can be used and re-used to represent multiple pieces of data.
Specifically, video compression assumes an uncompressed piece of video contains much more data than is needed to satisfactorily convey it. Compression technology therefore strives to achieve an optimal trade-off that balances data reduction with quality. From a technical standpoint, most types of video compression work by comparing a single frame of video to the frames immediately before it and after it, and saving only the pieces of the frame that are substantially different. The level of compression, therefore, can be adjusted by limiting or expanding just how much difference the compression software looks for. Compression works best when only small sections of the video are changing at a time. Fast-moving objects and events, such as explosions, are very hard to compress, due to their constantly changing composition.
Video compression is not a flawless process. With most means of video compression, the higher the level of compression, the longer it can take for video player hardware to decode the data. This can result in visual glitches. One of these, and a common pitfall of over-compression, is known as artifacting, a phenomenon wherein small, static chunks from previous frames of video remain on the screen over top of the moving image. Artifacting is particularly common in video files formatted for the Internet and mobile devices, where visual quality is a secondary priority behind file size.
In mediums such as DVD-Video™ (DVDs), in which optimum visual quality is the main objective, a video can still be greatly compressed and remain reasonably sharp. New technologies such as Blu-ray™, which have much greater capacities than DVDs, require less compression and can therefore present a video in even greater quality. Ongoing advances in both storage and transmission technologies continue to reduce the need for extreme levels of compression, and shift the emphasis towards providing greater quality.
In addition to traditional, or lossy, compression, there is also a class of video compression known as lossless. Lossless compression, as its name implies, compresses data without actually removing any information from the file. It is limited in scope, and cannot compress data to the same degree as lossy techniques, but does satisfy the needs of some applications that retain every piece of data from the original file.