GlossaryGOP (group of pictures)

GOP (group of pictures)

A GOP (group of pictures) in video encoding is a sequence of frames that starts with a keyframe (I-frame) followed by predicted P-frames and B-frames. GOP length, the number of frames between keyframes, shapes compression, seeking and streaming behavior. Longer GOPs give smaller files. Shorter GOPs make seeking faster and quality switching more responsive.

Why it matters

GOP settings trade file size against responsiveness. Long GOPs save bandwidth but make joining, seeking and quality switching slower. Short GOPs feel snappy but cost more bits. A GOP that does not line up with streaming segments can break adaptive playback on some devices.

How it works

  1. Each GOP opens with a keyframe that decodes on its own.
  2. P-frames and B-frames follow, storing only changes from the keyframe or each other.
  3. A closed GOP never references frames outside itself, so each group can be decoded independently.
  4. For streaming, GOP length is set so each segment holds whole GOPs, often 2 seconds each.

What is a good GOP size for streaming?

A GOP of about 2 seconds is a good default for streaming. At 30 fps that is 60 frames, and at 60 fps it is 120. This keeps join and seek times short while still allowing efficient compression. Make sure the segment length is a whole multiple of the GOP length.

Frame rate2 second GOP4 second GOP
24 fps48 frames96 frames
30 fps60 frames120 frames
60 fps120 frames240 frames

Open GOP vs closed GOP: which should I use?

Use closed GOPs for adaptive streaming. A closed GOP never references frames from a neighboring group, so every segment can be decoded alone when the player switches quality. Open GOPs can save a few bits, but they can cause glitches at segment boundaries. YouTube's upload guidance also recommends closed GOPs.

Where it's used

Live sports streamers keep GOPs short, often about two seconds, so viewers join quickly. OTT services and video platforms align GOPs with segments so quality switching stays smooth.

Where it usually goes wrong, and how FastPix handles it

Long or uneven GOPs often go unnoticed in testing, then show up as slow starts and sluggish seeking for real viewers on slower devices and networks.

Startup time and seek latency, the two places GOP choices show up for viewers, are measured for every view in FastPix Video Data, by device, browser and network. Encoding choices that slow one audience down get caught while the fix is still cheap, instead of surfacing as churn.

By the numbers