B-frame
|
B-frames are one of three possible frame types as outlined in the MPEG-4 video compression standard. The three frame-types are referred to as I(ntra)-frames, P(redicted)-frames and B(i-directional)-frames.
In compression formats, such as MPEG-4, only differentiating data between frames is recorded. For example, in a scene whereby a person stands still while lowering his guns, only the motion of him moving his arms will be recorded into those frames (either as motion vector co-ordinates or image data, depending on complexity). The rest of the scene does not have any motion; therefore storing it would be redundant in future frames.
Some knowledge of perceptual video compression will be assumed for the rest of the article.
Intra-frame
- Is an image coded without reference to anything except itself.
- Is generated when differentiating image details prohibit generation of effective P or B frames.
- Required to decode successive frames.
- I-frames are also known as key frames because of their importance. Longer intervals between I-frame appearances translates into longer frame reconstruction times, which in turn means longer seek times for local media and longer recovery times for streaming media if the connection goes bad. Therefore, most codecs limit the distance between I-frames to 250 or 300 frames (10 seconds of video)
Predicted-frame
- Only contains changes from previous frame.
- May contain both image data and motion vector co-ordinates.
- Can only reference previous frames.
- Is generated when differentiating details can be referenced from the previous relevant frame.
- Used to help rebuild certain frames.
- Compresses better than an I-frame.
Bi-directional frame
- Only contains changes from other frames.
- May contain both image data and motion vector co-ordinates.
- In most video standards (all except for H.264), B-frames are never used as reference frames. As a result, higher quantization values (this means better compression, but less quality) can be used for B-frames because the loss of detail will not be passed on to subsequent frames.
- References both the previous and next frame.
- Of the three types of frames, compresses best.