Skip to content
streamneo.
Streaming Settings10 min read

How to Set Keyframe Interval and B-Frames for 4K 60fps YouTube Live

Set a two-second keyframe interval (120 frames at 60 fps), use a closed GOP, and configure B-frames and reference frames for YouTube Live.

sn.
StreamNeoPublished 5 October 2026
Worth sharing?

For 4K 60 fps YouTube Live, set the keyframe interval to two seconds, which is 120 frames at 60 fps. Use a closed GOP, two B-frames and one reference frame; these are separate encoder settings, not different ways of specifying the keyframe interval.

YouTube recommends a two-second keyframe frequency and says not to exceed four seconds. Its guidance also calls for a closed GOP for optimal transcoding. The exact control names vary by encoder, so the important thing is to match the behaviour rather than look for one exact label.

Set the keyframe frequency to two seconds

A keyframe is a frame that can be decoded without relying on earlier frames. Other frames can describe changes in relation to frames around them, which is efficient but means a player or processing system may need to refer to the surrounding sequence. The interval determines how often the encoder inserts a keyframe.

For YouTube Live, use two seconds as the target. YouTube’s encoder guide recommends that frequency and says not to exceed four seconds. A longer interval is not a sensible way to solve bitrate or connection problems: it changes how the video is structured, but does not make an unreliable upload reliable. See YouTube’s live encoder settings and bitrate guidance for the recommendations that apply to your codec and resolution.

A two-second interval gives the receiving pipeline regular points at which it can begin decoding a sequence. It is also a practical setting for live delivery because it follows YouTube’s stated recommendation rather than asking you to infer a value from a general encoding rule. If the encoder has a field expressed in seconds, enter 2.

Do not confuse this interval with the stream’s frame rate. At 60 fps, the encoder produces 60 frames each second, but the interval still means two seconds of video. The equivalent number of frames depends on the actual frame rate being sent; the next section shows the conversion for 60 fps.

Convert the interval to 120 frames at 60 fps

Some encoders ask for keyframe frequency in seconds, while others expose a GOP size or keyframe interval as a number of frames. At 60 frames per second, the calculation is direct: 60 frames per second multiplied by two seconds equals 120 frames. If the control explicitly asks for a frame count, enter 120 for this 60 fps stream.

That number is not a bitrate, a B-frame count, or a reference-frame count. It is the distance between keyframes expressed in frames. Keeping the units in view prevents a common configuration mistake: typing 2 into a field that expects frames, or 120 into one that expects seconds.

Check the encoder’s output frame rate as well as the project or source frame rate. A project set to 60 fps does not prove that the broadcast is actually being encoded at 60 fps. If the outgoing stream is 30 fps, two seconds corresponds to 60 frames, not 120. Match the calculation to the frame rate of the encoded stream.

YouTube’s stated upper limit of four seconds is a ceiling, not a recommended target. At 60 fps, four seconds would correspond to 240 frames, but the recommended setting remains two seconds, or 120 frames. Do not lengthen the interval beyond that ceiling to compensate for a slow computer, an unstable connection, or a bitrate that is difficult to sustain. Address those issues directly and test the stream.

If the encoder’s terminology is unclear, consult its own documentation before changing values. A control called “GOP size” is often expressed in frames, but naming and implementation differ between applications. Confirm the units in the interface or help page, then verify the actual stream rather than assuming that a field name tells the whole story.

Use a closed GOP

GOP means group of pictures: a sequence of frames organised around keyframes and the frames that depend on them. A closed GOP prevents frames in one group from depending on frames in a neighbouring group. YouTube’s troubleshooting guidance says its pipeline requires a closed GOP for optimal transcoding. Its live streaming error messages guidance explains the open and closed GOP distinction and points to GOP configuration when diagnosing ingestion problems.

Look for a setting labelled GOP, GOP structure, Open/Closed GOP, or similar. If the encoder offers Open and Closed, choose Closed. Some tools instead describe the choice as fixed versus variable GOP. Do not assume those labels are interchangeable without checking the encoder’s documentation: a fixed interval and a closed group describe related but different properties.

In particular, closed GOP does not mean “set the GOP to 120” in every encoder. The 120 value is the two-second interval expressed in frames at 60 fps. The closed-GOP option controls whether frames in a group refer outside that group. You need to configure both properties where the encoder provides both controls.

If you cannot find an explicit closed-GOP switch, check for a preset or advanced codec panel, and consult the software’s documentation. Avoid changing unrelated codec flags simply because they sound as though they might affect GOP behaviour. If the stream produces a YouTube ingestion warning, revisit the encoder’s GOP and keyframe controls and test again.

Set two B-frames and one reference frame

B-frames and reference frames are not keyframes. They describe other parts of the frame-prediction structure, and YouTube’s recommended advanced frame settings include progressive scan, two B-frames and one reference frame. For the configuration in this article, set B-frames to 2 and reference frames to 1 where those controls are exposed.

A B-frame can use information from frames before and after it in the encoded sequence. That prediction can improve compression, but it also makes the relationship between encoded and displayed frames more involved. A reference frame is a frame that other frames may use as a prediction reference. The two controls have different roles, so do not enter 2 for reference frames merely because you are using two B-frames.

The keyframe interval remains two seconds (120 frames at 60 fps) regardless of the number of B-frames or reference frames. These values do not extend the GOP, replace its keyframe, or change the interval calculation. Treat them as separate entries in the encoder’s advanced video settings.

Some encoders offer a choice of frame types but no individual reference-frame control. In that case, do not invent a command-line parameter or change a hidden setting based on a guess. Use the available YouTube-recommended controls, check the encoder’s documentation, and confirm that the chosen codec and preset are supported by your workflow.

Map the recommendations to encoder controls

The same setting may appear under different names in OBS, a hardware encoder, or a managed streaming tool. Use the table as a translation guide, then check the field’s units and the application’s documentation before applying the value.

What you need Possible control label Value or choice for 4K 60 fps
Keyframe frequency Keyframe interval, keyframe frequency, GOP size 2 seconds, or 120 frames if the field is in frames
GOP structure GOP mode, Open/Closed GOP, GOP structure Closed
B-frame count B-frames, B-frame count, B-frames between references 2
Reference-frame count Reference frames, references, ref frames 1
Scan type Scan, field order, progressive/interlaced Progressive

Treat the table as a map, not a promise that every interface uses these exact labels. If a field says “keyframe interval” but shows no units, find out whether it expects seconds or frames. If you see both a keyframe interval and a GOP-mode control, set each independently. If the encoder does not expose one of the advanced options, do not treat a nearby setting as a substitute.

For example, if the control is named Keyframe Interval and its help text says that it uses seconds, enter 2. If it is labelled GOP Size and the documentation says it uses frames, enter 120 for an outgoing 60 fps stream. Then select Closed for GOP mode, set B-frames to 2 and reference frames to 1 if those controls are available.

These frame settings sit alongside the rest of the encoder configuration. YouTube lists RTMPS as its recommended protocol and constant bitrate encoding (CBR) in its encoder settings. At 2160p 60 fps, it lists different bitrate recommendations for different codecs: AV1 and H.265 (HEVC) are not given the same recommendation as H.264. Those are YouTube’s ingestion recommendations, not a guarantee that your internet connection can sustain the chosen rate. Choose a setting your upload connection can support and test it; the checklist for insufficient video data in OBS covers a related failure mode.

If you stream HDR over RTMP or RTMPS, YouTube recommends H.265 and says AV1 is not supported for HDR. Codec choice, HDR requirements and sustained upload capacity affect the broader configuration, but they do not change the two-second keyframe target. For a longer-running channel, it is worth separating encoder setup from the question of where the broadcast runs; this overview of cloud services for always-on YouTube streams discusses that operational choice without making the keyframe controls interchangeable.

Test and verify stream health

Before an important broadcast, test with material that resembles the real programme. If your 4K stream contains moving camera footage, test with similar movement. If it is a music or devotional loop with a still image and occasional transitions, include those transitions and the same audio arrangement. A static preview alone may not reveal an issue that appears when the video changes frequently.

Start an unlisted or otherwise suitable test broadcast if that fits your channel workflow, then check YouTube Studio’s stream health and the encoder’s own status. Confirm the outgoing resolution and frame rate, and watch for ingestion warnings or messages about keyframes, GOP size or missing video data. A green status at the start is useful, but continue observing it as the test runs; a problem can appear only after the encoder has been sending data for a while.

If YouTube reports an incorrect GOP size or a keyframe-related issue, first verify units and frame rate. A value of 120 is correct only when the field expects frames and the encoded output is 60 fps. If the field expects seconds, the right entry is 2. Next check that the encoder is actually using a closed GOP, rather than relying on the keyframe interval alone.

If the stream remains unstable, do not immediately raise the keyframe interval. YouTube says not to exceed four seconds, and recommends two. Check the upload connection and selected bitrate, encoder load, dropped frames and the specific health message instead. A keyframe setting cannot remedy packet loss or a connection that cannot sustain the video bitrate; the guide to packet loss on a 4K 60fps stream over Indian broadband addresses that separate network problem.

For a scheduled broadcast, write down the working encoder values and repeat the test after a meaningful change: a different codec, frame rate, encoder preset, or software update can alter what the controls mean or how they behave. Do not assume that settings copied from another encoder use the same units. Keep a short record of the outgoing frame rate, interval and GOP mode so that a later troubleshooting session starts with facts rather than guesses.

For a 24/7 channel built around a prepared video, there is also an operational choice between keeping a local encoder running and arranging for the file to be broadcast without your computer staying on. StreamNeo removes the need to keep a local machine running for that file-based workflow; it does not change YouTube’s recommended video settings or remove the need to check stream health.

Before committing, compare the operating options on the pricing page. When the file and channel are ready, start free — 24-hour trial, no card.

FAQ

What keyframe interval should I use for YouTube Live?

Use two seconds. YouTube recommends a two-second keyframe frequency and says not to exceed four seconds, so do not treat the maximum as the target.

How many frames is a two-second interval at 60 fps?

It is 120 frames: 60 frames per second multiplied by two seconds. Enter 120 only if the encoder field expects a frame count; if it expects seconds, enter 2.

How many B-frames should I use for 4K 60fps YouTube streaming?

Use two B-frames and one reference frame, with progressive scan, as YouTube’s recommended advanced frame configuration. B-frame count and reference-frame count are separate from the keyframe interval and from each other.

Should I use an open or closed GOP?

Use a closed GOP for optimal YouTube transcoding. If your encoder does not show that exact choice, check its documentation for the GOP control rather than assuming that a fixed interval alone makes the GOP closed.

YOU’VE REACHED THE END

Keep the ideas coming.

More guides, useful tools and a little help for your next broadcast.

Back to the journal ↗
YOUR NEXT READ

A little more to explore.

More Streaming Settings guides ↗ · All topics ↗