Closed vs Open GOPs in AV1: Random Access Efficiency
This article examines the structural and operational differences between closed and open Groups of Pictures (GOPs) in the AV1 video codec, specifically focusing on random access efficiency. While closed GOPs ensure complete independence between segments to provide deterministic, low-latency seeking and seamless adaptive streaming, open GOPs allow inter-frame references across GOP boundaries to maximize compression efficiency at the expense of random access speed and implementation simplicity.
GOP Fundamentals in AV1
In video compression, a Group of Pictures defines how intra-coded (I-frames or keyframes) and inter-coded (P-frames and B-frames) are organized over time. AV1 introduces advanced frame typing—such as Key Frames, Intra-only frames, Inter frames, and Switch Frames—to control prediction structures.
The primary distinction between open and closed GOPs lies in the strictness of reference frame boundaries:
- Closed GOP: Every frame within the GOP references only frames within that same GOP. No frame after an intra keyframe can reference any frame preceding that keyframe.
- Open GOP: Frames occurring after an intra-coded frame in display order are permitted to reference frames from the preceding GOP in decode order.
How Closed GOPs Optimize Random Access
Closed GOPs offer the highest random access efficiency. Because a closed GOP keyframe completely resets the decoding dependency chain, the decoder can initiate playback instantaneously at any keyframe without context from earlier frames.
- Deterministic Seeking Latency: When a user seeks to a specific timestamp corresponding to a closed GOP keyframe, the decoder immediately begins decoding that frame and subsequent frames. There is zero overhead from parsing or decoding past data.
- Predictable Memory and Buffer Management: Decoders can instantly purge reference frame buffers upon encountering a closed keyframe, preventing memory bloat and eliminating the need to maintain historical reference lists.
- Optimized for Chunk-Based Delivery: In HTTP Adaptive Streaming formats (such as HLS and DASH), video is split into discrete chunks. Closed GOPs ensure that each chunk is fully self-contained. When switching bitrates, the decoder does not encounter missing reference frames, preventing visual artifacts or decoder stalls.
The Random Access Penalty of Open GOPs
Open GOPs improve overall compression efficiency by roughly 1% to 3% because leading bidirectional frames (frames that appear after the keyframe in display order but before it in decode order, or vice versa) can use high-quality reference frames from the previous GOP. However, this structure degrades random access efficiency in several ways:
- Decoder Prerolling Requirements: To correctly decode all frames following an open GOP keyframe, the decoder may need to fetch and decode frames from the prior GOP. This creates seek latency, as the player must execute a "preroll" operation before presenting video to the user.
- Frame Dropping (Leading Frames): If the decoder jumps directly to an open GOP keyframe without decoding the prior GOP, it must identify and drop any leading frames that depend on the missing history. This causes stutter or temporary frame-rate drops at the seek destination until a purely independent temporal point is reached.
- Signaling Complexity: In AV1, open GOP structures rely heavily on metadata signaling (such as temporal delimiter OBUs and frame header reference flags) so the decoder knows which frames are displayable without previous dependencies. This increases decoder parser overhead.
Trade-Off Summary in AV1 Implementations
- Seeking Latency: Closed GOPs provide near-zero seek latency; open GOPs introduce decoding delays or frame drops when seeking into arbitrary keyframes.
- Compression Density: Open GOPs achieve higher video quality at the same bitrate by leveraging temporal continuity across boundaries; closed GOPs sacrifice minor compression gains to maintain frame independence.
- Use-Case Alignment: Closed GOP structures are the standard choice for video-on-demand (VOD) seeking responsiveness, live broadcasting, trick-play modes (fast-forward/rewind), and adaptive streaming. Open GOPs are preferred in offline storage or strictly linear playback scenarios where random seeking is rare and maximum compression efficiency is the priority.