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.
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.
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.
How to use
- Install the Remotion skills:
npx skills add remotion-dev/skills
- The rule activates automatically when you work on audio visualization in a Remotion project.
- Ask your AI agent to create audio-reactive components and it will use the correct Remotion patterns.
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.
Related on TokRepo
- AI Tools for Video — Video creation and editing tools for programmatic content
- AI Tools for Design — Design tools for creating visual assets and animations
Common pitfalls
useAudioData()is async and returns null initially. Always add a null check before accessing the audio data to prevent render errors.- The
numberOfSamplesparameter 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
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.
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.
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.
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.
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)
- Remotion Documentation— Remotion audio visualization APIs for programmatic video
- Remotion Skills GitHub— Official Remotion Agent Skill for AI coding assistants
- Remotion GitHub— React-based programmatic video creation
Related on TokRepo
Source & Thanks
Created by Remotion. Licensed under MIT. remotion-dev/skills — Rule:
audio-visualization
Part of the Remotion AI Skill collection on TokRepo.
Discussion
Related Assets
Claude-Flow — Multi-Agent Orchestration for Claude Code
Layers swarm and hive-mind multi-agent orchestration on top of Claude Code with 64 specialized agents, SQLite memory, and parallel execution.
ccusage — Real-Time Token Cost Tracker for Claude Code
CLI that reads ~/.claude logs and breaks down Claude Code token spend by day, session, and project — pluggable into your statusline.
SuperClaude — Workflow Framework for Claude Code
Adds 16+ slash commands, 9 cognitive personas, and a smart flag system to Claude Code in one pipx install.