A face swap on a still photo is a one-shot decision. On video it is a decision the model makes again on every frame, and the first ten frames are where that decision gets locked in.

I have been running short clips through face swaps and looking at where they fall apart, and the pattern is consistent: if the opening second is clean, the rest usually holds. If it is not, no amount of fixing later frames recovers it.

Why the opening frames matter more than the rest

A video face swap does not track a face in the way a human does. It detects a face per frame, aligns it, and then tries to keep the result consistent with what came before. At the start there is no "before", so frame zero becomes the anchor: its head angle, its light, its occlusion, its colour cast.

Everything after that is measured against frame zero. A turn that happens in frame 6 is fine. The same turn in frame 1 means the anchor was set on a face that was already moving, and the swap spends the next few seconds catching up — which looks like identity drift, not like motion.

Three things make the opening worse than it needs to be:

  • A cut in the first second. Each cut resets the anchor, so you get two different faces in the same clip.
  • A blink or a hand in the first ten frames. Occlusion at the anchor frame means the model fills in a mouth or an eye it never saw.
  • A keyframe mismatch. If the clip opens on a clean I-frame and the next frames are P-frames, fine detail (pores, stubble, the edge of the lip) arrives late and never quite matches the first frame.

Measuring it instead of eyeballing it

You can see the lock-in with about 30 lines of Python. Pull the first ten frames and compare each one's face region to frame zero:

ffmpeg -i input.mp4 -vf "select=lt(n\\,10)" -vsync 0 frame_%02d.png 
import cv2 from skimage.metrics import structural_similarity as ssim frames = [cv2.imread(f"frame_{i:02d}.png") for i in range(1, 11)] cascade = cv2.CascadeClassifier( cv2.data.haarcascades + "haarcascade_frontalface_default.xml" ) def face_crop(img): gray = cv2.cvtColor(img, cv2.COLOR_BGR2GRAY) x, y, w, h = cascade.detectMultiScale(gray, 1.1, 5)[0] return cv2.resize(img[y:y+h, x:x+w], (160, 160)) base = face_crop(frames[0]) for i, f in enumerate(frames[1:], start=2): score = ssim(base, face_crop(f), channel_axis=2) print(f"frame {i:02d} ssim vs frame 0: {score:.3f}") 

A curve that starts near 0.95 and slides to 0.80 over ten frames is not a face that moved. It is a swap that has not settled. On a good clip the number stays flat, because the face barely changes and the swap should barely change with it.

This is a crude metric — it rewards a static face and punishes real motion — but it is enough to answer the only question that matters at the start: did the model agree with itself?

What to do about it

  1. Start on a still. Ten frames of a settled face before anyone speaks. It costs a second and it buys the whole clip.
  2. Do not cut inside the first second. Trim the head of the clip, not the middle of it.
  3. Check the first second at 25% speed. If the ear or the hairline slides against the background, the anchor is wrong and the rest will follow.
  4. Re-encode at a constant frame rate. Variable frame rate is the quiet cause of half the "the swap drifts" complaints, because frame numbers and timestamps stop lining up.

The rest of a ten-minute clip is mostly repetition of what the first second decided. Which is why the cheapest fix is also the earliest one.

I work on FaceSwapAI, which does photo, video and GIF swaps up to ten minutes, HD and no watermark — the numbers above come from testing clips on it.