---
title: What Is a Keyframe? GOP Size and Keyframe Interval
description: What is a keyframe? An I-frame that stores a complete image; GOP size and keyframe interval control how often keyframes appear.
image: https://blog.blazingcdn.com/hubfs/Gemini-Blog/image-Oct-12-2026-07-30-18-1504-AM.jpeg
---

[![BlazingCDN](https://blog.blazingcdn.com/hubfs/Logo/blog-logo-w.png)](https://blog.blazingcdn.com?hsLang=en-us)

[📘Learn ▾](https://blog.blazingcdn.com/cdn-learn?hsLang=en-us)

[CDN Fundamentals](https://blog.blazingcdn.com/cdn-fundamentals?hsLang=en-us) [By Content Type](https://blog.blazingcdn.com/by-content-type?hsLang=en-us) [Advanced Concepts](https://blog.blazingcdn.com/advanced-concepts?hsLang=en-us) [Glossary](https://blog.blazingcdn.com/glossary?hsLang=en-us)

[⚡ Web Performance](https://blog.blazingcdn.com/web-performance?hsLang=en-us)

[🎬Video & Streaming ▾](https://blog.blazingcdn.com/video-streaming-cdn?hsLang=en-us)

[🔴 Live Streaming](https://blog.blazingcdn.com/live-streaming?hsLang=en-us) [📺 VOD & OTT](https://blog.blazingcdn.com/vod-ott?hsLang=en-us) [💰 Bandwidth & Costs](https://blog.blazingcdn.com/bandwidth-costs?hsLang=en-us)

[🏭 Other Industries ▾](https://blog.blazingcdn.com/cdn-industry-insights?hsLang=en-us)

[📺 Media & Broadcasting](https://blog.blazingcdn.com/media-broadcasting?hsLang=en-us) [💾 Software & SaaS](https://blog.blazingcdn.com/software-saas?hsLang=en-us) [🏗️ DevOps & Cloud Infra](https://blog.blazingcdn.com/devops-cloud-infra?hsLang=en-us) [📚 AdTech & Advertising](https://blog.blazingcdn.com/adtech-advertising?hsLang=en-us) [🎮 Gaming & Esports](https://blog.blazingcdn.com/gaming-esports?hsLang=en-us) [📱 Mobile Apps & Developers](https://blog.blazingcdn.com/mobile-apps-developers?hsLang=en-us) [🤖 AI & Machine Learning](https://blog.blazingcdn.com/ai-machine-learning?hsLang=en-us) [🏛️ Enterprise & Corporate](https://blog.blazingcdn.com/enterprise-corporate?hsLang=en-us) [📚 E-Learning & EdTech](https://blog.blazingcdn.com/e-learning-edtech?hsLang=en-us) [🏟️ Sports & Live Events](https://blog.blazingcdn.com/sports-live-events?hsLang=en-us)

[💰 Pricing & Costs ▾](https://blog.blazingcdn.com/cdn-pricing-and-cdn-costs?hsLang=en-us)

[Provider Pricing](https://blog.blazingcdn.com/provider-pricing?hsLang=en-us) [Cost Optimization](https://blog.blazingcdn.com/cost-optimization?hsLang=en-us) [Decision Support](https://blog.blazingcdn.com/decision-support?hsLang=en-us)

[⚡Compare ▾](https://blog.blazingcdn.com/cdn-comparison?hsLang=en-us)

[Provider Comparisons](https://blog.blazingcdn.com/provider-comparisons?hsLang=en-us) [Strategy Comparisons](https://blog.blazingcdn.com/strategy-comparisons?hsLang=en-us) [Ratings & Benchmarks](https://blog.blazingcdn.com/cdn-ratings-and-benchmarks?hsLang=en-us)

[📊 Benchmarks](https://blog.blazingcdn.com/cdn-ratings-and-benchmarks?hsLang=en-us)

[🔒 Security ▾](https://blog.blazingcdn.com/cdn-security?hsLang=en-us)

[Attack Protection](https://blog.blazingcdn.com/attack-protection?hsLang=en-us) [Encryption & Access](https://blog.blazingcdn.com/encryption-access?hsLang=en-us) [Video & DRM Security](https://blog.blazingcdn.com/video-drm-security?hsLang=en-us)

[📁 Case Studies](https://blog.blazingcdn.com/case-studies?hsLang=en-us) [🔌 Integrations](https://blog.blazingcdn.com/integrations?hsLang=en-us) [🛠️ Tools](https://blog.blazingcdn.com/cdn-tools?hsLang=en-us)

[Get Started](https://blazingcdn.com/sign-up-contact-form/)

[Learn](https://blog.blazingcdn.com/en-us/tag/learn) [Video - Video & Streaming](https://blog.blazingcdn.com/en-us/tag/video-video-streaming) [Learn - CDN Fundamentals](https://blog.blazingcdn.com/en-us/tag/learn-cdn-fundamentals)

# What Is a Keyframe? GOP Size and Keyframe Interval

 Vadym Borovskyi  Oct 12, 2026, 9:31:59 AM

![](https://blog.blazingcdn.com/hubfs/Gemini-Blog/image-Oct-12-2026-07-30-18-1504-AM.jpeg)

In answer to what is a keyframe: a keyframe, or I-frame, is a video frame encoded without reference to any other frame, so a decoder can start playback from it alone. The keyframe interval is the spacing between keyframes, and the group of pictures (GOP) size is that spacing counted in frames. At 30 fps, a 2-second interval equals a GOP size of 60.

As of 2026, the widely followed HLS authoring guidance recommends an instantaneous decoder refresh (IDR) keyframe every 2 seconds, with media segments of about 6 seconds, so every segment holds exactly three GOPs. That spacing sets the floor for seek precision, adaptive bitrate (ABR) switch points and the minimum segment duration a live stream can use.

## **How keyframes, GOP size and keyframe interval work together**

An encoder produces three frame types. I-frames are self-contained. P-frames store only the difference from earlier frames, and B-frames reference frames on both sides. A GOP starts at one keyframe and runs until the next, and every P-frame and B-frame inside it depends, directly or through a chain, on that opening I-frame.

Because of that chain, a decoder that loses the keyframe loses the whole GOP. It also explains the size difference: an I-frame is typically several times larger than a P-frame at the same quality, so keyframe spacing trades random access against compression efficiency.

### What GOP size does to bitrate: a worked model

Assume an I-frame costs 5 units of data and a P-frame costs 1 unit (an illustrative ratio; real ratios vary with content and codec). At 30 fps with no B-frames, the per-second cost works out as follows.

| Keyframe interval | GOP size at 30 fps | Units per GOP | Units per second | Bitrate vs. 2 s GOP |
| --- | --- | --- | --- | --- |
| 0.5 s | 15 | 5 + 14 = 19 | 38 | +18.8% |
| 1 s | 30 | 5 + 29 = 34 | 34 | +6.3% |
| 2 s | 60 | 5 + 59 = 64 | 32 | baseline |
| 4 s | 120 | 5 + 119 = 124 | 31 | −3.1% |

Under this model, stretching the GOP beyond 2 seconds saves only about 3% of bitrate, while shrinking it below 1 second costs close to 19%, which is why 2 seconds is the common default.

## **Why keyframe interval controls seeking, ABR switching and segment alignment**

**Seeking.** A player can only start decoding at a keyframe. A seek to 1:23.7 with a 4-second GOP lands on the keyframe at or before that point, then the player either decodes forward up to 4 seconds of frames silently or snaps the playhead back. Short GOPs give frame-accurate scrubbing at lower CPU cost.

**Segment alignment.** In HLS (RFC 8216) and MPEG-DASH, each media segment should begin with an IDR frame so it decodes independently. Segment duration therefore has to be a whole multiple of the keyframe interval: a 2-second GOP permits 2, 4 or 6-second segments, while a 2.5-second GOP cannot produce clean 6-second segments.

**ABR switching.** A player switches renditions at segment boundaries. If the 1080p and 480p renditions place keyframes at different presentation timestamps (PTS), the boundaries drift apart and switches show a stall, a repeated frame or a visible jump. Every rung of the ladder must share identical keyframe timestamps.

### How keyframe interval affects live stream latency

Keyframe interval sets a hard lower bound on live latency because segment length cannot be shorter than one GOP, and players typically buffer about three segments before starting. With 6-second segments that buffer alone is roughly 18 seconds; with 2-second segments it falls to about 6 seconds, before encode and packaging time are added.

Low-Latency HLS loosens this bound with partial segments of a few hundred milliseconds. Parts do not each need a keyframe, but a player joining mid-stream must wait for a part flagged as independent, so the keyframe interval still determines worst-case join time. Typical LL-HLS deployments reach 2 to 5 seconds of glass-to-glass latency with a 1 to 2-second GOP.

## **Keyframe vs. I-frame, segment duration and open GOP**

**Keyframe vs. I-frame:** every keyframe is an I-frame, but in H.264 and HEVC not every I-frame is a safe entry point. Only an IDR frame flushes the decoder reference buffer; a non-IDR I-frame can be followed by frames that still reference the previous GOP. Packagers need IDR frames, or equivalent clean random access points, at segment starts.

**Keyframe interval vs. segment duration:** the keyframe interval is an encoder setting and segment duration is a packager setting. Segment duration must be an integer multiple of the interval, and a mismatch is a frequent cause of segments that run long and players that misreport buffer levels.

**Closed GOP vs. open GOP:** a closed GOP references nothing outside itself. An open GOP lets leading B-frames reference the prior GOP, saving a few percent of bitrate but breaking clean switching. ABR packaging for HLS and DASH should use closed GOPs unless the whole toolchain explicitly supports open-GOP random access.

## **Setting a fixed GOP size in an encoder**

For a 2-second keyframe interval at 30 fps with x264 or x265 through ffmpeg, set these options on every rendition of the ladder:

- Set the g option (maximum GOP size) to 60, which is the frame rate multiplied by the interval in seconds.
- Set keyint\_min to 60 so the encoder cannot insert a shorter GOP.
- Set sc\_threshold to 0 to disable scene-cut keyframes, which otherwise land at different timestamps per rendition.
- Alternatively, use force\_key\_frames with a time expression that emits a keyframe every 2 seconds, which survives frame-rate changes across the ladder.
- For hardware encoders, set the equivalent GOP length and IDR period options, and confirm closed-GOP mode is on.

To verify, run ffprobe on each rendition with frame-level output limited to key frames, export the keyframe PTS list, and diff the lists across renditions. Any mismatch means switching artifacts.

## **Common misconceptions about GOP size**

**"Shorter is always better for live."** Below about 1 second, the bitrate penalty grows steeply (nearly 19% at 0.5 seconds in the model above) and latency is then dominated by player buffering, not GOP length.

**"Scene-cut keyframes improve quality, so leave them on."** They help single-file encodes, but in an ABR ladder they create unaligned keyframes. Keep scene detection only if the encoder can add extra I-frames without resetting the fixed IDR cadence.

**"The GOP size is fixed in frames."** A GOP of 60 is 2 seconds at 30 fps but 1 second at 60 fps. Mixed-frame-rate ladders should define the interval in seconds and derive the frame count per rendition.

## **FAQ: what is a keyframe, GOP size and keyframe interval**

### What keyframe interval should I use for live streaming?

Use a 2-second keyframe interval for standard HLS and DASH live streaming, and 1 to 2 seconds for low-latency HLS. Two seconds aligns cleanly with 2, 4 or 6-second segments and keeps the bitrate penalty small. Go shorter only if join time or switch responsiveness is measurably limited by the GOP rather than player buffering.

### Is GOP size the same as keyframe interval?

GOP size and keyframe interval describe the same spacing in different units. GOP size counts frames between keyframes, while keyframe interval is usually expressed in seconds. Converting is simple: multiply the interval by the frame rate, so a 2-second keyframe interval at 25 fps equals a GOP size of 50 frames.

### Is every I-frame a keyframe in H.264?

Every I-frame is intra-coded, but only IDR frames act as true keyframes for streaming in H.264. An IDR frame clears the decoder reference buffer, so nothing after it can reference earlier frames. A plain I-frame in an open GOP may be followed by frames that reference the previous GOP, making it unsafe as a segment start.

### Why do keyframes need to align across ABR renditions?

Keyframes must align across adaptive bitrate renditions because players switch quality only at segment boundaries, and each segment must start with a keyframe. If renditions place keyframes at different timestamps, their segment boundaries diverge, and switching produces stalls, repeated frames or visible jumps. Fixed GOP size with scene-cut detection disabled keeps every rendition aligned.

## **Audit your keyframe alignment before the next live event**

This week, pull one segment from every rendition of a live or VOD ladder, extract keyframe timestamps with ffprobe, and diff them. Then check that segment duration divided by keyframe interval is a whole number on every rung, and that scene-cut detection is disabled or decoupled from the IDR cadence. Log player switch events against segment boundaries for a day; switches that cluster with rebuffering usually trace back to misaligned GOPs. For latency work, measure join time separately from steady-state latency, since only the first is bounded by the keyframe interval.

Once the ladder is aligned, the [**BlazingCDN HLS Streaming CDN for pre-encoded HLS, LL-HLS and DASH segments**](https://blazingcdn.com/streaming-cdn/) delivers those segments, with a 14-day testing period on real production traffic to compare against your current delivery path.

Share: [f](https://www.facebook.com/sharer/sharer.php?u=https://blog.blazingcdn.com/en-us/what-is-a-keyframe-gop-size-and-keyframe-interval) [in](https://www.linkedin.com/sharing/share-offsite/?url=https://blog.blazingcdn.com/en-us/what-is-a-keyframe-gop-size-and-keyframe-interval) [𝕏](https://twitter.com/intent/tweet?url=https://blog.blazingcdn.com/en-us/what-is-a-keyframe-gop-size-and-keyframe-interval&text=) [✉](mailto:?subject=%3Cspan%20id="hs_cos_wrapper_name"%20class="hs_cos_wrapper%20hs_cos_wrapper_meta_field%20hs_cos_wrapper_type_text"%20style=""%20data-hs-cos-general-type="meta_field"%20data-hs-cos-type="text"%20%3EWhat%20Is%20a%20Keyframe?%20GOP%20Size%20and%20Keyframe%20Interval%3C/span%3E&body=https://blog.blazingcdn.com/en-us/what-is-a-keyframe-gop-size-and-keyframe-interval)

![BlazingCDN](https://blog.blazingcdn.com/hs-fs/hubfs/Logo/blog-logo-w.png?height=24&name=blog-logo-w.png)

*Heavy traffic.*  
Light bill.

The CDN for video and large traffic

Their monthly bill vs ours

- 20 TBFastly $2,087**$92.50**
- 50 TBCDN77 $990**$215**
- 200 TBCloudFront $11,965**$765**

Published list prices, Aug 2026

[Calculate your cost](https://blazingcdn.com/cdn-cost-calculator/?utm_source=blog&utm_medium=sidebar&utm_campaign=blog_sidebar&utm_content=compare_calc)

## Related posts

[![](https://blog.blazingcdn.com/hubfs/Gemini-Blog/image-Oct-12-2026-07-01-19-9802-AM.jpeg)](https://blog.blazingcdn.com/en-us/set-up-microsoft-cdn-via-azure-step-by-step-guide-pricing-inside?hsLang=en-us)

Learn

### [Azure CDN Setup and Pricing 2026: Front Door Migration Guide](https://blog.blazingcdn.com/en-us/set-up-microsoft-cdn-via-azure-step-by-step-guide-pricing-inside?hsLang=en-us)

New Azure CDN deployments now go only one way: Microsoft stopped accepting new Azure CDN Standard from Microsoft ...

Oct 12, 2026, 9:03:58 AM [Read more](https://blog.blazingcdn.com/en-us/set-up-microsoft-cdn-via-azure-step-by-step-guide-pricing-inside?hsLang=en-us)

[![](https://blog.blazingcdn.com/hubfs/Gemini-Blog/image-Oct-11-2026-07-30-21-7745-AM.jpeg)](https://blog.blazingcdn.com/en-us/hardware-vs-software-video-encoding-nvenc-qsv-and-x264?hsLang=en-us)

Learn

### [Hardware vs Software Video Encoding: NVENC, QSV and x264](https://blog.blazingcdn.com/en-us/hardware-vs-software-video-encoding-nvenc-qsv-and-x264?hsLang=en-us)

Evaluated October 2026: for live video, a modern GPU hardware encoder (NVIDIA NVENC on Turing or newer, Intel Quick ...

Oct 11, 2026, 9:33:05 AM [Read more](https://blog.blazingcdn.com/en-us/hardware-vs-software-video-encoding-nvenc-qsv-and-x264?hsLang=en-us)

[![BlazingCDN](https://blog.blazingcdn.com/hubfs/Logo/blog-logo-w.png)](https://blog.blazingcdn.com?hsLang=en-us)

[📘 Learn](https://blog.blazingcdn.com/cdn-learn?hsLang=en-us) [📊 Benchmarks](https://blog.blazingcdn.com/cdn-ratings-and-benchmarks?hsLang=en-us) [🎬 Video & Streaming](https://blog.blazingcdn.com/video-streaming-cdn?hsLang=en-us) [🏭 Industries](https://blog.blazingcdn.com/cdn-industry-insights?hsLang=en-us) [💰 Pricing & Costs](https://blog.blazingcdn.com/cdn-pricing-and-cdn-costs?hsLang=en-us) [⚡ Compare](https://blog.blazingcdn.com/cdn-comparison?hsLang=en-us) [🔒 Security](https://blog.blazingcdn.com/cdn-security?hsLang=en-us) [🛠️ Tools](https://blog.blazingcdn.com/cdn-tools?hsLang=en-us) [✍️ Publish with us](https://blog.blazingcdn.com/publish-with-us?hsLang=en-us)

in f 𝕏 ✉

 Copyright © BlazingCDN |. All rights reserved.

```json
{
  "@context" : "https://schema.org",
  "@id" : "https://blazingcdn.com/#organization",
  "@type" : "Organization",
  "description" : "High-volume CDN for video, live streaming, OTT/IPTV, software, games, SaaS and large-file delivery.",
  "logo" : {
    "@id" : "https://blazingcdn.com/#logo",
    "@type" : "ImageObject",
    "height" : 560,
    "url" : "https://blazingcdn.com/wp-content/uploads/2024/08/logo-560-560.png",
    "width" : 560
  },
  "name" : "BlazingCDN",
  "sameAs" : [ "https://www.linkedin.com/company/blazingcdn", "https://x.com/BlazingCdn", "https://www.reddit.com/r/BlazingCDN/" ],
  "url" : "https://blazingcdn.com/"
}
```

```json
{
  "@context" : "https://schema.org",
  "@id" : "https://blog.blazingcdn.com/#website",
  "@type" : "WebSite",
  "inLanguage" : "en-US",
  "name" : "BlazingCDN Blog",
  "publisher" : {
    "@id" : "https://blazingcdn.com/#organization"
  },
  "url" : "https://blog.blazingcdn.com/"
}
```

```json
{
  "@context" : "https://schema.org",
  "@id" : "https://blog.blazingcdn.com/en-us/what-is-a-keyframe-gop-size-and-keyframe-interval#article",
  "@type" : "BlogPosting",
  "author" : {
    "@type" : "Person",
    "name" : "Vadym Borovskyi"
  },
  "dateModified" : "2026-10-12T07:31:59Z",
  "datePublished" : "2026-10-12T07:31:59Z",
  "description" : "What is a keyframe? An I-frame that stores a complete image; GOP size and keyframe interval control how often keyframes appear.",
  "headline" : "What Is a Keyframe? GOP Size and Keyframe Interval",
  "image" : "https://143144902.fs1.hubspotusercontent-eu1.net/hubfs/143144902/Gemini-Blog/image-Oct-12-2026-07-30-18-1504-AM.jpeg",
  "inLanguage" : "en-us",
  "isPartOf" : {
    "@id" : "https://blog.blazingcdn.com/#website"
  },
  "mainEntityOfPage" : {
    "@id" : "https://blog.blazingcdn.com/en-us/what-is-a-keyframe-gop-size-and-keyframe-interval",
    "@type" : "WebPage"
  },
  "publisher" : {
    "@id" : "https://blazingcdn.com/#organization"
  },
  "wordCount" : 1534
}
```

```json
{
  "@context" : "https://schema.org",
  "@id" : "https://blog.blazingcdn.com/en-us/what-is-a-keyframe-gop-size-and-keyframe-interval#breadcrumb",
  "@type" : "BreadcrumbList",
  "itemListElement" : [ {
    "@type" : "ListItem",
    "item" : "https://blog.blazingcdn.com/en-us",
    "name" : "Blog",
    "position" : 1
  }, {
    "@type" : "ListItem",
    "item" : "https://blog.blazingcdn.com/en-us/what-is-a-keyframe-gop-size-and-keyframe-interval",
    "name" : "What Is a Keyframe? GOP Size and Keyframe Interval",
    "position" : 2
  } ]
}
```

```json
{
  "@context" : "https://schema.org",
  "@id" : "https://blog.blazingcdn.com/en-us/what-is-a-keyframe-gop-size-and-keyframe-interval#faq",
  "@type" : "FAQPage",
  "mainEntity" : [ {
    "@type" : "Question",
    "acceptedAnswer" : {
      "@type" : "Answer",
      "text" : "Use a 2-second keyframe interval for standard HLS and DASH live streaming, and 1 to 2 seconds for low-latency HLS. Two seconds aligns cleanly with 2, 4 or 6-second segments and keeps the bitrate penalty small. Go shorter only if join time or switch responsiveness is measurably limited by the GOP rather than player buffering."
    },
    "name" : "What keyframe interval should I use for live streaming?"
  }, {
    "@type" : "Question",
    "acceptedAnswer" : {
      "@type" : "Answer",
      "text" : "GOP size and keyframe interval describe the same spacing in different units. GOP size counts frames between keyframes, while keyframe interval is usually expressed in seconds. Converting is simple: multiply the interval by the frame rate, so a 2-second keyframe interval at 25 fps equals a GOP size of 50 frames."
    },
    "name" : "Is GOP size the same as keyframe interval?"
  }, {
    "@type" : "Question",
    "acceptedAnswer" : {
      "@type" : "Answer",
      "text" : "Every I-frame is intra-coded, but only IDR frames act as true keyframes for streaming in H.264. An IDR frame clears the decoder reference buffer, so nothing after it can reference earlier frames. A plain I-frame in an open GOP may be followed by frames that reference the previous GOP, making it unsafe as a segment start."
    },
    "name" : "Is every I-frame a keyframe in H.264?"
  }, {
    "@type" : "Question",
    "acceptedAnswer" : {
      "@type" : "Answer",
      "text" : "Keyframes must align across adaptive bitrate renditions because players switch quality only at segment boundaries, and each segment must start with a keyframe. If renditions place keyframes at different timestamps, their segment boundaries diverge, and switching produces stalls, repeated frames or visible jumps. Fixed GOP size with scene-cut detection disabled keeps every rendition aligned."
    },
    "name" : "Why do keyframes need to align across ABR renditions?"
  } ]
}
```