add-sound-effect

star 0

Add a new sound effect to the remotion-media project. Converts a source audio file to WAV format normalized to -3dB peak and adds it to generate.ts.

remotion-dev By remotion-dev schedule Updated 3/5/2026

name: add-sound-effect description: Add a new sound effect to the remotion-media project. Converts a source audio file to WAV format normalized to -3dB peak and adds it to generate.ts. user-invocable: true

Add Sound Effect

Add a new sound effect WAV file to the remotion-media project.

Required information

Ask the user for:

  1. Output filename (e.g. bruh.wav)
  2. Source file path (e.g. /Users/jonathanburger/Downloads/source.mp3)
  3. Attribution source URL

Steps

  1. Detect peak volume of the source file:

    ffmpeg -i <source> -af "volumedetect" -f null - 2>&1 | grep max_volume
    
  2. Calculate gain adjustment: target is -3dB peak. If current max is X dB, apply (-3 - X) dB gain.

  3. Convert to WAV with gain adjustment, 44100 Hz sample rate, PCM 16-bit:

    ffmpeg -i <source> -af "volume=<adjustment>dB" -c:a pcm_s16le -ar 44100 <project_root>/<output_filename> -y
    
  4. Trim trailing silence using silence detection:

    ffmpeg -i <output> -af "silencedetect=noise=-40dB:d=0.1" -f null - 2>&1 | grep silence
    

    If there is trailing silence (silence_start near the end), trim the file to just after the last non-silent section (add ~0.15s padding after the last sound):

    ffmpeg -i <output> -t <trim_point> -c:a pcm_s16le -ar 44100 <output_trimmed> -y && mv <output_trimmed> <output>
    
  5. Verify the output peaks at -3dB:

    ffmpeg -i <output> -af "volumedetect" -f null - 2>&1 | grep max_volume
    
  6. Add entry to the soundEffects array in generate.ts:

    {
      fileName: "<output_filename>",
      attribution: "<description> -- <source_url>",
    },
    

    Insert before the closing ]; of the soundEffects array.

Install via CLI
npx skills add https://github.com/remotion-dev/remotion.media --skill add-sound-effect
Repository Details
star Stars 0
call_split Forks 1
navigation Branch main
article Path SKILL.md
More from Creator
remotion-dev
remotion-dev Explore all skills →