---
title: "Change Playback Speed and Add Fades | Rendley SDK Docs"
description: "Speed up or slow down video, audio, GIF and Lottie clips. Preserve audio pitch at different speeds, and add volume fade-in and fade-out effects."
url: https://docs.rendley.com/sdk/getting-started/playback-speed/
---

# Playback speed

Video, audio, GIF, and Lottie clips can be slowed down or sped up. Video and audio clips additionally support pitch preservation and volume fades.

## Playback speed

```
videoClip.setPlaybackSpeed(2); // twice as fast
audioClip.setPlaybackSpeed(0.5); // half speed
lottieClip.setPlaybackSpeed(3);
gifClip.setPlaybackSpeed(1.5);
```

`setPlaybackSpeed` is available on [VideoClip](https://docs.rendley.com/sdk/getting-started/clips/video/), [AudioClip](https://docs.rendley.com/sdk/getting-started/clips/audio/), [GifClip](https://docs.rendley.com/sdk/getting-started/clips/gif/), and [LottieClip](https://docs.rendley.com/sdk/getting-started/clips/lottie/), the clip types with their own playback timeline.

The supported speed range is `[0.25, 4]`. On Safari it is limited to `[0.25, 2]` because of a platform bug that affects higher speeds.

Warning

Calling `setPlaybackSpeed` mutates both `duration` and `startTime` of the clip. After confirming the new speed, call [`Timeline::adjustClipsLayout`](https://docs.rendley.com/sdk/getting-started/timeline/#adjust-layout) so the layer repositions conflicting clips.

### Preserve bounds

The second and third arguments control what stays constant:

```
videoClip.setPlaybackSpeed(2, true, false);
// true: preserve the left bound (startTime + leftTrim stays the same)
// false: do not preserve trimmed duration (the visible range will change)
```

This is useful when a user scrubs the playback speed inside the UI: you typically want the left edge of the clip to stay anchored.

## Preserve pitch

By default, audio is pitch-shifted along with the speed change. To keep the original pitch (useful for voiceovers):

```
videoClip.setPreservePitch(true);
audioClip.setPreservePitch(true);
```

## Volume fade

Video and audio clips expose fade in and fade out controls that work independently of any animation or keyframe:

```
import { FadeCurveEnum } from "@rendley/sdk";

videoClip.setVolumeFadeInDuration(1);
videoClip.setVolumeFadeInCurve(FadeCurveEnum.LINEAR);

videoClip.setVolumeFadeOutDuration(2);
videoClip.setVolumeFadeOutCurve(FadeCurveEnum.EXPONENTIAL);
```

Supported curves include linear, quarter sine, half sine, exponential, logarithmic, quadratic, cubic, and more. See [FadeCurveEnum](https://docs.rendley.com/sdk/api-reference/enums/FadeCurveEnum.html) for the full list.

## Freezing a video frame

Video clips can be frozen on a specific frame for the rest of the clip duration with [`setFreezeTime`](https://docs.rendley.com/sdk/api-reference/classes/VideoClip.html#setfreezetime):

```
videoClip.setFreezeTime(2); // freeze on second 2
videoClip.setFreezeTime(); // unfreeze
```

Freeze is useful for keeping a poster frame after the media ends, or for extending a clip without duplicating it.

## What to read next

- **[Video clips](https://docs.rendley.com/sdk/getting-started/clips/video/)** trim, split and place footage on a layer.
- **[Audio clips](https://docs.rendley.com/sdk/getting-started/clips/audio/)** add music, voiceover and sound effects.
- **[Crop and zoom](https://docs.rendley.com/sdk/getting-started/crop/)** reframes a clip inside the composition.

[Previous pageCrop and zoom](https://docs.rendley.com/sdk/getting-started/crop/) [Next pageFilters](https://docs.rendley.com/sdk/getting-started/filters/)
