Controlling pitch
Use the toneFrequency prop to control the pitch of sound from both <Video> and <Audio>.
| Tag | Preview | Server-side rendering | Client-side rendering |
|---|---|---|---|
<Audio> from @remotion/media | ✅ v4.0.520 | ✅ v4.0.357 | ✅ v4.0.523 |
<Video> from @remotion/media | ✅ v4.0.520 | ✅ v4.0.357 | ✅ v4.0.523 |
<Html5Audio> from remotion | ❌ | ✅ v4.0.47 | ❌ |
<Html5Video> from remotion | ❌ | ✅ v4.0.47 | ❌ |
<OffthreadVideo> from remotion | ❌ | ✅ v4.0.47 | ❌ |
Values between 0.01 and 2 are accepted, where 1 represents the original pitch. Values less than 1 will decrease the pitch, while values greater than 1 will increase it.
A toneFrequency of 0.5 would lower the pitch by half, and a toneFrequency of 1.5 would increase the pitch by 50%.
The value must stay constant for each audio or video asset. Animating or keyframing toneFrequency is not supported.
- Video
- Audio
MyComposition.tsximport {Video } from '@remotion/media'; import {staticFile } from 'remotion'; export constMyComposition = () => { return <Video src ={staticFile ('video.mp4')}toneFrequency ={0.8} />; };
MyComposition.tsximport {Audio } from '@remotion/media'; import {staticFile } from 'remotion'; export constMyComposition = () => { return <Audio src ={staticFile ('audio.mp3')}toneFrequency ={0.8} />; };
To change playback speed while keeping the original pitch, use preservePitch instead.