October DealsAmazon USOctober deal check: compare before you payAmazon US: current deals, useful picks and tech finds.Check DealsClean PCRecommendedOne scan can reveal what keeps slowing WindowsLook for cleanup and repair opportunities.Run ScanOctober DealsAmazon USDeal season is back - check today's better picksAmazon US: current deals, useful picks and tech finds.See Picks×
Skip to content
DocumentaryTube
Admit one · Blog

What GOP Means in Video Encoding: A Beginner’s Guide

GOP means Group of Pictures: a pattern of compressed frames. Learn how frame types, keyframe intervals and GOP size affect compression, seeking and streaming.
Opened Runtime5 min Written byDocumentaryTube Team
Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

GOP means Group of Pictures: an arrangement of compressed video frames that determines how frames refer to one another. GOP size is usually measured in frames, so its duration depends on frame rate. Shorter intervals can make it easier to start decoding or seek through video; longer intervals can give the encoder more opportunity to use inter-frame prediction. Neither is always better—the right setting depends on the codec, encoder, delivery platform and viewing needs.

What is a GOP?

A Group of Pictures is a sequence of coded frames organized around how they are compressed and how a decoder can reconstruct them. Instead of storing every frame as a complete image, a video encoder can describe some frames using information from other frames.

A useful, imperfect analogy is a complete page followed by notes describing changes relative to nearby pages. Real codecs operate on coded image data and can use more complex reference relationships than that analogy suggests. GOPs do not all follow one fixed pattern; the codec and encoder determine their structure. AWS Elemental Server describes GOP configuration and controls in its GOP encoding guide.

How I-, P-, B- and IDR-frames differ

  • I-frames are intra-coded: their image data is coded without relying on other frames for prediction. An I-frame is not necessarily an IDR frame.
  • P-frames use prediction from earlier frames.
  • B-frames can use prediction from earlier or later frames.
  • IDR frames mark a special refresh boundary. Frames after an IDR do not reference frames from before that boundary, allowing decoding to begin from that point without dependencies on preceding pictures.

A common pattern begins with an IDR frame and continues with a mixture of B- and P-frames, but encoders can arrange frames differently. AWS Elemental MediaConvert explains frame types and GOP examples in its recommended encoding settings for video quality.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

What GOP size and keyframe interval mean

GOP size: frames, not seconds

GOP size is commonly expressed as a number of frames. To estimate its duration, divide the frame count by the video frame rate. For example, at 30 frames per second, 30 frames span about one second and 60 frames span about two seconds. AWS Elemental MediaConvert describes one-to-two-second GOPs as typical guidance, with a 30-frame example containing one IDR and 29 P/B frames. This is a contextual example, not a universal standard.

Keyframe interval: a maximum, not a promise of exact spacing

A keyframe interval generally sets a maximum distance between keyframes; an encoder may insert them more often, such as around scene changes. Apple’s VideoToolbox documentation says a maximum interval of zero leaves placement to the encoder. It also explains that a keyframe resets inter-frame dependencies so a decoder can start decoding subsequent difference frames. See Apple’s keyframe interval documentation.

Encoder controls are not interchangeable

GOP size, B-frame count and closed-GOP behavior describe different things. FFmpeg documents g (also called keyint) as the maximum GOP size, while bf controls the number of B-frames between I- and P-frames. Exact names and behavior can vary by encoder implementation; consult the documentation for the codec and encoder you are using. See the FFmpeg codecs documentation.

Why GOP settings matter

Compression and file size

Predicted frames can represent changes relative to other frames rather than encode a complete image each time. More opportunity for inter-frame prediction can improve compression efficiency, but the result depends on scene content, bitrate, codec and encoder decisions. GOP length alone does not guarantee a smaller file or better-looking video.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Seeking and decoder entry

Keyframes provide points where decoding can begin without first reconstructing earlier frame dependencies. More frequent keyframes can make seeking or decoder entry more convenient, but can reduce compression efficiency because more frames are coded independently. Apple describes keyframes as resetting inter-frame dependencies in its VideoToolbox documentation.

Segmented streaming

For segmented delivery such as HLS or DASH, GOP and segment boundaries may need to align so segments can be decoded as intended. AWS Elemental Live recommends closed-GOP cadence 1 for segmented outputs in its GOP configuration guidance. Requirements vary by service and workflow, so use the target platform’s specifications rather than treating that recommendation as universal.

Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Is a longer or shorter GOP better?

Neither is best for every video. A longer interval can offer more opportunities for inter-frame prediction; a shorter interval can provide more frequent decoder-entry points and may better suit particular access or delivery requirements. The tradeoff is affected by bitrate, codec, content, scene-change handling and player compatibility.

AWS Elemental MediaConvert’s one-to-two-second range is a typical vendor example, not a rule for every codec or destination. AWS guidance also varies by product and use case. Start with your platform’s requirements and encoder defaults, then evaluate the result with the actual content and intended bitrate.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

How to choose a GOP setting

  1. Check the destination first. Find the streaming service, player or packaging workflow’s requirements for keyframe interval, closed GOPs and segment alignment.
  2. Choose an interval in seconds, then convert it to frames. Multiply frame rate by the desired interval. For example, at 30 fps, a one-second interval corresponds to 30 frames.
  3. Confirm what the encoder control actually sets. Determine whether it specifies a maximum GOP size, a keyframe interval, or another encoder-specific value. Do not mistake B-frame count for GOP length.
  4. Check scene-change behavior. An encoder may add keyframes more frequently than the configured maximum interval; account for that when assessing spacing and segment boundaries.
  5. Test the encoded output. Check visual quality and file size at the intended bitrate, plus seeking, playback compatibility and any segment-boundary behavior important to your workflow.

AWS describes one-to-two-second GOPs as typical examples, while its recommendations vary with codec and use case. Apple’s documentation notes that the encoder can determine placement when the maximum keyframe interval is zero. These are reasons to treat defaults and platform requirements as starting points rather than assume a single ideal value.

Common GOP-setting problems

  • Seeking does not start where expected: keyframes may be farther apart than the access pattern requires. Check the maximum interval and the encoder’s actual keyframe placement.
  • Segments do not align cleanly: verify the target workflow’s segment duration and closed-GOP requirements, then check whether the encoder produces compatible boundaries.
  • Changing “GOP” has no apparent effect: confirm that the control applies to the active codec and encoder, and whether it is a maximum rather than an exact interval. Different implementations use different option names and behavior.
  • Quality or file size changes unexpectedly: GOP is only one part of encoding. Recheck bitrate, codec, content and encoder settings together; a longer or shorter GOP does not guarantee a particular quality or size outcome.

Or let it run in the cloud

If your goal is to keep a prerecorded video live on YouTube around the clock, StreamNeo is a separate option from configuring an encoder yourself: upload a recording or build a playlist, add your YouTube stream key, and go live. StreamNeo loops uploaded videos from the cloud, so nothing has to stay on at home. Your upload streams as made, up to 4K 60fps, at one price per slot; it automatically recovers if YouTube drops the stream. The first day is free with no card. Monthly: $9.99 per month. Learn more at StreamNeo, or start the free day.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

Leave a Reply

Your email address will not be published. Required fields are marked *

What’s actually slowing this PC down?

Pick the symptom - the matching free tool is one click away.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

More from the Screening Room

  1. Mexico’s Drug War BBC DocumentaryAdmit one · CrimeMexico's Drug War BBC DocumentaryOpened05 OCT 2026Runtime2 min
  2. Vincent Moon and Naná Vasconcelos: The World’s Hidden Music RitualsAdmit one · Personal TriumphsVincent Moon and Naná Vasconcelos: The World's Hidden Music RitualsOpened05 OCT 2026Runtime2 min
  3. 100 Greatest Discoveries – Origins And EvolutionAdmit one · Science100 Greatest Discoveries - Origins And EvolutionOpened05 OCT 2026Runtime3 min
Recommended PC Tool
Recommended PC Tool
Windows Errors? Fix Them Before They SpreadFree repair scan
Crashes, No Sound, or Screen Glitches?Free driver scan

Two free Windows tools

One Free Minute Could Fix That PC

Before you go - each of these free tools takes about a minute and tackles what quietly slows a Windows PC down.

Special offer. View Outbyte info, uninstall instructions, EULA, and Privacy Policy.