@remotion/media-utils
A package providing utility functions for getting information about video and audio, and for visualizing audio.
Except for useAudioData() and useWindowedAudioData(), all functions can also be used outside of Remotion.
- Remotion CLI
- npm
- bun
- pnpm
- yarn
npx remotion add @remotion/media-utils
This assumes you are currently using v4.0.544 of Remotion.npm i --save-exact @remotion/[email protected]
Also update
remotion and all `@remotion/*` packages to the same version.Remove all
^ character in front of the version numbers of it as it can lead to a version conflict.This assumes you are currently using v4.0.544 of Remotion.pnpm i @remotion/[email protected]
Also update
remotion and all `@remotion/*` packages to the same version.Remove all
^ character in front of the version numbers of it as it can lead to a version conflict.This assumes you are currently using v4.0.544 of Remotion.bun i @remotion/[email protected]
Also update
remotion and all `@remotion/*` packages to the same version.Remove all
^ character in front of the version numbers of it as it can lead to a version conflict.This assumes you are currently using v4.0.544 of Remotion.yarn --exact add @remotion/[email protected]
Also update
remotion and all `@remotion/*` packages to the same version.Remove all
^ character in front of the version numbers of it as it can lead to a version conflict.APIs
audioBufferToDataUrl()
Serialize an audio buffer
getAudioData()
Get metadata of an audio source
getAudioDurationInSeconds()
Get the duration of an audio source
getImageDimensions()
Get the dimensions of an image
getVideoMetadata()
Get metadata of a video source
getWaveformPortion()
Trims audio data into a waveform
useAudioData()
getAudioData() as a hookuseWindowedAudioData()
Optimized for fetching only current data, works only with
.wavvisualizeAudio()
Process a music waveform for visualization
visualizeAudioWaveform()
Process a voice waveform for visualization
createSmoothSvgPath()
Turn waveform points into a smooth SVG path
License
MIT