Compression
Keyframes: Why Scrubbing Jumps and Cuts Land in the Wrong Place
Most frames in a video are not pictures, they are descriptions of change. That single fact explains jerky seeking, cuts that miss by a second, and why some files compress so much better than others.
3 min read · Published 20 August 2026
Drag the playhead through a video and it snaps to positions rather than moving smoothly. Cut at an exact moment and the result starts a second earlier. Both come from the same thing: most frames in a video file are not complete pictures.
Three kinds of frame
Video compression works by not repeating what has not changed. If a person is talking against a fixed background, the background is identical across hundreds of frames, and storing it hundreds of times would be absurd.
| Frame type | What it holds | Rough size |
|---|---|---|
| I-frame, the keyframe | A complete picture, independent of every other frame | Largest, often 10 to 100 times a P-frame |
| P-frame | The difference from the frame before it | Small |
| B-frame | The difference from frames before and after | Smallest |
A keyframe can be decoded on its own. Everything else is meaningless without the frames it refers to, which is the root of all the behaviour below.
Why seeking snaps
To display any frame, a player must start at the nearest keyframe before it and decode forward. Land on a P-frame and it has nothing to apply the difference to.
Fast seeking therefore jumps to keyframes only. If keyframes are two seconds apart, the playhead can only land every two seconds, and dragging feels like it is snapping to a grid. It is.
Precise seeking means decoding from the keyframe up to the target frame and throwing the intermediate frames away. That is why scrubbing through a heavily compressed file with distant keyframes feels sluggish while a file with frequent keyframes responds instantly.
Why a cut misses
Cutting without re-encoding, sometimes called stream copy or lossless trim, can only cut at a keyframe. There is no other place where the output can begin and still be decodable.
So a tool asked to cut at 30 seconds, with the nearest earlier keyframe at 28, has three options: start at 28 and include two extra seconds, start at the next keyframe and lose two, or re-encode the beginning so the cut lands exactly. Different tools choose differently and often without telling you.
If a trim was instant and the start is slightly off, it cut at a keyframe. If it was exact and took a while, it re-encoded. That is the whole trade, and neither answer is wrong.
Keyframe interval, and what it is worth
The gap between keyframes is a setting. Two seconds is a common default; streaming often uses the segment length; some editing formats use every single frame.
| Interval | Good for | Cost |
|---|---|---|
| Every frame | Editing, frame accurate cuts | Enormous files |
| About 1 second | Streaming, responsive seeking | Slightly larger files |
| 2 to 5 seconds | General distribution | Coarse seeking |
| 10 seconds or more | Smallest possible file | Sluggish seeking, and damage spreads far |
There is a robustness angle too. A corrupted keyframe ruins everything until the next one, so a long interval means a small fault produces a long stretch of broken picture.
Why this changes file size so much
It explains something that otherwise looks arbitrary: two videos of the same length, resolution and bitrate setting can differ enormously in size.
A static shot compresses beautifully because nearly every frame is a small difference from the last. Confetti, rain, fire or a fast pan changes every pixel every frame, so the differences are almost as large as complete pictures, and the encoder inserts more keyframes on top. This is also why grainy footage is so expensive: noise is change, and the encoder cannot tell it apart from real detail.
Practical consequences
- If you need frame accurate cuts, expect re-encoding or work from a format with frequent keyframes.
- If seeking feels slow in a file you produced, shorten the keyframe interval on export.
- If a file is unexpectedly large, look at how much of the frame is moving before blaming the settings.
- If you are producing for streaming, match the keyframe interval to the segment length or the player cannot switch quality cleanly.
Common questions
Why can I not cut a video at an exact moment without re-encoding?
Because a cut can only begin at a keyframe. Every other frame stores a difference from its neighbours and is meaningless on its own, so a stream copy has no valid place to start except the nearest keyframe.
What keyframe interval should I use?
About one to two seconds suits most distribution and keeps seeking responsive. Editing formats use far more frequent keyframes for accuracy, and only aggressive size reduction justifies going beyond five seconds.
Why is my static video smaller than a short action clip?
Compression stores change. A still frame repeated costs almost nothing, while footage where every pixel moves gives the encoder nothing to reuse and forces more keyframes as well.
Do more keyframes improve quality?
Not directly. They improve seeking accuracy and limit how far corruption spreads, and they make the file larger at the same bitrate, which can actually reduce quality elsewhere since the bits have to come from somewhere.