How to fix livestream keyframe interval errors

2 min read

Livestream platforms and restreaming tools often require keyframes every 2 seconds. If your keyframe interval is too high, streams may fail, lag, or disconnect.

To fix such issues, set your encoder keyframe interval to 2 seconds, then stop and restart your stream.

This setting may also be called GOP size, GOP duration, I-frame interval, or IDR interval.

OBS Studio

  1. Open OBS Studio and click Settings in the bottom right.
  2. Click the Output tab on the left.
  3. Change Output Mode to Advanced.
  4. Go to the Streaming tab.
  5. Set Keyframe Interval to 2.
  6. Click Apply, then OK.

Streamlabs

  1. Open Settings.
  2. Select Output.
  3. Set Output Mode to Advanced if the keyframe setting is not visible.
  4. Open the Streaming tab.
  5. Set Keyframe Interval to 2.
  6. Click Done.
  7. Stop your stream, then start it again.

vMix

  1. Click the Stream gear icon or go to Settings > Streaming in vMix.
  2. Locate the Keyframe Frequency dropdown menu.
  3. Select or type 2 seconds.
  4. Click Save and Close.
  5. Stop your stream, then start it again.

Other encoders

Look in the video, encoding, output, or advanced stream settings. Set Keyframe Interval, GOP size, GOP duration, I-frame interval, or IDR interval to 2 seconds.

If the encoder asks for a frame count instead of seconds, multiply your frame rate by 2. For example, use 60 frames for 30 fps video, or 120 frames for 60 fps video.