Private beta: we are looking for design partners
Video Context

Free tool · Runs in your browser

Check the keyframe
interval of any video.

The keyframe interval is the time between two full frames in a video. This free tool reads every frame of your video in your browser, lists each keyframe, measures the GOP size, and tells you if the video meets the 2-second target for YouTube Live, Twitch, and HLS.

  • Free
  • No upload
  • No sign-up
  • No watermark

Drop a video here

MP4, MOV, WebM, or MKV. Large files are fine.

Your video stays on your computer. Nothing is uploaded.

How to use it

  1. 1

    Drop a video, or try the sample video.

  2. 2

    Read the summary, the timeline of keyframes, and the list of intervals.

  3. 3

    Choose a target, such as YouTube Live, Twitch, or Apple HLS, to see if the video passes.

  4. 4

    Download the keyframes as CSV or JSON, or copy the FFmpeg command that sets a fixed interval.

What a keyframe is

A video stores a keyframe as a full image. The frames after it store only what changed. A player can start playback, or jump to a new time, only at a keyframe. The group of frames from one keyframe to the next is a group of pictures, or GOP. The GOP size is the number of frames in that group.

Long intervals give smaller files, because full images use more data. Short intervals make seeking faster and let a stream start sooner.

Platform Keyframe interval Notes
YouTube Live 2 seconds Do not go above 4 seconds
Twitch 2 seconds A fixed interval
Apple HLS 2 seconds Each segment must start with a keyframe
Video on demand files 2 to 10 seconds Longer intervals give smaller files

At 30 frames per second, 2 seconds is a GOP size of 60 frames. At 60 frames per second, it is 120 frames.

Fixed or variable GOP

Most encoders add a keyframe at each scene cut by default. This gives a variable GOP: the intervals change through the video. That is good for file quality, but it causes problems for live streaming and HLS, where the segments must all start with a keyframe at the same rhythm. This tool shows the shortest and the longest interval, so you can see a variable GOP at once.

The sample video shows this. It has a keyframe every 2 seconds, plus extra keyframes at its scene cuts. To find the cuts in your own video, use the free scene detection tool. To learn more about cuts, see shot detection.

How to fix the keyframe interval

Re-encode the video with a fixed GOP. For a 2-second interval at 30 fps, use this command:

ffmpeg -i input.mp4 -c:v libx264 -g 60 -keyint_min 60 -sc_threshold 0 -c:a copy output.mp4

  • -g 60 sets the longest GOP to 60 frames.
  • -keyint_min 60 sets the shortest GOP to 60 frames.
  • -sc_threshold 0 stops the extra keyframes at scene cuts.

The tool makes this command for the frame rate of your file, with the target that you choose.

How the tool works

The tool reads the container of your video with WebCodecs and Mediabunny. It reads only the frame headers, not the pictures, so it is fast, even for a long file. It marks each frame as a keyframe or a delta frame. For other details about the file, such as the codec and the bitrate, use the video metadata viewer.

FAQ

Questions, answered.

Common questions about the free keyframe checker tool.

What is a keyframe interval?+

A keyframe interval is the time or the number of frames between two keyframes. A keyframe is a full image. The frames between keyframes store only the changes from the frames before them.

What is the best keyframe interval for streaming?+

Use 2 seconds. YouTube Live recommends 2 seconds and says not to go above 4 seconds. Twitch asks for 2 seconds. Apple's HLS authoring specification says that keyframes should come every 2 seconds.

How do I check the keyframe interval of a video?+

Drop the video into this tool. It reads the frame headers in your browser and shows the time of each keyframe, the shortest, average, and longest interval, and the GOP size in frames. You can also use ffprobe from the command line.

What is the difference between a fixed GOP and a variable GOP?+

In a fixed GOP, every keyframe interval is the same length. In a variable GOP, the encoder adds extra keyframes, often at scene cuts, so the intervals change. Live streaming and HLS work best with a fixed GOP.

How do I set a 2-second keyframe interval in FFmpeg?+

Set the GOP size to 2 times the frame rate and turn off scene cut keyframes. For a 30 fps video, use -g 60 -keyint_min 60 -sc_threshold 0. This tool makes the full command for your file.

Does this tool show I, P, and B frames?+

No. It shows keyframes and the frames between them, which is what the keyframe interval needs. To see I, P, and B frame types, use ffprobe.

Your videos contain
valuable data.
Start using it.

Analyse video at scale. Find exactly what you need. Give your products and AI the context to act on it.