rea-video: break down any video, shot by shot
The short version
rea-video (github.com/JuneYaooo/rea-video, Apache-2.0, free) is a tool your coding agent runs. You give it a video file. It splits the video into shots, checks each shot's file for evidence of how it was made (filmed, AI video or code-built), and writes a report with a remake plan. It runs in Claude Code, Codex or any agent that can run commands.
It trusts the file over the looks. Three fingerprints it measures:
| If the shot is | The evidence in the file | Why it works |
|---|---|---|
| Code or a template | The background pixels stay identical frame to frame; only parts move | Nothing is filmed, so nothing shifts |
| AI video | Most models output 24 frames a second; at 30 fps about one frame in five is a copy | The video was stretched from 24 to 30 |
| Filmed | Sensor noise and shake from a real camera | Real sensors are never perfectly clean |
The 19-second clip from the reel is the README's own mixed-media example: 10 shots, AI characters talking, code-built screens and 8 seconds of real screen recording. Its report calls it 59% code and 41% AI video (by shots; the screen recording sits inside the code shots).
Copy these prompts
1. Install it and break down a video
Install https://github.com/JuneYaooo/rea-video, then break down this video: ./clip.mp4
2. Break it down, then plan the remake
Use rea-video on ./clip.mp4. For every shot tell me whether it was filmed, AI-generated or built with code, and the evidence you measured. Then write the remake plan: what I can film myself, what a video model can generate, and what I can build in code.
3. Check the uncertain shots (when the file was recompressed)
This video was downloaded from an app, so the noise evidence is gone. For every shot rea-video marked low confidence, look at the frames yourself, say what you see (hands, text, lighting, motion), and give your final call per shot with a one-line reason.
What you need
- ffmpeg and Python 3.10 or newer (the README's requirements).
- Claude Code, Codex or another agent that can run commands.
- Optional: a video-capable model (Gemini or Doubao both work). Give your agent its endpoint and key. It makes the filmed / AI / 3D calls more accurate and adds a reverse-engineered prompt per shot. It works without one; if your agent can see images, it checks the uncertain shots itself.
What you get
- Report (
report.html/ PDF), for you: structure, how it was made, how to remake it. - VIDEO.md, for your agent: the same breakdown in layers, so it reads only what a question needs.
- Beyond how it was made: captions with timings (SRT / ASS export), cuts and pacing, audio (voice, music, sound effects), and the material you would have to supply yourself.
The one catch: recompression
Apps recompress uploads, and that wipes the sensor noise, the strongest sign of real footage. On the README's live-action unboxing clip, the offline tools alone said 35% AI after the platform's re-encode; after the agent looked at the shots, the verdict was 97% live-action.
- Use the original file whenever you can.
- If you only have a downloaded copy, run prompt 3 so your agent checks the uncertain shots by eye.
- The checks that survive recompression: frame cadence (24 to 30 fps copies) and the frozen background of code shots.
If you are building
- The detection rules are in the repo's
docs/decompose.md(each rule lists how reliable it is). Frame cadence and "does the whole image move as one flat plane" are cheap to reproduce with ffmpeg. - Output is VIDEO.md, an open format (github.com/videomd/videomd), so your own agent or tool can read a breakdown layer by layer.
- The remake recipe lives in a separate repo, capsule-cinema, and uses the report as its input.
Run this on your codebase
Read https://github.com/JuneYaooo/rea-video/blob/main/docs/decompose.md. Then look at how my project processes video or images today. Where could a cheap check (frame cadence, background change, noise) tell me how a file was made, and what would I do with that answer?
Use it fairly
The README is clear: this is for learning a video's structure, pacing and techniques, then remaking it with material you have the rights to. Do not reuse other people's footage, music, characters or likeness. Follow platform rules when you publish.
Source: README, docs/decompose.md, eval/RESULTS.md and the dual_role and unboxing cases in the repo, read 2026-11-19.