@remotion/media-utils
一个提供用于获取视频和音频信息以及可视化音频的实用函数的包。
🌐 A package providing utility functions for getting information about video and audio, and for visualizing audio.
除 useAudioData() 外,所有功能也可以在 Remotion 外使用。
🌐 Except for useAudioData(), 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.431 of Remotion.npm i --save-exact @remotion/media-utils@4.0.431
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.431 of Remotion.pnpm i @remotion/media-utils@4.0.431
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.431 of Remotion.bun i @remotion/media-utils@4.0.431
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.431 of Remotion.yarn --exact add @remotion/media-utils@4.0.431
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.函数
🌐 Functions
audioBufferToDataUrl()
Serialize an audio buffer
getAudioData()
Get metadata of an audio source
getAudioDurationInSeconds()
Get the duration of an audio source
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