What is a GOP? GOP meaning

GOP

Group of Pictures (GOP) — a structured group of successive frames in an MPEG-encoded video stream. Frames are grouped for the interframe compression purposes.

To deliver video over the internet using a limited bandwidth, it is often necessary to compress the video. Besides compressing frames themselves, there is a more progressive technology called interframe compression. It works by sending full frames (referred to as keyframes), and then only sending the difference between the keyframe and the subsequent frames. The receiver (decoder) uses the keyframe plus these differences to re-create the desired frame with reasonable accuracy.

For interframe compression purposes, frames in a track are grouped into GOPs. GOP (group of pictures) is a structured group of successive frames in a video stream or file.

Each GOP consists of an I-frame (keyframe) followed by P-frames and B-frames:

I-frame (keyframe) is the 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-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.

A typical GOP contains a repeating pattern of B- and P-frames following the keyframe. An example of a typical pattern might be the following:

I B B P B B P B B P B B

GOP

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. Most programs for processing video are configured to work with GOPs of equal size. Therefore, in most situations equal GOPs are used, for example, the TV standard is 28 frames in a GOP.

It is important to understand that a GOP without a keyframe has no sense. Thus, it is impossible to play video just in the middle of the GOP.

Grouping into GOPs is applicable to video frames only. Corresponding audio and text subtitle frames are added to GOPs synchronously.

What would be the optimal GOP length?

Why a GOP should not be too long? Because a longer GOP can result in a bigger zap time – duration of time from which the viewer changes the channel using a remote control to the point that the picture of the new channel is displayed. If a viewer clicks the remote control before the previous GOP has finished, they see unactual picture. This problem may be critical for video games or video calls.

To solve this problem, Flussonic uses the prepush feature: it saves each GOP in the buffer before sending it to a client. When a client connects to the server, the server sends the first GOP from the buffer and then transmits a stream with a timeshift — the delivery lags for a time interval equal to the size of one GOP converted to seconds. When the connection with the server breaks or slows down, the client plays a GOP from the buffer. In this way, video is played more evenly, however, a latency may grow.

Why a GOP should not be too short?

Because longer GOPs provide better compression.

Different applications use different GOP lengths, but typically these lengths are in the 0.5 – 2 second range.

Open GOP

In some cases, it is possible to compress video even better by using so called open GOPs. Open GOP contains P-frames that refer to the frames before the keyframe. This allows to lower bitrate by 5-7 %. However, open GOP may result in problems when it comes to using segments.

Flussonic Media Server trial

通过发送请求,您同意我们的 条件

Our experts will contact you shortly, offer tech advice and consultation, and send you a trial license..

填写表格以获取免费的Flussonic Media Server试用密钥。

如果您在一小时内没有收到我们的电子邮件,请检查您的垃圾邮件文件夹,并将Flussonic添加到您的受信任联系人列表中。

Email: support@flussonic.com Phone: +1 (778) 716-2080 (United States) +7 (800) 777-84-13 +7 (495) 481-37-63