Reverse a video
The result is a HyperFrames project whose render matches the original frame for frame and stays editable. Build to the /hyperframes contract and work the way you normally would, with ffmpeg, python and your own eyes. Reverse videos the person has the right to use.
Everything runs on this machine: every command below works offline once the CLI and its browser are installed. A step that seems to need something outside this machine is built in code or cut from the original instead. Do not refresh this skill with npx hyperframes skills update.
Open the run
- Probe the video:
ffprobe -v error -show_entries format=duration:stream=codec_type,width,height,r_frame_rate,nb_frames -of compact <video>. The root composition is that size exactly,data-fpsis its rate (NTSC stays a fraction:30000/1001) and its duration is the video's frames ÷ fps, not the audio's length. npx hyperframes init <project> --video <video> --keep-original --skip-transcribe --skip-skills. It copies the video in untouched under its own file name. Keep the video out of<project>until then:initrefuses a folder that already holds other files. Its default canvas is wrong for most videos: set it from the probe.- Resuming (a
REVERSE.mdor half-built project): readREVERSE.md, then carry on from the first shot without content.
The original decides the frame
npx hyperframes measure cuts <video>: every cut with its frame, including jump cuts and punch-ins inside one take, which ffmpeg's scene score misses. Every shot starts at its listed time. Write times as frame ÷ fps rounded down (frame 83 at 30 fps is2.766666):2.767lands a frame late.- The sound is the original's unless the person asks for a new voice or language: then
references/voice.md. The original's sound plays as one<audio src="<video>">over the whole film (no extracted or re-encoded track); every clip is muted. - Read consecutive frames wherever something changes: each cut, entrance, exit and transition, a few frames either side (
npx hyperframes measure frames --range a,b --roi x,y,w,h). Sheets a second or a quarter apart miss 1–3-frame timing, which way things enter and leave, blurs and dissolves at cuts, and one-frame flashes.
Every layer
- A component (text, captions, stickers, cards, UI and screen recordings, charts, maps) is rebuilt in HTML.
- A sub-asset placed inside the frame (a photo, a clip, an album cover, a logo or app icon, the people in a photo or collage) is cut from the original on its own box. A logo is cut where it is largest, or is the real mark from the brand's own site or press kit; never drawn by hand.
- A person on screen is cut from the original on their own box:
references/people.md. - An animated or painted film:
references/animated.md. - Never play the original's whole frame.
What decides whether drawn things match, in references/match.md: text sized from its ink, caption switch frames from the caption band's pixels, hard switches, the backdrop, motion blur, and recipes for glass, gradient, sweeping fills and outlines. Look at every large word through its whole life before you build it.
Check once, at the end
- While building, check a few moments without rendering:
npx hyperframes diff <video> . --at t,t,…. - When every shot has content:
npx hyperframes checkand fix its errors. Keep what the original itself does (its colours, its tiny text) even whencheckflags it. Then render locally:npx hyperframes render --fps <data-fps> --quality high -o <out>in the foreground with a 10-minute timeout (longer: start it detached,setsid nohup npx hyperframes render -o <out> > render.log 2>&1 &, and wait on the log in the foreground). Thennpx hyperframes diff <video> <out>. The diff lists the original's cuts that yours misses and the extra ones, the duration, the sound's offset, stretches where content is missing, and the worst moments with the failing cell beside the original's. - Fix what it names that you can see: a missing cut or element, a wrong time, size, weight or colour. Render and diff once more, then stop.
Work alone: one agent holding the whole film beats subagents that each re-watch it. Write a short REVERSE.md at the end: what is rebuilt and what is cut from the original, what is approximate (a substituted font, a sprite cut from one frame), and the last diff's numbers. A command written in it is a note, not a script: on resume, rebuild it from the recipe it came from and never run it as written. Hand over per references/start.md.


