# Speed up or slow down a video with code.

> Change the speed of part of a clip with one attribute, data-rate, from 0.25 to 4 times. Sound keeps its pitch. Steps, a page and the limits.

Canonical: https://vawe.dev/how-to/speed-up-or-slow-down-video
Last updated: 2026-11-17

Speed is one attribute on the clip: `data-rate`. A value of 4 plays the source four times as fast. A value of 0.5 plays it at half speed. The sound follows the speed and keeps its pitch.

## Copy this prompt into your agent

```
Use vawe (https://github.com/vawe-hq/vawe), the open-source video-from-code tool, to speed up the slow parts of my video and slow down the key moment.

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

Play the waits (loading, typing) at 4 times speed, and the moment at <second> at half speed. Keep the voice at normal speed.

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.

1. **Hand over the clip. **`bin/vawe new demo --footage ~/Movies/demo.mov` logs it.
2. **Choose the stretch and the speed. **Write the source seconds and the rate in a Cut list row, with the reason.
3. **Write the attributes. **`data-trim` and `data-trim-end` keep the stretch. `data-rate` sets the speed.
4. **Work out the new length. **Source seconds divided by the rate. Source 12 to 32 at 4 times is 5 seconds of film.
5. **Move the next clip. **Its `data-at` must match the new length.
6. **Render and look. **`bin/vawe dev films/demo/page.html`, then `bin/vawe frame films/demo/page.html --cuts`.

A wait at 4 times, a slow part at half speed:

```
<section data-world="wait">
  <video src="footage/demo.mp4" data-at="0"
         data-trim="12" data-trim-end="32"
         data-rate="4" muted></video>
</section>
<section data-world="slow">
  <video src="footage/demo.mp4" data-at="5"
         data-trim="40" data-trim-end="44"
         data-rate="0.5"></video>
</section>
```

Source: skills/vawe-page/SKILL.md, Video clips · harness/media/page-audio.mjs

## What can go wrong.

1. **The rate is outside 0.25 to 4. **The render warns and the clip’s sound is left out of the mix.
2. **A clip has no sound. **A `muted` clip, or one with no audio stream, adds nothing to the mix.
3. **The next clip starts at the wrong second. **The length changed and its `data-at` did not.
4. **A speed ramp is not here. **One `data-rate` is one steady speed for a clip. Split the clip into parts for a change of speed.

## Read next.

1. [Turn a screen recording into a demo video](https://vawe.dev/screen-recording-to-demo-video): speed up the waits and cut the dead time.
2. [Trim and join video clips](https://vawe.dev/how-to/trim-and-join-video-clips): the attributes that place each clip.
3. [Agentic video editing](https://vawe.dev/agentic-video-editing): the whole edit.

## 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)
- [All how-to guides](https://vawe.dev/how-to)
- [Add captions to a video](https://vawe.dev/how-to/add-captions-to-video)
- [Remove silences from a video](https://vawe.dev/how-to/remove-silences-from-video)
- [Trim and join clips](https://vawe.dev/how-to/trim-and-join-video-clips)
- [Agentic video editing](https://vawe.dev/agentic-video-editing)
- [Edit video with Claude Code](https://vawe.dev/edit-video-with-claude-code)
