StreamLive Pro

What is a keyframe interval, and why set it to 2?

What a keyframe interval is in live streaming: keyframes and GOPs, seconds versus frames, why networks ask for 2 seconds, and where to set it in OBS, vMix and FFmpeg.

Updated · 5 min read

The keyframe interval is how often the encoder puts a complete picture into the stream. Between those complete pictures, called keyframes, the encoder sends only what changed. For live streaming the interval is usually set in seconds, and the common answer is 2: YouTube asks for a keyframe every 2 seconds and no more than 4 (YouTube Help: live encoder settings), and the ingest behind StreamLive Pro requires between 2 and 10 seconds (Cloudflare Stream: Start a live stream, checked 5 November 2026).

This page covers the term in depth. Shorter definitions of the related terms are in the Live streaming glossary: the terms you will meet.

Keyframes and the frames between them

A video encoder such as H.264 does not store every frame as a full image. It uses three kinds of frames:

A keyframe costs many more bits than the frames that follow it. The run from one keyframe to the next is called a GOP, a group of pictures, so "GOP length" and "keyframe interval" describe the same distance.

Seconds or frames

Some tools ask for the interval in seconds, some in frames. The conversion is the frame rate times the seconds:

Frame rate2 seconds in frames4 seconds in frames
25 fps50100
30 fps60120
50 fps100200
60 fps120240

A common mistake is typing 2 into a field that counts frames: that asks for a keyframe every second frame and wastes most of the bitrate.

Why live streaming cares

Viewers join at keyframes. A player that opens a live in the middle has to wait for the next complete picture before it can show anything. With a 2-second interval that wait is short; with a long one, people stare at a black or frozen player.

Live video is cut into segments at keyframes. Networks and players deliver live video as a series of brief pieces, and each piece starts with a keyframe. If keyframes come irregularly or too far apart, the pieces come out uneven, and the network may warn about the stream or play it badly. That is why receivers state a range rather than leaving it to the encoder.

Recovery after a glitch. A lost packet damages the picture until the next keyframe repairs it. A shorter interval means a shorter smear after a hiccup.

The trade-off

Keyframes are expensive. At the same bitrate:

Cloudflare's own guidance for its standard playback is a GOP of 4 to 8 seconds for efficiency, and 2 to 4 seconds when low delay matters, with B-frames off. For multistreaming, 2 seconds is the setting that every common destination accepts.

Open and closed GOPs, and scene cuts

A closed GOP does not refer to any frame before its own keyframe, so each segment can be decoded on its own. Cloudflare Stream requires closed GOPs; most encoders use them by default.

Many encoders also insert extra keyframes when the picture changes completely, for example at a hard cut between cameras. That keeps cuts clean in recordings, but it makes the interval irregular. For live output, a fixed interval is safer: in FFmpeg that is what -sc_threshold 0 does.

Where to set it

ToolSettingValue for 2 seconds
OBSSettings, Output, Advanced, Streaming tab: Keyframe Interval2 (0 means auto)
vMixStreaming quality settings: Keyframe Frequency2
FFmpeg-g and -keyint_min, in frames60 at 30 fps, 120 at 60 fps
Phone and hardware encodersOften called keyframe, GOP or I-frame interval2 seconds, or the frame count from the table

OBS walk-through: OBS settings for multistreaming to several networks. vMix: Connect vMix to StreamLive Pro and stream everywhere. FFmpeg: Stream to StreamLive Pro with FFmpeg over RTMPS or SRT. If a device does not let you set it, check its manual before an important show; the Blackmagic ATEM Mini manual, for example, does not state it (Stream from an ATEM Mini to several networks at once).

How to check what your encoder really sends

Setting a value is not the same as getting it. Two quick checks:

  1. Ask the destination. YouTube Studio's stream health panel shows warnings about the incoming stream, keyframes included. If it warns about keyframes while your encoder says 2, the field may count frames, or a scene-cut option may be adding keyframes.
  2. Measure a recording. Record a minute with the same settings and list the frame types with FFmpeg's ffprobe, for example ffprobe -v error -select_streams v:0 -show_entries frame=pict_type,pts_time -of csv recording.mp4. The lines marked I are keyframes; the time between them is your real interval.

For example, with 30 fps and an interval of 2 seconds you should see an I line every 60 frames, at 0, 2, 4, 6 seconds and so on. Irregular gaps mean the encoder is adding scene-cut keyframes; gaps of 8 or 10 seconds mean the setting did not take.

Where it matters in StreamLive Pro

When you send from an encoder, the keyframe interval you set is what our ingest receives and what every network gets. Two mistakes to avoid:

Symptoms and fixes are in My encoder says it is streaming, but there is no picture.

The Live stream screen: Preview, Program and the channels panel (test account).
The Live stream screen: Preview, Program and the channels panel (test account).

Frequently asked questions

What does keyframe interval mean?

How often the encoder puts a complete picture into the stream. Between keyframes it sends only the changes.

Why should the keyframe interval be 2 seconds?

YouTube asks for 2 seconds and no more than 4, and the ingest behind StreamLive Pro accepts 2 to 10. Two seconds passes every common destination and lets viewers join quickly.

What does keyframe interval 0 mean in OBS?

Auto: the encoder chooses. That can come out longer than networks accept, so type 2 instead.

Is the keyframe interval in seconds or frames?

It depends on the tool. OBS and vMix use seconds; FFmpeg's -g uses frames, which is the frame rate times the seconds.

Does a shorter keyframe interval improve quality?

No. At the same bitrate, more keyframes leave fewer bits for detail. Go below 2 seconds only if a destination asks for it.

Keep reading

Live stream checklist: before, during and after

A printable live stream checklist: test broadcasts, stream keys, sound check, backup internet, what to do if the stream drops, and the work after it ends.

PTZ cameras for live streaming: protocols and setup

What a PTZ camera is, VISCA, Panasonic, ONVIF and NDI control, HDMI vs SDI vs NDI delay, presets for a lecture or service, zoom by room depth, PoE.

Upload speed and bitrate for multistreaming

YouTube's bitrate table for 720p to 4K, the upload you need to multistream from OBS vs a relay, CBR and 2-second keyframes, and how to test your connection.

My encoder says it is streaming, but there is no picture

OBS, vMix or your encoder says it is streaming but StreamLive Pro or the networks show no picture: the likely causes in order, a symptom table, and what to send support.

Want to try it? 7-day trial, no credit card.

Start free
Mobile app Home Help Center Guides PrivacyTermsAccessibility