Remove silences from a video with code.
An agent reads the word times in your clip’s transcript, finds each gap longer than 0.5 seconds and keeps only the spans that hold speech. Each span becomes one trimmed clip in a page that vawe renders to MP4.
Copy this prompt into your agent
Paste it into Claude Code, Codex or Cursor. Fill in the parts in angle brackets. The agent installs vawe if it needs to and does the steps on this page.
Use vawe (https://github.com/vawe-hq/vawe), the open-source video-from-code tool, to remove the silences and dead pauses from my video. My clip: <path to your clip or folder>. Find the gaps in speech from the transcript, keep each spoken span as one cut, and leave a short breath at each cut so it does not sound clipped. List the cuts you made with their times. If vawe is not installed here, install it first: npm install @vawe/cli (it needs Node 22 or newer and ffmpeg; npx vawe new prints the install line for anything missing). Then follow each command’s next: line. Start with npx vawe new <name> --footage <my clip>, which logs the clip with a transcript. Show me the draft video and wait for my OK before the final render.
The steps.
- Log the clip.
bin/vawe new talk --footage ~/clips/talk.movwritesfootage/talk.words.json: every word with a start and an end in seconds. - Find the gaps. The gap between two words is the start of the next one minus the end of the first. Over 0.5 seconds is a silence.
- Group the words between two silences. A span starts at its first word’s start and ends at its last word’s end. Cutting on word ends keeps each word whole.
- Write one row per span. The Cut list in
brief.mdtakes the clip, the in and out seconds, the speed and the reason. - Write one video per row.
data-trimis the in second,data-trim-endthe out second, and eachdata-atis the sum of the lengths before it. - Render and check the cuts.
bin/vawe dev films/talk/page.html, thenbin/vawe frame films/talk/page.html --cutswrites a frame at each cut.
Each span of speech is a Cut list row
| world | clip | in | out | rate | why | | --- | --- | --- | --- | --- | --- | | s2 | talk | 0.42 | 2.62 | 1 | “so today I show this” | | s4 | talk | 4.10 | 5.50 | 1 | “it takes a minute”, gap was 1.48 s |
What can go wrong.
- Fillers stay. vawe has no filler-word detector. The agent can read an “um” in the transcript and cut it on its word times, but the choice is the agent’s and yours.
- A bad take stays. Nothing scores a take.
- A cut feels wrong although the numbers are right. Look at the frames from
--cuts. To keep a breath at the start of a span, movedata-trimearlier by a few hundredths of a second. - A span flashes. A clip held under 1.2 seconds reads as a flash. The agent can join two close spans and keep the short gap inside.
Read next.
- Cut the silences with an agent: the same method with the example word times worked out.
- How an agent reads footage it cannot watch: what footage.md holds.
- Agentic video editing: the scope of an edit.