🎥 Make videos programmatically with React
Move large example public assets to remotion.media
Jonny Burger71869c43eda2
diff --git a/packages/example-videos/download-cached-example-media.ts b/packages/example-videos/download-cached-example-media.tsnew file mode 100644index 0000000000..7d0e6c10b3--- /dev/null+++ b/packages/example-videos/download-cached-example-media.ts@@ -0,0 +1,3 @@+import {downloadCachedExampleMedia} from './src/cached-example-media';++await downloadCachedExampleMedia();diff --git a/packages/example-videos/package.json b/packages/example-videos/package.jsonindex 9b62bc2e28..181ed05568 100644--- a/packages/example-videos/package.json+++ b/packages/example-videos/package.json@@ -9,7 +9,8 @@"scripts": {"formatting": "prettier src --check","lint": "eslint src",- "make": "tsgo -d"+ "download-media": "bun download-cached-example-media.ts",+ "make": "tsgo -d && bun download-cached-example-media.ts"},"author": "Jonny Burger","license": "MIT",diff --git a/packages/example-videos/src/cached-example-media.ts b/packages/example-videos/src/cached-example-media.tsnew file mode 100644index 0000000000..50e985666d--- /dev/null+++ b/packages/example-videos/src/cached-example-media.ts@@ -0,0 +1,52 @@+/* eslint-disable no-console */+import fs from 'fs';+import path from 'path';++const REMOTE_BASE = 'https://remotion.media';++const rootDir = path.join(__dirname, '..');+const cachedDir = path.join(rootDir, 'node_modules', '.videos');++const cachedExampleMedia = {+ bigBuckBunny: 'bigbuckbunny.mp4',+ corrupted: 'corrupted.mp4',+ variablefps: 'variablefps.webm',+ iphonevideo: 'iphonevideo.mov',+ music: 'music.mp3',+ iphonehevc: 'iphone-hevc.mov',+ stretchedVp8: 'stretched-vp8.webm',+} as const;++type CachedKey = keyof typeof cachedExampleMedia;++export const cachedExampleMediaPaths = Object.fromEntries(+ (Object.keys(cachedExampleMedia) as CachedKey[]).map((key) => [+ key,+ path.join(cachedDir, cachedExampleMedia[key]),+ ]),+) as {[K in CachedKey]: string};++const downloadFile = async (url: string, location: string) => {+ if (fs.existsSync(location)) {+ return;+ }++ if (!fs.existsSync(cachedDir)) {+ fs.mkdirSync(cachedDir, {recursive: true});+ }++ const {$} = await import('bun');+ console.log('Downloading', url);+ console.time(`Download ${url}`);+ await $`curl -f -o ${location} ${url}`;+ console.timeEnd(`Download ${url}`);+};++export const downloadCachedExampleMedia = async () => {+ for (const filename of Object.values(cachedExampleMedia)) {+ await downloadFile(+ `${REMOTE_BASE}/${filename}`,+ path.join(cachedDir, filename),+ );+ }+};diff --git a/packages/example-videos/src/index.ts b/packages/example-videos/src/index.tsindex b63444a322..d55a1b12e5 100644--- a/packages/example-videos/src/index.ts+++ b/packages/example-videos/src/index.ts@@ -1,4 +1,5 @@import path from 'node:path';+import {cachedExampleMediaPaths} from './cached-example-media';const examplePackage = path.join(__dirname, '..', '..', 'example');const musicVisualizationPackage = path.join(@@ -11,7 +12,7 @@ const docsPackage = path.join(__dirname, '..', '..', 'docs');const lambdaPackage = path.join(__dirname, '..', '..', 'lambda');export const exampleVideos = {- bigBuckBunny: path.join(examplePackage, 'public/bigbuckbunny.mp4'),+ bigBuckBunny: cachedExampleMediaPaths.bigBuckBunny,transparentWebm: path.join(docsPackage, '/static/img/transparent-video.webm'),framerWithoutFileExtension: path.join(examplePackage,@@ -19,14 +20,14 @@ export const exampleVideos = {'framermp4withoutfileextension',),framerWebm: path.join(examplePackage, 'public', 'framer.webm'),- corrupted: path.join(examplePackage, 'public', 'corrupted.mp4'),+ corrupted: cachedExampleMediaPaths.corrupted,customDar: path.join(examplePackage, 'public', 'custom-dar.mp4'),screenrecording: path.join(examplePackage, 'public', 'quick.mov'),nofps: path.join(examplePackage, 'public', 'nofps.webm'),- variablefps: path.join(examplePackage, 'public', 'variablefps.webm'),+ variablefps: cachedExampleMediaPaths.variablefps,zerotimestamp: path.join(examplePackage, 'public', 'zero-timestamp.mp4'),webcam: path.join(examplePackage, 'public', 'webcam.webm'),- iphonevideo: path.join(examplePackage, 'public', 'iphonevideo.mov'),+ iphonevideo: cachedExampleMediaPaths.iphonevideo,av1: path.join(examplePackage, 'public', 'av1.webm'),framer24fps: path.join(examplePackage,@@ -34,7 +35,7 @@ export const exampleVideos = {'resources','framer-24fps.mp4',),- music: path.join(examplePackage, 'public', 'music.mp3'),+ music: cachedExampleMediaPaths.music,notavideo: path.join(examplePackage, 'public', 'giphy.gif'),notafile: path.join(examplePackage, 'public', 'doesnotexist'),transparentwithdar: path.join(@@ -43,7 +44,7 @@ export const exampleVideos = {'transparent-with-dar.webm',),prores: path.join(examplePackage, 'public', 'prores.mov'),- iphonehevc: path.join(examplePackage, 'public', 'iphone-hevc.mov'),+ iphonehevc: cachedExampleMediaPaths.iphonehevc,matroskaPcm16: path.join(examplePackage, 'public', 'matroska-pcm16.mkv'),mp4withmp3: path.join(examplePackage, 'public', 'mp4-mp3.mp4'),av1bbb: path.join(examplePackage, 'public', 'av1-bbb.webm'),@@ -51,7 +52,7 @@ export const exampleVideos = {av1mp4WithColr: path.join(examplePackage, 'public', 'av1.mp4'),vp8Vorbis: path.join(examplePackage, 'public', 'vp8-vorbis.webm'),vp9: path.join(examplePackage, 'public', 'vp9.webm'),- stretchedVp8: path.join(examplePackage, 'public', 'stretched-vp8.webm'),+ stretchedVp8: cachedExampleMediaPaths.stretchedVp8,matroskaMp3: path.join(examplePackage, 'public', 'matroska-mp3.mkv'),shortmp3: path.join(examplePackage, 'public', 'whip.mp3'),mpeg1layer3: path.join(examplePackage, 'src', 'resources', 'sound1.mp3'),@@ -152,6 +153,7 @@ export const exampleVideos = {'audio-with-64msoffset-editlist.mp4',),};+export {downloadCachedExampleMedia} from './cached-example-media';export {getPrivateExampleVideo,getRemoteExampleVideo,diff --git a/packages/example/public/16khz.wav b/packages/example/public/16khz.wavdeleted file mode 100644index 52283447e6..0000000000Binary files a/packages/example/public/16khz.wav and /dev/null differdiff --git a/packages/example/public/bigbuckbunny.mp4 b/packages/example/public/bigbuckbunny.mp4deleted file mode 100644index 1362fd7d73..0000000000Binary files a/packages/example/public/bigbuckbunny.mp4 and /dev/null differdiff --git a/packages/example/public/corrupted.mp4 b/packages/example/public/corrupted.mp4deleted file mode 100644index 70ff2ac2b5..0000000000Binary files a/packages/example/public/corrupted.mp4 and /dev/null differdiff --git a/packages/example/public/iphone-hevc.mov b/packages/example/public/iphone-hevc.movdeleted file mode 100644index 4e22de3e32..0000000000Binary files a/packages/example/public/iphone-hevc.mov and /dev/null differdiff --git a/packages/example/public/iphonevideo.mov b/packages/example/public/iphonevideo.movdeleted file mode 100644index 45cd2b4c3a..0000000000Binary files a/packages/example/public/iphonevideo.mov and /dev/null differdiff --git a/packages/example/public/long-video.mp4 b/packages/example/public/long-video.mp4deleted file mode 100644index 775a650bd5..0000000000Binary files a/packages/example/public/long-video.mp4 and /dev/null differdiff --git a/packages/example/public/music.mp3 b/packages/example/public/music.mp3deleted file mode 100644index e80bf73822..0000000000Binary files a/packages/example/public/music.mp3 and /dev/null differdiff --git a/packages/example/public/sounds/1.wav b/packages/example/public/sounds/1.wavdeleted file mode 100644index 28707c1f04..0000000000Binary files a/packages/example/public/sounds/1.wav and /dev/null differdiff --git a/packages/example/public/sounds/2.wav b/packages/example/public/sounds/2.wavdeleted file mode 100644index 57c8275a59..0000000000Binary files a/packages/example/public/sounds/2.wav and /dev/null differdiff --git a/packages/example/public/sounds/3.wav b/packages/example/public/sounds/3.wavdeleted file mode 100644index 0cdf5e436c..0000000000Binary files a/packages/example/public/sounds/3.wav and /dev/null differdiff --git a/packages/example/public/sounds/4.wav b/packages/example/public/sounds/4.wavdeleted file mode 100644index f840593e5e..0000000000Binary files a/packages/example/public/sounds/4.wav and /dev/null differdiff --git a/packages/example/public/sounds/5.wav b/packages/example/public/sounds/5.wavdeleted file mode 100644index 2bd8d40b6f..0000000000Binary files a/packages/example/public/sounds/5.wav and /dev/null differdiff --git a/packages/example/public/sounds/6.wav b/packages/example/public/sounds/6.wavdeleted file mode 100644index e1d7f42d5c..0000000000Binary files a/packages/example/public/sounds/6.wav and /dev/null differdiff --git a/packages/example/public/sounds/7.wav b/packages/example/public/sounds/7.wavdeleted file mode 100644index 29c9bdc26d..0000000000Binary files a/packages/example/public/sounds/7.wav and /dev/null differdiff --git a/packages/example/public/sounds/8.wav b/packages/example/public/sounds/8.wavdeleted file mode 100644index 5d9c2e31f4..0000000000Binary files a/packages/example/public/sounds/8.wav and /dev/null differdiff --git a/packages/example/public/sounds/9.wav b/packages/example/public/sounds/9.wavdeleted file mode 100644index 5d55187de2..0000000000Binary files a/packages/example/public/sounds/9.wav and /dev/null differdiff --git a/packages/example/public/spiral_.mp4 b/packages/example/public/spiral_.mp4deleted file mode 100644index cb42049fe5..0000000000Binary files a/packages/example/public/spiral_.mp4 and /dev/null differdiff --git a/packages/example/public/stretched-vp8.webm b/packages/example/public/stretched-vp8.webmdeleted file mode 100644index ced176e1ce..0000000000Binary files a/packages/example/public/stretched-vp8.webm and /dev/null differdiff --git a/packages/example/public/variablefps.webm b/packages/example/public/variablefps.webmdeleted file mode 100644index 2f89ca317f..0000000000Binary files a/packages/example/public/variablefps.webm and /dev/null differdiff --git a/packages/example/public/vid1.mp4 b/packages/example/public/vid1.mp4deleted file mode 100644index 61286869e8..0000000000Binary files a/packages/example/public/vid1.mp4 and /dev/null differdiff --git a/packages/example/public/video.mp4 b/packages/example/public/video.mp4deleted file mode 100644index 9f4b2fb712..0000000000Binary files a/packages/example/public/video.mp4 and /dev/null differdiff --git a/packages/example/src/22KhzAudio/index.tsx b/packages/example/src/22KhzAudio/index.tsxindex f71a68a4bd..d41fa00a02 100644--- a/packages/example/src/22KhzAudio/index.tsx+++ b/packages/example/src/22KhzAudio/index.tsx@@ -5,7 +5,7 @@ export const TwentyTwoKHzAudio = () => {return (<AbsoluteFill><Sequence from={1} durationInFrames={30}>- <Html5Audio src={staticFile('music.mp3')} />+ <Html5Audio src="https://remotion.media/music.mp3" /></Sequence><Sequence from={31} durationInFrames={100}><Html5Audio src={twenty} />diff --git a/packages/example/src/AudioTesting/Amplify.tsx b/packages/example/src/AudioTesting/Amplify.tsxindex 4c44e3abd1..b4e5d8423b 100644--- a/packages/example/src/AudioTesting/Amplify.tsx+++ b/packages/example/src/AudioTesting/Amplify.tsx@@ -1,5 +1,5 @@import React from 'react';-import {Html5Audio, OffthreadVideo, Sequence, staticFile} from 'remotion';+import {Html5Audio, OffthreadVideo, Sequence} from 'remotion';const Amplify: React.FC = () => {const [volume1, setVolume1] = React.useState(1);@@ -36,11 +36,11 @@ const Amplify: React.FC = () => {value={volume3}onChange={(e) => setVolume3(Number(e.target.value))}/>- <Html5Audio src={staticFile('music.mp3')} volume={volume1} />- <Html5Audio src={staticFile('sounds/9.wav')} volume={volume2} />+ <Html5Audio src="https://remotion.media/music.mp3" volume={volume1} />+ <Html5Audio src="https://remotion.media/sounds/9.wav" volume={volume2} /><Sequence durationInFrames={90}><OffthreadVideo- src={staticFile('bigbuckbunny.mp4')}+ src="https://remotion.media/bigbuckbunny.mp4"volume={volume3}playbackRate={1}style={{@@ -56,7 +56,7 @@ const Amplify: React.FC = () => {}}><OffthreadVideo- src={staticFile('vid1.mp4')}+ src="https://remotion.media/vid1.mp4"volume={volume3}playbackRate={2}pauseWhenBufferingdiff --git a/packages/example/src/ComplexSounds/index.tsx b/packages/example/src/ComplexSounds/index.tsxindex dda1b4c01c..229e718b1c 100644--- a/packages/example/src/ComplexSounds/index.tsx+++ b/packages/example/src/ComplexSounds/index.tsx@@ -1,4 +1,4 @@-import {AbsoluteFill, Html5Audio, Series, staticFile} from 'remotion';+import {AbsoluteFill, Html5Audio, Series} from 'remotion';import music from '../resources/sound1.mp3';export const ComplexSounds: React.FC = () => {@@ -7,31 +7,31 @@ export const ComplexSounds: React.FC = () => {<Html5Audio src={music} volume={0.3} /><Series><Series.Sequence durationInFrames={60}>- <Html5Audio src={staticFile('sounds/1.wav')} />+ <Html5Audio src="https://remotion.media/sounds/1.wav" /></Series.Sequence><Series.Sequence durationInFrames={60}>- <Html5Audio src={staticFile('sounds/2.wav')} />+ <Html5Audio src="https://remotion.media/sounds/2.wav" /></Series.Sequence><Series.Sequence durationInFrames={30}>- <Html5Audio src={staticFile('sounds/3.wav')} />+ <Html5Audio src="https://remotion.media/sounds/3.wav" /></Series.Sequence><Series.Sequence durationInFrames={90}>- <Html5Audio src={staticFile('sounds/4.wav')} />+ <Html5Audio src="https://remotion.media/sounds/4.wav" /></Series.Sequence><Series.Sequence durationInFrames={120}>- <Html5Audio src={staticFile('sounds/5.wav')} />+ <Html5Audio src="https://remotion.media/sounds/5.wav" /></Series.Sequence><Series.Sequence durationInFrames={90}>- <Html5Audio src={staticFile('sounds/6.wav')} />+ <Html5Audio src="https://remotion.media/sounds/6.wav" /></Series.Sequence><Series.Sequence durationInFrames={90}>- <Html5Audio src={staticFile('sounds/7.wav')} />+ <Html5Audio src="https://remotion.media/sounds/7.wav" /></Series.Sequence><Series.Sequence durationInFrames={90}>- <Html5Audio src={staticFile('sounds/8.wav')} />+ <Html5Audio src="https://remotion.media/sounds/8.wav" /></Series.Sequence><Series.Sequence durationInFrames={100}>- <Html5Audio src={staticFile('sounds/9.wav')} />+ <Html5Audio src="https://remotion.media/sounds/9.wav" /></Series.Sequence></Series></AbsoluteFill>diff --git a/packages/example/src/CorruptVideo/index.tsx b/packages/example/src/CorruptVideo/index.tsxindex 1a5df6d731..f785c022b8 100644--- a/packages/example/src/CorruptVideo/index.tsx+++ b/packages/example/src/CorruptVideo/index.tsx@@ -1,4 +1,4 @@-import {interpolate, OffthreadVideo, staticFile} from 'remotion';+import {interpolate, OffthreadVideo} from 'remotion';const CorruptVideo: React.FC = () => {return (@@ -6,7 +6,7 @@ const CorruptVideo: React.FC = () => {volume={(f) =>interpolate(f, [0, 500], [1, 0], {extrapolateRight: 'clamp'})}- src={staticFile('corrupted.mp4')}+ src="https://remotion.media/corrupted.mp4"/>);};diff --git a/packages/example/src/DecoderDemo.tsx b/packages/example/src/DecoderDemo.tsxindex 1aad7c93ef..9543f15c49 100644--- a/packages/example/src/DecoderDemo.tsx+++ b/packages/example/src/DecoderDemo.tsx@@ -6,7 +6,7 @@ export const DecoderDemo: React.FC = () => {const [blob, setBlob] = useState<string | null>(null);useEffect(() => {- fetch(staticFile('iphone-hevc.mov'))+ fetch('https://remotion.media/iphone-hevc.mov').then((res) => res.blob()).then((buffer) => URL.createObjectURL(buffer)).then((url) => setBlob(url));@@ -20,11 +20,11 @@ export const DecoderDemo: React.FC = () => {<SrcEncoder label="mp4-with-mp3.mp4" src={staticFile('mp4-mp3.mp4')} /><SrcEncoderlabel="bigbuckbunny.mp4"- src={staticFile('bigbuckbunny.mp4')}+ src="https://remotion.media/bigbuckbunny.mp4"/><SrcEncoderlabel="corrupted-timestamps.mp4"- src={staticFile('corrupted.mp4')}+ src="https://remotion.media/corrupted.mp4"/><SrcEncoderlabel="lossless-audio.mkv"@@ -42,10 +42,10 @@ export const DecoderDemo: React.FC = () => {label="mp3-in-mkv.mkv"src={staticFile('matroska-mp3.mkv')}/>- <SrcEncoder label="vid1.mp4" src={staticFile('vid1.mp4')} />+ <SrcEncoder label="vid1.mp4" src="https://remotion.media/vid1.mp4" /><SrcEncoderlabel="hevc-with-rotation.mov"- src={staticFile('iphone-hevc.mov')}+ src="https://remotion.media/iphone-hevc.mov"/><SrcEncoderlabel="https://upload.wikimedia.org/wikipedia/commons/transcoded/c/c0/Big_Buck_Bunny_4K.webm/Big_Buck_Bunny_4K.webm.720p.vp9.webm"@@ -53,7 +53,7 @@ export const DecoderDemo: React.FC = () => {/><SrcEncoderlabel="vp8-with-stretch.webm"- src={staticFile('stretched-vp8.webm')}+ src="https://remotion.media/stretched-vp8.webm"/><SrcEncoderlabel="vp8-vorbis.webm"diff --git a/packages/example/src/EffectsTestbed/EffectsTestbed.tsx b/packages/example/src/EffectsTestbed/EffectsTestbed.tsxindex 558488b3c5..eb9ab8557c 100644--- a/packages/example/src/EffectsTestbed/EffectsTestbed.tsx+++ b/packages/example/src/EffectsTestbed/EffectsTestbed.tsx@@ -3,15 +3,9 @@ import {LightLeakInternals} from '@remotion/light-leaks';import {Video} from '@remotion/media';import {StarburstInternals} from '@remotion/starburst';import React from 'react';-import {- AbsoluteFill,- Solid,- staticFile,- useCurrentFrame,- useVideoConfig,-} from 'remotion';+import {AbsoluteFill, Solid, useCurrentFrame, useVideoConfig} from 'remotion';-const SAMPLE_VIDEO = staticFile('bigbuckbunny.mp4');+const SAMPLE_VIDEO = 'https://remotion.media/bigbuckbunny.mp4';const Tile: React.FC<{readonly title: string;diff --git a/packages/example/src/EffectsTestbed/VideoEffectsFastRefresh.tsx b/packages/example/src/EffectsTestbed/VideoEffectsFastRefresh.tsxindex e041e566a8..e9c29952d7 100644--- a/packages/example/src/EffectsTestbed/VideoEffectsFastRefresh.tsx+++ b/packages/example/src/EffectsTestbed/VideoEffectsFastRefresh.tsx@@ -14,14 +14,14 @@import {EffectInternals} from '@remotion/effects';import {Video} from '@remotion/media';import React from 'react';-import {AbsoluteFill, Solid, staticFile} from 'remotion';+import {AbsoluteFill, Solid} from 'remotion';// --- Edit these values and save to test fast refresh ---const TINT_COLOR = '#ff5fa2';const TINT_AMOUNT = 0.2;// --------------------------------------------------------const SAMPLE_VIDEO = staticFile('bigbuckbunny.mp4');+const SAMPLE_VIDEO = 'https://remotion.media/bigbuckbunny.mp4';const panelStyle: React.CSSProperties = {flex: 1,diff --git a/packages/example/src/ExperimentalControls/index.tsx b/packages/example/src/ExperimentalControls/index.tsxindex dcddaa275f..2da073ba65 100644--- a/packages/example/src/ExperimentalControls/index.tsx+++ b/packages/example/src/ExperimentalControls/index.tsx@@ -166,7 +166,7 @@ export const ExperimentalControlsShowcase: React.FC = () => {</Tile><Tile title="Video"><Video- src={staticFile('bigbuckbunny.mp4')}+ src="https://remotion.media/bigbuckbunny.mp4"style={{width: '100%',height: '100%',@@ -185,7 +185,7 @@ export const ExperimentalControlsShowcase: React.FC = () => {}}>Audio (no visual)- <Audio src={staticFile('music.mp3')} volume={1.29} />+ <Audio src="https://remotion.media/music.mp3" volume={1.29} /></div></Tile><Tile title="Sequence layout='none'">@@ -197,7 +197,7 @@ export const ExperimentalControlsShowcase: React.FC = () => {<div style={{flex: 1, display: 'flex', flexDirection: 'row', gap: 16}}><Tile title="Html5Video"><Html5Video- src={staticFile('bigbuckbunny.mp4')}+ src="https://remotion.media/bigbuckbunny.mp4"style={{width: '100%',height: '100%',@@ -214,7 +214,7 @@ export const ExperimentalControlsShowcase: React.FC = () => {}}>Html5Audio (no visual)- <Html5Audio src={staticFile('music.mp3')} volume={1} />+ <Html5Audio src="https://remotion.media/music.mp3" volume={1} /></div></Tile>{' '}<Tile title="Series">diff --git a/packages/example/src/LoopTrimmedAudio/index.tsx b/packages/example/src/LoopTrimmedAudio/index.tsxindex 30809a088b..ca55e1ba5a 100644--- a/packages/example/src/LoopTrimmedAudio/index.tsx+++ b/packages/example/src/LoopTrimmedAudio/index.tsx@@ -1,11 +1,11 @@import React from 'react';-import {Html5Audio, staticFile} from 'remotion';+import {Html5Audio} from 'remotion';const LoopedTrimmedAudio: React.FC = () => {return (<Html5Audioloop- src={staticFile('music.mp3')}+ src="https://remotion.media/music.mp3"startFrom={125}endAt={370}volume={(v) => Math.min(1, v / 30)}diff --git a/packages/example/src/ManyAudio/index.tsx b/packages/example/src/ManyAudio/index.tsxindex a1b7581b69..a3bdb02e55 100644--- a/packages/example/src/ManyAudio/index.tsx+++ b/packages/example/src/ManyAudio/index.tsx@@ -1,11 +1,11 @@import React from 'react';-import {AbsoluteFill, Html5Audio, staticFile} from 'remotion';+import {AbsoluteFill, Html5Audio} from 'remotion';export const ManyAudio: React.FC = () => {return (<AbsoluteFill>{new Array(32).fill(true).map(() => {- return <Html5Audio src={staticFile('music.mp3')} />;+ return <Html5Audio src="https://remotion.media/music.mp3" />;})}</AbsoluteFill>);diff --git a/packages/example/src/ObjectFitTest.tsx b/packages/example/src/ObjectFitTest.tsxindex 20ced61e6a..9c11891b31 100644--- a/packages/example/src/ObjectFitTest.tsx+++ b/packages/example/src/ObjectFitTest.tsx@@ -1,6 +1,6 @@import {Video, VideoObjectFit} from '@remotion/media';import React from 'react';-import {AbsoluteFill, Composition, staticFile} from 'remotion';+import {AbsoluteFill, Composition} from 'remotion';import {z} from 'zod';const objectFitSchema = z.object({@@ -13,7 +13,7 @@ const ObjectFitTest: React.FC<z.infer<typeof objectFitSchema>> = ({return (<AbsoluteFill style={{backgroundColor: '#333'}}><Video- src={staticFile('bigbuckbunny.mp4')}+ src="https://remotion.media/bigbuckbunny.mp4"style={{width: '100%', height: '100%'}}objectFit={objectFit as VideoObjectFit}muteddiff --git a/packages/example/src/OffthreadRemoteVideo/LoopedOffthreadRemoteVideo.tsx b/packages/example/src/OffthreadRemoteVideo/LoopedOffthreadRemoteVideo.tsxindex 5501c9c1aa..896b87c2a5 100644--- a/packages/example/src/OffthreadRemoteVideo/LoopedOffthreadRemoteVideo.tsx+++ b/packages/example/src/OffthreadRemoteVideo/LoopedOffthreadRemoteVideo.tsx@@ -1,15 +1,10 @@import {StudioInternals} from '@remotion/studio';-import {- AbsoluteFill,- OffthreadVideo,- staticFile,- useCurrentFrame,-} from 'remotion';+import {AbsoluteFill, OffthreadVideo, useCurrentFrame} from 'remotion';import {calculateMetadataFn} from './OffthreadRemoteVideo';const fps = 30;-const src = staticFile('bigbuckbunny.mp4') + '#t=lol';+const src = 'https://remotion.media/bigbuckbunny.mp4#t=lol';export const LoopedOffthreadVideo: React.FC<{durationInFrames: number;diff --git a/packages/example/src/OffthreadRemoteVideo/OffthreadRemoteSeries.tsx b/packages/example/src/OffthreadRemoteVideo/OffthreadRemoteSeries.tsxindex 38353cb384..e44eedcb05 100644--- a/packages/example/src/OffthreadRemoteVideo/OffthreadRemoteSeries.tsx+++ b/packages/example/src/OffthreadRemoteVideo/OffthreadRemoteSeries.tsx@@ -1,15 +1,10 @@import {parseMedia} from '@remotion/media-parser';import {StudioInternals} from '@remotion/studio';-import {- CalculateMetadataFunction,- OffthreadVideo,- Series,- staticFile,-} from 'remotion';+import {CalculateMetadataFunction, OffthreadVideo, Series} from 'remotion';const fps = 30;const sources = [- staticFile('bigbuckbunny.mp4'),+ 'https://remotion.media/bigbuckbunny.mp4','https://remotion.media/video.mp4',];diff --git a/packages/example/src/OffthreadRemoteVideo/OffthreadRemoteVideo.tsx b/packages/example/src/OffthreadRemoteVideo/OffthreadRemoteVideo.tsxindex c4aaa115b6..cc638f6cbd 100644--- a/packages/example/src/OffthreadRemoteVideo/OffthreadRemoteVideo.tsx+++ b/packages/example/src/OffthreadRemoteVideo/OffthreadRemoteVideo.tsx@@ -1,9 +1,9 @@import {parseMedia} from '@remotion/media-parser';import {StudioInternals} from '@remotion/studio';-import {CalculateMetadataFunction, OffthreadVideo, staticFile} from 'remotion';+import {CalculateMetadataFunction, OffthreadVideo} from 'remotion';const fps = 30;-const src = staticFile('bigbuckbunny.mp4') + '#t=lol';+const src = 'https://remotion.media/bigbuckbunny.mp4#t=lol';export const calculateMetadataFn: CalculateMetadataFunction<Record<string, unknown>diff --git a/packages/example/src/OffthreadVideoToCanvas/index.tsx b/packages/example/src/OffthreadVideoToCanvas/index.tsxindex 0150eaacda..fb886c7eb6 100644--- a/packages/example/src/OffthreadVideoToCanvas/index.tsx+++ b/packages/example/src/OffthreadVideoToCanvas/index.tsx@@ -1,10 +1,5 @@import {useCallback, useRef} from 'react';-import {- AbsoluteFill,- OffthreadVideo,- staticFile,- useVideoConfig,-} from 'remotion';+import {AbsoluteFill, OffthreadVideo, useVideoConfig} from 'remotion';export const OffthreadVideoToCanvas: React.FC = () => {const canvas = useRef<HTMLCanvasElement>(null);@@ -46,7 +41,7 @@ export const OffthreadVideoToCanvas: React.FC = () => {<OffthreadVideomutedstyle={{opacity: 0}}- src={staticFile('vid1.mp4')}+ src="https://remotion.media/vid1.mp4"onVideoFrame={onVideoFrame}/></AbsoluteFill>diff --git a/packages/example/src/Root.tsx b/packages/example/src/Root.tsxindex a02226b7d5..e3643f89bf 100644--- a/packages/example/src/Root.tsx+++ b/packages/example/src/Root.tsx@@ -779,7 +779,7 @@ export const Index: React.FC = () => {component={NewAudioExample}fps={30}defaultProps={{- src: staticFile('music.mp3'),+ src: 'https://remotion.media/music.mp3',}}calculateMetadata={async ({props}) => {const fps = 30;diff --git a/packages/example/src/TenFrameTester/index.tsx b/packages/example/src/TenFrameTester/index.tsxindex 9c88a419fb..d489023f76 100644--- a/packages/example/src/TenFrameTester/index.tsx+++ b/packages/example/src/TenFrameTester/index.tsx@@ -1,10 +1,10 @@-import {AbsoluteFill, Html5Audio, staticFile} from 'remotion';+import {AbsoluteFill, Html5Audio} from 'remotion';import ReactSvg from '../ReactSvg';// Short video that is fast to render for testingexport const TenFrameTester: React.FC = () => (<AbsoluteFill><ReactSvg transparent={false} />- <Html5Audio src={staticFile('music.mp3')} />+ <Html5Audio src="https://remotion.media/music.mp3" /></AbsoluteFill>);diff --git a/packages/example/src/WhisperWeb/index.tsx b/packages/example/src/WhisperWeb/index.tsxindex b3e4b9537b..776825be9f 100644--- a/packages/example/src/WhisperWeb/index.tsx+++ b/packages/example/src/WhisperWeb/index.tsx@@ -7,9 +7,8 @@ import {transcribe,} from '@remotion/whisper-web';import {useCallback, useEffect, useState} from 'react';-import {staticFile} from 'remotion';-const audioFileUrl = staticFile('16khz.wav');+const audioFileUrl = 'https://remotion.media/16khz.wav';// Define available modelsconst AVAILABLE_MODELS: WhisperWebModel[] = [