audio

audio is a cursor rule for Cursor from ratnesh-maurya/cursor-claude-personas. It costs 17 tokens per session (1,029 once invoked), scanned A, original, MIT.

A Remotion guide for adding audio files to generated videos, including remote audio, trimming, volume, speed, and pitch controls.

In plain words
What is it for?
Adding music, narration, or sound effects to Remotion compositions and editing when they start, stop, or play.
Why use it?
It explains how to place and adjust sound without guessing at the Remotion media API or timing values.

Cursor rule for Cursor

Written for Cursor: installed under .cursor/.

Good fit Adding music, narration, or sound effects to Remotion compositions and editing when they start, stop, or play.

Compare 6 cursor rules from other repositories ↓
Install with agentmods
npx agentmods add rules/ratnesh-maurya/cursor-claude-personas/rules-audio
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Clone the repo
git clone --depth 1 https://github.com/ratnesh-maurya/cursor-claude-personas

Made for: Cursor.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for audio

README.md
[![agentmods](https://agentmods.dev/badge/rules/ratnesh-maurya/cursor-claude-personas/rules-audio/github.svg)](https://agentmods.dev/rules/ratnesh-maurya/cursor-claude-personas/rules-audio)
Your own site
<a href="https://agentmods.dev/rules/ratnesh-maurya/cursor-claude-personas/rules-audio"><img src="https://agentmods.dev/badge/rules/ratnesh-maurya/cursor-claude-personas/rules-audio/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for audio

Your own site · 80×15
<a href="https://agentmods.dev/rules/ratnesh-maurya/cursor-claude-personas/rules-audio"><img src="https://agentmods.dev/badge/rules/ratnesh-maurya/cursor-claude-personas/rules-audio.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 17 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,029 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00017 $0.01029
Opus 5 $0.00009 $0.00515
Sonnet 5 $0.00003 $0.00206
Haiku 4.5 $0.00002 $0.00103

Measured 5d ago against content hash 06d859b2f463, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-09, from the pricing page.

Security

Grade A, and why

audio scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 5d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

3d-frontend-developer/.cursor/rules/rules--audio.mdc · 173 lines

How it starts

The opening of the file, as written. The whole thing — 173 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Using audio in Remotion

Prerequisites

First, the @remotion/media package needs to be installed. If it is not installed, use the following command:

npx remotion add @remotion/media # If project uses npm
bunx remotion add @remotion/media # If project uses bun
yarn remotion add @remotion/media # If project uses yarn
pnpm exec remotion add @remotion/media # If project uses pnpm

Importing Audio

Use <Audio> from @remotion/media to add audio to your composition.

import { Audio } from "@remotion/media";
import { staticFile } from "remotion";

export const MyComposition = () => {
  return <Audio src={staticFile("audio.mp3")} />;
};

Remote URLs are also supported:

<Audio src="https://remotion.media/audio.mp3" />

By default, audio plays from the start, at full volume and full length. Multiple audio tracks can be layered by adding multiple <Audio> components.

Trimming

Use trimBefore and trimAfter to remove portions of the audio. Values are in frames.

const { fps } = useVideoConfig();

return (
  <Audio
    src={staticFile("audio.mp3")}
    trimBefore={2 * fps} // Skip the first 2 seconds
    trimAfter={10 * fps} // End at the 10 second mark
  />
);

The audio still starts playing at the beginning of the composition - only the specified portion is played.

Delaying

Wrap the audio in a <Sequence> to delay when it starts:

import { Sequence, staticFile } from "remotion";
import { Audio } from "@remotion/media";

const { fps } = useVideoConfig();

return (
  <Sequence from={1 * fps}>
    <Audio src={staticFile("audio.mp3")} />
  </Sequence>
);

The audio will start playing after 1 second.

Volume

Set a static volume (0 to 1):

<Audio src={staticFile("audio.mp3")} volume={0.5} />

Or use a callback for dynamic volume based on the current frame:

import { interpolate } from "remotion";

const { fps } = useVideoConfig();

return (
  <Audio
    src={staticFile("audio.mp3")}
    volume={(f) =>
      interpolate(f, [0, 1 * fps], [0, 1], { extrapolateRight: "clamp" })
    }
  />
);

Read the full file on GitHub · 173 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 5d ago First seen · 173 lines · 17 tokens per session scan A 06d859b2f463

Subscribe to this mod's changes

audio is a cursor rule published in the GitHub repository ratnesh-maurya/cursor-claude-personas (8 stars, last pushed 5mo ago), licensed MIT. It adds 17 tokens to every session and 1,029 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.