JR

juneyaooo/rea-video

Developer tools
13.1K stars Quality 74 Trend 90Apache-2.0

Reverse-engineer any video, shot by shot: filmed, AI-generated or coded, and how to remake it. Breakdowns in the open VIDEO.md format. 逆向一切视频,逐个镜头看是拍的、AI 生成的还是代码做的,再告诉你怎么复刻;拆解结果按 VIDEO.md 格式输出。

Overview

Shot by shot: was it filmed, AI-generated or coded, and how to remake it. Every breakdown is written in , an open format that agents read layer by layer. ⭐ Help more people find rea-video. Star this repo! Left: a TikTok ad shot on a phone. Right: an AI remake with another product. rea-video's verdict: the left is all live footage, one set and two camera positions; the right is all AI, 8 shots across 3 generations. rea-video is built for AI agents. In Claude Code, Codex or any agent that can run commands, say: The agent installs the CLI, learns the workflow and runs the whole thing. You need ffmpeg and Python 3.10+. Breakdowns are fully upgraded. Each one gives you two outputs: - (report.html / PDF), for you: more reader-friendly, with a clearer structure, easier to learn from and to understand how the video was made and how to remake it. - , for your AI: layered, so the AI reads only what a question needs and uses fewer tokens.

README

Quick start

rea-video is built for AI agents. In Claude Code, Codex or any agent that can run commands, say:

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

The agent installs the CLI, learns the workflow and runs the whole thing. You need ffmpeg and Python 3.10+.

You can also install rea-video as an agent plugin, which adds its skill to your agent:

# Codex
codex plugin marketplace add JuneYaooo/rea-video
codex plugin add rea-video@rea-video

# Claude Code
claude plugin marketplace add JuneYaooo/rea-video
claude plugin install rea-video@rea-video

.agents/plugins/marketplace.json is the agent-agnostic marketplace entry. The agent still installs the CLI the first time it runs a breakdown.

Breakdowns are fully upgraded. Each one gives you two outputs:

  • Report (report.html / PDF), for you: more reader-friendly, with a clearer structure, easier to learn from and to understand how the video was made and how to remake it.
  • VIDEO.md, for your AI: layered, so the AI reads only what a question needs and uses fewer tokens.

You can also hook up a video-capable model (Gemini or Doubao both work) by giving the agent its endpoint and key. That makes the live/AI/3D calls more accurate and adds a reverse-engineered prompt for every shot. It works fine without one; if your agent can see images, it checks the uncertain shots itself.

Reports are written in whichever language you ask in (Chinese or English). The example reports below are in English.

Updates

  • 2026-11-21: Clearer report layout. Remake plans default to the official MiniMax H3 and follow the model you name.
  • 2026-11-19: Magic videos: finds the reveal of each trick, frame by frame with a slow-motion clip. Highlights (twists, climaxes, goofs) when you ask for them.
  • 2026-11-17: Better timing of cuts and moves.
  • 2026-11-15: Remake plans are made for the model you choose. The report is split into a breakdown part and a remake part.
  • 2026-11-11: VIDEO.md breakdown package, rewritten report, sound effects separated on their own track.

What it can break down

Video type Examples What you get
Live footage Talking-head, tabletop, handheld product demo, vlog, store visit Setups and camera positions, framing, camera moves, lighting (12 setups with gear lists), color grade
AI video Text/image-to-video, AI short drama, AI music video Evidence, a reverse-engineered prompt per shot, how to batch into generations and which model to use
Avatar A portrait driven by audio, lip-sync Which shots are avatar shots, what portrait and audio you need
3D / animation Blender / C4D explainers, product animation, 2D animation, stop-motion Whether to generate with a video model or render from 3D code
Code / template Kinetic type, UI demos, charts, slide-style cards Text, layout and motion timing, ready to rebuild as a Remotion project
Screen recording Software tutorials, web demos Which parts are real material you’ll need to record yourself
Mixed / edits AI characters + code UI + real screen capture; live footage with AI edits Each shot judged separately, then reassembled on the original timeline

Besides how the visuals were made, every breakdown also covers:

  • Captions and styled text: start and end of each line (exports to SRT / ASS), plus color, outline and how the text comes in
  • Stickers, emoji, picture-in-picture: where they sit and how long they stay
  • Editing: where the cuts are, how fast, whether they hit the beat
  • Audio: human or AI voice, AI or library music and its BPM, where each sound effect lands
  • Material you’ll need to supply yourself: screen recordings, screenshots, product photos

For magic videos it also finds the reveal of each trick: when and how the object changes, laid out frame by frame and zoomed in, plus a slow-motion clip. Ask for highlights and it pulls out twists, climaxes and goofs too.

Examples

The sample videos in docs/cases/videos/ are re-compressed to keep the repo small, which strips the TikTok / Douyin platform tags. So if you run them yourself, you’ll get different results from the reports below, especially without a vision model. To reproduce them, use the original downloads from the platform.

Remakes

After rea-video breaks a video down, the remake recipe in capsule-cinema generates a new version that keeps the original’s camera, motion, pacing and transitions and swaps only the elements you pick. These were made with a self-hosted MiniMax H3, using the original shot as the motion reference and keyframes with the swapped elements (gpt-image-2) for the look. Remake plans use the official MiniMax H3 specs by default. Name another model, or set the one you usually use, and the plan follows that model instead. Below are three remakes OiiOii showed in its WeChat articles. We made two versions of each: one with the same swap as OiiOii, and one that also swaps the subject, setting and props. Each GIF plays four versions in sync: the original, OiiOii’s remake, our remake and the element-swap version.

The HD comparison videos use the original audio. The originals and OiiOii versions come from the articles and are shown for comparison only.

You can also do the remake in ChatCut, a hosted AI video editor: there is no model to set up, and the generated shots land on a timeline you can keep editing. Sponsor

Sponsors

rea-video is free and open source. Sponsors help keep it maintained.

Sponsored · Become a sponsor

Accuracy

Accuracy of the how-it-was-made call, weighted by shot duration:

Tuning set (15) Holdout (16) Re-encoded WeChat videos (10)
Tools only (offline, free) 98.3% 99.6% / 98.9% 88.6%
+ vision model (Gemini) — 99.6% / 99.8% 99.6%
+ agent visual review — 99.6% / 99.8% 100%

The Holdout column shows two numbers: holdout (9 videos) and holdout2 (7 videos).

On original files, the tools alone are usually enough. Videos downloaded from platforms have been recompressed, which wipes out the noise evidence, so you need a visual check to get back above 99%.

Real-asset detection is 97–99%; on nine hand-labelled clips, shot boundaries reach 95% recall and 94% precision. Numbers and how to reproduce them: eval/RESULTS.md.

How it works

  1. Split: cut the video into shots and split the audio into voice, music and effects.
  2. Gather evidence: measure (frame cadence, sensor noise, whether the whole image moves as one flat plane, AIGC tags in the metadata), look (hands, text, physics) and listen (BPM, key, singing vs speech).
  3. Decide: hard evidence like AIGC tags and frame cadence beats “looks like”. Conflicts get flagged for the agent to check visually.
  4. Plan the remake: batch shots according to what the target video model can actually do, such as max clip length, multi-shot support and how many reference images it takes.

Star History

FAQ

Docs

Run rea-video prefs lang en for English reports, CLI help and messages. The capability tables, eval results and agent skill are in Chinese.

Community

Questions, breakdowns and remake ideas: GitHub Discussions. Chat with us on Discord. Chinese speakers can also find us on linux.do.

Want a video broken down? Open a request issue with the link and we’ll publish the result as a case.

Credits

Inspired by REA (Reverse Engineer Anything): work back from what you see to how it was made, back every claim with evidence, and verify by measuring.

Sound separation uses UVR MDX-Net for voice and music, and BandIt v2 (Watcharasupat, Wu and Orife; weights CC BY-SA 4.0) for sound effects. Both models are downloaded on first use and are not part of this repo.

View the full README on GitHub

Recommended Tools

Try a different keyword or remove a filter.

Install

npx skillfish add juneyaooo/rea-video
New to MCP? Start with the mcpskill.org guide →