Sandbox
@MartinDelophy/ai-video-editor

Video timeline skill for Claude Code and Codex

This repository packages a Timeline Studio skill that lets agents inspect, plan, validate, and apply edits to portable video projects. It works with the versioned command runner, browser compatibility path, and WebMCP integration so the project timeline stays the source of truth.

802 stars101 forksJavaScriptUpdated 7d ago
timeline studio show time
Delophy Martin63 views • 1 month ago
Who it's for

Builders who want their coding agent to reason about and edit a real video timeline instead of returning a flat render.

What it delivers

You can have an agent inspect a project, propose reversible edits, and apply them to the same `.timeline` file with validation.

What it does

Versioned timeline commands

`project.inspect`, `track.inspect`, `clip.inspect`, `project.diff`, `project.run`, and `project.render` operate on portable `.timeline` projects.

Agent skill packaging

The skill is packaged for Skills.sh and GitHub CLI install, with support for Claude Code, Codex, Copilot, and Gemini CLI.

Browser WebMCP integration

`docs/webmcp.md` describes structured reads and reviewed visual edits against the project already open in a compatible browser.

Transactional plan execution

The command runner validates JSON plans, supports dry runs and idempotent operation IDs, and writes updated `.timeline` archives without rewriting media.

Render and verification path

The runner can render the documented Visuals + Voiceover + Music subset to a verified H.264/AAC MP4.

How to get it

  1. 1Requirements: Node.js 20+ and a modern Chromium browser. WebGPU is recommended for the…
    git clone https://github.com/MartinDelophy/ai-video-editor.git
    cd ai-video-editor
    npm install
    npm run dev

README

Timeline Studio — Browser AI Video Editor

English | 中文 | 日本語 | 한국어 | Español | Français | Deutsch | Português | ไทย | Tiếng Việt | Русский

Live Demo MIT License skills.sh PRs Welcome LINUX DO Timeline Studio - Listed on Tool Index

Responsible use of deep synthesis

This tool uses deep-synthesis technology and is intended solely for technical research and learning.

Users must ensure that they:

  • use only facial images or videos of themselves or people who have provided lawful authorization;
  • do not create or distribute any illegal, infringing, false, or misleading content;
  • do not present generated content as authentic footage or impersonate another person without their consent.

Users are solely responsible for any legal liability arising from violations of these requirements.

Project updates

  • September 10, 2026 — WebMCP for the live editor: supported browsers can expose the open project to agents for structured inspection, preview seeking, and reviewed visual reorder/trim plans. The browser adapter reuses the shared command engine, checks for concurrent edits before applying, and preserves editor undo. Agent discovery and integration documentation are included; the root URL still opens directly into the editor.
  • September 8, 2026 — Smoother playhead dragging: pointer updates are combined once per display frame, in-flight video seeks complete before advancing to the latest requested time, and timeline sampling is cached. Thumbnail refinement pauses throughout dragging; releasing the pointer resolves the exact final position with the same controls.
  • September 8, 2026 — Timeline markers for Agents: Agents can read, add, update, and delete timeline markers through the Skill, CLI, and MCP to plan chapters and musical beats or record revision notes, with project inspection and semantic diff previews before applying changes.
  • September 7, 2026 — Timeline markers: add markers, chapters, ranges, and notes to organize long edits, mark musical beats, and record revision feedback. Edit titles, notes, times, and colors, search and jump between markers, and use M to mark the playhead. Markers stay at project time, are saved in portable .timeline projects, and support undo/redo in all 13 interface languages.
  • September 3, 2026 — Italian and Indonesian interfaces: Timeline Studio now offers 13 interface languages. Italian and Indonesian include complete editor and runtime-message dictionaries, reviewed terminology for captions, timeline tools, Smart Frame, AI Music, vector design and generation plugins, matching fonts, and Whisper subtitle recognition.

See the public Roadmap for planned work, Releases for shipped changes, and Issues for focused tasks and bugs.

What can it produce?

Explore reproducible before/after examples and editing recipes:

AI Video Editing Skills Handbook

MartinDelophy%2Fai-video-editor | Trendshift MartinDelophy%2Fai-video-editor | Trendshift

Timeline Studio is a local-first AI video editor that runs in the browser. It combines a CapCut-style multi-track timeline with WebGPU AI music and repair, multilingual voiceovers, automatic captions, talking-avatar generation, and deterministic offline export.

Open the editor · Watch on YouTube · Hugging Face Space

Video demo

Auto Edit

Visual analysis, keyframes, captions, and export.

https://github.com/user-attachments/assets/e8327caa-429e-40ff-a7fe-a59e6cf7a464

AI Repair

Timed watermark removal with before/after review.

https://github.com/user-attachments/assets/aea9f5b4-c720-4b0c-9067-5ec124eef982

AI Voiceover

https://github.com/user-attachments/assets/304a744e-d620-4380-9c17-19af3726f5a4

Timeline Studio editor

AI capabilities

  • Multilingual voiceover: Chinese and mixed Chinese/English Hojo TTS Light 80M FP16 reference voices (晴岚 and 若溪), with autoregressive generation on WebGPU and stable waveform decoding on WASM; English Kokoro 82M; and browser Piper voices for German, Spanish, French, Italian, and Brazilian Portuguese.
  • Local AI music: Stable Audio 3 Small Q4 ONNX runs through WebGPU with translated free-form prompts, 30/60/90/120-second choices, waveform-aware long-track looping, persistent model caching, and automatic insertion into My Assets.
  • Automatic captions: Whisper small q8 ONNX with waveform-aware timing and conservative Chinese recognition cleanup.
  • Smart framing: YOLOS tiny subject detection and MODNet portrait matting for smart crop, caption avoidance, and background removal across images and complete videos.
  • AI Repair: browser-local MI-GAN watermark/object removal with multiple timed repair regions, plus NanoVSR 644K WebGPU 4× restoration for images and videos with synchronized before/after comparison.
  • AI vocal separation: isolate vocals and place the instrumental stem on the music track without leaving the browser workflow.
  • Digital human: JoyVASA audio-to-motion and LivePortrait neural rendering with WebGPU, 256px preview and 512px quality paths.
  • Local-first inference: large models are lazy-loaded, revision-pinned, and cached by the service worker; supported workflows run without uploading project media to an editing backend.

Resilient model delivery

Browser AI models are mirrored on both Hugging Face and ModelScope. Timeline Studio uses ModelScope first for Chinese interfaces and domestic sessions, uses Hugging Face first elsewhere, remembers the first working source for the current runtime, and automatically falls back to the other source when needed. Cache identities are shared across both providers, so switching routes does not download the same revision twice.

Editing and export

  • Contiguous main Visuals track plus timed picture-in-picture overlays.
  • Direct canvas selection, movement, proportional resize, rotation, masks, filters, effects, animation, speed, and explicit keyframes, plus desktop four-way color grading with fully keyframeable temperature, tint, saturation, hue, wheel saturation, and luminance controls.
  • Captions, stickers, voiceover, separated source audio, and music on independent timed tracks.
  • CapCut-style snapping, alignment guides, clip menus, split/duplicate/delete, timeline zoom, undo/redo, and portable .timeline projects.
  • Native media playback for a responsive preview; export uses a separate deterministic offline rendering path.
  • WebCodecs MP4/WebM composition with shared preview/export geometry, audio mixing, captions, overlays, effects, and MediaRecorder fallback.
  • Installable PWA with a cached app shell and multilingual UI.

Agent Skill

The repository includes the AI Video Editing Skill for Codex, Claude Code, Copilot and Gemini CLI, backed by edit-timeline-studio for planning, executing, and verifying editable video timelines.

It helps an agent:

  • inspect media and preserve the user's editing brief;
  • describe reversible edits with stable clip IDs and explicit timestamps;
  • operate the hosted or local editor through the browser compatibility path;
  • validate declarative edit plans with skills/edit-timeline-studio/scripts/validate_edit_plan.mjs;
  • verify track placement, transitions, captions, overlays, audible audio, and final export artifacts;
  • keep the editable .timeline project as the source of truth instead of returning only an opaque render.

The versioned headless command runner loads and inspects portable projects, validates revisioned JSON plans, applies supported operations transactionally, supports dry runs and idempotent operation IDs, and writes a new .timeline archive without rewriting its media files. It also renders the documented portable Visuals + Voiceover + Music subset to a verified H.264/AAC MP4. Browser control remains the compatibility path for richer compositions and operations that are not in the command registry yet. The browser WebMCP integration adds structured reads and reviewed basic visual edits to the project already open in a compatible browser, with conflict checks and editor undo.

npm run agent -- project.inspect /absolute/path/project.timeline
npm run agent -- track.inspect /absolute/path/project.timeline visuals
npm run agent -- clip.inspect /absolute/path/project.timeline visual-123
npm run agent -- transcript.inspect /absolute/path/project.timeline voice-123
npm run agent -- project.diff /absolute/path/edit-plan.json
npm run agent -- project.run /absolute/path/edit-plan.json
npm run agent -- project.render /absolute/path/render-request.json

The legacy inspect and run aliases remain available. The write registry supports ffprobe-backed, hashed visual/audio import to Visuals, Music, or the portable Voiceover slot, plus transactional timed edits, captions, source-accurate Visuals/Overlays, transitions, validated properties, track state, and ratio changes. Read commands return project, track, clip, transcript, media-inventory, and field-level predicted diffs. See the command contract for the plan envelope.

Install through the public skills.sh directory (the current CLI requires Node.js 22.20.0 or later):

npx skills add MartinDelophy/ai-video-editor --skill edit-timeline-studio

Or install it with GitHub CLI 2.90.0 or later:

# Claude Code
gh skill install MartinDelophy/ai-video-editor edit-timeline-studio --agent claude-code --scope user

# Codex
gh skill install MartinDelophy/ai-video-editor edit-timeline-studio --agent codex --scope user

To install the tested release instead of following the latest release, add --pin v1.0.8. Preview the Skill before installing with:

gh skill preview MartinDelophy/ai-video-editor edit-timeline-studio

Roadmap

  • Now: expand the versioned command registry, harden deterministic offline export, and improve timeline editing reliability.
  • Next: expand headless render parity and the reviewed browser WebMCP command subset.
  • Later: add collaborative review workflows, a plugin extension surface, and more locally verified AI models.

Roadmap priorities are shaped in GitHub Discussions. Feature requests and real-world workflow feedback are welcome.

Help wanted

Timeline Studio is looking for contributors interested in browser media, WebCodecs, WebGPU/ONNX, timeline UX, localization, testing, and documentation.

  • Try the live editor and report reproducible bugs in Issues.
  • Join Discussions to propose features, share projects, or help prioritize the roadmap.
  • Read the contribution guide for setup, validation, and first-contribution guidance.
  • Contributions of focused fixes, tests, translations, documentation, and example projects are especially useful.

Quick start

Requirements: Node.js 20+ and a modern Chromium browser. WebGPU is recommended for the heaviest AI workflows.

git clone https://github.com/MartinDelophy/ai-video-editor.git
cd ai-video-editor
npm install
npm run dev

Open the local URL printed by Vite. The first AI run may download model files; later runs reuse the browser cache.

Validate and build

npm run build
npm run preview

Run the complete repository check with:

npm run check

Deploy

The included netlify.toml builds with npm run build, publishes dist, enables the cross-origin isolation headers required by browser AI/media workers, and provides the SPA fallback.

npx netlify-cli deploy --prod --dir=dist

Support and feedback

If this project helps you, please consider giving it a ⭐ Star. If you encounter a problem, please open an Issue.

Join our Discord community to ask questions, share feedback, and connect with other users and contributors.

License

Timeline Studio's original source code is licensed under the MIT License.

The MIT License does not automatically apply to third-party models, model weights, datasets, fonts, stock media, or other bundled or remotely downloaded assets. Those materials remain subject to their respective upstream licenses and terms, regardless of where they are hosted or how they are downloaded or integrated. Review MODEL_LICENSES.md before redistribution or commercial use.

Files in the repo

Repository payload33 top-level entries
  • .codex
  • .github
  • docs
  • huggingface-space
  • public
  • scripts
  • skills
  • src
  • .gitignore
  • .prettierignore
  • .prettierrc.json
  • CONTRIBUTING.md
  • eslint.config.js
  • index.html
  • LICENSE
  • MODEL_LICENSES.md
  • netlify.toml
  • package-lock.json
  • package.json
  • README.de.md
  • README.es.md
  • README.fr.md
  • README.ja.md
  • README.ko.md
  • README.md
  • README.pt-BR.md
  • README.ru.md
  • README.th.md
  • README.vi.md
  • README.zh-CN.md
  • ROADMAP.md
  • tsconfig.json
  • vite.config.mjs

Discussion (0)

Ask about usage, or say what you built with it

Sign in to join the discussion.

No comments yet. Be the first to say what this is good for.

More skills

obra/
superpowers

An agentic skills framework & software development methodology that works.

285k
1 add

Turn any codebase, with its docs, SQL schemas, configs, and PDFs, into a queryable knowledge graph. A /graphify skill for Claude Code, Cursor, Codex, and Gemini CLI: local deterministic AST parsing, every edge explained, no vector store.

117k
1 add
Vincentwei1021/
anything2explainer

Topic in, narrated explainer video out. A Claude Code / Codex skill that turns any topic into a black-canvas motion-graphics explainer video with TTS voiceover, subtitles and a chapter progress bar. Chinese or English; every frame drawn in code with Remotion.

666

Open-source AI job search: scan job portals, evaluate listings into a structured A-H report with a global 1-5 score, tailor your CV, track applications — runs locally in your AI coding CLI (Claude Code, Codex, OpenCode, Antigravity…)

71k