The keyframe interval is crucial. In a video, keyframes are 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 more steady and reduce artifacts.
OBS keyframe interval determines the balance between picture quality and smoothness of a stream. Higher keyframe value will require more processing power but in return, it provides higher quality.
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.
For example, if a 30 frame per second video file is given and then 30 frames are being shown in a second. When a 30 frame per second video is given and the keyframe interval is set to 2 seconds then every 60 frames a frame or an image will be rendered.
This saves a lot of time and it 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?
Keyframe interval is very important. As keyframes are points in a video where the entire frame is sent instead of just the differences from the previous frame. So, a higher keyframe interval value will make the video more stable and it will lessen the artifacts in a video.
But a higher keyframe interval will need more bandwidth and it will also need 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 but 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 above 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 and it has a keyframe interval of 5 then 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 this, when we set a higher keyframe value then it will make the video clearer and reduce the transmission artifacts but a lower keyframe value will cause 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. The correct keyframe interval is crucial as streamers need to make sure their stream is acceptable in quality and the stream is not being choppy.
For this, a keyframe interval value of “2” in OBS is considered the optimal and best balance between quality and smoothness. But this 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 but if he sets his keyframe interval to a very low value then he will need less bandwidth but the stream will look very bad.
So, it is very important that the keyframe interval is set perfectly according to the bitrate and the frame per second of the video. In a 29 frame per second video with a good bitrate when the keyframe is set to a higher value like 10 then the stream will start lagging a lot but if you set a very low value like 1 then the stream will be pixelated and will be bad in quality. Thus, a good keyframe value needs to be set to make the stream look good.