This is referred to as intra-frame compression, because compression is limited to within that frame. Once each frame s been compressed, they re simply put together to create the movie. JPEG is an example of such a codec. Here, once individual frames have been compressed, the compressor seeks a way to capitalize on redundancies between consecutive frames. This is called frame differencing.
Frame differencing uses key frames a frame in which all the data for that frame is stored.
A key frame is self-contained it doesn t rely on other frames. Differenced frames are based on a particular key frame, and store only that information which is different from the key frame. So, you have key frames at regular intervals and subsequent differenced frames that rely on the key frame they re associated with. Obviously, this is most effective when there s little change between frames and least effective when large amounts of data change. The key frame rate is decided at the time of compression.