Video trimming
Turn a raw recording into a tight first cut that a human editor would sign off on: every retake and stumble gone,
the speaker's natural rhythm intact, no clipped words, every join reading as the sentence the speaker meant.
It works for any niche, any format and any language the speech engines understand: the rules are about how people speak, not
what they speak about. Format and language differences (pause style, demos, interviews, noisy locations,
non-English speakers) are in references/formats.md.
This skill is the trimming phase only: one camera/audio source in, one single-track timeline out. Placing a screen
recording, B-roll or graphics on top is a later phase; it can reuse segments.json (the exact source in/out of
every kept piece) to cut other tracks in sync.
What gets cut, and what never does
Cut (mistakes): retakes (the last take wins), false starts, abandoned approaches, stutters and doubled words, filler sounds ("uh", "um", "eh", half-words like "tha-"), misspeaks they correct, mutters, things the speaker tells the editor to remove on camera, and dead space (long silences, pauses with only breathing/clicking).
Keep: natural pauses (under ~1 s), the speaker's phrasing even when clumsy, opinions, stories, jokes, rhetorical repetition that builds ("this is what the pros do, this is what the people who win do"), lines that point at something on screen, demo moments the viewer needs to see, and anything that has no retake.
Not this skill's call: creative trims (dropping a story, an aside, a sponsor claim for pacing). A human editor may do those; don't imitate them and don't flag them. If the user later shows you the editor's version, learn the mistakes-only lessons from it, not the creative ones.
Why this split: the users of this skill are editors. A first cut that only removes mistakes is something they trust and can build on; a cut that also makes taste decisions forces them to re-check everything.
Full rules with real examples: read references/cutting-rules.md before writing any cuts. It is the heart of
this skill.
Setup (once per machine)
Python 3.10+, ffmpeg, and:
pip install numpy soundfile num2words torch torchaudio
# main speech engine: NVIDIA Parakeet (English + 24 European languages)
pip install parakeet-mlx # Apple Silicon (on the GPU)
pip install "nemo_toolkit[asr]" # Windows/Linux with an NVIDIA GPU
# Whisper: used by the gap scan (it can be told to write out "uh"/"um") and for languages Parakeet lacks
pip install mlx-whisper # Apple Silicon
pip install faster-whisper # anything else
pip install uroman # only for languages in a non-Latin script (Hindi, Arabic, Japanese, ...)
The first run downloads Parakeet (~1.2 GB), Whisper large-v3 (~3 GB) and the MMS aligner (~1.2 GB).
Why Parakeet: on a 41-minute test recording with 9 known hidden retakes (repeats an ordinary transcript merges
into one clean line, which had needed extra check rounds and reviewer corrections), Parakeet heard 8 and Whisper 1.
Parakeet also writes out mumbles ("Mm-hmm") that Whisper drops, and the whole verbatim pass took 3 min instead of
~11. Each engine still misses a few one-word stutters the other hears ("Because… Because"), which is why the
listen-back check and the gap scan stay. Engine choice is automatic
(config "asr": "auto"); set "parakeet" or "whisper" to force one.
Workflow
Work in a "cut folder" (one per recording). Scripts live in this skill's scripts/ folder; run them with
python <skill>/scripts/<name>.py <cut folder>.
1. Intake (2 min)
- Copy
assets/config.example.jsonto<cut folder>/config.json; settitle,source(the camera file, with its audio),timeline_fps(the delivery frame rate; the source rate is probed) andlanguage(language code: "en", "es", "hi", … or "auto"). Leave the timing numbers alone unless the format calls for a different pause style (references/formats.md): each one is the result of a real mistake (references/edges-and-pauses.md). - Note the format (solo, scripted, tutorial, podcast, short-form…) and read its row in
references/formats.md. - Extract the audio:
ffmpeg -i <camera file> -vn -ac 1 -ar 16000 <cut folder>/audio.wav - If a speaker profile exists (
profiles/<speaker>.md, see below), read it now.
2. Verbatim transcript (~5 s per minute of audio with Parakeet; start it right away, in the background)
python scripts/transcribe_verbatim.py <cut>/audio.wav <cut>/verbatim.json
This is not an ordinary transcript. An ordinary full-length pass hides many of the stutters and retakes ("because the, because the" comes back as "because the"; Whisper hid about a third of them) and its word times are only roughly right, which is what clips word endings. This pass transcribes short chunks split at pauses and then force-aligns every word to the audio. Every cut is placed on these word times.
3. Find the candidates
Run all three, then read their output alongside the transcript:
python scripts/make_reading_copy.py <cut>: writesreading.txt, the transcript with every word numbered.python scripts/retake_finder.py <cut>: every place the speaker restarts with the same opening words. Most are retakes (keep the last take); some are rhetorical repetition (keep both). Decide each one.python scripts/gap_scan.py <cut>: re-listens to every long gap that has sound in it. Mumbled restarts hide there ("The battery li- the battery life"); the transcript often skips them.
4. Read the whole transcript and write the cuts
Read reading.txt top to bottom like an editor would, with references/cutting-rules.md in mind. Write
<cut>/cuts.json:
{"remove": [[0, 236, "retakes: two earlier takes of the intro"],
[1047, 1064, "false starts: 'because we just haven't had, because we have…'"]],
"remove_t": [[1125.80, 1129.45, "hidden retake heard in gap scan: 'So in each of these recipes…'"]],
"markers": [[2680, "HOST NOTE: 'Just delete the bit about my landlord' -> removed 'So my landlord called…' (3 sentences)"]],
"markers_t": [[1501.2, "CHECK: kept the 4 s silent pour, the speaker is doing the demo"]]}
remove= inclusive word-index ranges fromreading.txt(preferred: exact boundaries for free).remove_t= seconds, only for sounds the transcript doesn't have as words (from the gap scan or the check).markers(word index) /markers_t(seconds) = red To-Do markers in the timeline for every host instruction, every judgement call, and every rewind that drops 20+ s of unique content, so the editor can check them in seconds.- Give every cut a reason. It ends up in
CUTS.md, and reasons are what make a cut list reviewable.
Before moving on, read the words on both sides of every cut as one sentence. If it doesn't read as the sentence the speaker meant, the cut is in the wrong place. This single habit prevents most "the cut doesn't make sense" feedback.
5. Build
python scripts/trim.py <cut> writes timeline.fcpxml, timeline.edl, segments.json, words-cut.json and
CUTS.md, and prints the raw and cut lengths. Sanity check: a cut that removes 30-45% of a rambling unscripted
recording is normal (10-20% for a scripted one); under 10% on an unscripted recording usually means retakes were
missed.
6. Listen back (~15 s per minute of cut) and fix
python scripts/check_cut.py <cut> renders the cut audio, transcribes it the same way and diffs it word by word
against what the cut should say. Then python scripts/retake_finder.py <cut> --kept lists repeated openers where
both takes survived.
Treat every JOIN line as a bug until a re-listen proves otherwise. How to read the output, the usual
transcription noise, and how to fix each kind of problem: references/checks.md. Fix, rebuild, re-check. Two or
three rounds is normal.
Then read words-cut.json start to finish once, as a viewer would hear it. The checker compares audio with
intent; only reading catches an intent that is itself wrong (a sentence left hanging, a retake kept on purpose by
mistake).
7. Deliver
- Final Cut Pro: double-click
timeline.fcpxml(File → Import → XML). Premiere/Resolve: importtimeline.edland relink to the camera file. - Tell the user, in plain words: raw → cut length, number of cuts, each marker (time + what was done), anything you were unsure about, and how long it took.
- If the user's editor publishes a final version, ask for its transcript and run
python scripts/compare_editor.py <cut> <their transcript.txt>: the fastest way to find what you missed (references/checks.md→ "Comparing with an editor's version").
Learning from feedback (the part that makes this skill get better)
Every creator speaks differently. Keep what you learn about one speaker in a profile:
profiles/<speaker-slug>.md (start from references/speaker-profile-template.md; a filled-in example, built from
real reviews, is in assets/profiles/example-solo-youtube-host.md). It holds their verbal habits, how they give instructions to the
editor, their pause style, glossary, and every correction the user has made.
When the user reviews a cut:
- Map each complaint to its cause before fixing it. Is it a cutting decision (a rule), an edge placement (a
number), or something the transcript hid (a detection gap)?
references/lessons.mdlists the causes seen so far, and most new complaints turn out to be one of them. - Fix the cause, not only the instance. A clipped word means an edge rule is wrong somewhere; a missed retake means a pattern to add to the profile.
- Before changing any timing number, re-run the change on a previous recording's joins first. A change that fixes
one complaint can quietly create thirty new ones (
references/lessons.md, lead-in story). - Write the lesson into the profile with the example and the reason. If it applies to every speaker, add it to
references/cutting-rules.md.
Files in this skill
scripts/transcribe_verbatim.py: chunked Parakeet (or Whisper) + forced alignment →verbatim.jsonscripts/make_reading_copy.py: numbered transcript →reading.txtscripts/retake_finder.py: repeated openers →retakes.txt(--keptafter building)scripts/gap_scan.py: re-listens to loud gaps →gaps.txtscripts/trim.py: cuts →timeline.fcpxml,timeline.edl,segments.json,words-cut.json,CUTS.mdscripts/check_cut.py: listen-back diff →check.txtscripts/compare_editor.py: diff against an editor's final transcript →compare-editor.txtreferences/cutting-rules.md: what to cut and keep, with examples (read before every cut)references/edges-and-pauses.md: why every timing number is what it isreferences/checks.md: reading the checks, transcription noise, fixing each kind of problemreferences/lessons.md: real mistakes, their causes and fixesreferences/formats.md: pause styles and quirks by format, noisy audio, several speakers, other languagesreferences/speaker-profile-template.md: the per-speaker profileassets/config.example.json,assets/profiles/example-solo-youtube-host.md