Skip to content

EmiGross/ClaudeCut

Repository files navigation

ClaudeCut

A homemade "AutoEdit" alternative: a folder full of clips + one sentence of briefing → a ready, roughly-cut Premiere timeline. Claude understands the content of your footage (via the transcripts), picks the strongest soundbites, orders them thematically and writes a Premiere-importable XML. You jump straight into the fine cut.

Built for content-driven videos — vlogs, explainers, podcasts: anything where the message matters, not the picture.

Demo

ClaudeCut pipeline: clips → Whisper transcripts → Claude picks → Premiere timeline

▶️ Watch in full quality (MP4)

⚠️ Important: the "brain" is Claude Code

The actual editorial choice (which soundbites make it in, in what order, what gets dropped) is made by Claude in Claude Code, by reading the transcripts. This repo is not a standalone program — it's a Claude Code template. Without Claude Code you only have the two mechanical ends (transcribe + build XML), but not the selection. A fully automatic variant (local LLM / API) would be "stage 2" — deliberately not built (yet).

Pipeline

Folder of clips
  │
  ▼  prep.py            ── Whisper per clip (word timestamps) + ffprobe metadata
  │                        writes: transcripts.md  +  cut.py (scaffold)
  ▼  [Claude reads transcripts.md]   ◄── the "brain": selection + ordering
  │                        fills the EDL in cut.py
  ▼  [you review & fix cut.py]   ◄── your control stop before the build
  │
  ▼  build_xml.py        ── builds FCP7 XML (video + stereo audio + sequence format)
  │                        writes: cut.xml  +  cut_plan.md
  ▼
Import into Premiere  →  ready, roughly-cut sequence

The three scripts

File Role
prep.py Front end. python prep.py "<folder>" --briefing "…" → walks every clip, runs Whisper per clip (JSON is cached/skipped), measures fps/resolution/aspect via ffprobe, writes transcripts.md and scaffolds cut.py. Suggests the sequence format and warns on mixed footage.
cut.py The job (per project, generated by prep.py). Holds CLIPS_DIR, BRIEFING, SEQ_* and the EDL — the latter is filled by Claude while reading transcripts.md. cut.example.py shows a finished cut.
build_xml.py Back end / translator. Imports from cut.py, builds the FCP7 XML + a human-readable cut_plan.md.

transcribe.py is the (vendored) Whisper script; config.py holds the paths.

What "EDL" means

Edit Decision List — the list that says "from this file take the section from second X to second Y", per clip, in the order of the finished video:

EDL = [
    ("intro.mp4",   2.30, 16.35, "Hook: what today is about"),
    ("meeting.mov", 17.00, 29.32, "the strong take, repeat discarded"),
]

Quickstart

  1. Setup once — see docs/SETUP.md (two venvs: otio + Whisper, ffmpeg, paths in config.py).
  2. In Claude Code: "Folder D:\…\Footage, make a 90-sec recap, the best lines, casual tone."
  3. Claude runs: prep.py → reads transcripts.md → fills cut.py → (you review) → build_xml.py.
  4. In Premiere: File → Import → cut.xml.

How Claude drives the flow is described in CLAUDE.md.

Pitfalls solved (the actual know-how)

OpenTimelineIO's fcp_xml adapter writes an incomplete XML — three things had to be added back via ffprobe measurement + XML post-processing, otherwise Premiere refuses it:

  1. Audio channels/sample rate per <file> — missing → "channel mismatch", Premiere guesses mono, relink fails.
  2. Real audio clip items — the adapter only creates empty stubs → no sound; we build the stereo tracks from the video clip items and link them.
  3. Sequence <format> — missing → Premiere assumes 640×480 / 4:3; we write in resolution/fps/pixel aspect and recompute clip positions to the target frame rate.

For mixed footage (e.g. 30 + 60 fps) the real rate is read per clip via ffprobe and converted frame-accurately; the target sequence format is suggested by prep.py, which asks when in doubt (guessing would be wrong).

Limits (honest)

  • Claude judges only the transcript content — not picture, sharpness or framing. Strong for talking-head without B-roll, weak for picture-driven stories.
  • Whisper does not label speakers (diarization would be a future stage).
  • Premiere is picky about XML import — tested with FCP7 XML (fcp_xml), confirmed frame-accurate.

About

Turn a folder of clips + one line of briefing into a roughly-cut Premiere timeline. Claude reads Whisper transcripts, picks the strongest soundbites, orders them, and writes an import-ready FCP7 XML — you jump straight into the fine cut. A Claude Code template for content-driven video (vlogs, explainers, podcasts).

Topics

Resources

License

Stars

1 star

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages