RemotionUI

Audio Reactive Scale

Scale any child by per-frame audio amplitude in Remotion. Install with npx remotion-ui@latest add audio-reactive-scale.

PrimitiveData & media

audio-reactive-scale30fps · 960×540
Install
$ npx remotion-ui@latest add audio-reactive-scale

Wraps anything and scales it by the track's per-frame amplitude.

It draws nothing of its own on purpose — a logo, a chart, or a whole scene can be made to breathe with the music by wrapping it, and the wrapper stays composable with the enter/exit primitives above and below it.

Picking a band

band selects which part of the spectrum drives the motion. bass (the default) is weighted toward the low end so the element moves on the kick rather than on hats. full follows overall loudness, which suits speech.

Shared amplitude

The level comes from useAudioAmplitude() in audio-viz-utils, the same path audio-pulse uses. Two components pointed at one track therefore pump in step instead of each running their own FFT with slightly different constants.

Source format

useWindowedAudioData() only accepts uncompressed audio, so src must be a .wav. Pass it through staticFile().

Shares `useAudioAmplitude()` with audio-pulse, so two components on one track pump in step.

Agent notes

Install first, then import the copied source component locally. AI guide →

Import
@/remotion/primitives/audio-reactive-scale
  • Use when: audio-first videos, podcast clips, and waveform visuals.
  • Customize: src, minScale, maxScale, band, plus copied source for timing, layout, colors, and typography.
  • Rule: do not import this component from the remotion-ui npm package; it is copied into your project.

Usage

Example
import { AudioReactiveScale } from "@/remotion/primitives/audio-reactive-scale"; <AudioReactiveScale src={staticFile("track.wav")} maxScale={1.2}> <Img src={staticFile("logo.png")} /> </AudioReactiveScale>

API Reference

PropTypeDescription
src*stringAudio source. `useWindowedAudioData()` requires an uncompressed .wav.
children*ReactNodeAnything to scale with the track.
minScalenumberScale at silence.
maxScalenumberScale at a full-amplitude hit.
band"low" | "mid" | "high" | "full" | "bass"Which slice of the spectrum drives the motion.
sensitivitynumberMultiplies the level before compression.
compressionnumberExponent on the level. Below 1 lifts quiet passages.
axis"both" | "x" | "y"Restrict the scale to one axis.
tiltnumberDegrees of rotation at a full hit.
minOpacitynumberOpacity at silence. Left at 1 the wrapper never touches opacity.
framenumberFrame override — pass the parent frame inside a Sequence.

Related

On this page