There are actually 3 types of frames:
- I-frame Intra-coded (independent) frame, the least compressed
- P-frame Predicted frame: uses precedent frames to improve compression
- B-frame Bi-directional frame: uses both previous and next frames for the best compression
These frames are indeed the result of compression by the encoder, which is done in different steps, roughly (not exhaustive):
- Reduce color nuances & resolution of images
- Remove imperceptible details
- Compare adjacent images and remove redundant informations (i.e. unchanged items between 2 images)
- [...]
There is a good article on wikipedia. You can find more asking google on I/P/B frames ;)
Also checkout this answer related to your question.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…