Why a video freezes, smears or jumps back when you skip ahead (keyframes explained)

You drag the slider and the video freezes for a moment, or lands a few seconds before where you tapped, or turns into a smeary mess of moving blocks that snaps clean a second later. It all comes from one thing: most pictures in a video aren't complete pictures.

What each symptom means

You seeWhat's happeningFix
Freeze or spinner for a moment after skippingThe player is rebuilding from the last keyframe up to where you tappedNormal. Shorter keyframe spacing (below) makes it faster.
Lands a few seconds before where you tappedThe player snapped to the nearest keyframe to be quickMany players have a precise-seek option, e.g. VLC's Fast seek setting off, or mpv's --hr-seek=yes
Smeary moving blocks or a ghost of the old scene, then it snaps cleanChanges were drawn on top of the wrong picture until the next keyframe arrivedUsually a damaged or partly downloaded file, or a cut made without re-encoding. Re-download or re-encode.
Grey or green blocks after a jump in a streamThe new part hasn't downloaded yet, or packets were lostWait a second; check the connection. See video keeps buffering.
Scrubbing is slow in an editor, playback is finePhone footage often has long gaps between keyframes, so each scrub means rebuilding many framesUse proxies, or transcode to an editing format (ProRes, DNxHR) or a short keyframe interval.
A trimmed clip starts with a frozen or blocky pictureThe cut was made "without re-encoding" at a point that isn't a keyframeCut on a keyframe, or re-encode the first few seconds (many trimmers have a smart-cut option)

Why videos are built like this

From one frame to the next, most of the picture doesn't change. Storing only what moved makes video many times smaller. The price is that an in-between frame is meaningless on its own: it says "move this patch a little left", and you need the picture before it. Keyframes are the fresh starts. More keyframes make jumping quicker and errors heal faster, but each one costs space. Going from one every 2 seconds to one every 10 typically saves only a few percent, which is why streaming services sit around 2 seconds.

Choose the spacing in your own encodes

VideoKeyframe every
Editing or scrubbing a lotEvery frame to ½ second (or an intra-only editing format)
Streaming, live or on demandAbout 2 seconds, so the player can switch quality and join quickly
Normal downloads and sharing2-5 seconds
Security or doorbell camera footage10 seconds or more, to save space on hours of still scenes

With ffmpeg and x264, -g sets the maximum gap in frames: at 30 fps, -g 60 means a keyframe at least every 2 seconds. Encoders also add extra keyframes at scene cuts. To re-encode a phone clip for smoother editing: ffmpeg -i in.mp4 -c:v libx264 -crf 18 -g 30 -c:a copy out.mp4. Check the result with the video size calculator.

Try it

The jump-ahead demo on Wirebook plays a tiny clip where you can change the keyframe spacing and skip with a careful, snapping or rough player, and watch the smear clear at the next keyframe.

Related

Compress a video to a target size · Split a video into parts without re-encoding · Why is my GIF so big · What is a keyframe? (Wirebook)

Questions

Why does a video freeze for a moment when I skip ahead?

The player has to start from the last full picture (keyframe) and rebuild every in-between frame up to where you tapped. Videos with keyframes far apart pause longer.

Why does skipping land a few seconds before where I tapped?

Fast players snap to the nearest keyframe instead of rebuilding. Turn on precise or accurate seeking in the player's settings if it has one.

Why does a video smear or show moving blocks after skipping?

The changes for each frame were drawn on the wrong starting picture, often because the file is damaged or was cut without re-encoding. It clears when the next keyframe arrives.

Why is phone footage so slow to scrub in an editor?

Phones often record with keyframes far apart, so each scrub means rebuilding many frames. Use proxy files or transcode to an editing format or a short keyframe interval.

What keyframe interval should I use?

About 2 seconds for streaming, 2-5 seconds for ordinary sharing, and ½ second or less if you'll be editing. In ffmpeg, -g sets it in frames.

Published .

Try it

Related guides

Newest guides