Communitygithub.com

WEBGRS/reframe

Re-frame landscape footage for a vertical (9:16), square or 4:5 film - every shot cropped onto what matters in it (the speaker, the thing that moves, what the shot is about), the crop following a subject that crosses the frame, the footage never re-encoded. Measures each shot first, draws every window on the frames for you to check, and checks the finished film.html against the same rules.

What is reframe?

reframe is a Claude Code agent skill that re-frame landscape footage for a vertical (9:16), square or 4:5 film - every shot cropped onto what matters in it (the speaker, the thing that moves, what the shot is about), the crop following a subject that crosses the frame, the footage never re-encoded. Measures each shot first, draws every window on the frames for you to check, and checks the finished film.html against the same rules.

Works with~Claude Code~Codex CLI~Cursor
npx skills add https://github.com/WEBGRS/openfilm-reframe/tree/HEAD/skills/reframe

Ask in your favorite AI

Open a new chat with this agent skill pre-loaded.

Documentation

What does reframe do?

The person's landscape footage as a vertical or square film that looks shot for that shape: at every moment the viewer sees what the shot is about, never the wall beside it, never half a face.

What defines it

Each shot is framed on its own content. One centre crop for the whole video is not this, however tidy, and neither is the whole landscape frame shrunk between blurred bars.

What has to be true

  • Measured, then looked at. Every window comes from the measure and from your own eyes on its pictures. The measure can be wrong; the pictures decide.
  • The subject stays whole. Faces, the speaker, the moving thing and words that matter stay inside the frame with room around them. When two things matter and both do not fit, the frame goes to the one the moment is about (who speaks, what moves, what the narration names), and the person hears what was left out.
  • Calm framing. A still subject gets one still window for the shot. The window moves only when the subject does: a hard reposition at least a second after the last one, or a smooth follow; never a crop that drifts or jitters.
  • Their footage as it is. The same file trimmed with #t= and cropped by the clip's own CSS (object-fit: cover with an object-position, or a box of the footage's shape moved by translate); never re-encoded, cropped into a new file, or changed in speed. Clips of one shot meet frame to frame, so the shot's sound runs on unbroken.

What you have

node <this skill's folder>/scripts/reframe.mjs <video> --aspect 9:16 --src assets/<file> (in the film's folder) writes reframe/<name>.json, a review page and reframe/<name>-sheet.jpg. It finds the shots, weighs motion (the camera's own move taken out), detail, colour contrast and skin tones ten times a second, and gives each shot a fixed window (one clip), a split (several clips of the same file, each at least a second, each with its own position) or whole (the footage's own shape), with ready <video> lines at their own source seconds.

Read every sheet it prints (look: … (Read it)). Each picture is a moment (each clip's start, its weakest moment marked WEAKEST, one every 1.5 s): the frame with the window outlined and the outside dimmed, a ruler in % of the frame, and the crop as the film shows it. Where the subject is outside the window or cut by it, set object-position yourself; the output gives the formula. held is how often the window agrees with the measure, not proof the subject is in it. Lines marked ! say where to look hardest.

A smooth follow (--follow): @keyframes follow-N of translate for a split shot's path and the one <video> clip that wears them, also in reframe/<name>-follow.css. Put the keyframes in film.html's <style>. The animation runs on the clip's own time from its at: a clip trimmed to start a seconds after the shot's start takes animation-delay: -a s. The clip keeps its own sound.

Trimming a shot keeps only the clips inside the new #t=, the outer two cut to it, positions unchanged.

The film as written: node <this skill's folder>/scripts/reframe.mjs check in the film's folder reads film.html's own crops and prints each window, how long it moves, each reposition, the moments where the window keeps least of what the measure found, and draws them in a sheet. It lists with ! what breaks the rules above. Fix every ! and run it again.

The film's shape is its viewport (<meta name="viewport" content="width=1080, height=1920">). npx openfilm look shows the cut film.

With the person

What they ask for comes first: the shape (9:16 when they say vertical), the shots that must be in it, anything that must stay in frame (a product, a logo, a second speaker). Ask without holding up the work. When done, say per shot: held, every ! line, each window you moved and why, and what the crop left out.

Related Skills