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.
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.
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.
Some tools ask for the interval in seconds, some in frames. The conversion is the frame rate times the seconds:
| Frame rate | 2 seconds in frames | 4 seconds in frames |
|---|---|---|
| 25 fps | 50 | 100 |
| 30 fps | 60 | 120 |
| 50 fps | 100 | 200 |
| 60 fps | 120 | 240 |
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.
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.
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.
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.
| Tool | Setting | Value for 2 seconds |
|---|---|---|
| OBS | Settings, Output, Advanced, Streaming tab: Keyframe Interval | 2 (0 means auto) |
| vMix | Streaming quality settings: Keyframe Frequency | 2 |
| FFmpeg | -g and -keyint_min, in frames | 60 at 30 fps, 120 at 60 fps |
| Phone and hardware encoders | Often called keyframe, GOP or I-frame interval | 2 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).
Setting a value is not the same as getting it. Two quick checks:
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.
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.

How often the encoder puts a complete picture into the stream. Between keyframes it sends only the changes.
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.
Auto: the encoder chooses. That can come out longer than networks accept, so type 2 instead.
It depends on the tool. OBS and vMix use seconds; FFmpeg's -g uses frames, which is the frame rate times the seconds.
No. At the same bitrate, more keyframes leave fewer bits for detail. Go below 2 seconds only if a destination asks for it.
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 setupWhat 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 multistreamingYouTube'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 pictureOBS, 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