Keyframe interval
A keyframe interval is the setting that controls how often a video encoder inserts a full keyframe (I-frame), measured in seconds or frames. A keyframe interval of 2 seconds at 30 fps means one keyframe every 60 frames. Live streaming services often require a fixed interval, commonly 2 seconds, so they can cut the stream into even segments.
Why it matters
A wrong keyframe interval is one of the most common causes of live stream problems: buffering, quality switching that fails, extra delay or a stream the platform rejects. Too long an interval slows joining and seeking. Too short an interval wastes bits that could improve picture quality.
How it works
- You set the interval in the encoder, such as OBS, in seconds or as a frame count.
- The encoder inserts a keyframe at that interval, plus extra ones at scene cuts if allowed.
- The streaming server cuts the stream into segments at keyframes, so segment length depends on the interval.
- Players join, seek and switch quality only at keyframes, so the interval sets how quickly those actions happen.
What keyframe interval should I use for streaming?
Use 2 seconds for most live streaming. It is the most widely recommended value: YouTube Live recommends 2 seconds and says not to exceed 4, and Apple's HLS guidance also suggests a keyframe every 2 seconds. Set it as a fixed value, not auto, so segments stay even.
How do I set the keyframe interval in OBS?
In OBS Studio, open Settings, go to Output and switch Output Mode to Advanced. On the Streaming tab, find Keyframe Interval and enter 2. A value of 0 means auto, which lets the encoder choose and can cause uneven segments, so set it explicitly.
Keyframe interval in seconds vs frames: how do I convert?
Multiply the interval in seconds by the frame rate. For example, 2 seconds at 30 fps is 60 frames, and 2 seconds at 60 fps is 120 frames. Some encoders ask for frames (often called GOP size), others for seconds, so check which one the field expects.
Where it's used
Live sports streamers, connected fitness platforms and live event hosts set the keyframe interval in their encoders, because a wrong value causes buffering, extra delay or rejected streams.
Where it usually goes wrong, and how FastPix handles it
Teams often leave the encoder's keyframe setting on auto or use a long interval, then see uneven segments, slow joins and extra delay without knowing the encoder caused it.
Stream health stats are reported for each FastPix live stream, whether it arrives over RTMPS or SRT from OBS, vMix or a mobile encoder. Video Data records live stream latency and startup time per view, so an event team can spot a bad encoder setting from the numbers instead of from viewer complaints.
By the numbers
- YouTube Live recommends a keyframe frequency of 2 seconds and says not to exceed 4 seconds. (YouTube Help: Choose live encoder settings, bitrates, and resolutions)
- Apple's HLS authoring specification says key frames (IDRs) should be present every two seconds. (Apple Developer: HLS Authoring Specification for Apple Devices)


