Skip to content

πŸŽ₯ Make videos programmatically with React

`@remotion/sfx`: Clean up PR follow-ups

JonnyBurger1a867335ed89
diff --git a/packages/docs/sidebars.ts b/packages/docs/sidebars.ts
index 2db51c9cc4..348d06f1cc 100644
--- a/packages/docs/sidebars.ts
+++ b/packages/docs/sidebars.ts
@@ -500,7 +500,6 @@ const sidebars: SidebarsConfig = {
'sfx/bruh',
'sfx/vine-boom',
'sfx/windows-xp-error',
- // Issue #7054
'sfx/fah',
'sfx/spongebob-fail',
'sfx/omg-hell-nah',
diff --git a/packages/sfx/src/index.ts b/packages/sfx/src/index.ts
index 296a4cfb68..d1bc471576 100644
--- a/packages/sfx/src/index.ts
+++ b/packages/sfx/src/index.ts
@@ -11,8 +11,6 @@ export const bruh = 'https://remotion.media/bruh.wav' as const;
export const vineBoom = 'https://remotion.media/vine-boom.wav' as const;
export const windowsXpError =
'https://remotion.media/windows-xp-error.wav' as const;
-
-// Issue #7054 myinstants sound effects
export const fah = 'https://remotion.media/fah.wav' as const;
export const spongebobFail =
'https://remotion.media/spongebob-fail.wav' as const;
diff --git a/packages/skills/skills/remotion/rules/sfx.md b/packages/skills/skills/remotion/rules/sfx.md
index 57f571203b..630f585fac 100644
--- a/packages/skills/skills/remotion/rules/sfx.md
+++ b/packages/skills/skills/remotion/rules/sfx.md
@@ -26,8 +26,6 @@ The following sound effects are available:
- `https://remotion.media/bruh.wav`
- `https://remotion.media/vine-boom.wav`
- `https://remotion.media/windows-xp-error.wav`
-
-<!-- Issue #7054 -->
- `https://remotion.media/fah.wav`
- `https://remotion.media/spongebob-fail.wav`
- `https://remotion.media/omg-hell-nah.wav`
diff --git a/scripts/apply-sfx-renames.ts b/scripts/apply-sfx-renames.ts
deleted file mode 100644
index 55e09c5d5d..0000000000
--- a/scripts/apply-sfx-renames.ts
+++ /dev/null
@@ -1,122 +0,0 @@
-import {copyFileSync, existsSync, mkdirSync, readdirSync, rmSync, statSync, unlinkSync} from 'node:fs';
-import path from 'node:path';
-import {OLD_7054_FILES, SFX_FINAL} from './sfx-final-names';
-
-const MEDIA = path.join(import.meta.dir, '../packages/remotion-media');
-const DOCS = path.join(import.meta.dir, '../packages/docs/docs/sfx');
-const OLD_SLUGS = [
- 'faaah',
- 'x-files',
- 'fail-horn',
- 'romance',
- 'yippieh',
- 'lagging',
- 'quack',
- 'notification-snap',
- 'aah',
- 'what',
- 'hurt',
- 'oh-ma-gaud',
- 'illuminati',
- 'core-trigger',
-];
-
-// Rename WAV files in remotion-media package root
-for (const sfx of SFX_FINAL) {
- const src = path.join(MEDIA, sfx.oldFileName ?? sfx.fileName);
- const dest = path.join(MEDIA, sfx.fileName);
- if (!existsSync(src)) {
- throw new Error(`Missing source wav: ${src}`);
- }
-
- if (src !== dest) {
- copyFileSync(src, dest);
- }
-}
-
-// Remove obsolete wav files (including x-files duplicate)
-for (const file of [...OLD_7054_FILES, 'x-files.wav']) {
- const p = path.join(MEDIA, file);
- if (existsSync(p)) {
- unlinkSync(p);
- }
-}
-
-// Copy to files/ for R2
-mkdirSync(path.join(MEDIA, 'files'), {recursive: true});
-for (const sfx of SFX_FINAL) {
- copyFileSync(
- path.join(MEDIA, sfx.fileName),
- path.join(MEDIA, 'files', sfx.fileName),
- );
-}
-
-// Remove old doc pages
-for (const slug of OLD_SLUGS) {
- const mdx = path.join(DOCS, `${slug}.mdx`);
- if (existsSync(mdx)) {
- rmSync(mdx);
- }
-}
-
-// Update variants.json β€” drop old 7054 entries, add final
-const variantsPath = path.join(MEDIA, 'variants.json');
-const variants = JSON.parse(await Bun.file(variantsPath).text()) as Array<{
- fileNames: string[];
- category: string;
- attribution?: string;
- videoCodec: string;
- audioCodec: string;
- container: string;
- size: number;
-}>;
-
-const oldNames = new Set([
- ...OLD_7054_FILES,
- ...SFX_FINAL.map((s) => s.oldFileName).filter(Boolean) as string[],
- ...SFX_FINAL.map((s) => s.fileName),
-]);
-
-const filtered = variants.filter(
- (v) =>
- !(
- v.category === 'sound-effects' &&
- v.fileNames.some((f) => oldNames.has(f))
- ),
-);
-
-for (const sfx of SFX_FINAL) {
- const size = statSync(path.join(MEDIA, sfx.fileName)).size;
- const label = sfx.description.replace(' sound effect', '');
- filtered.push({
- videoCodec: 'none',
- audioCodec: 'pcm',
- container: 'wav',
- fileNames: [sfx.fileName],
- size,
- category: 'sound-effects',
- attribution: `${label} -- ${sfx.pageUrl}`,
- });
-}
-
-await Bun.write(variantsPath, JSON.stringify(filtered, null, 2) + '\n');
-
-// Update generate.ts soundEffects block
-const generatePath = path.join(MEDIA, 'generate.ts');
-let generate = await Bun.file(generatePath).text();
-const start = generate.indexOf('\t{\n\t\tfileName: \'faaah.wav\'');
-const end = generate.indexOf('\n];\n\nfor (const sfx of soundEffects)');
-if (start === -1 || end === -1) {
- throw new Error('Could not find soundEffects block to replace in generate.ts');
-}
-
-const entries = SFX_FINAL.map((sfx) => {
- const label = sfx.description.replace(' sound effect', '');
- return `\t{\n\t\tfileName: '${sfx.fileName}',\n\t\tattribution: '${label} -- ${sfx.pageUrl}',\n\t},`;
-});
-
-generate =
- generate.slice(0, start) + '\n' + entries.join('\n') + generate.slice(end);
-await Bun.write(generatePath, generate);
-
-console.log(`Renamed ${SFX_FINAL.length} wav files, updated variants.json and generate.ts`);
diff --git a/scripts/download-myinstants-7054.ts b/scripts/download-myinstants-7054.ts
deleted file mode 100644
index 5ad00904d2..0000000000
--- a/scripts/download-myinstants-7054.ts
+++ /dev/null
@@ -1,75 +0,0 @@
-const OUT = new URL('../downloads/myinstants-7054/', import.meta.url);
-
-const items: {slug: string; page: string}[] = [
- {slug: 'faaah', page: 'https://www.myinstants.com/en/instant/fahhhhhhhhhhhhhh-3525/'},
- {slug: 'spongebob-fail', page: 'https://www.myinstants.com/en/instant/spongebob-fail-11236/'},
- {slug: 'omg-hell-nah', page: 'https://www.myinstants.com/en/instant/oh-my-god-bro-oh-hell-nah-man-42939/'},
- {slug: 'x-files', page: 'https://www.myinstants.com/en/instant/x-files/'},
- {slug: 'fail-horn', page: 'https://www.myinstants.com/en/instant/fail-horn/'},
- {slug: 'romance', page: 'https://www.myinstants.com/en/instant/romanceeeeeeeeeeeeee-29042/'},
- {slug: 'bone-crack', page: 'https://www.myinstants.com/en/instant/bone-crack-23901/'},
- {slug: 'anime-wow', page: 'https://www.myinstants.com/en/instant/anime-wow/'},
- {slug: 'yippieh', page: 'https://www.myinstants.com/en/instant/yippeeeeeeeeeeeeee-34261/'},
- {slug: 'lagging', page: 'https://www.myinstants.com/en/instant/lagging-loading-11339/'},
- {slug: 'wilhelm-scream', page: 'https://www.myinstants.com/en/instant/man-screaming-aaaah-32768/'},
- {slug: 'quack', page: 'https://www.myinstants.com/en/instant/mac-quack-83896/'},
- {slug: 'skedaddle', page: 'https://www.myinstants.com/en/instant/skedaddle-78470/'},
- {slug: 'notification', page: 'https://www.myinstants.com/en/instant/notification-snap-43481/'},
- {slug: 'aah', page: 'https://www.myinstants.com/en/instant/nelly-ahh-89172/'},
- {slug: 'what', page: 'https://www.myinstants.com/en/instant/what-bottom-text-meme-sanctuary-guardian-s-24591/'},
- {slug: 'hurt', page: 'https://www.myinstants.com/en/instant/minecraft-hurt/'},
- {slug: 'oh-ma-gaud', page: 'https://www.myinstants.com/en/instant/oh-ma-gaud-vine-78004/'},
- {slug: 'illuminati', page: 'https://www.myinstants.com/en/instant/illuminati-confirmed-meme-99730/'},
- {slug: 'dramatic-boomer', page: 'https://www.myinstants.com/en/instant/dramatic-boomer-29428/'},
- {slug: 'core-trigger', page: 'https://www.myinstants.com/en/instant/core-sound-effect-57998/'},
-];
-
-const mp3Re = /https:\/\/www\.myinstants\.com\/media\/sounds\/[^"]+\.mp3/;
-
-import {mkdir} from 'node:fs/promises';
-
-await mkdir(OUT, {recursive: true});
-
-const manifestLines = ['slug\tpage_url\tmp3_url\tlocal_file\tbytes'];
-let ok = 0;
-let fail = 0;
-
-for (const {slug, page} of items) {
- try {
- const html = await fetch(page).then((r) => {
- if (!r.ok) {
- throw new Error(`HTTP ${r.status}`);
- }
-
- return r.text();
- });
- const mp3 = html.match(mp3Re)?.[0];
- if (!mp3) {
- console.error(`FAIL no mp3 link: ${slug}`);
- fail++;
- continue;
- }
-
- const fname = mp3.split('/').pop()!;
- const dest = new URL(`${slug}--${fname}`, OUT);
- const res = await fetch(mp3);
- if (!res.ok) {
- throw new Error(`HTTP ${res.status}`);
- }
-
- const buf = await res.arrayBuffer();
- await Bun.write(dest, buf);
- const bytes = buf.byteLength;
- manifestLines.push(
- `${slug}\t${page}\t${mp3}\t${dest.pathname}\t${bytes}`,
- );
- console.log(`OK ${slug} -> ${fname} (${bytes} bytes)`);
- ok++;
- } catch (err) {
- console.error(`FAIL ${slug}:`, err);
- fail++;
- }
-}
-
-await Bun.write(new URL('manifest.tsv', OUT), manifestLines.join('\n') + '\n');
-console.log(`---\nDownloaded: ${ok}, Failed: ${fail}`);
diff --git a/scripts/download-myinstants-sfx.sh b/scripts/download-myinstants-sfx.sh
deleted file mode 100644
index 68b051f5bc..0000000000
--- a/scripts/download-myinstants-sfx.sh
+++ /dev/null
@@ -1,59 +0,0 @@
-#!/usr/bin/env bash
-# Downloads sound effects from myinstants.com pages listed in issue #7054.
-set -euo pipefail
-
-OUT_DIR="$(cd "$(dirname "$0")/.." && pwd)/myinstants-downloads"
-mkdir -p "$OUT_DIR"
-
-declare -a ITEMS=(
- "faaah|https://www.myinstants.com/en/instant/fahhhhhhhhhhhhhh-3525/"
- "spongebob-fail|https://www.myinstants.com/en/instant/spongebob-fail-11236/"
- "omg-hell-nah|https://www.myinstants.com/en/instant/oh-my-god-bro-oh-hell-nah-man-42939/"
- "x-files|https://www.myinstants.com/en/instant/x-files/"
- "fail-horn|https://www.myinstants.com/en/instant/fail-horn/"
- "romance|https://www.myinstants.com/en/instant/romanceeeeeeeeeeeeee-29042/"
- "bone-crack|https://www.myinstants.com/en/instant/bone-crack-23901/"
- "anime-wow|https://www.myinstants.com/en/instant/anime-wow/"
- "yippieh|https://www.myinstants.com/en/instant/yippeeeeeeeeeeeeee-34261/"
- "lagging|https://www.myinstants.com/en/instant/lagging-loading-11339/"
- "wilhelm-scream|https://www.myinstants.com/en/instant/man-screaming-aaaah-32768/"
- "quack|https://www.myinstants.com/en/instant/mac-quack-83896/"
- "skedaddle|https://www.myinstants.com/en/instant/skedaddle-78470/"
- "notification|https://www.myinstants.com/en/instant/notification-snap-43481/"
- "aah|https://www.myinstants.com/en/instant/nelly-ahh-89172/"
- "what|https://www.myinstants.com/en/instant/what-bottom-text-meme-sanctuary-guardian-s-24591/"
- "hurt|https://www.myinstants.com/en/instant/minecraft-hurt/"
- "oh-ma-gaud|https://www.myinstants.com/en/instant/oh-ma-gaud-vine-78004/"
- "illuminati|https://www.myinstants.com/en/instant/illuminati-confirmed-meme-99730/"
- "dramatic-boomer|https://www.myinstants.com/en/instant/dramatic-boomer-29428/"
- "core-trigger|https://www.myinstants.com/en/instant/core-sound-effect-57998/"
-)
-
-ok=0
-fail=0
-
-for item in "${ITEMS[@]}"; do
- name="${item%%|*}"
- url="${item#*|}"
- mp3_url=$(curl -fsSL "$url" | rg -o 'https://www\.myinstants\.com/media/sounds/[^"'\'' ]+\.mp3' -m 1 || true)
-
- if [[ -z "$mp3_url" ]]; then
- echo "FAIL $name: no MP3 link on $url"
- fail=$((fail + 1))
- continue
- fi
-
- out="$OUT_DIR/${name}.mp3"
- if curl -fsSL "$mp3_url" -o "$out"; then
- bytes=$(wc -c <"$out" | tr -d ' ')
- echo "OK $name ($bytes bytes) <- $mp3_url"
- ok=$((ok + 1))
- else
- echo "FAIL $name: download failed for $mp3_url"
- rm -f "$out"
- fail=$((fail + 1))
- fi
-done
-
-echo ""
-echo "Done: $ok succeeded, $fail failed -> $OUT_DIR"
diff --git a/scripts/generate-sfx-package-docs.ts b/scripts/generate-sfx-package-docs.ts
deleted file mode 100644
index 4228c37834..0000000000
--- a/scripts/generate-sfx-package-docs.ts
+++ /dev/null
@@ -1,207 +0,0 @@
-import path from 'node:path';
-import {SFX_FINAL} from './sfx-final-names';
-
-const VERSION = '4.0.464';
-const DOCS_DIR = path.join(import.meta.dir, '../packages/docs/docs/sfx');
-const durations = await Bun.file(
- path.join(import.meta.dir, '../downloads/wav-normalized/durations.json'),
-).json() as Record<string, string>;
-
-const durationFor = (fileName: string, oldFileName?: string) => {
- return (
- durations[fileName] ??
- (oldFileName ? durations[oldFileName] : undefined) ??
- 'unknown'
- );
-};
-
-const attributionBlock = (pageUrl: string) => `Taken from ${pageUrl}.
-This sound is not explicitly released under a free license, but it is probably fine to use given its widespread use.
-Remotion will not take any responsibility for your use of this sound.`;
-
-const seeAlso = [
- '[`bruh`](/docs/sfx/bruh)',
- '[`vineBoom`](/docs/sfx/vine-boom)',
- '[`windowsXpError`](/docs/sfx/windows-xp-error)',
-];
-
-for (const entry of SFX_FINAL) {
- const duration = durationFor(entry.fileName, entry.oldFileName);
- const mdx = `---
-image: /generated/articles-docs-sfx-${entry.slug}.png
-title: '${entry.exportName}'
-crumb: '@remotion/sfx'
----
-
-# ${entry.exportName}<AvailableFrom v="${VERSION}" />
-
-import {PlayButton} from './PlayButton';
-
-<PlayButton src="https://remotion.media/${entry.fileName}" />
-<br />
-
-A URL pointing to a ${entry.description.replace(' sound effect', '')} WAV file.
-
-## Example
-
-\`\`\`tsx twoslash title="MyComp.tsx"
-import {${entry.exportName}} from '@remotion/sfx';
-import {Audio} from '@remotion/media';
-
-const MyVideo = () => {
- return <Audio src={${entry.exportName}} />;
-};
-\`\`\`
-
-## Value
-
-\`\`\`bash
-https://remotion.media/${entry.fileName}
-\`\`\`
-
-## Duration
-
-${duration}
-
-## Attribution
-
-${attributionBlock(entry.pageUrl)}
-
-## See also
-
-${seeAlso.map((l) => `- ${l}`).join('\n')}
-`;
-
- await Bun.write(path.join(DOCS_DIR, `${entry.slug}.mdx`), mdx);
-}
-
-const exports = SFX_FINAL.map(
- (e) => `export const ${e.exportName} = 'https://remotion.media/${e.fileName}' as const;`,
-).join('\n');
-
-const existing = await Bun.file(
- path.join(import.meta.dir, '../packages/sfx/src/index.ts'),
-).text();
-
-const marker = '// Issue #7054 myinstants sound effects';
-const base = existing.includes(marker)
- ? existing.split(marker)[0]!.trimEnd()
- : existing.trimEnd();
-
-await Bun.write(
- path.join(import.meta.dir, '../packages/sfx/src/index.ts'),
- `${base}\n\n${marker}\n${exports}\n`,
-);
-
-const existingTocItems = [
- ['whip', 'whip', 'whip', 'Whip sound effect'],
- ['whoosh', 'whoosh', 'whoosh', 'Whoosh sound effect'],
- ['page-turn', 'page-turn', 'pageTurn', 'Page turn sound effect'],
- ['ui-switch', 'switch', 'uiSwitch', 'UI switch sound effect'],
- ['mouse-click', 'mouse-click', 'mouseClick', 'Mouse click sound effect'],
- ['shutter-modern', 'shutter-modern', 'shutterModern', 'Modern camera shutter sound effect'],
- ['shutter-old', 'shutter-old', 'shutterOld', 'Vintage camera shutter sound effect'],
- ['ding', 'ding', 'ding', 'Ding notification sound effect'],
- ['bruh', 'bruh', 'bruh', 'Bruh sound effect'],
- ['vine-boom', 'vine-boom', 'vineBoom', 'Vine boom sound effect'],
- ['windows-xp-error', 'windows-xp-error', 'windowsXpError', 'Windows XP error sound effect'],
-] as const;
-
-const allTocItems = [
- ...existingTocItems.map(
- ([slug, file, name, description]) =>
- `\t\t\t\t<SfxItem link="/docs/sfx/${slug}" src="https://remotion.media/${file}.wav" name="${name}" description="${description}" />`,
- ),
- ...SFX_FINAL.map(
- (e) =>
- `\t\t\t\t<SfxItem link="/docs/sfx/${e.slug}" src="https://remotion.media/${e.fileName}" name="${e.exportName}" description="${e.description}" />`,
- ),
-].join('\n');
-
-const tocHeader = `import React from 'react';
-import {Grid} from '../../components/TableOfContents/Grid';
-import {TOCItem} from '../../components/TableOfContents/TOCItem';
-import {PlayButton} from './PlayButton';
-
-const SfxItem: React.FC<{
- readonly link: string;
- readonly src: string;
- readonly name: string;
- readonly description: string;
-}> = ({link, src, name, description}) => {
- return (
- <TOCItem link={link}>
- <div style={{display: 'flex', flexDirection: 'row', alignItems: 'center', gap: 12}}>
- <PlayButton src={src} size={32} depth={0.5} />
- <div>
- <strong>{name}</strong>
- <div>{description}</div>
- </div>
- </div>
- </TOCItem>
- );
-};
-
-export const TableOfContents: React.FC = () => {
- return (
- <div>
- <Grid>
-`;
-
-await Bun.write(
- path.join(DOCS_DIR, 'table-of-contents.tsx'),
- `${tocHeader}${allTocItems}
- </Grid>
- </div>
- );
-};
-`,
-);
-
-const sidebarPath = path.join(import.meta.dir, '../packages/docs/sidebars.ts');
-const sidebar = await Bun.file(sidebarPath).text();
-const sidebarMarker = '// Issue #7054';
-const sidebarItems = SFX_FINAL.map((e) => `\t\t\t\t'sfx/${e.slug}',`).join('\n');
-
-if (sidebar.includes(sidebarMarker)) {
- const before = sidebar.split(sidebarMarker)[0]!;
- const afterPart = sidebar.split(sidebarMarker)[1]!;
- const afterLines = afterPart.split('\n');
- const endIdx = afterLines.findIndex((l) => l.trim() === '],');
- const after = endIdx === -1 ? '' : afterLines.slice(endIdx).join('\n');
- await Bun.write(sidebarPath, `${before}${sidebarMarker}\n${sidebarItems}${after}`);
-} else {
- await Bun.write(
- sidebarPath,
- sidebar.replace(
- "\t\t\t\t'sfx/windows-xp-error',",
- `\t\t\t\t'sfx/windows-xp-error',\n\t\t\t\t${sidebarMarker}\n${sidebarItems}`,
- ),
- );
-}
-
-const skillsPath = path.join(
- import.meta.dir,
- '../packages/skills/skills/remotion/rules/sfx.md',
-);
-const skills = await Bun.file(skillsPath).text();
-const skillsMarker = '<!-- Issue #7054 -->';
-const skillUrls = SFX_FINAL.map(
- (e) => `- \`https://remotion.media/${e.fileName}\``,
-).join('\n');
-
-if (skills.includes(skillsMarker)) {
- const before = skills.split(skillsMarker)[0]!.trimEnd();
- const after = skills.split(skillsMarker)[1] ?? '';
- await Bun.write(skillsPath, `${before}\n\n${skillsMarker}\n${skillUrls}${after}`);
-} else {
- await Bun.write(
- skillsPath,
- skills.replace(
- '- `https://remotion.media/windows-xp-error.wav`',
- `- \`https://remotion.media/windows-xp-error.wav\`\n\n${skillsMarker}\n${skillUrls}`,
- ),
- );
-}
-
-console.log(`Generated ${SFX_FINAL.length} docs and package exports.`);
diff --git a/scripts/normalize-myinstants-wav.ts b/scripts/normalize-myinstants-wav.ts
deleted file mode 100644
index 5d9c755dbc..0000000000
--- a/scripts/normalize-myinstants-wav.ts
+++ /dev/null
@@ -1,277 +0,0 @@
-import {mkdir, readdir} from 'node:fs/promises';
-import path from 'node:path';
-import {$} from 'bun';
-
-const DOWNLOADS = path.join(import.meta.dir, '../downloads/myinstants-7054');
-const OUT = path.join(import.meta.dir, '../downloads/wav-normalized');
-const REMOTION_MEDIA = path.join(
- import.meta.dir,
- '../packages/remotion-media',
-);
-
-export type SfxEntry = {
- slug: string;
- fileName: string;
- exportName: string;
- pageUrl: string;
- title: string;
- description: string;
- sourceGlob: string;
-};
-
-export const SFX_ENTRIES: SfxEntry[] = [
- {
- slug: 'faaah',
- fileName: 'faaah.wav',
- exportName: 'faaah',
- pageUrl: 'https://www.myinstants.com/en/instant/fahhhhhhhhhhhhhh-3525/',
- title: 'faaah',
- description: 'Faaah sound effect',
- sourceGlob: 'faaah--*',
- },
- {
- slug: 'spongebob-fail',
- fileName: 'spongebob-fail.wav',
- exportName: 'spongebobFail',
- pageUrl: 'https://www.myinstants.com/en/instant/spongebob-fail-11236/',
- title: 'spongebobFail',
- description: 'SpongeBob fail sound effect',
- sourceGlob: 'spongebob-fail--*',
- },
- {
- slug: 'omg-hell-nah',
- fileName: 'omg-hell-nah.wav',
- exportName: 'omgHellNah',
- pageUrl: 'https://www.myinstants.com/en/instant/oh-my-god-bro-oh-hell-nah-man-42939/',
- title: 'omgHellNah',
- description: 'Oh my god bro hell nah sound effect',
- sourceGlob: 'omg-hell-nah--*',
- },
- {
- slug: 'x-files',
- fileName: 'x-files.wav',
- exportName: 'xFiles',
- pageUrl: 'https://www.myinstants.com/en/instant/x-files/',
- title: 'xFiles',
- description: 'X-Files theme sound effect',
- sourceGlob: 'x-files--*',
- },
- {
- slug: 'fail-horn',
- fileName: 'fail-horn.wav',
- exportName: 'failHorn',
- pageUrl: 'https://www.myinstants.com/en/instant/fail-horn/',
- title: 'failHorn',
- description: 'Fail horn sound effect',
- sourceGlob: 'fail-horn--*',
- },
- {
- slug: 'romance',
- fileName: 'romance.wav',
- exportName: 'romance',
- pageUrl: 'https://www.myinstants.com/en/instant/romanceeeeeeeeeeeeee-29042/',
- title: 'romance',
- description: 'Romance sound effect',
- sourceGlob: 'romance--*',
- },
- {
- slug: 'bone-crack',
- fileName: 'bone-crack.wav',
- exportName: 'boneCrack',
- pageUrl: 'https://www.myinstants.com/en/instant/bone-crack-23901/',
- title: 'boneCrack',
- description: 'Bone crack sound effect',
- sourceGlob: 'bone-crack--*',
- },
- {
- slug: 'anime-wow',
- fileName: 'anime-wow.wav',
- exportName: 'animeWow',
- pageUrl: 'https://www.myinstants.com/en/instant/anime-wow/',
- title: 'animeWow',
- description: 'Anime wow sound effect',
- sourceGlob: 'anime-wow--*',
- },
- {
- slug: 'yippieh',
- fileName: 'yippieh.wav',
- exportName: 'yippieh',
- pageUrl: 'https://www.myinstants.com/en/instant/yippeeeeeeeeeeeeee-34261/',
- title: 'yippieh',
- description: 'Yippieh sound effect',
- sourceGlob: 'yippieh--*',
- },
- {
- slug: 'lagging',
- fileName: 'lagging.wav',
- exportName: 'lagging',
- pageUrl: 'https://www.myinstants.com/en/instant/lagging-loading-11339/',
- title: 'lagging',
- description: 'Lagging loading sound effect',
- sourceGlob: 'lagging--*',
- },
- {
- slug: 'wilhelm-scream',
- fileName: 'wilhelm-scream.wav',
- exportName: 'wilhelmScream',
- pageUrl: 'https://www.myinstants.com/en/instant/man-screaming-aaaah-32768/',
- title: 'wilhelmScream',
- description: 'Wilhelm scream sound effect',
- sourceGlob: 'wilhelm-scream--*',
- },
- {
- slug: 'quack',
- fileName: 'quack.wav',
- exportName: 'quack',
- pageUrl: 'https://www.myinstants.com/en/instant/mac-quack-83896/',
- title: 'quack',
- description: 'Mac quack sound effect',
- sourceGlob: 'quack--*',
- },
- {
- slug: 'skedaddle',
- fileName: 'skedaddle.wav',
- exportName: 'skedaddle',
- pageUrl: 'https://www.myinstants.com/en/instant/skedaddle-78470/',
- title: 'skedaddle',
- description: 'Skedaddle sound effect',
- sourceGlob: 'skedaddle--*',
- },
- {
- slug: 'notification-snap',
- fileName: 'notification-snap.wav',
- exportName: 'notificationSnap',
- pageUrl: 'https://www.myinstants.com/en/instant/notification-snap-43481/',
- title: 'notificationSnap',
- description: 'Snapchat notification sound effect',
- sourceGlob: 'notification--*',
- },
- {
- slug: 'aah',
- fileName: 'aah.wav',
- exportName: 'aah',
- pageUrl: 'https://www.myinstants.com/en/instant/nelly-ahh-89172/',
- title: 'aah',
- description: 'Aah sound effect',
- sourceGlob: 'aah--*',
- },
- {
- slug: 'what',
- fileName: 'what.wav',
- exportName: 'what',
- pageUrl:
- 'https://www.myinstants.com/en/instant/what-bottom-text-meme-sanctuary-guardian-s-24591/',
- title: 'what',
- description: 'What meme sound effect',
- sourceGlob: 'what--*',
- },
- {
- slug: 'hurt',
- fileName: 'hurt.wav',
- exportName: 'hurt',
- pageUrl: 'https://www.myinstants.com/en/instant/minecraft-hurt/',
- title: 'hurt',
- description: 'Minecraft hurt sound effect',
- sourceGlob: 'hurt--*',
- },
- {
- slug: 'oh-ma-gaud',
- fileName: 'oh-ma-gaud.wav',
- exportName: 'ohMaGaud',
- pageUrl: 'https://www.myinstants.com/en/instant/oh-ma-gaud-vine-78004/',
- title: 'ohMaGaud',
- description: 'Oh ma gaud vine sound effect',
- sourceGlob: 'oh-ma-gaud--*',
- },
- {
- slug: 'illuminati',
- fileName: 'illuminati.wav',
- exportName: 'illuminati',
- pageUrl: 'https://www.myinstants.com/en/instant/illuminati-confirmed-meme-99730/',
- title: 'illuminati',
- description: 'Illuminati confirmed sound effect',
- sourceGlob: 'illuminati--*',
- },
- {
- slug: 'dramatic-boomer',
- fileName: 'dramatic-boomer.wav',
- exportName: 'dramaticBoomer',
- pageUrl: 'https://www.myinstants.com/en/instant/dramatic-boomer-29428/',
- title: 'dramaticBoomer',
- description: 'Dramatic boomer sound effect',
- sourceGlob: 'dramatic-boomer--*',
- },
- {
- slug: 'core-trigger',
- fileName: 'core-trigger.wav',
- exportName: 'coreTrigger',
- pageUrl: 'https://www.myinstants.com/en/instant/core-sound-effect-57998/',
- title: 'coreTrigger',
- description: 'Core trigger sound effect',
- sourceGlob: 'core-trigger--*',
- },
-];
-
-const matchGlob = (files: string[], glob: string): string | null => {
- const prefix = glob.replace('*', '');
- const matches = files.filter((f) => f.startsWith(prefix));
- return matches.sort().at(-1) ?? null;
-};
-
-const getMaxVolumeDb = async (input: string): Promise<number> => {
- const result =
- await $`ffmpeg -hide_banner -i ${input} -af volumedetect -f null -`.quiet().nothrow();
- const stderr = result.stderr.toString();
- const match = stderr.match(/max_volume:\s*(-?\d+(?:\.\d+)?)\s*dB/);
- if (!match) {
- throw new Error(`Could not detect max volume for ${input}`);
- }
-
- return Number.parseFloat(match[1]!);
-};
-
-const normalizeToWav = async (input: string, output: string) => {
- const maxVol = await getMaxVolumeDb(input);
- const gain = -3.0 - maxVol;
- await $`ffmpeg -hide_banner -y -i ${input} -af volume=${gain}dB -ar 44100 -ac 2 -c:a pcm_s16le ${output}`;
-};
-
-const getDurationInfo = async (wav: string): Promise<string> => {
- const result = await $`afinfo ${wav}`.quiet().nothrow();
- const out = result.stdout.toString() + result.stderr.toString();
- const durationMatch = out.match(/estimated duration:\s*([\d.]+)\s*sec/);
- const formatMatch = out.match(/Data format:\s*(.+)/);
- const duration = durationMatch?.[1] ?? '?';
- const format = formatMatch?.[1]?.trim() ?? '?';
- return `${duration} seconds (${format})`;
-};
-
-if (import.meta.main) {
-await mkdir(OUT, {recursive: true});
-const files = await readdir(DOWNLOADS);
-const durations: Record<string, string> = {};
-
-for (const entry of SFX_ENTRIES) {
- const source = matchGlob(files, entry.sourceGlob);
- if (!source) {
- throw new Error(`Missing source for ${entry.slug} (${entry.sourceGlob})`);
- }
-
- const input = path.join(DOWNLOADS, source);
- const staged = path.join(OUT, entry.fileName);
- const dest = path.join(REMOTION_MEDIA, entry.fileName);
-
- console.log(`Processing ${entry.slug} <- ${source}`);
- await normalizeToWav(input, staged);
- await $`cp ${staged} ${dest}`;
- durations[entry.fileName] = await getDurationInfo(dest);
- const verify = await getMaxVolumeDb(dest);
- console.log(` -> ${entry.fileName}, peak ${verify} dB, ${durations[entry.fileName]}`);
-}
-
-await Bun.write(
- path.join(OUT, 'durations.json'),
- JSON.stringify(durations, null, 2),
-);
-console.log('Done.');
-}
diff --git a/scripts/sfx-final-names.ts b/scripts/sfx-final-names.ts
deleted file mode 100644
index 3cb59055da..0000000000
--- a/scripts/sfx-final-names.ts
+++ /dev/null
@@ -1,182 +0,0 @@
-export type SfxFinal = {
- slug: string;
- fileName: string;
- exportName: string;
- pageUrl: string;
- description: string;
- oldFileName?: string;
-};
-
-export const SFX_FINAL: SfxFinal[] = [
- {
- slug: 'fah',
- fileName: 'fah.wav',
- exportName: 'fah',
- oldFileName: 'faaah.wav',
- pageUrl: 'https://www.myinstants.com/en/instant/fahhhhhhhhhhhhhh-3525/',
- description: 'Fah meme sound effect',
- },
- {
- slug: 'spongebob-fail',
- fileName: 'spongebob-fail.wav',
- exportName: 'spongebobFail',
- pageUrl: 'https://www.myinstants.com/en/instant/spongebob-fail-11236/',
- description: 'SpongeBob fail sound effect',
- },
- {
- slug: 'omg-hell-nah',
- fileName: 'omg-hell-nah.wav',
- exportName: 'omgHellNah',
- pageUrl: 'https://www.myinstants.com/en/instant/oh-my-god-bro-oh-hell-nah-man-42939/',
- description: 'Oh my god bro hell nah sound effect',
- },
- {
- slug: 'price-is-right-fail',
- fileName: 'price-is-right-fail.wav',
- exportName: 'priceIsRightFail',
- oldFileName: 'fail-horn.wav',
- pageUrl: 'https://www.myinstants.com/en/instant/fail-horn/',
- description: 'Price Is Right fail horn sound effect',
- },
- {
- slug: 'romance-meme',
- fileName: 'romance-meme.wav',
- exportName: 'romanceMeme',
- oldFileName: 'romance.wav',
- pageUrl: 'https://www.myinstants.com/en/instant/romanceeeeeeeeeeeeee-29042/',
- description: 'Romance meme sound effect',
- },
- {
- slug: 'bone-crack',
- fileName: 'bone-crack.wav',
- exportName: 'boneCrack',
- pageUrl: 'https://www.myinstants.com/en/instant/bone-crack-23901/',
- description: 'Bone crack sound effect',
- },
- {
- slug: 'anime-wow',
- fileName: 'anime-wow.wav',
- exportName: 'animeWow',
- pageUrl: 'https://www.myinstants.com/en/instant/anime-wow/',
- description: 'Anime wow sound effect',
- },
- {
- slug: 'yippee',
- fileName: 'yippee.wav',
- exportName: 'yippee',
- oldFileName: 'yippieh.wav',
- pageUrl: 'https://www.myinstants.com/en/instant/yippeeeeeeeeeeeeee-34261/',
- description: 'Yippee sound effect',
- },
- {
- slug: 'loading-lag',
- fileName: 'loading-lag.wav',
- exportName: 'loadingLag',
- oldFileName: 'lagging.wav',
- pageUrl: 'https://www.myinstants.com/en/instant/lagging-loading-11339/',
- description: 'Loading lag sound effect',
- },
- {
- slug: 'wilhelm-scream',
- fileName: 'wilhelm-scream.wav',
- exportName: 'wilhelmScream',
- pageUrl: 'https://www.myinstants.com/en/instant/man-screaming-aaaah-32768/',
- description: 'Wilhelm scream sound effect',
- },
- {
- slug: 'mac-quack',
- fileName: 'mac-quack.wav',
- exportName: 'macQuack',
- oldFileName: 'quack.wav',
- pageUrl: 'https://www.myinstants.com/en/instant/mac-quack-83896/',
- description: 'Mac quack sound effect',
- },
- {
- slug: 'skedaddle',
- fileName: 'skedaddle.wav',
- exportName: 'skedaddle',
- pageUrl: 'https://www.myinstants.com/en/instant/skedaddle-78470/',
- description: 'Skedaddle sound effect',
- },
- {
- slug: 'snapchat-notification',
- fileName: 'snapchat-notification.wav',
- exportName: 'snapchatNotification',
- oldFileName: 'notification-snap.wav',
- pageUrl: 'https://www.myinstants.com/en/instant/notification-snap-43481/',
- description: 'Snapchat notification sound effect',
- },
- {
- slug: 'nelly-ahh',
- fileName: 'nelly-ahh.wav',
- exportName: 'nellyAhh',
- oldFileName: 'aah.wav',
- pageUrl: 'https://www.myinstants.com/en/instant/nelly-ahh-89172/',
- description: 'Nelly ahh sound effect',
- },
- {
- slug: 'sanctuary-guardian-what',
- fileName: 'sanctuary-guardian-what.wav',
- exportName: 'sanctuaryGuardianWhat',
- oldFileName: 'what.wav',
- pageUrl:
- 'https://www.myinstants.com/en/instant/what-bottom-text-meme-sanctuary-guardian-s-24591/',
- description: 'Sanctuary Guardian what meme sound effect',
- },
- {
- slug: 'minecraft-hurt',
- fileName: 'minecraft-hurt.wav',
- exportName: 'minecraftHurt',
- oldFileName: 'hurt.wav',
- pageUrl: 'https://www.myinstants.com/en/instant/minecraft-hurt/',
- description: 'Minecraft hurt sound effect',
- },
- {
- slug: 'oh-my-god-vine',
- fileName: 'oh-my-god-vine.wav',
- exportName: 'ohMyGodVine',
- oldFileName: 'oh-ma-gaud.wav',
- pageUrl: 'https://www.myinstants.com/en/instant/oh-ma-gaud-vine-78004/',
- description: 'Oh my god vine sound effect',
- },
- {
- slug: 'illuminati-confirmed',
- fileName: 'illuminati-confirmed.wav',
- exportName: 'illuminatiConfirmed',
- oldFileName: 'illuminati.wav',
- pageUrl: 'https://www.myinstants.com/en/instant/illuminati-confirmed-meme-99730/',
- description: 'Illuminati confirmed sound effect',
- },
- {
- slug: 'dramatic-boomer',
- fileName: 'dramatic-boomer.wav',
- exportName: 'dramaticBoomer',
- pageUrl: 'https://www.myinstants.com/en/instant/dramatic-boomer-29428/',
- description: 'Dramatic boomer sound effect',
- },
- {
- slug: 'triggered',
- fileName: 'triggered.wav',
- exportName: 'triggered',
- oldFileName: 'core-sound-effect.wav',
- pageUrl: 'https://www.myinstants.com/en/instant/core-sound-effect-57998/',
- description: 'Triggered meme sound effect',
- },
-];
-
-export const OLD_7054_FILES = [
- 'faaah.wav',
- 'x-files.wav',
- 'fail-horn.wav',
- 'romance.wav',
- 'yippieh.wav',
- 'lagging.wav',
- 'quack.wav',
- 'notification-snap.wav',
- 'aah.wav',
- 'what.wav',
- 'hurt.wav',
- 'oh-ma-gaud.wav',
- 'illuminati.wav',
- 'core-trigger.wav',
-];
diff --git a/scripts/upload-sfx-to-r2.ts b/scripts/upload-sfx-to-r2.ts
deleted file mode 100644
index a64c347056..0000000000
--- a/scripts/upload-sfx-to-r2.ts
+++ /dev/null
@@ -1,61 +0,0 @@
-import {readdirSync, statSync} from 'node:fs';
-import path from 'node:path';
-import {S3Client} from 'bun';
-
-const filesDir = path.join(import.meta.dir, '../packages/remotion-media/files');
-const envFile =
- process.env.REMOTION_MEDIA_ENV ??
- '/Users/jonathanburger/remotion/packages/remotion-media/.env';
-
-// Load credentials from user's .env without printing them
-const envText = await Bun.file(envFile).text();
-for (const line of envText.split('\n')) {
- const trimmed = line.trim();
- if (!trimmed || trimmed.startsWith('#')) continue;
- const eq = trimmed.indexOf('=');
- if (eq === -1) continue;
- const key = trimmed.slice(0, eq).trim();
- const value = trimmed.slice(eq + 1).trim();
- if (!process.env[key]) {
- process.env[key] = value;
- }
-}
-
-const awsSecretAccessKey =
- process.env.AWS_SECRET_ACCESS_KEY ?? process.env.AWS_ACCESS_SECRET_KEY;
-
-if (!process.env.AWS_ACCESS_KEY_ID || !awsSecretAccessKey) {
- throw new Error(`Missing AWS credentials in ${envFile}`);
-}
-
-const client = new S3Client({
- accessKeyId: process.env.AWS_ACCESS_KEY_ID,
- secretAccessKey: awsSecretAccessKey,
- endpoint:
- 'https://2fe488b3b0f4deee223aef7464784c46.r2.cloudflarestorage.com',
- bucket: 'parser-media',
-});
-
-const wavs = readdirSync(filesDir).filter((f) => f.endsWith('.wav'));
-let uploaded = 0;
-let skipped = 0;
-
-for (const file of wavs) {
- const filePath = path.join(filesDir, file);
- const fileToUpload = Bun.file(filePath);
- const exists = await client.exists(file);
- if (exists) {
- const remote = await client.stat(file);
- if (remote.size === fileToUpload.size) {
- console.log(`Skip ${file} (same size on R2)`);
- skipped++;
- continue;
- }
- }
-
- await client.write(file, fileToUpload);
- console.log(`Uploaded ${file} (${statSync(filePath).size} bytes)`);
- uploaded++;
-}
-
-console.log(`Done: ${uploaded} uploaded, ${skipped} skipped, ${wavs.length} total`);