Skip to content

watzing/claude-video-editor

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

video_editor

A Claude Code skill that turns a recorded screen-cast walkthrough into a tight, edited video. You drop a video into source/, ask Claude to clean it up, and it:

  1. extracts the audio with ffmpeg
  2. transcribes it with OpenAI's Whisper (word-level timestamps)
  3. proposes cuts — removing false starts, repeated takes, "no, scratch that" moments, and dead silence
  4. shows you the proposed cuts and the resulting transcript so you can sign off
  5. renders the final video with ffmpeg

When the auto-proposed cuts are close but not perfect, Claude can spin up a small browser-based editor that lets you adjust segment boundaries by ear, then save the cuts back to disk for a re-render — no manual ffmpeg required.

Requirements

  • Claude Code — the CLI that runs the skill
  • ffmpeg and ffprobebrew install ffmpeg
  • OpenAI Whisper — pip install openai-whisper
  • Python 3.9+ (stdlib only for the helper scripts)

Setup

git clone <this-repo> video_editor
cd video_editor
claude          # launch Claude Code in this folder

Workflow

  1. Drop a video file into source/ (e.g. source/walkthrough.mp4).
  2. In Claude Code, say something like "clean up the video in source/".
  3. Claude transcribes, proposes cuts, and asks you to confirm.
  4. After approval it renders to output/walkthrough_draft.mp4 for you to review.
  5. If something needs adjusting:
    • Ask Claude to "open the editor" — it generates editor/walkthrough.html and starts a local server.
    • Open http://localhost:8765/editor/walkthrough.html.
    • Drag segment edges to resize, drag the body to move, or type precise times. Hit Save (or Cmd+S) to write the new cuts back to tmp/walkthrough_cuts.json.
    • Tell Claude you've saved — it re-renders.
  6. Once you're happy, Claude promotes the draft to output/walkthrough_final.mp4 and cleans up tmp/.

The visual editor

A single static HTML page served by a tiny stdlib Python HTTP server (serve_editor.py). Built with build_editor.py from the source video, the Whisper transcript, and the current cuts.

Features:

  • Scrub the video; click the timeline to seek
  • Drag a segment band to move it; drag its left/right edge to resize start/end
  • Per-segment numeric start / end inputs and a per-segment Play that auto-pauses at the segment end
  • Preview Final plays only the kept segments in sequence
  • Add/Delete segments, full Undo history (Cmd+Z)
  • Zoom with +/ buttons or Cmd+scroll on the timeline; horizontal scroll for long videos
  • Transcript view below — green = inside a kept segment, dim = cut. Click any line to jump.
  • Save writes to tmp/<name>_cuts.json over POST /api/save (server validates the path stays inside the project root)
  • Export falls back to a download if the server isn't running

Keyboard:

Key Action
Space Play / pause
/ Seek 1s (Shift for 0.1s)
I or Cmd+< Set selected segment's start to current time
O or Cmd+> Set selected segment's end to current time
Cmd+Z Undo
Cmd+S Save
Cmd+scroll Zoom timeline

Project layout

.
├── .claude/skills/video-editor/SKILL.md  # the skill Claude follows
├── build_editor.py                       # writes editor/<name>.html
├── serve_editor.py                       # local HTTP server with Range + save
├── source/                               # input videos (gitignored)
├── output/                               # rendered drafts + finals (gitignored)
├── editor/                               # generated editor pages (gitignored)
└── tmp/                                  # audio, transcript, cuts JSON (gitignored)

Notes

  • Whisper downloads its model on first run (~140 MB for base.en); subsequent runs are cached in ~/.cache/whisper.
  • The local server only binds to 127.0.0.1 and only writes paths inside the project root.
  • The skill assumes English screen recordings with base.en. For other languages or higher accuracy, edit the model in .claude/skills/video-editor/SKILL.md.

About

Claude Code skill that turns a screen-cast walkthrough into a tight edited video — Whisper transcription, transcript-driven cut proposals, and a browser-based editor for fine-tuning.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages