OBS Keyframe Interval

By Mohammad Alam Written by Mohammad Alam
Updated on August 10, 2023

The keyframe interval is crucial. In a video, keyframes refer to the points where the full-frame is conveyed rather than simply the differences from the previous frame. As a result, a higher keyframe interval setting will make the video steady and reduce artifacts. The OBS keyframe interval determines the balance between picture quality and the smoothness of a stream.

A higher keyframe value will require more processing power but in return, it provides higher quality. 

OBS Keyframe Interval

What does OBS keyframe interval mean?

Keyframes are points in a video where the entire frame is sent instead of just the differences from the previous frame. For example, a keyframe interval value of 2 means that a full video frame will be rendered every 2 seconds. 

If a 30-frame-per-second video file is given, 30 frames are being shown in a second. For a 30-frame-per-second video with the keyframe interval set to 2 seconds, every 60 frames a frame or an image will be rendered. 

It saves a lot of time and puts less pressure on the computer to decode a video. While streaming, a lower keyframe interval is usually recommended. 

How does keyframe interval affect video quality?

Setting the right keyframe interval is very important. A higher keyframe interval value will make the video more stable and essen the artifacts. 

But a higher keyframe interval will need more bandwidth and more GPU power as it needs to compress more bits per second. On the other hand, a lower keyframe interval value will cause more artifacts. However, in return, it will take less processing power to finish the job. 

So, in the short term, a lower keyframe interval value will affect the video quality negatively and a higher keyframe value should affect the video quality positively. But the optimal keyframe interval value can vary in different scenarios. 

For streaming, a higher keyframe interval is not needed but while recording a higher keyframe interval should be selected.

How to set the correct keyframe interval?

The correct keyframe interval is set based on the streamer and their requirements from a stream. The keyframe interval value of 0 means that the stream is set to automatic instead of 0 seconds. The value of 0 or automatic is usually around 8 seconds. 

This value is not good for streaming, for streaming a keyframe interval value should be set according to the frame rate and bitrate of the stream. If a streamer is streaming a 1080p video in 25 or 30 fps then a keyframe interval value of 2 is optimal. 

As in this situation, a keyframe interval of 2 means that it takes at most 2 seconds for the viewers to catch up to a point where they can properly display the feed. For a 30-frame-per-second video, the keyframe interval value should not exceed 4. A value above 4 will cause the stream to lag a lot as it will take higher bandwidth.


How does the keyframe interval work?

Keyframes are points in the video where the entire frame is sent instead of just the differences from the previous frame. When a 60-frame-per-second video is recorded with a keyframe interval of 5, every 300 frames a keyframe is made. 

On the other hand, there is a delta frame, which is a “difference” frame that provides an incremental change from the previous frame. Keyframe is different from a delta frame. When we set a higher keyframe value, it will make the video clearer and reduce transmission artifacts. On the other hand, a lower keyframe value will result in more artifacts. 

Using keyframes does not waste bandwidth but delta frames waste bandwidth as it records all the slight changes in a frame. 

What is the importance of keyframe intervals in streaming?

Keyframe interval is important for streaming as it can create lag or it can cause streams to be pixelated. We cannot emphasize enough how important the correct keyframe interval is. Streamers need to make sure their stream is acceptable in quality and not choppy. 

For this, a keyframe interval value of “2” in OBS is considered optimal. It provides the best balance between quality and smoothness. However, the value can change depending on the streamer’s internet bandwidth and processing capabilities. 

When a streamer sets a higher keyframe value then the streamer will need a lot higher internet bandwidth. On the other hand, if he sets his keyframe interval to a very low value, he will need less bandwidth. However, the stream will look very bad. 

It is very important that the keyframe interval is set perfectly according to the video’s bitrate and the frame per second. Consider a 29-frame-per-second video with a good bitrate. When the keyframe is set to a higher value like 10, the stream will start lagging a lot. But if you set a very low value like 1, the stream will be pixelated and with poor quality. Thus, a good keyframe value needs to be set to make the stream look good.