The two methods of video compression are intraframe (I-frame) compression and interframe compression. Compression itself is a mathematically-based algorithm that allows the reduction of the file size of images while maintaining visual quality. The way compression works is similar to compression in photographic files and audio files. Video compression takes advantage of the physical characteristics of filming which is a vast number of individual shots called frames. Frames have similar characteristics to movie film which is actually individual photos taken by a camera at a high rate of speed except that the construction of frames are with computer pixels rather than a chemical emulsion exposed to light.
In compression, the software program relies on the principle of redundant information in multiple images. Redundancy occurs in two types: Spatial redundancy and temporal redundancy. If a pixel occurs in the same location for a number of images, the program notes it in the first image and removes it in subsequent images until the location ceases. The program is using temporal redundancy to compress the image. The second type of redundancy, spatial, the pixels are in the process of stretching, so the software prevents the pixels from expanding.
Video software uses either intraframe compression or interframe compression for reducing the file size. Intraframe works with the issue of spatial redundancy by reducing the expansion of the I-frame 10:1, maintaining the integrity of the data within the image. But the file is still large because the program doesn’t make use of temporal redundancy. Interframe compression addresses both issues of spatial and temporal redundancy.
A software program using interframe compression starts with creating I-frames like the intraframe program would create but it goes further by analyzing the frames to create the I-frame at fixed intervals of 15 frames. These frames are organized into a GOP or group of pictures. In the interframe method, the I-frame is renamed a keyframe, which acts as the reference frame, holding the color value of the pixel in place, similar to a sample in PCM.