Inside the GOP: I, P, and B Frames, and Why Editing and Streaming Want Opposite Things
In a hurry? Skip straight to the numbers.
Open the Keyframe Interval (GOP Size) Calculator →The companion calculator converts a keyframe interval into a GOP size in frames. That GOP, the Group of Pictures, is the fundamental structure of compressed video, and how frequently keyframes appear within it drives a genuine tension: streaming platforms want keyframes often, while video editors prefer formats with keyframes on every frame. Understanding what I, P, and B frames are, and why streaming and editing pull in opposite directions, turns a keyframe-interval setting into a real grasp of how compressed video is organized.
The Frame Types in a GOP
Compressed video is built from three kinds of frames, arranged into repeating groups.
| Frame | What it is |
|---|---|
| I-frame (keyframe) | A complete, self-contained image |
| P-frame | Stores only changes from a previous frame |
| B-frame | Stores changes referenced from both earlier and later frames |
A GOP begins with a full keyframe (I-frame), followed by a series of P- and B-frames that describe only what changed, referencing other frames rather than storing complete images. The keyframe interval sets how long each group runs before the next full keyframe, which is exactly the GOP size the calculator computes. This structure is what lets video compress so efficiently, but it also means most frames cannot stand alone; they depend on their neighbors to be reconstructed.
The Seeking-vs-Compression Trade-off
Keyframe frequency involves a direct trade-off. Because only keyframes are complete images, they are the points a player can jump to directly; seeking to a P- or B-frame requires decoding from the previous keyframe forward.
| Frequent keyframes (short interval) | Infrequent keyframes (long interval) | |
|---|---|---|
| Seeking accuracy | Better, more jump points | Coarser |
| Error recovery | Faster, resyncs sooner | Slower |
| Compression efficiency | Lower, keyframes are big | Higher, fewer big frames |
Frequent keyframes improve seeking precision and let a stream recover quickly from a dropped packet, but they cost compression efficiency because full keyframes are large. Infrequent keyframes compress better and shrink the file, but make seeking coarser and error recovery slower. Choosing the interval balances these, which is why the setting matters.
Why Streaming Wants Frequent Keyframes
Live and adaptive streaming has strong reasons to favor frequent keyframes. Streaming protocols chop video into short segments, and each segment must begin with a keyframe so a player can start or switch quality at segment boundaries, which requires keyframes aligned to the segment length. Frequent keyframes also let a viewer's player recover quickly when packets are lost over an unreliable network, resyncing at the next keyframe rather than showing prolonged corruption, and they enable smooth switching between quality levels in adaptive streaming. This is why streaming guidance specifies a keyframe interval matched to the segment duration, the streaming architecture depends on regular, predictable keyframes even at some cost to compression.
Why Editing Wants the Opposite
Editing pulls the other way. Because most frames in a long-GOP file depend on other frames, an editor cannot cut precisely at an arbitrary frame without decoding a whole group, and applying effects means reconstructing interdependent frames, which is computationally heavy and imprecise. So editing-friendly codecs often use intraframe (all-I) compression, where every frame is a complete keyframe. These files are much larger, but every frame is independent, making cutting, scrubbing, and effects fast and frame-accurate. This is why professional editing formats favor all-intraframe codecs (or proxies) despite their size: the editor wants random access to every frame, the exact opposite of the compact, interdependent long-GOP structure that streaming and delivery prefer. The same technology that makes delivery efficient makes editing awkward.
Setting the Interval Wisely
Use the calculator to convert a keyframe interval into GOP size, and choose it with the trade-offs in mind: I-frames are complete images while P- and B-frames store only changes, frequent keyframes aid seeking and streaming resilience at the cost of compression, and streaming wants keyframes aligned to its segments while editing prefers all-intraframe codecs where every frame stands alone. The calculation sets the GOP; understanding I, P, and B frames is what tells you whether to keep keyframes frequent or sparse.
Ready to Put This Into Practice?
Now that you understand how it works, plug in your own numbers and get an instant, accurate result.
Use the Keyframe Interval (GOP Size) Calculator Now →