Cette page est affichée en anglais. Une traduction française est en cours.
SkillsMar 29, 2026·2 min de lecture

Remotion Rule: Audio

Remotion skill rule: Using audio and sound in Remotion - importing, trimming, volume, speed, pitch. Part of the official Remotion Agent Skill for programmatic video in React.

Prêt pour agents

Installation agent prête

Cet actif peut être installé après choix du runtime, vérification du plan et exécution de la commande adaptée.

Native · 98/100Policy : autoriser
Surface agent
Tout agent MCP/CLI
Type
Skill
Installation
Single
Confiance
Confiance : Established
Point d'entrée
Remotion Rule: Audio
Commande d'installation directe
npx -y tokrepo@latest install e92dc629-9a69-4a43-9143-6aec38691794 --target codex

À exécuter après confirmation du plan en dry-run.

TL;DR
Remotion audio rule covers importing, trimming, volume, speed, and pitch for sound in React-based programmatic video projects.
§01

What it is

The Remotion Rule: Audio is a skill rule from the official Remotion Agent Skill set. It provides structured guidance for AI coding agents working with audio in Remotion projects. Remotion is a framework for creating programmatic video using React components, and this rule covers the audio layer: importing sound files, trimming clips, adjusting volume over time, changing playback speed, and modifying pitch.

This rule is for developers using AI coding assistants (like Claude Code) to build Remotion video projects. When activated, it teaches the AI how to correctly use Remotion's audio APIs.

§02

How it saves time or tokens

Without this rule, an AI coding agent would need to discover Remotion's audio API conventions through trial and error or by reading documentation. The rule provides the correct patterns upfront, reducing failed attempts and token waste on incorrect code generation.

The rule is approximately 500 tokens and activates automatically when audio work is detected in a Remotion project context.

§03

How to use

  1. Install the Remotion skills:
npx skills add remotion-dev/skills
  1. The audio rule activates automatically when working with audio in a Remotion project.
  1. Use the Audio component in your Remotion composition:
import { Audio } from 'remotion';

export const MyVideo: React.FC = () => {
  return (
    <Audio
      src='https://example.com/music.mp3'
      volume={0.5}
      startFrom={30}  // skip first 30 frames
      endAt={150}      // stop at frame 150
    />
  );
};
§04

Example

Dynamic volume adjustment with a fade-in effect:

import { Audio, interpolate, useCurrentFrame } from 'remotion';

export const FadeInAudio: React.FC = () => {
  const frame = useCurrentFrame();

  const volume = interpolate(
    frame,
    [0, 30],   // frames 0 to 30
    [0, 1],    // volume 0 to 1
    { extrapolateRight: 'clamp' }
  );

  return (
    <Audio
      src='https://example.com/bgm.mp3'
      volume={volume}
    />
  );
};

The interpolate function creates smooth transitions for volume, making fade-in and fade-out effects straightforward.

§05

Related on TokRepo

§06

Common pitfalls

  • Using unsupported audio formats. Remotion supports MP3, WAV, and AAC. Some browsers have limited codec support for formats like OGG or FLAC during preview.
  • Forgetting that Audio components must be inside a Remotion Composition. Placing them outside the composition tree causes silent failures.
  • Not pre-loading audio assets. For remote URLs, add the audio to your public folder or use the staticFile() helper to avoid loading delays during rendering.

Questions fréquentes

What audio formats does Remotion support?+

Remotion supports MP3, WAV, and AAC audio formats. The support depends on the browser engine used for rendering (Chromium). For production renders, MP3 and AAC are the most reliable choices.

Can I control audio volume dynamically in Remotion?+

Yes. The Audio component accepts a volume prop that can be a static number (0 to 1) or a function that receives the frame number. Using interpolate() with useCurrentFrame() creates smooth volume transitions like fade-in and fade-out.

How do I trim audio in Remotion?+

Use the startFrom and endAt props on the Audio component. startFrom skips a number of frames from the beginning of the audio file. endAt stops playback at a specific frame. Both work in frame units based on your composition's FPS.

Can I change audio playback speed in Remotion?+

Yes. Use the playbackRate prop on the Audio component. A value of 2 doubles the speed, 0.5 halves it. Note that changing playback speed also affects pitch unless you use additional audio processing.

How does this skill rule integrate with Claude Code?+

Install the Remotion skills with 'npx skills add remotion-dev/skills'. When Claude Code detects audio-related work in a Remotion project, this rule activates automatically and provides correct API patterns without manual instruction.

Sources citées (3)
🙏

Source et remerciements

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

Part of the Remotion AI Skill collection on TokRepo.

Fil de discussion

Connectez-vous pour rejoindre la discussion.
Aucun commentaire pour l'instant. Soyez le premier à partager votre avis.

Actifs similaires