HaojingChen/ClipAnyVideo
About
Clip any video with agents. Your coding agent recasts every shot while motion, camera and scene stay as filmed.
Developer ToolsMeasured star growth
- in 24h
- Collecting history
- in 7 days
- Collecting history
- in 15 days
- Collecting history
- in 1 month
- Collecting history
Net star changes over overlapping periods, not daily totals. Missing measurements are left blank. Stars measure attention, not software quality.
README.md
OriginalEnglish · 简体中文
ClipAnyVideo
Clip any video with agents.
Hand your coding agent a video and a character. It recasts every shot, while the motion, camera and scene stay exactly as filmed.
Showcase · How it works · Why agents · Roadmap · FAQ
Left: original · Right: recast by the agent · Drag-to-compare player with sound →
ClipAnyVideo is a procedure a coding agent follows from start to finish: cut the video into shots, draw character sheets, paint reference frames, generate each shot with a video model, review its own results and redo what fails. You approve a plan and a budget once; the agent does the rest and hands back a finished clip on the original timeline, with the original sound.
[!NOTE] This repository is just opening up. It currently holds the project page and demos. The workflow spec and agent skill will be published here next. Watch the repo to get notified.
🎬 Showcase
Every result below came from the same written procedure. GIFs are trimmed and compressed; the project page has full-length, full-quality clips with a drag-to-compare slider and sound.
🧩 How it works
One shot from Fated Duel, with the files the agent actually produced:
| 1 · Source shot | 2 · Character sheets | 3 · Reference frames | 4 · Depth | 5 · Result | |||
|---|---|---|---|---|---|---|---|
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
flowchart LR
V[🎞️ Video] --> S[✂️ Cut into shots]
C[🧑🎨 Character picture] --> K[Head sheet + four-view turnaround]
S --> R[🖼️ 3 reference frames per shot]
K --> R
R --> Q1{Self-review}
Q1 -- fail --> R
Q1 -- pass --> OK([👤 One confirmation: plan + cost])
OK --> G[🎬 Generate each shot]
S --> D[Depth video] --> G
G --> Q2{Self-review}
Q2 -- fail --> X[Re-cut the segment & redo] --> G
Q2 -- pass --> A[🎧 Assemble on the original timeline + sound]
Each input gets exactly one job in the generation prompt:
| Input | Used for | Never used for |
|---|---|---|
| Original clip | motion, blocking, camera, framing, background | the character's look |
| Depth video | who is in front of whom | silhouette, body shape |
| Head sheet + turnaround | face, hair, outfit, body, art style | — |
| Reference frames | composition and pose at their timestamps | overriding the sheets |
🤖 Why an agent
🧾 One confirmation. Before spending anything, the agent shows the shot list, character sheets, reference frames and a cost estimate. After that it only stops for real blockers.
🔍 Self-review, written down. Full-size face crops, motion timelines, residue and head-count checks are recorded per shot, not judged from thumbnails.
♻️ Targeted redo. When a segment fails, only that segment is re-cut, re-referenced and regenerated, out of a reserved budget. Every version is kept.
🔌 Bring your provider. Wan 3.0 through Alibaba Cloud DashScope or any OpenAI-compatible /v1/videos relay. Jobs are recorded and resumed, never blindly resubmitted.
🧠 Works with your agent. Built and tested with Codex. The procedure is plain Markdown, so Claude Code or any agent that can run shell commands can follow it.
🎧 Keeps the film. Original cuts, timing and sound are kept. Only the people change.
🗺️ Roadmap
- End-to-end procedure: shots → sheets → reference frames → generation → self-review → redo
- Wan 3.0 via DashScope and OpenAI-compatible relays
- Project page with drag-to-compare demos
- Publish the workflow spec
- Publish the agent skill (Codex / Claude Code)
- More video models and providers
❓ FAQ
Do I need a GPU?
Generation runs on a hosted video model, so no. A local GPU only speeds up the depth pass.
How much does a clip cost?
It depends on the provider and the number of shots. The agent prices the whole plan, including a reserve for redos, and asks you before it spends anything.
Does it keep the original audio?
Yes. Shots are placed back on the original timeline and the original sound track is muxed in unchanged.
Can it recast real people?
Use characters you own or have permission to use, and don't use it to impersonate real people or mislead viewers. See the disclaimer below.
⚖️ Disclaimer
The original clips in the demos are shown for research and demonstration only; all rights remain with their owners. If you own one and want it removed, open an issue and it will be taken down.
📄 License
MIT © 2026 HaojingChen
Explore related projects
Loading…











