Compression is the process of reducing the size of a data file by eliminating redundancies. In video, compression typically operates in two ways; spatial and temporal.
Spatial compression deals with minimizing color information on each digital image by removing or reordering. For example, if an image had 20 black pixels in a row, instead of storing an individual piece of information for each pixel, the computer can simply say “blackX20” and still have the same result.
Temporal compression operates across time. Static backgrounds or props that don’t change between frames need only to be captured once, then repeated for the frames after
Compression can be either lossless, which reduces file size up to a factor of 3, or lossy, which can reduce to a factor between 20 to 200. Of course, the smaller the file is reduced, the worse the compressed video will look.
lossless compression means that the image can be fully reconstructed pixel-to-pixel when uncompressed.
Lossy compression means that when the image is restored some amount of detail is lost, albeit usually information that the human eye will not readily notice.