Group of Pictures (GOP) — a structured group of successive frames in an MPEG-encoded video stream. Frames are grouped for the interframe compression purposes. We need compression to transfer video over networks. The encoder software compresses video data to reduce its amount compared with non-compressed (raw) video data.
A compressed stream is a succession of GOPs. On a receiving side, the decoder takes all frames in a GOP and creates an image that you can see.
A GOP consists of an I-frame followed by P-frames and B-frames:
- I-frame (keyframe) – is a first frame in a GOP. It is a full image encoded independently from other frames (meaning no links to them). Each GOP has a keyframe at the start.
- P-frame, B-frame – frames that go after the keyframe in a GOP.
- P-frames contain the difference between the previous P-frame and a current frame. It is encoded with a link to an I-frame.
- B-frames contain links to I-frames and P-frames before and after themselves. It helps to rewind quicker, for example.
GOP size (the number of frames between two neighbor keyframes) – the number of frames in one GOP. This number can be variable or constant for a stream. When Flussonic transcodes a stream, it creates GOPs of a constant size, so all GOPs have the same size.