SkillsMar 29, 2026·2 min read

Remotion Rule: Audio Visualization

Remotion skill rule: Audio visualization patterns - spectrum bars, waveforms, bass-reactive effects. Part of the official Remotion Agent Skill for programmatic video in React.

TL;DR
Remotion skill rule providing spectrum bars, waveforms, and bass-reactive effects for programmatic video in React.
§01

What it is

This is a Remotion skill rule that provides audio visualization patterns for programmatic video creation in React. It covers spectrum bar animations, waveform rendering, and bass-reactive visual effects. The rule is part of the official Remotion Agent Skill and activates automatically when an AI coding agent works on audio visualization in a Remotion project.

The rule targets developers using Remotion to create programmatic videos with audio-reactive visuals. It provides the exact API patterns, hook usage, and animation techniques needed to sync visual elements with audio data.

§02

How it saves time or tokens

Without this rule, an AI agent guesses at Remotion's audio visualization API based on general React knowledge. The rule provides verified patterns for useAudioData(), visualizeAudio(), and frequency-domain processing. This eliminates debugging cycles from incorrect API usage and produces working audio-reactive animations on the first attempt.

§03

How to use

  1. Install the Remotion skills:
npx skills add remotion-dev/skills
  1. The rule activates automatically when you work on audio visualization in a Remotion project.
  1. Ask your AI agent to create audio-reactive components and it will use the correct Remotion patterns.
§04

Example

Spectrum bar visualization using Remotion's audio APIs:

import { useAudioData, visualizeAudio } from '@remotion/media-utils';
import { useCurrentFrame, useVideoConfig } from 'remotion';

export const SpectrumBars: React.FC<{ src: string }> = ({ src }) => {
  const frame = useCurrentFrame();
  const { fps } = useVideoConfig();
  const audioData = useAudioData(src);

  if (!audioData) return null;

  const visualization = visualizeAudio({
    fps,
    frame,
    audioData,
    numberOfSamples: 32,
  });

  return (
    <div style={{ display: 'flex', gap: 4, alignItems: 'flex-end' }}>
      {visualization.map((v, i) => (
        <div
          key={i}
          style={{
            width: 20,
            height: v * 300,
            backgroundColor: `hsl(${i * 10}, 80%, 60%)`,
          }}
        />
      ))}
    </div>
  );
};

This creates a color-coded spectrum bar visualization that reacts to audio frequencies in real time.

§05

Related on TokRepo

§06

Common pitfalls

  • useAudioData() is async and returns null initially. Always add a null check before accessing the audio data to prevent render errors.
  • The numberOfSamples parameter must be a power of 2 (16, 32, 64, etc.) for proper FFT processing.
  • Audio visualization adds computation per frame. Keep the sample count reasonable (32-64) for real-time preview performance.
  • Always check the official documentation for the latest version-specific changes and migration guides before upgrading in production environments.

Frequently Asked Questions

What is a Remotion skill rule?+

A skill rule is a configuration file that teaches AI coding agents the correct API patterns for a specific domain. The audio visualization rule provides the exact Remotion hooks and functions needed for audio-reactive video components.

What visualization types does this rule cover?+

The rule covers spectrum bar animations, waveform rendering, and bass-reactive effects. These are the most common audio visualization patterns for music videos, podcast visuals, and audio-driven content.

Do I need an audio file to use these patterns?+

Yes. Remotion's audio visualization APIs require an audio source file (MP3, WAV, etc.) to extract frequency data. The audio file is referenced by URL or local path in the component props.

Can I customize the visual style of the spectrum bars?+

Yes. The visualizeAudio function returns normalized amplitude values (0 to 1) that you map to any visual representation. You control colors, shapes, sizes, and animation curves in your React component.

Does this work with Remotion's server-side rendering?+

Yes. Remotion's audio APIs work in both preview mode and during server-side rendering for final video output. The visualization is deterministic per frame, ensuring consistent results between preview and rendered output.

Citations (3)
🙏

Source & Thanks

Created by Remotion. Licensed under MIT. remotion-dev/skills — Rule: audio-visualization

Part of the Remotion AI Skill collection on TokRepo.

Discussion

Sign in to join the discussion.
No comments yet. Be the first to share your thoughts.

Related Assets