Skip to content

Follow the talker shot by shot, over any number of faces, without jitter - #436

Merged
dillonstreator merged 3 commits into
mainfrom
claude/fix-face-track-shots-jitter-612b9a
Dec 2, 2026
Merged

dillonstreator merged 3 commits into
mainfrom
claude/fix-face-track-shots-jitter-612b9a

Conversation

@dillonstreator

Copy link
Copy Markdown
Member

"Follow speaker" (a section set to it, or a project's reframe: face) now decides shot by shot, over everyone in the shot, and stays on the person talking without jerking between faces.

Cause

#433 made a forced face crop follow the talker over two faces, but two gaps remained:

  • One decision across cuts. The forced section was decided once over its whole length. Its two seats paired faces from different shots: a panel shot with the comic at the left beside two men at a desk, and a stage shot with the comic at the centre. On a Kill Tony range that cuts between those shots, the crop locked onto the man at the desk while the comic talked.
  • Three or more faces. The two-seat logic doesn't apply to three people of about the same size. The crop then followed the largest face of each frame, which flips between them. On a steady wide shot of three people the crop hopped between the host and a panelist every few seconds.

Fix

  • Per shot. A forced face section is cut at its scene cuts (shotSpans; shots under 1.5 s fold into the one before). Each shot gets its own seats (shotSeats): every face track seen in at least 25% of the shot and at least half the biggest face's height, up to four, lead seat first. The crop never follows "the largest face this frame".

  • Speaker detection over N seats. activeSpeakers takes any number of seats, and a seat can be a moving path (a comic who paces). It also records each seat's torso colour histogram ("looks").

  • followTalker, per shot, in order:

    1. The talker detection names (one person, or clear turns).
    2. If unsure: the person talking in the nearest decided neighbouring shot, matched by looks.
    3. If still unsure: the lead seat only when it outweighs the next by 2×, else the whole shot (fit) rather than a bystander nearest the centre.
    4. A lone face that isn't talking while speech fills the shot (a reaction shot) is also shown whole.

    There is no mic cue: Reelsaw has no object detector, so continuity rests on looks.

  • No jitter. Within a shot, a new person takes the crop only after leading the talk for 1.5 s (FACE_SWITCH_SEC; splits keep 0.6 s). The crop eases to them over 0.6 s (talkerTrack, smoothstep) instead of snapping. Across shots it cuts with the edit.

  • A crop the user pointed (subjectX) or nudged is left alone and follows that person through the section, as before. Splits are unchanged; speakerPlan and its helpers were generalized to N seats with identical two-seat behaviour.

Cost: speaker detection now reads every forced-face shot, about one second of CPU per second of followed footage.

Evals

There are two new follow cases in the speakers suite (Kill Tony #794). Each runs the render's Follow-speaker path over a real range and scores the resulting crop against hand-labelled talker positions. Labels come from 1 fps frames with a 0.1 grid; the who-talks labels for the three-person range come from the transcript and the visible mics. Metrics:

  • onTalker: share of the labelled time with the crop centre within 0.12 of the talker's face.
  • switches/min: crop target changes inside a shot.
  • snaps: target changes made in one 0.1 s step.

"Before" is main (079d97f0) with the same suite and its path adapted to main's API (one section, two seats, followSpeakers); both runs used the same media.

case onTalker switches/min snaps
killtony-follow-comic-across-cuts (4 cuts, comic talks throughout) 0.66 → 1.00 0 → 0 0 → 0
killtony-follow-three-at-the-desk (one wide shot, 3 people, 2 real turns) 0.38 → 0.98 15.4 → 3.1 6 → 0

The existing two-seat cases give identical results on both builds. sistercircle-couch-smiling-listener fails on both: its media was re-downloaded and the encode's hash differs from the fixture's, so it is not affected by this change. The baseline is left as it was.

Unit tests are in forced-face-seat.test.ts. They cover seats for two and three people, shots split at cuts, follow and turns, look continuity, the dominant-lead and whole-shot fallbacks, reaction shots, hysteresis and easing.

Verified on

A local self-hosted instance, built from this branch plus 9983217e (the A/V seek fix from the range-join sync branch, included so that instance kept it). Re-rendered with project reframe: face:

  • The two reported clips. The comic stays in every frame across the panel and stage shots. In the three-person shot the crop holds the host and moves once to the panelist reading the ad copy, then back.
  • Two clips from Follow the talker in a forced face crop over two people #433. They still stay on the comic.
  • One clip from each of two other episodes. One briefly shows a wide panel shot whole.
  • A range clip, A/V check. Video and audio are 0.013 s apart.

docs/LAYOUTS.md ("Follow speaker, shot by shot"), docs/CONFIG.md, docs/EVALS.md and the README roadmap are updated, and there is a changeset.

A forced face crop was one decision over the whole section: seats paired faces
from different shots, and with three people the crop followed the largest face,
which flips between them. Each shot now gets its own seats (any number, by face
track), active speaker detection reads all of them, an unsure shot takes the
talker of a neighbouring shot by their looks, else a dominant lead seat, else
the whole shot. Turns switch after 1.5 s and the crop eases between people.

Signed-off-by: dillonstreator <dillonstreator@gmail.com>
Signed-off-by: dillonstreator <dillonstreator@gmail.com>
speakers gains follow cases: the render's Follow speaker path over a real range,
scored on time on the talker, target switches per minute inside a shot, and
snaps. One range cuts between a panel shot and the stage with the comic talking
throughout; the other is a steady wide shot of three people.

Signed-off-by: dillonstreator <dillonstreator@gmail.com>
@vercel

vercel Bot commented Dec 2, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
reelsaw-website Ready Ready Preview Dec 2, 2026 6:14pm UTC

Request Review

@dillonstreator
dillonstreator merged commit 8a77208 into main Dec 2, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant