Video editing
One command does everything:
python scripts/edit_video.py clip1.MP4 clip2.MP4 -o edited.mp4
(python3 on macOS / Linux if python is missing.) It joins the clips in
the order given, cuts the silences, cuts the filler words ("um", "uh",
"euh"...), drops the false starts (when a sentence is said several times,
only the last take is kept), renders edited.mp4, then writes the
transcript next to it: edited.txt (text) and edited.srt (with timings).
Pass --lang fr (or es, de...) when the user speaks another language:
the filler words and the transcript depend on it.
First time — YOU install the tools, not the user
The user just unzipped this skill. Check both tools, install what is
missing, without asking them to do it themselves:
| tool |
check |
macOS |
Windows |
Linux |
| ffmpeg + ffprobe |
ffmpeg -version |
brew install ffmpeg |
winget install Gyan.FFmpeg (then reopen the terminal) |
sudo apt install ffmpeg |
| whisper-cli (whisper.cpp) |
whisper-cli --help |
brew install whisper-cpp |
download whisper-bin-x64.zip from https://github.com/ggml-org/whisper.cpp/releases (latest release), unzip, add the folder to the PATH |
sudo apt install whisper-cpp or build https://github.com/ggml-org/whisper.cpp |
The transcription model (1.5 GB) downloads itself on the first run, into
`/.cache/whisper-cpp/. On a PC without a GPU, if transcription is too slow, pass --model small` (less accurate, 6× lighter).
What to do
- Find the clips (usually the newest files in
~/Downloads) and run the
command. It takes a while: about the length of the video, plus the model
download the first time.
- Read what the script prints: duration before / after, and the list of
retakes it dropped (each line quotes the repeated words). Mention that
list to the user: it is the only thing worth a glance.
- Hand back the path of the video and a summary of the transcript. Do not
re-read, do not verify, do not redo.
Three settings, no more
| Setting |
Default |
When to touch it |
--min-sil |
0.40 s |
it cuts breaths → raise to 0.6; it leaves gaps → lower to 0.3 |
--pad |
0.05 s |
clipped words → raise to 0.10; too much air at the joins → lower to 0.03 |
--noise |
32 dB |
background noise (street, fan) and nothing gets cut → lower to 25 |
--protect 12.5:14.0 keeps a deliberate pause (a comedic beat, say): the
times are those of the joined footage, before cuts.
--keep-retakes keeps every take (a deliberate repetition, a chorus);
--keep-fillers keeps the "um"s; --min-match 6 asks for longer matches
before two takes count as a repeat (default 4 words). --no-transcript
skips whisper entirely: silences only.
When it fails
ffmpeg or whisper-cli not found → install (table above), reopen the
terminal. Without whisper the edit still comes out; only the transcript
is missing.
- A 0 s video or a
concat error → the clips do not share the same format
(resolution, fps); edit each clip alone, or re-encode them first.
What comes next
This is the foundation. When the user asks for more, add it right here, in
this script: burned-in subtitles from the .srt, a cover on frame 0, music
under the voice, a split screen.
1---2name: video-editing3description: Edit a talking-head video (TikTok, Reels, Shorts, YouTube) in one command - joins the raw clips, cuts the silences and the filler words, keeps only the last take of repeated sentences, transcribes. macOS, Windows, Linux. Use when the user says "edit my video", "cut the silences", "remove the dead air", "transcribe my video", "monte ma vidéo", "coupe les blancs", or drops raw clips to edit.4---56# Video editing78One command does everything:910```sh11python scripts/edit_video.py clip1.MP4 clip2.MP4 -o edited.mp412```1314(`python3` on macOS / Linux if `python` is missing.) It joins the clips in15the order given, cuts the silences, cuts the filler words ("um", "uh",16"euh"...), drops the false starts (when a sentence is said several times,17only the **last** take is kept), renders `edited.mp4`, then writes the18transcript next to it: `edited.txt` (text) and `edited.srt` (with timings).19**Pass `--lang fr` (or es, de...) when the user speaks another language**:20the filler words and the transcript depend on it.2122## First time — YOU install the tools, not the user2324The user just unzipped this skill. Check both tools, install what is25missing, without asking them to do it themselves:2627| tool | check | macOS | Windows | Linux |28|---|---|---|---|---|29| ffmpeg + ffprobe | `ffmpeg -version` | `brew install ffmpeg` | `winget install Gyan.FFmpeg` (then reopen the terminal) | `sudo apt install ffmpeg` |30| whisper-cli (whisper.cpp) | `whisper-cli --help` | `brew install whisper-cpp` | download `whisper-bin-x64.zip` from https://github.com/ggml-org/whisper.cpp/releases (latest release), unzip, add the folder to the PATH | `sudo apt install whisper-cpp` or build https://github.com/ggml-org/whisper.cpp |3132The transcription model (~1.5 GB) downloads itself on the first run, into33`~/.cache/whisper-cpp/`. On a PC without a GPU, if transcription is too34slow, pass `--model small` (less accurate, 6× lighter).3536## What to do37381. Find the clips (usually the newest files in `~/Downloads`) and run the39 command. It takes a while: about the length of the video, plus the model40 download the first time.412. Read what the script prints: duration before / after, and the list of42 retakes it dropped (each line quotes the repeated words). Mention that43 list to the user: it is the only thing worth a glance.443. Hand back the path of the video and a summary of the transcript. Do not45 re-read, do not verify, do not redo.4647## Three settings, no more4849| Setting | Default | When to touch it |50|---|---|---|51| `--min-sil` | 0.40 s | it cuts breaths → raise to 0.6; it leaves gaps → lower to 0.3 |52| `--pad` | 0.05 s | clipped words → raise to 0.10; too much air at the joins → lower to 0.03 |53| `--noise` | 32 dB | background noise (street, fan) and nothing gets cut → lower to 25 |5455`--protect 12.5:14.0` keeps a deliberate pause (a comedic beat, say): the56times are those of the joined footage, before cuts.5758`--keep-retakes` keeps every take (a deliberate repetition, a chorus);59`--keep-fillers` keeps the "um"s; `--min-match 6` asks for longer matches60before two takes count as a repeat (default 4 words). `--no-transcript`61skips whisper entirely: silences only.6263## When it fails6465- `ffmpeg` or `whisper-cli` not found → install (table above), reopen the66 terminal. Without whisper the edit still comes out; only the transcript67 is missing.68- A 0 s video or a `concat` error → the clips do not share the same format69 (resolution, fps); edit each clip alone, or re-encode them first.7071## What comes next7273This is the foundation. When the user asks for more, add it right here, in74this script: burned-in subtitles from the `.srt`, a cover on frame 0, music75under the voice, a split screen.