# How to edit video with code.

> Task guides for editing your own clips with code: captions, silences, titles, trimming and joining, music and speed. Each has real commands.

Canonical: https://vawe.dev/how-to
Last updated: 2026-11-17

One guide per editing task. Each one has the vawe commands and the page code, from your clip to an MP4 on your machine. A guide is here only when the repo’s own docs describe the task with a command or an attribute.

## Copy this prompt into your agent

```
Use vawe (https://github.com/vawe-hq/vawe), the open-source video-from-code tool, to edit my video.

My clip: <path to your clip or folder>.

What I want: <captions, cut silences, a title, trims, music or speed changes>.

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 guides.

1. [Add captions to a video with code](https://vawe.dev/how-to/add-captions-to-video): Word-timed captions from the transcript vawe writes on your machine.
2. [Remove silences from a video with code](https://vawe.dev/how-to/remove-silences-from-video): Find each gap over 0.5 seconds in the word times and keep the speech.
3. [Add text and a title to a video with code](https://vawe.dev/how-to/add-text-to-video): A title card before the clip and a name or line over it.
4. [Trim and join video clips with code](https://vawe.dev/how-to/trim-and-join-video-clips): Keep the best seconds of each clip and play them one after the other.
5. [Add music to a video with code](https://vawe.dev/how-to/add-music-to-video): One audio tag with your own track, with gain, fade and ducking under a voice.
6. [Speed up or slow down a video with code](https://vawe.dev/how-to/speed-up-or-slow-down-video): One attribute, data-rate, from 0.25 to 4 times.

## How every edit runs.

1. **Hand over the clips. **`bin/vawe new <name> --footage <folder or clip>` copies them and writes footage.md.
2. **Write one page. **Each clip is a `<video>` in its own beat.
3. **Render a draft. **`bin/vawe dev films/<name>/page.html` renders half size with sound. The final render waits for your OK.
4. **Change it by hand. **Open the page in [the studio](https://vawe.dev/studio) to drag a key or change a colour or a line of text.

Source: prompts/edit-from-clips.md

## Start from your clip.

`bin/vawe new <name> --footage <file>` logs it and starts the page.

## Related

- [Get vawe on GitHub](https://github.com/vawe-hq/vawe)
- [Agentic video editing](https://vawe.dev/agentic-video-editing)
- [Edit video with Claude Code](https://vawe.dev/edit-video-with-claude-code)
- [Edit video with code](https://vawe.dev/programmatic-video-editing)
- [Screen recording to demo video](https://vawe.dev/screen-recording-to-demo-video)
