~/codigoagente
AI agents

rea-video: reverse-engineer how any video was made (filmed, AI or code) with Claude Code

You see a TikTok ad that works and wonder: was it shot on a phone, generated with AI or animated in code? How many cameras? Is the voice real or synthetic? rea-video is an open source tool built so an agent like Claude Code or Codex can reverse-engineer how a video was made, shot by shot, and hand you a report with the recipe to remake it with your own material.

It does not generate video: it takes it apart. It splits the video into shots, separates voice, music and effects, measures technical evidence (frame cadence, sensor noise, AI metadata), reads the captions and decides which technique is behind every shot. We installed it in a Claude Code cloud environment (version 0.1.0, commit 7515969, November 14, 2026) and tested it on one of our own Shorts, where we know exactly how it was made.

The HTML report rea-video produced for our 27 s Short, after the agent's visual review · codigoagente

What rea-video is

  • Repository: github.com/JuneYaooo/rea-video
  • License: Apache-2.0, not MIT. Just as permissive for free and commercial use; if you redistribute a modified version, keep the license notice and the NOTICE file.
  • What it installs: a Python CLI (rea-video) and an agent skill (skills/rea-video/SKILL.md) linked into ~/.claude/skills, ~/.codex/skills or ~/.agents/skills.
  • Requirements: Python 3.10+ and ffmpeg.
  • Language: the README is translated into many languages, but the technical docs (docs/) and the skill are in Chinese, and reports come out in Chinese or English (--lang en).

Every breakdown produces two outputs: a report (report.html, exportable to PDF) for you, and a VIDEO.md, an open layered format so the AI reads only what a question needs: a card of a few hundred tokens, an overview, one line per shot and one file per shot.

What it detects in each shot

Video typeWhat it tells you
Live footageCamera setups, framing, moves, lighting (12 setups with gear lists), color grade
AI videoEvidence, a reverse-engineered prompt per shot and which model to use
AvatarWhich shots are a portrait driven by audio and what material you need
3D or animationWhether to generate it with a video model or render it from 3D code
Code or templateText, layout and motion timing, ready to rebuild in Remotion
Screen recordingWhich parts are real material you will need to record yourself

Beyond the picture it covers captions (start and end of each line, exported to styled SRT and ASS), stickers and animated text, editing (where it cuts, how fast, whether it hits the beat) and sound: human or synthetic voice, AI or library music with its BPM, and where each effect lands.

Real test: we fed it a Short we made ourselves

To know whether it gets things right you need a video whose origin you know. We used our 27 s Short about the grill-me skill, made 100% in code with the animate skill: canvas drawing, one real terminal screenshot, a local synthetic voice and a score composed in code.

terminalsh
python3 -m venv .venv && .venv/bin/pip install "./rea-video[ocr]"
.venv/bin/rea-video decompose grill.mp4 -o out/grill --lang en

It took 151 s on a 4-core container with no GPU, including the first download of about 216 MB of audio separation models. This was its first verdict, tools only, with no AI looking at the picture:

Top, tools only: it mistakes canvas drawing for 3D and AI video. Bottom, after Claude's visual review: all four shots are code · codigoagente
Mixed production: AI-generated video 43% + 3D render 31% + code render 26%. Confidence: 0.485.

It is wrong, and it says so: the output itself warns that without a vision model confidence is limited, and suggests the next step. That step is what matters for Claude Code users. If your agent can see images, it acts as the vision model at no extra cost:

terminalsh
rea-video review out/grill
# the agent looks at each shot's sheet and fills in review_answers.json
rea-video apply-review out/grill --by claude-code --lang en

After the review (Claude looked at the storyboard and the sheets for the 4 shots and filled in the answers), the verdict became code or template 100%, at 86% confidence, and it correctly found:

  • the real terminal screenshot (flagged as material you would have to supply),
  • 12 caption lines with keywords highlighted in yellow, plus a subtitles.srt,
  • a synthetic (TTS) voice-over and 2 sound effects,
  • a pace of 6.7 cuts per minute, with no camera footage.

It missed one detail: it called the music "leaning stock library music" (145.6 BPM, F major) when animate's code composed it. The report marks it "to confirm", which is the honest answer.

How to install it

The recommended way is to let the agent do it. In Claude Code or Codex:

snippettext
Install https://github.com/JuneYaooo/rea-video, then break down this video: /path/to/ad.mp4

By hand:

terminalsh
git clone https://github.com/JuneYaooo/rea-video && cd rea-video
bash scripts/install_skill.sh
rea-video --help

install_skill.sh looks for a Python between 3.10 and 3.14, installs the CLI (with pip, pipx or a .venv when your system blocks global installs), fixes a known clash between opencv-python and opencv-python-headless, and links the skill into the agent folders you have. On Windows, run it from Git Bash or WSL, or install by hand with pip install -e ".[ocr]".

It also works as a Claude Code plugin, but you still need the CLI:

snippettext
/plugin marketplace add JuneYaooo/rea-video
/plugin install rea-video@rea-video

Useful commands besides decompose:

CommandWhat for
`rea-video probe video.mp4`Metadata only: camera, AI markers, C2PA, editor signature
`rea-video stems video.mp4 -o out`Separates voice, music and effects into WAVs
`rea-video summary out/breakdown.json`Short summary and low-confidence shots
`rea-video pdf out`Prints the report to PDF with your Chrome or Edge
`rea-video correct out --shots 3 --label ...`Fixes a shot; remembered next time

What it costs

PartPriceRequired?
rea-video0 USD (Apache-2.0)Yes
Python, ffmpeg and audio models (UVR MDX-Net, BandIt v2)0 USD, run on your CPUYes
Visual review with Claude Code or Codexincluded in your plan (Claude Pro from 20 USD/month)Recommended
Vision model via API (Gemini, GPT-4o or any OpenAI-compatible one)whatever the provider charges per imageNo
Remaking AI shots with capsule-cinemawhatever each video model charges; a free dry run comes firstNo
ChatCut (hosted AI video editor, the repo's sponsor)per its planNo

The cheapest setup: offline breakdown + visual review by your own agent = 0 USD extra. On original files (not downloaded from social networks) the authors measure 98-99% accuracy with the tools alone; on videos recompressed by platforms it drops to 88.6% and you need the visual review to get back above 99%. Our case, a hand-drawn canvas video, is exactly the kind that confuses the tools most.

What the README does not tell you

  • Reports are Chinese or English only. Ask for English (--lang en), or keep Chinese and have the agent summarize it.
  • The first run downloads models. About 67 MB for voice and music and 149 MB for effects, into ~/.cache/rea-video/models. BandIt v2 weights are CC BY-SA 4.0.
  • Some downloads can fail on locked-down networks. In our container the face detection model returned a 403; rea-video carried on without it and the result was unaffected.
  • Speech transcription is an extra. Local transcription of what is said (rea-video[asr], SenseVoice) is optional and covers Chinese, English, Japanese, Korean and Cantonese, with a separate model for Bengali; Spanish is not covered.
  • It is not for reposting other people's videos. The README says so itself: use it to learn structure and technique, then remake with material you have the rights to.

Frequently asked questions

Can it tell whether a video was made with AI? Yes, that is its strength: it looks for AI markers in the metadata, the frame cadence typical of video models (24 fps), missing sensor noise and visual glitches like warped hands or garbled text. For videos downloaded from social networks, add the visual review.

Do I need a paid API? No. Tools-only mode is offline and free, and Claude Code can do the visual review. A vision model API is optional.

Does it remake the video by itself? Partly. Code shots are rebuilt as a project (code-remake), AI shots can be regenerated with capsule-cinema if you install it and pay for the models, and filmed shots come as a shooting plan for you to shoot.

How is it different from reverse-engineer-marketing? reverse-engineer-marketing analyzes a competitor's website and messaging. rea-video analyzes their videos. Together they give you the strategy and the production.

Conclusion

rea-video is the most complete free way we have tested to find out how a video was made: filmed, AI or code, which voice and music it uses and how to remake it. Its weak spot is that without eyes it gets unusual styles wrong; with Claude Code doing the visual review, our result went from 48% to 86% confidence and got every shot's technique right. Use it to study the ads that work in your niche, then produce your own version with animate or the tools in the guide how to make AI videos with Claude Code or Codex.

// source code

Repository in this article
The code this article covers is public: browse it, star it or clone it from here.

Help us grow

codigoagente is free, with no paywalls. If this article helped you, any of these keeps the blog going.

// newsletter

One email a week with the repos worth your time

The week's new articles, tested against real code. No spam; unsubscribe in one click.

AI agents

guide · The complete ECC guide for Claude Code · #8

AgentShield, ECC's scanner, checks CLAUDE.md, settings.json, MCP, hooks and agents. We ran it on a deliberately vulnerable setup and on ECC's own install.
  • Security and code review
  • Claude Code
read article
AI agents

guide · The complete ECC guide for Claude Code · #7

We measured ECC's context footprint with /ecc:context-budget --audit (about 12,500 tokens on the minimal profile) and how to trim it: model, compaction and MCP.
  • Claude Code
  • Skills for your agents
read article
AI agents

guide · The complete ECC guide for Claude Code · #6

What ECC's 28 hooks do, how GateGuard stops the first edit, how to save and resume sessions and how continuous learning instincts work, with a real test.
  • Claude Code
  • Skills for your agents
read article