What is Keyframe Interval?
Updated: Oct 27

Keyframe interval is the gap between designated keyframes in compressed video, expressed as a duration or a number of frames. It affects the opportunities to start decoding, seek, switch video representations or recover a usable picture. A shorter interval provides more frequent entry points, but it can change compression efficiency and the encoder's allocation of bits.
The setting belongs to the video encoding and delivery system. It is not your broadband speed, the frame rate of your display or a promise about how far a live stream lags behind the event. Understanding those boundaries is more useful than copying a two-second setting into every application.
Why video needs keyframes
A video encoder can reduce repeated information by predicting parts of a picture from other pictures. A camera may capture a new complete image at every instant, but the compressed stream need not store every image independently. The decoder reconstructs the pictures using the coded information and the required references.
A keyframe provides an important decoding entry point. In an H.264 example, an Instantaneous Decoding Refresh picture, usually shortened to IDR, creates a reference reset. The H.264 RTP specification explains that pictures following an IDR in decoding order can be decoded without prediction from pictures decoded before it.
That distinction matters. An intra-coded I-picture does not automatically mean every later picture is independent of everything before that point. “Keyframe”, “I-frame” and “IDR” are often used loosely in interfaces, but the required random-access behaviour depends on the codec and delivery format. The decoder also needs the relevant configuration information; an isolated picture is not necessarily a complete playable stream.

The infographic uses a deliberately simple H.264 prediction chain to explain the boundary. Real encoders can use more reference pictures, B-pictures and different coding orders. Its timing examples are calculations, not measurements of a particular streaming service.
How keyframe interval works
The source supplies pictures at the chosen output frame rate and timestamps.
The encoder creates an appropriate entry picture and codes other pictures using the permitted prediction structure.
Its cadence, scene-change and refresh controls determine where additional entry pictures occur.
A packager or streaming service places the video into its delivery structure, such as segments, according to that system's requirements.
A receiver obtains the necessary configuration and a suitable entry point, then reconstructs and presents pictures.
Later entry points support the operations permitted by the application, including switching, seeking or recovery when the relevant data arrives successfully.
These are separate jobs. A packager cannot safely make an arbitrary predicted picture independently decodable merely by cutting a file there. Equally, a keyframe arriving at the receiver does not remove all buffering or display processing.
Seconds and frames describe the same cadence differently
For a constant output frame rate, divide the interval in frames by frames per second to obtain seconds. To convert seconds into frames, multiply the desired duration by the output frame rate. Check the units in the actual encoder interface before entering a number.
Constant output rate | Frames for a two-second interval | Calculation |
|---|---|---|
25 fps | 50 frames | 25 × 2 = 50 |
30 fps | 60 frames | 30 × 2 = 60 |
50 fps | 100 frames | 50 × 2 = 100 |
60 fps | 120 frames | 60 × 2 = 120 |
A value of 60 frames means two seconds at 30 fps, but one second at 60 fps. Changing the output frame rate while retaining the same frame-count value therefore changes the duration. A seconds-based control may perform that conversion for you, depending on the encoder.
Fractional and variable frame rates need more care. At 60000/1001 fps, 120 frame periods occupy 2.002 seconds. With variable frame rate, picture counts alone do not establish a constant duration. Inspect timestamps when the exact timing matters instead of rounding the frame rate and assuming the output agrees.
Is keyframe interval the same as GOP size?
A Group of Pictures, or GOP, describes a structure of coded pictures. In many encoder controls, GOP size is the frame count associated with the repeated entry-picture cadence. However, the labels do not guarantee identical behaviour across encoders, codecs and presets.
An open GOP can involve prediction across a GOP boundary, whereas a closed GOP confines the relevant prediction structure within its boundary. Those dependencies matter to random access and independently decodable output. Do not assume that selecting a numeric GOP size also selects every other required setting.
AWS's encoding documentation illustrates why implementation details matter: scene-change controls and minimum intervals can interact with the normal cadence. Some implementations insert an extra intra picture without moving the regular boundary; others offer controls that vary the GOP. A “maximum interval” is also different from a guarantee that every interval has exactly that length.
When checking a configuration, distinguish these questions:
Does the control use seconds or frames?
Is it a maximum, a minimum, a fixed cadence or an automatic choice?
Which codec and encoder implementation are actually active?
Are scene changes allowed to add pictures or alter scheduled boundaries?
Does the output provide the random-access behaviour the receiving service requires?
The correct answer comes from the active encoder and destination documentation, followed by inspection of the output. A setting copied from a different software wrapper is not sufficient evidence.
Why two seconds is common, but not universal
At the time of checking on 25 October 2026, YouTube's live encoder guidance recommends a two-second keyframe frequency and says not to exceed four seconds. That is guidance for its live ingest configuration, not a rule for every recording, call or video platform.
Apple's HLS authoring specification separately recommends IDRs every two seconds and requires video segments to start with an IDR. Its ordinary segment-duration guidance is nominally six seconds. Those are different controls: a six-second segment can contain three two-second GOPs.
Follow the destination's current requirements and the applicable codec and packaging rules. Neither example establishes that the shortest possible interval is always best. An accepted input setting also does not prove that every representation ultimately delivered to viewers preserves the original encoder's cadence, because a service can transcode the input.
How keyframes help adaptive streaming
A viewer may need to move between representations of the same programme. Suitable entry points at matching media times help the system change representation without relying on unavailable pictures from a different encode. Matching an interval number alone is weaker than checking that the actual timestamps and required boundaries line up.
For example, imagine two representations with entry points at media times 0, 2 and 4 seconds. Both offer a matching entry point at 2 seconds. If the second representation instead has its entry points offset, a player cannot assume that an arbitrary switch at 2 seconds is safe just because both encoders display “two seconds”.
The player still needs the new data in time and must obey its format and playback rules. Our adaptive bitrate streaming guide explains how representation choice also depends on delivery and buffering. Keyframe alignment supports that process; it does not replace it.
Does a shorter interval reduce latency?
It can reduce a particular wait for a suitable future entry point. It does not necessarily reduce capture-to-display latency by the same amount. Encoding lookahead, picture reordering, segment availability, network delivery and playback buffering are separate contributors.
Techie Broadband example: one entry-point wait
Assume a simplified live path whose usable IDRs occur at media times 0, 2 and 4 seconds. A receiver becomes ready at 0.7 seconds, cannot use earlier data, and must wait for the next scheduled IDR. The interval-related wait is 2.0 minus 0.7, or 1.3 seconds.
Now imagine an otherwise identical example with entry points at 0, 1 and 2 seconds. The next one is at 1.0 second, so that particular wait becomes 0.3 seconds. The reduction is one second for this arrival time. It is not a prediction that changing a real stream's setting will reduce every viewer's live delay by one second.
Part of the example | Two-second cadence | One-second cadence |
|---|---|---|
Receiver ready | 0.7 s | 0.7 s |
Next scheduled entry point | 2.0 s | 1.0 s |
Wait for that entry point | 1.3 s | 0.3 s |
Total playback startup time | Not calculated | Not calculated |
A player with access to earlier segments might start from an earlier entry point instead. A service may request a refresh or have another recovery mechanism. Packet loss can also damage the entry picture itself. These cases are why a simple interval calculation must state its assumptions.
Compression, bitrate and recovery trade-offs
More frequent intra-coded entry pictures can leave less opportunity to reuse information over longer prediction structures. The resulting effect depends on content, codec, rate control and quality target. There is no reliable fixed percentage by which halving the interval increases bandwidth or processor load for every stream.
At a fixed bitrate, the encoder has to allocate its bit budget across those pictures. A different cadence can change visible quality even when the average rate remains the same. If a quality-based encode uses more bits, file size or delivery demand can change instead. Our bitrate explanation separates the rate of coded data from picture dimensions and frame rate.
A fresh, successfully received reference reset can also limit dependence on an earlier damaged reference chain. However, recovery is not guaranteed at exactly one interval after a fault. The location and type of damage, refresh requests, retransmission, concealment and receiver behaviour all matter. The interval is one design choice within a larger system.
What UK broadband users can change
A creator running an encoder may be able to change its interval, subject to the receiving platform's requirements. A viewer of a managed streaming service normally cannot alter the service's encoding structure by changing a router setting or buying a faster broadband package.
For a UK upload, consider the ISP, access network, product and location together with the local Ethernet or WiFi connection. A path that cannot carry the outgoing stream reliably needs investigation, but increasing capacity does not repair misaligned encoding boundaries. Conversely, changing GOP settings does not remove local wireless interference or an overloaded upload.
Compare the outgoing media rate and other simultaneous traffic with the connection's behaviour during the event. Our upload speed guide explains the access-side measurement. Keep encoding warnings, network interruptions and viewer playback symptoms as distinct observations until the evidence connects them.
A practical checking sequence
Record the destination, codec, active encoder implementation, output frame rate and symptom.
Read the destination's current interval and random-access requirements, noting whether each value is mandatory or recommended.
Confirm whether the encoder control uses seconds or frames and whether it sets a fixed value, limit or automatic mode.
Convert the duration using the actual output rate, then check scene-change and GOP dependency settings in that encoder's documentation.
Inspect a permitted local recording or supported stream analysis for actual entry-picture timestamps and usable boundaries. A picture-type label alone may not prove an IDR reset.
For multiple representations, compare matching media times and segment boundaries rather than only the configuration numbers.
Run a private or otherwise appropriate test with representative motion and scene changes. Compare platform health, output quality, stability and delay without disrupting an essential broadcast.
Change one documented setting at a time, retain the original configuration and repeat. Escalate with timestamps and relevant evidence, keeping stream keys and private session details confidential.
This process identifies whether the question is cadence, packaging, encoder load or delivery. It avoids treating every playback pause as proof that the keyframe setting is wrong.
Frequently asked questions
What is keyframe interval measured in?
It may be measured in seconds or frames. For a constant frame rate, frames divided by frames per second gives the interval in seconds.
How many frames equal two seconds at 60 fps?
At exactly 60 fps, two seconds is 120 frame periods. Fractional or variable output rates require attention to the actual timing.
Is every I-frame an IDR frame?
No. In H.264, an IDR provides a reference reset with specific decoding behaviour. An I-picture label alone does not establish the same boundary.
Is a two-second interval always best?
No. It is common guidance for some streaming workflows. Use the destination's current requirements and assess the actual codec, packaging and quality trade-offs.
Is keyframe interval the same as segment duration?
No. A segment can contain multiple GOPs. The relationship must satisfy the delivery format's entry-point and boundary requirements.
Will faster broadband fix a keyframe interval warning?
Not necessarily. Broadband capacity and encoder cadence are different properties. Check the actual outgoing encoding and platform diagnostics as well as delivery conditions.
Key takeaway
Keyframe interval describes the spacing of video entry pictures. Read its units, distinguish an intra picture from a suitable reference reset, and verify the actual output. Good streaming depends on compatible encoding and packaging together with timely delivery, rather than one interval value solving every quality or latency problem.
Explore the Techie Broadband terminology guide for the related video and networking concepts.

