Skip to content

πŸŽ₯ Make videos programmatically with React

awesome

Jonny Burger07853ef8d94c
diff --git a/.claude/skills/add-sfx/SKILL.md b/.claude/skills/add-sfx/SKILL.md
new file mode 100644
index 0000000000..f7bcbfb24f
--- /dev/null
+++ b/.claude/skills/add-sfx/SKILL.md
@@ -0,0 +1,80 @@
+---
+name: add-sfx
+description: Add a new sound effect to @remotion/sfx
+---
+
+## Prerequisites
+
+Sound effects must first be added to the [remotion.media](https://github.com/remotion-dev/remotion.media) repository. The source of truth is `generate.ts` in that repo. A sound effect must exist there before it can be added to `@remotion/sfx`.
+
+Sound effects must be:
+- WAV format
+- CC0 (Creative Commons 0) licensed
+- Normalized to peak at -3dB
+
+## Steps
+
+### 1. Add to `remotion.media` repo (must be done first)
+
+In the `remotion-dev/remotion.media` repo:
+
+1. Add the WAV file to the root of the repo
+2. Add an entry to the `soundEffects` array in `generate.ts`:
+ ```ts
+ {
+ fileName: "my-sound.wav",
+ attribution:
+ "Description by Author -- https://source-url -- License: Creative Commons 0",
+ },
+ ```
+3. Run `bun generate.ts` to copy it to `files/` and regenerate `variants.json`
+4. Deploy
+
+### 2. Add the export to `packages/sfx/src/index.ts`
+
+Use camelCase for the variable name. Avoid JavaScript reserved words (e.g. use `uiSwitch` not `switch`).
+
+```ts
+export const mySound = 'https://remotion.media/my-sound.wav';
+```
+
+### 3. Create a doc page at `packages/docs/docs/sfx/<name>.mdx`
+
+Follow the pattern of existing pages (e.g. `whip.mdx`). Include:
+- Frontmatter with `image`, `title` (camelCase export name), `crumb: '@remotion/sfx'`
+- `<AvailableFrom>` tag with the next release version
+- `<PlayButton>` import and usage
+- Description
+- Example code using `@remotion/media`'s `<Audio>` component
+- Value section with the URL in a fenced code block
+- Duration section (fetch the file and use `afinfo` on macOS to get duration/format)
+- Attribution section with source link and license
+- See also section linking to related sound effects
+
+### 4. Register in sidebar and table of contents
+
+- `packages/docs/sidebars.ts` β€” add `'sfx/<name>'` to the `@remotion/sfx` category items
+- `packages/docs/docs/sfx/table-of-contents.tsx` β€” add a `<TOCItem>` with a `<PlayButton size={32}>`
+
+### 5. Update the skills rule file
+
+Add the new URL to the list in `packages/skills/skills/remotion/rules/sfx.md`.
+
+### 6. Build
+
+```bash
+cd packages/sfx && bun run make
+```
+
+## Naming conventions
+
+| File name | Export name |
+|-----------|------------|
+| `my-sound.wav` | `mySound` |
+| `switch.wav` | `uiSwitch` (reserved word) |
+| `page-turn.wav` | `pageTurn` |
+
+## Version
+
+Use the current version from `packages/core/src/version.ts`.
+For docs `<AvailableFrom>`, increment the patch version by 1.
diff --git a/packages/docs/docs/sfx/PlayButton.tsx b/packages/docs/docs/sfx/PlayButton.tsx
index 4c757361a9..bc362a7f9a 100644
--- a/packages/docs/docs/sfx/PlayButton.tsx
+++ b/packages/docs/docs/sfx/PlayButton.tsx
@@ -4,7 +4,8 @@ import React, {useCallback, useRef, useState} from 'react';
export const PlayButton: React.FC<{
readonly src: string;
readonly size?: number;
-}> = ({src, size = 48}) => {
+ readonly depth?: number;
+}> = ({src, size = 48, depth}) => {
const [playing, setPlaying] = useState(false);
const audioRef = useRef<HTMLAudioElement | null>(null);
@@ -39,6 +40,7 @@ export const PlayButton: React.FC<{
style={{width: size, height: size}}
onClick={toggle}
title={playing ? 'Stop' : 'Play'}
+ depth={depth}
>
{playing ? (
<svg
diff --git a/packages/docs/docs/sfx/index.mdx b/packages/docs/docs/sfx/index.mdx
index 7d3a36208a..5313d84d96 100644
--- a/packages/docs/docs/sfx/index.mdx
+++ b/packages/docs/docs/sfx/index.mdx
@@ -5,7 +5,10 @@ title: '@remotion/sfx'
# @remotion/sfx<AvailableFrom v="4.0.429" />
-Sound effect URLs for use in Remotion videos.
+Sound effect URLs for general use.
+Available as a package or from loading through a URL directly.
+Normalized volume for the peak to be at -3dB.
+All files can be used without attribution, but the attribution is available on the detail page of a sound.
import {TableOfContents} from './table-of-contents';
@@ -17,4 +20,5 @@ import {TableOfContents} from './table-of-contents';
## License
-MIT
+NPM package: MIT
+See license of each sound effect by clicking on it.
diff --git a/packages/docs/docs/sfx/mouse-click.mdx b/packages/docs/docs/sfx/mouse-click.mdx
new file mode 100644
index 0000000000..7dff665724
--- /dev/null
+++ b/packages/docs/docs/sfx/mouse-click.mdx
@@ -0,0 +1,44 @@
+---
+image: /generated/articles-docs-sfx-mouse-click.png
+title: 'mouseClick'
+crumb: '@remotion/sfx'
+---
+
+# mouseClick<AvailableFrom v="4.0.429" />
+
+import {PlayButton} from './PlayButton';
+
+<PlayButton src="https://remotion.media/mouse-click.wav" />
+<br />
+
+A URL pointing to a mouse click sound effect WAV file.
+
+## Example
+
+```tsx twoslash title="MyComp.tsx"
+import {mouseClick} from '@remotion/sfx';
+import {Audio} from '@remotion/media';
+
+const MyVideo = () => {
+ return <Audio src={mouseClick} />;
+};
+```
+
+## Value
+
+```bash
+https://remotion.media/mouse-click.wav
+```
+
+## Duration
+
+0.397 seconds (2 channels, 44100 Hz, 16-bit)
+
+## Attribution
+
+Mouse Click Sound.mp3 by Pixeliota - [freesound.org/s/678248](https://freesound.org/s/678248/) - License: Creative Commons 0
+
+## See also
+
+- [`uiSwitch`](/docs/sfx/ui-switch)
+- [`whip`](/docs/sfx/whip)
diff --git a/packages/docs/docs/sfx/page-turn.mdx b/packages/docs/docs/sfx/page-turn.mdx
new file mode 100644
index 0000000000..ec7af97257
--- /dev/null
+++ b/packages/docs/docs/sfx/page-turn.mdx
@@ -0,0 +1,44 @@
+---
+image: /generated/articles-docs-sfx-page-turn.png
+title: 'pageTurn'
+crumb: '@remotion/sfx'
+---
+
+# pageTurn<AvailableFrom v="4.0.429" />
+
+import {PlayButton} from './PlayButton';
+
+<PlayButton src="https://remotion.media/page-turn.wav" />
+<br />
+
+A URL pointing to a page turn sound effect WAV file.
+
+## Example
+
+```tsx twoslash title="MyComp.tsx"
+import {pageTurn} from '@remotion/sfx';
+import {Audio} from '@remotion/media';
+
+const MyVideo = () => {
+ return <Audio src={pageTurn} />;
+};
+```
+
+## Value
+
+```bash
+https://remotion.media/page-turn.wav
+```
+
+## Duration
+
+0.400 seconds (1 channel, 44100 Hz, 16-bit)
+
+## Attribution
+
+Draw Knife 1 by kenney.nl - [kenney.nl](https://kenney.nl) - License: Creative Commons 0
+
+## See also
+
+- [`whip`](/docs/sfx/whip)
+- [`whoosh`](/docs/sfx/whoosh)
diff --git a/packages/docs/docs/sfx/shutter-modern.mdx b/packages/docs/docs/sfx/shutter-modern.mdx
new file mode 100644
index 0000000000..7da3cfabf9
--- /dev/null
+++ b/packages/docs/docs/sfx/shutter-modern.mdx
@@ -0,0 +1,44 @@
+---
+image: /generated/articles-docs-sfx-shutter-modern.png
+title: 'shutterModern'
+crumb: '@remotion/sfx'
+---
+
+# shutterModern<AvailableFrom v="4.0.429" />
+
+import {PlayButton} from './PlayButton';
+
+<PlayButton src="https://remotion.media/shutter-modern.wav" />
+<br />
+
+A URL pointing to a modern camera shutter sound effect WAV file.
+
+## Example
+
+```tsx twoslash title="MyComp.tsx"
+import {shutterModern} from '@remotion/sfx';
+import {Audio} from '@remotion/media';
+
+const MyVideo = () => {
+ return <Audio src={shutterModern} />;
+};
+```
+
+## Value
+
+```bash
+https://remotion.media/shutter-modern.wav
+```
+
+## Duration
+
+0.489 seconds (1 channel, 44100 Hz, 16-bit)
+
+## Attribution
+
+DSLR Shutter fast 006.wav by ristooooo1 - [freesound.org/s/539136](https://freesound.org/s/539136/) - License: Creative Commons 0
+
+## See also
+
+- [`shutterOld`](/docs/sfx/shutter-old)
+- [`whip`](/docs/sfx/whip)
diff --git a/packages/docs/docs/sfx/shutter-old.mdx b/packages/docs/docs/sfx/shutter-old.mdx
new file mode 100644
index 0000000000..ff80fa9c35
--- /dev/null
+++ b/packages/docs/docs/sfx/shutter-old.mdx
@@ -0,0 +1,44 @@
+---
+image: /generated/articles-docs-sfx-shutter-old.png
+title: 'shutterOld'
+crumb: '@remotion/sfx'
+---
+
+# shutterOld<AvailableFrom v="4.0.429" />
+
+import {PlayButton} from './PlayButton';
+
+<PlayButton src="https://remotion.media/shutter-old.wav" />
+<br />
+
+A URL pointing to a vintage camera shutter sound effect WAV file.
+
+## Example
+
+```tsx twoslash title="MyComp.tsx"
+import {shutterOld} from '@remotion/sfx';
+import {Audio} from '@remotion/media';
+
+const MyVideo = () => {
+ return <Audio src={shutterOld} />;
+};
+```
+
+## Value
+
+```bash
+https://remotion.media/shutter-old.wav
+```
+
+## Duration
+
+0.314 seconds (2 channels, 44100 Hz, 16-bit)
+
+## Attribution
+
+Werra.wav by hmilleo - [freesound.org/s/409093](https://freesound.org/s/409093/) - License: Creative Commons 0
+
+## See also
+
+- [`shutterModern`](/docs/sfx/shutter-modern)
+- [`whip`](/docs/sfx/whip)
diff --git a/packages/docs/docs/sfx/table-of-contents.tsx b/packages/docs/docs/sfx/table-of-contents.tsx
index d21fa30d77..0508bf5030 100644
--- a/packages/docs/docs/sfx/table-of-contents.tsx
+++ b/packages/docs/docs/sfx/table-of-contents.tsx
@@ -3,24 +3,36 @@ 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>
- <TOCItem link="/docs/sfx/whip">
- <strong>whip</strong>
- <div>URL for a whip sound effect</div>
- <div style={{marginTop: 8}}>
- <PlayButton src="https://remotion.media/whip.wav" size={32} />
- </div>
- </TOCItem>
- <TOCItem link="/docs/sfx/whoosh">
- <strong>whoosh</strong>
- <div>URL for a whoosh sound effect</div>
- <div style={{marginTop: 8}}>
- <PlayButton src="https://remotion.media/whoosh.wav" size={32} />
- </div>
- </TOCItem>
+ <SfxItem link="/docs/sfx/whip" src="https://remotion.media/whip.wav" name="whip" description="Whip sound effect" />
+ <SfxItem link="/docs/sfx/whoosh" src="https://remotion.media/whoosh.wav" name="whoosh" description="Whoosh sound effect" />
+ <SfxItem link="/docs/sfx/page-turn" src="https://remotion.media/page-turn.wav" name="pageTurn" description="Page turn sound effect" />
+ <SfxItem link="/docs/sfx/ui-switch" src="https://remotion.media/switch.wav" name="uiSwitch" description="UI switch sound effect" />
+ <SfxItem link="/docs/sfx/mouse-click" src="https://remotion.media/mouse-click.wav" name="mouseClick" description="Mouse click sound effect" />
+ <SfxItem link="/docs/sfx/shutter-modern" src="https://remotion.media/shutter-modern.wav" name="shutterModern" description="Modern camera shutter sound effect" />
+ <SfxItem link="/docs/sfx/shutter-old" src="https://remotion.media/shutter-old.wav" name="shutterOld" description="Vintage camera shutter sound effect" />
</Grid>
</div>
);
diff --git a/packages/docs/docs/sfx/ui-switch.mdx b/packages/docs/docs/sfx/ui-switch.mdx
new file mode 100644
index 0000000000..a018b07b68
--- /dev/null
+++ b/packages/docs/docs/sfx/ui-switch.mdx
@@ -0,0 +1,44 @@
+---
+image: /generated/articles-docs-sfx-ui-switch.png
+title: 'uiSwitch'
+crumb: '@remotion/sfx'
+---
+
+# uiSwitch<AvailableFrom v="4.0.429" />
+
+import {PlayButton} from './PlayButton';
+
+<PlayButton src="https://remotion.media/switch.wav" />
+<br />
+
+A URL pointing to a UI switch sound effect WAV file.
+
+## Example
+
+```tsx twoslash title="MyComp.tsx"
+import {uiSwitch} from '@remotion/sfx';
+import {Audio} from '@remotion/media';
+
+const MyVideo = () => {
+ return <Audio src={uiSwitch} />;
+};
+```
+
+## Value
+
+```bash
+https://remotion.media/switch.wav
+```
+
+## Duration
+
+0.330 seconds (2 channels, 44100 Hz, 16-bit)
+
+## Attribution
+
+UI Audio - Switch 35 by kenney.nl - [kenney.nl](https://kenney.nl) - License: Creative Commons 0
+
+## See also
+
+- [`mouseClick`](/docs/sfx/mouse-click)
+- [`whip`](/docs/sfx/whip)
diff --git a/packages/docs/sidebars.ts b/packages/docs/sidebars.ts
index d9c0b37800..3913008381 100644
--- a/packages/docs/sidebars.ts
+++ b/packages/docs/sidebars.ts
@@ -467,7 +467,15 @@ const sidebars: SidebarsConfig = {
type: 'doc',
id: 'sfx/index',
},
- items: ['sfx/whip', 'sfx/whoosh'],
+ items: [
+ 'sfx/whip',
+ 'sfx/whoosh',
+ 'sfx/page-turn',
+ 'sfx/ui-switch',
+ 'sfx/mouse-click',
+ 'sfx/shutter-modern',
+ 'sfx/shutter-old',
+ ],
},
{
type: 'category',
diff --git a/packages/gif/src/worker/source.ts b/packages/gif/src/worker/source.ts
index e68453f0d0..821bbd9b61 100644
--- a/packages/gif/src/worker/source.ts
+++ b/packages/gif/src/worker/source.ts
@@ -1,4 +1,4 @@
// Auto-generated by build.mjs
export const src =
- // eslint-disable-next-line no-template-curly-in-string
- '"use strict";(()=>{var P=(t,r,e={},n=e)=>{if(Array.isArray(r))r.forEach(o=>P(t,o,e,n));else if(typeof r=="function")r(t,e,n,P);else{let o=Object.keys(r)[0];Array.isArray(r[o])?(n[o]={},P(t,r[o],e,n[o])):n[o]=r[o](t,e,n,P)}return e},M=(t,r)=>function(e,n,o,c){let i=[],a=e.pos;for(;r(e,n,o);){let s={};if(c(e,t,n,s),e.pos===a)break;a=e.pos,i.push(s)}return i},g=(t,r)=>(e,n,o,c)=>{r(e,n,o)&&c(e,t,n,o)};var W=t=>({data:t,pos:0}),m=()=>t=>t.data[t.pos++],U=(t=0)=>r=>r.data[r.pos+t],f=t=>r=>r.data.subarray(r.pos,r.pos+=t),k=t=>r=>r.data.subarray(r.pos,r.pos+t),v=t=>r=>Array.from(f(t)(r)).map(e=>String.fromCharCode(e)).join(""),b=t=>r=>{let e=f(2)(r);return t?(e[1]<<8)+e[0]:(e[0]<<8)+e[1]},E=(t,r)=>(e,n,o)=>{let c=typeof r=="function"?r(e,n,o):r,i=f(t),a=new Array(c);for(let s=0;s<c;s++)a[s]=i(e);return a},$=(t,r,e)=>{let n=0;for(let o=0;o<e;o++)n+=Number(t[r+o]&&2**(e-o-1));return n},I=t=>r=>{let e=m()(r),n=new Array(8);for(let o=0;o<8;o++)n[7-o]=!!(e&1<<o);return Object.keys(t).reduce((o,c)=>{let i=t[c];return i.length?o[c]=$(n,i.index,i.length):o[c]=n[i.index],o},{})};var z={blocks:t=>{let e=[],n=t.data.length,o=0;for(let a=m()(t);a!==0&&a;a=m()(t)){if(t.pos+a>=n){let s=n-t.pos;e.push(f(s)(t)),o+=s;break}e.push(f(a)(t)),o+=a}let c=new Uint8Array(o),i=0;for(let a=0;a<e.length;a++)c.set(e[a],i),i+=e[a].length;return c}},q=g({gce:[{codes:f(2)},{byteSize:m()},{extras:I({future:{index:0,length:3},disposal:{index:3,length:3},userInput:{index:6},transparentColorGiven:{index:7}})},{delay:b(!0)},{transparentColorIndex:m()},{terminator:m()}]},t=>{let r=k(2)(t);return r[0]===33&&r[1]===249}),H=g({image:[{code:m()},{descriptor:[{left:b(!0)},{top:b(!0)},{width:b(!0)},{height:b(!0)},{lct:I({exists:{index:0},interlaced:{index:1},sort:{index:2},future:{index:3,length:2},size:{index:5,length:3}})}]},g({lct:E(3,(t,r,e)=>2**(e.descriptor.lct.size+1))},(t,r,e)=>e.descriptor.lct.exists),{data:[{minCodeSize:m()},z]}]},t=>U()(t)===44),J=g({text:[{codes:f(2)},{blockSize:m()},{preData:(t,r,e)=>f(e.text.blockSize)(t)},z]},t=>{let r=k(2)(t);return r[0]===33&&r[1]===1}),Q=g({application:[{codes:f(2)},{blockSize:m()},{id:(t,r,e)=>v(e.blockSize)(t)},z]},t=>{let r=k(2)(t);return r[0]===33&&r[1]===255}),V=g({comment:[{codes:f(2)},z]},t=>{let r=k(2)(t);return r[0]===33&&r[1]===254}),K=[{header:[{signature:v(3)},{version:v(3)}]},{lsd:[{width:b(!0)},{height:b(!0)},{gct:I({exists:{index:0},resolution:{index:1,length:3},sort:{index:4},size:{index:5,length:3}})},{backgroundColorIndex:m()},{pixelAspectRatio:m()}]},g({gct:E(3,(t,r)=>2**(r.lsd.gct.size+1))},(t,r)=>r.lsd.gct.exists),{frames:M([q,Q,V,H,J],t=>{let r=U()(t);return r===33||r===44})}];var X=(t,r)=>{let e=new Array(t.length),n=t.length/r,o=function(s,d){let u=t.slice(d*r,(d+1)*r);e.splice(...[s*r,r].concat(u))},c=[0,4,2,1],i=[8,8,4,2],a=0;for(let s=0;s<4;s++)for(let d=c[s];d<n;d+=i[s])o(d,a),a++;return e};var Z=(t,r,e)=>{let c=e,i,a,s,d,u;var w;let l,p;var C,y,h,_,G;let x=new Array(e),B=new Array(4096),T=new Array(4096),F=new Array(4097),R=t,S=1<<R,O=S+1;for(i=S+2,u=-1,s=R+1,a=(1<<s)-1,l=0;l<S;l++)B[l]=0,T[l]=l;var C,w,y,h,G,_;for(C=w=y=h=G=_=0,p=0;p<c;){if(h===0){if(w<s){C+=r[_]<<w,w+=8,_++;continue}if(l=C&a,C>>=s,w-=s,l>i||l===O)break;if(l===S){s=R+1,a=(1<<s)-1,i=S+2,u=-1;continue}if(u===-1){F[h++]=T[l],u=l,y=l;continue}for(d=l,l===i&&(F[h++]=y,l=u);l>S;)F[h++]=T[l],l=B[l];y=T[l]&255,F[h++]=y,i<4096&&(B[i]=u,T[i]=y,i++,(i&a)===0&&i<4096&&(s++,a+=i)),u=d}h--,x[G++]=F[h],p++}for(p=G;p<c;p++)x[p]=0;return x};var j=t=>{let r=new Uint8Array(t);return P(W(r),K)},D=(t,r)=>{var i,a,s;if(!t.image)return console.warn("gif frame does not have associated image."),null;let{image:e}=t,n=e.descriptor.width*e.descriptor.height,o=Z(e.data.minCodeSize,e.data.blocks,n);return(i=e.descriptor.lct)!=null&&i.interlaced&&(o=X(o,e.descriptor.width)),{pixels:o,dims:{top:t.image.descriptor.top,left:t.image.descriptor.left,width:t.image.descriptor.width,height:t.image.descriptor.height},colorTable:(a=e.descriptor.lct)!=null&&a.exists?e.lct:r,delay:(((s=t.gce)==null?void 0:s.delay)||10)*10,disposalType:t.gce?t.gce.extras.disposal:1,transparentIndex:t.gce&&t.gce.extras.transparentColorGiven?t.gce.transparentColorIndex:-1}};var L=t=>t.frames.filter(r=>"image"in r).map(r=>D(r,t.gct)).filter(Boolean).map(r=>r);var Y=t=>{let r=null;for(let e of t.frames)r=e.gce?e.gce:r,"image"in e&&!("gce"in e)&&r!==null&&(e.gce=r)},ee=({typedArray:t,dx:r,dy:e,width:n,height:o,gifWidth:c})=>{let i=e*c+r;for(let a=0;a<o;a++)for(let s=0;s<n;s++){let d=i+a*c+s;t[d*4]=0,t[d*4+1]=0,t[d*4+2]=0,t[d*4+3]=0}},te=(t,r,e)=>{let{width:n,height:o,top:c,left:i}=r.dims,a=c*e.width+i;for(let s=0;s<o;s++)for(let d=0;d<n;d++){let u=s*n+d,l=r.pixels[u];if(l!==r.transparentIndex){let p=a+s*e.width+d,x=r.colorTable[l];t[p*4]=x[0],t[p*4+1]=x[1],t[p*4+2]=x[2],t[p*4+3]=l===r.transparentIndex?0:255}}},N=(t,{signal:r})=>fetch(t,{signal:r}).then(e=>{var n;if(!((n=e.headers.get("Content-Type"))!=null&&n.includes("image/gif")))throw Error(`Wrong content type: "${e.headers.get("Content-Type")}"`);return e.arrayBuffer()}).then(e=>j(e)).then(e=>(Y(e),e)).then(e=>Promise.all([L(e),{width:e.lsd.width,height:e.lsd.height}])).then(([e,n])=>{let o=[],c=n.width*n.height*4,i=new Uint8ClampedArray(c);for(let a=0;a<e.length;++a){let s=e[a],d=e[a].disposalType===3?i.slice():null;if(te(i,s,n),o.push(i.slice()),e[a].disposalType===2)ee({typedArray:i,dx:s.dims.left,dy:s.dims.top,width:s.dims.width,height:s.dims.height,gifWidth:n.width});else if(e[a].disposalType===3){if(!d)throw Error("Disposal type 3 without previous frame");i=d}else i=o[a].slice()}return{...n,loaded:!0,delays:e.map(a=>a.delay),frames:o}});var A=new Map;self.addEventListener("message",t=>{let{type:r,src:e}=t.data||t;switch(r){case"parse":{if(!A.has(e)){let n=new AbortController,o={signal:n.signal};A.set(e,n),N(e,o).then(c=>{self.postMessage(Object.assign(c,{src:e}),c.frames.map(i=>i.buffer))}).catch(c=>{self.postMessage({src:e,error:c,loaded:!0})}).finally(()=>{A.delete(e)})}break}case"cancel":{A.has(e)&&(A.get(e).abort(),A.delete(e));break}default:break}});})();\n';
+// eslint-disable-next-line no-template-curly-in-string
+ "\"use strict\";(()=>{var P=(t,r,e={},n=e)=>{if(Array.isArray(r))r.forEach(o=>P(t,o,e,n));else if(typeof r==\"function\")r(t,e,n,P);else{let o=Object.keys(r)[0];Array.isArray(r[o])?(n[o]={},P(t,r[o],e,n[o])):n[o]=r[o](t,e,n,P)}return e},M=(t,r)=>function(e,n,o,c){let i=[],a=e.pos;for(;r(e,n,o);){let s={};if(c(e,t,n,s),e.pos===a)break;a=e.pos,i.push(s)}return i},g=(t,r)=>(e,n,o,c)=>{r(e,n,o)&&c(e,t,n,o)};var W=t=>({data:t,pos:0}),m=()=>t=>t.data[t.pos++],U=(t=0)=>r=>r.data[r.pos+t],f=t=>r=>r.data.subarray(r.pos,r.pos+=t),k=t=>r=>r.data.subarray(r.pos,r.pos+t),v=t=>r=>Array.from(f(t)(r)).map(e=>String.fromCharCode(e)).join(\"\"),b=t=>r=>{let e=f(2)(r);return t?(e[1]<<8)+e[0]:(e[0]<<8)+e[1]},E=(t,r)=>(e,n,o)=>{let c=typeof r==\"function\"?r(e,n,o):r,i=f(t),a=new Array(c);for(let s=0;s<c;s++)a[s]=i(e);return a},$=(t,r,e)=>{let n=0;for(let o=0;o<e;o++)n+=Number(t[r+o]&&2**(e-o-1));return n},I=t=>r=>{let e=m()(r),n=new Array(8);for(let o=0;o<8;o++)n[7-o]=!!(e&1<<o);return Object.keys(t).reduce((o,c)=>{let i=t[c];return i.length?o[c]=$(n,i.index,i.length):o[c]=n[i.index],o},{})};var z={blocks:t=>{let e=[],n=t.data.length,o=0;for(let a=m()(t);a!==0&&a;a=m()(t)){if(t.pos+a>=n){let s=n-t.pos;e.push(f(s)(t)),o+=s;break}e.push(f(a)(t)),o+=a}let c=new Uint8Array(o),i=0;for(let a=0;a<e.length;a++)c.set(e[a],i),i+=e[a].length;return c}},q=g({gce:[{codes:f(2)},{byteSize:m()},{extras:I({future:{index:0,length:3},disposal:{index:3,length:3},userInput:{index:6},transparentColorGiven:{index:7}})},{delay:b(!0)},{transparentColorIndex:m()},{terminator:m()}]},t=>{let r=k(2)(t);return r[0]===33&&r[1]===249}),H=g({image:[{code:m()},{descriptor:[{left:b(!0)},{top:b(!0)},{width:b(!0)},{height:b(!0)},{lct:I({exists:{index:0},interlaced:{index:1},sort:{index:2},future:{index:3,length:2},size:{index:5,length:3}})}]},g({lct:E(3,(t,r,e)=>2**(e.descriptor.lct.size+1))},(t,r,e)=>e.descriptor.lct.exists),{data:[{minCodeSize:m()},z]}]},t=>U()(t)===44),J=g({text:[{codes:f(2)},{blockSize:m()},{preData:(t,r,e)=>f(e.text.blockSize)(t)},z]},t=>{let r=k(2)(t);return r[0]===33&&r[1]===1}),Q=g({application:[{codes:f(2)},{blockSize:m()},{id:(t,r,e)=>v(e.blockSize)(t)},z]},t=>{let r=k(2)(t);return r[0]===33&&r[1]===255}),V=g({comment:[{codes:f(2)},z]},t=>{let r=k(2)(t);return r[0]===33&&r[1]===254}),K=[{header:[{signature:v(3)},{version:v(3)}]},{lsd:[{width:b(!0)},{height:b(!0)},{gct:I({exists:{index:0},resolution:{index:1,length:3},sort:{index:4},size:{index:5,length:3}})},{backgroundColorIndex:m()},{pixelAspectRatio:m()}]},g({gct:E(3,(t,r)=>2**(r.lsd.gct.size+1))},(t,r)=>r.lsd.gct.exists),{frames:M([q,Q,V,H,J],t=>{let r=U()(t);return r===33||r===44})}];var X=(t,r)=>{let e=new Array(t.length),n=t.length/r,o=function(s,d){let u=t.slice(d*r,(d+1)*r);e.splice(...[s*r,r].concat(u))},c=[0,4,2,1],i=[8,8,4,2],a=0;for(let s=0;s<4;s++)for(let d=c[s];d<n;d+=i[s])o(d,a),a++;return e};var Z=(t,r,e)=>{let c=e,i,a,s,d,u;var w;let l,p;var C,y,h,_,G;let x=new Array(e),B=new Array(4096),T=new Array(4096),F=new Array(4097),R=t,S=1<<R,O=S+1;for(i=S+2,u=-1,s=R+1,a=(1<<s)-1,l=0;l<S;l++)B[l]=0,T[l]=l;var C,w,y,h,G,_;for(C=w=y=h=G=_=0,p=0;p<c;){if(h===0){if(w<s){C+=r[_]<<w,w+=8,_++;continue}if(l=C&a,C>>=s,w-=s,l>i||l===O)break;if(l===S){s=R+1,a=(1<<s)-1,i=S+2,u=-1;continue}if(u===-1){F[h++]=T[l],u=l,y=l;continue}for(d=l,l===i&&(F[h++]=y,l=u);l>S;)F[h++]=T[l],l=B[l];y=T[l]&255,F[h++]=y,i<4096&&(B[i]=u,T[i]=y,i++,(i&a)===0&&i<4096&&(s++,a+=i)),u=d}h--,x[G++]=F[h],p++}for(p=G;p<c;p++)x[p]=0;return x};var j=t=>{let r=new Uint8Array(t);return P(W(r),K)},D=(t,r)=>{var i,a,s;if(!t.image)return console.warn(\"gif frame does not have associated image.\"),null;let{image:e}=t,n=e.descriptor.width*e.descriptor.height,o=Z(e.data.minCodeSize,e.data.blocks,n);return(i=e.descriptor.lct)!=null&&i.interlaced&&(o=X(o,e.descriptor.width)),{pixels:o,dims:{top:t.image.descriptor.top,left:t.image.descriptor.left,width:t.image.descriptor.width,height:t.image.descriptor.height},colorTable:(a=e.descriptor.lct)!=null&&a.exists?e.lct:r,delay:(((s=t.gce)==null?void 0:s.delay)||10)*10,disposalType:t.gce?t.gce.extras.disposal:1,transparentIndex:t.gce&&t.gce.extras.transparentColorGiven?t.gce.transparentColorIndex:-1}};var L=t=>t.frames.filter(r=>\"image\"in r).map(r=>D(r,t.gct)).filter(Boolean).map(r=>r);var Y=t=>{let r=null;for(let e of t.frames)r=e.gce?e.gce:r,\"image\"in e&&!(\"gce\"in e)&&r!==null&&(e.gce=r)},ee=({typedArray:t,dx:r,dy:e,width:n,height:o,gifWidth:c})=>{let i=e*c+r;for(let a=0;a<o;a++)for(let s=0;s<n;s++){let d=i+a*c+s;t[d*4]=0,t[d*4+1]=0,t[d*4+2]=0,t[d*4+3]=0}},te=(t,r,e)=>{let{width:n,height:o,top:c,left:i}=r.dims,a=c*e.width+i;for(let s=0;s<o;s++)for(let d=0;d<n;d++){let u=s*n+d,l=r.pixels[u];if(l!==r.transparentIndex){let p=a+s*e.width+d,x=r.colorTable[l];t[p*4]=x[0],t[p*4+1]=x[1],t[p*4+2]=x[2],t[p*4+3]=l===r.transparentIndex?0:255}}},N=(t,{signal:r})=>fetch(t,{signal:r}).then(e=>{var n;if(!((n=e.headers.get(\"Content-Type\"))!=null&&n.includes(\"image/gif\")))throw Error(`Wrong content type: \"${e.headers.get(\"Content-Type\")}\"`);return e.arrayBuffer()}).then(e=>j(e)).then(e=>(Y(e),e)).then(e=>Promise.all([L(e),{width:e.lsd.width,height:e.lsd.height}])).then(([e,n])=>{let o=[],c=n.width*n.height*4,i=new Uint8ClampedArray(c);for(let a=0;a<e.length;++a){let s=e[a],d=e[a].disposalType===3?i.slice():null;if(te(i,s,n),o.push(i.slice()),e[a].disposalType===2)ee({typedArray:i,dx:s.dims.left,dy:s.dims.top,width:s.dims.width,height:s.dims.height,gifWidth:n.width});else if(e[a].disposalType===3){if(!d)throw Error(\"Disposal type 3 without previous frame\");i=d}else i=o[a].slice()}return{...n,loaded:!0,delays:e.map(a=>a.delay),frames:o}});var A=new Map;self.addEventListener(\"message\",t=>{let{type:r,src:e}=t.data||t;switch(r){case\"parse\":{if(!A.has(e)){let n=new AbortController,o={signal:n.signal};A.set(e,n),N(e,o).then(c=>{self.postMessage(Object.assign(c,{src:e}),c.frames.map(i=>i.buffer))}).catch(c=>{self.postMessage({src:e,error:c,loaded:!0})}).finally(()=>{A.delete(e)})}break}case\"cancel\":{A.has(e)&&(A.get(e).abort(),A.delete(e));break}default:break}});})();\n";
\ No newline at end of file
diff --git a/packages/sfx/src/index.ts b/packages/sfx/src/index.ts
index ae1bb4845b..8f54db3381 100644
--- a/packages/sfx/src/index.ts
+++ b/packages/sfx/src/index.ts
@@ -1,2 +1,7 @@
-export const whip = 'https://remotion.media/whip.wav';
-export const whoosh = 'https://remotion.media/whoosh.wav';
+export const whip = 'https://remotion.media/whip.wav' as const;
+export const whoosh = 'https://remotion.media/whoosh.wav' as const;
+export const pageTurn = 'https://remotion.media/page-turn.wav' as const;
+export const uiSwitch = 'https://remotion.media/switch.wav' as const;
+export const mouseClick = 'https://remotion.media/mouse-click.wav' as const;
+export const shutterModern = 'https://remotion.media/shutter-modern.wav' as const;
+export const shutterOld = 'https://remotion.media/shutter-old.wav' as const;
diff --git a/packages/skills/skills/remotion/rules/sfx.md b/packages/skills/skills/remotion/rules/sfx.md
index c4ddab0285..f03c6b7373 100644
--- a/packages/skills/skills/remotion/rules/sfx.md
+++ b/packages/skills/skills/remotion/rules/sfx.md
@@ -5,10 +5,22 @@ metadata:
tags: sfx, sound, effect, audio
---
-# Sound effect rules
+To include a sound effect, use the `<Audio>` tag:
-## Prerequisites
+```tsx
+import { Audio } from "@remotion/sfx";
-```bash
-npx remotion add @remotion/sfx
-```
\ No newline at end of file
+<Audio src={"https://remotion.media/whoosh.wav"} />;
+```
+
+The following sound effects are available:
+
+- `https://remotion.media/whoosh.wav`
+- `https://remotion.media/whip.wav`
+- `https://remotion.media/page-turn.wav`
+- `https://remotion.media/switch.wav`
+- `https://remotion.media/mouse-click.wav`
+- `https://remotion.media/shutter-modern.wav`
+- `https://remotion.media/shutter-old.wav`
+
+For more sound effects, search the internet. A good resource is https://github.com/kapishdima/soundcn/tree/main/assets.