GOP Structure
Picolo Diligent provides MPEG-4 compressed media streams.
The M in MPEG stands for "Motion". Indeed, the differences between successive images represent the movement of the objects observed by the camera.
MPEG is sometimes called temporal compression because it mixes informations from successive images to achieve better compression ratios and lower bit rates.
I, P and B Frames
In the MPEG compression, each image of the video stream is compressed individually, but various techniques allow to reduce the compressed size even more. The compressed images are categorized as follow:
- I - Intra Frames: the image is compressed and the media sample corresponding to this image holds all the information necessary to retrieve the image.
- P - Predictive Frames: the image is more compressed by using the information from previous images. The media samples corresponding to this image is not enough to reconstruct the image. Information from previous images is necessary.
- B - Bi-Directional Frames: the image is even more compressed by using the differences with the images before and after the image to compress. Several successive media samples are necessary to retrieve one image.
Group Of Pictures
A MPEG-4 media stream is made of a succession of I, P and B frames.
I ONLY: the media stream is composed only of I frames.
IP ONLY: the media stream is composed of I and P frames. In that situation, the I-frames are often called key-frames. The GOP-size setting tells the period of key frames in the stream.
IPB: the media stream is composed of all three frame types. In that situation GOP-size must be a multiple of 3. Again, one calls the I-frames, key-frames.
Example
IP ONLY stream with GOP-Size = 5: ... I P P P P I P P P P I P P P P I P P ...
IPB stream with GOP-Size = 6 : ... I B B P B B I B B P B B I B B P ...