🎥 Make videos programmatically with React
Refactor disco light show for Studio editing
Jonny Burger855d4c4679d1
diff --git a/packages/jonnys-videos/src/components/AnimatedCaptions.tsx b/packages/jonnys-videos/src/components/AnimatedCaptions.tsxindex ae423e5a1f..3da91a8dfd 100644--- a/packages/jonnys-videos/src/components/AnimatedCaptions.tsx+++ b/packages/jonnys-videos/src/components/AnimatedCaptions.tsx@@ -333,9 +333,15 @@ const AnimatedCaptionsContent: React.FC<{return (<>{voiceoverSrc ? (- <Audio src={voiceoverSrc} hidden showInTimeline={false} />+ <Audio+ premountFor={fps}+ src={voiceoverSrc}+ hidden+ showInTimeline={false}+ />) : null}<HtmlInCanvas+ premountFor={fps}name="Animated captions canvas"width={width}height={height}diff --git a/packages/jonnys-videos/src/disco-light-show/AnimatedCaptionsBigWords.tsx b/packages/jonnys-videos/src/disco-light-show/AnimatedCaptionsBigWords.tsxindex 29fb3955b3..654381c7d8 100644--- a/packages/jonnys-videos/src/disco-light-show/AnimatedCaptionsBigWords.tsx+++ b/packages/jonnys-videos/src/disco-light-show/AnimatedCaptionsBigWords.tsx@@ -34,6 +34,7 @@ const BigWordPage: React.FC<{page: TikTokPage}> = ({page}) => {return (<AbsoluteFill+ premountFor={fps}style={{alignItems: 'center',justifyContent: 'center',@@ -43,6 +44,7 @@ const BigWordPage: React.FC<{page: TikTokPage}> = ({page}) => {}}><Interactive.Div+ premountFor={fps}name={`Caption page: ${page.text.trim()}`}style={{alignItems: 'center',@@ -153,8 +155,13 @@ export const AnimatedCaptionsBigWords: React.FC = () => {}return (- <AbsoluteFill>- <Audio src={asset(VOICEOVER_FILE)} hidden showInTimeline={false} />+ <AbsoluteFill premountFor={fps}>+ <Audio+ premountFor={fps}+ src={asset(VOICEOVER_FILE)}+ hidden+ showInTimeline={false}+ />{pages.map((page, index) => {const nextPage = pages[index + 1];const startFrame = Math.round((page.startMs / 1000) * fps);diff --git a/packages/jonnys-videos/src/disco-light-show/ArrowLogo.tsx b/packages/jonnys-videos/src/disco-light-show/ArrowLogo.tsxindex e5d8f8c363..ef5619e940 100644--- a/packages/jonnys-videos/src/disco-light-show/ArrowLogo.tsx+++ b/packages/jonnys-videos/src/disco-light-show/ArrowLogo.tsx@@ -2,14 +2,21 @@ import {dropShadow} from '@remotion/effects/drop-shadow';import {scale} from '@remotion/effects/scale';import {Arrow} from '@remotion/shapes';import React from 'react';-import {Img, interpolate, useCurrentFrame} from 'remotion';+import {+ useVideoConfig,+ CanvasImage,+ interpolate,+ useCurrentFrame,+} from 'remotion';import {asset} from './assets';export const ArrowLogo: React.FC = () => {+ const {fps} = useVideoConfig();const frame = useCurrentFrame();return (<><Arrow+ premountFor={fps}length={300}headWidth={185}headLength={120}@@ -34,7 +41,8 @@ export const ArrowLogo: React.FC = () => {}),]}/>- <Img+ <CanvasImage+ premountFor={fps}src={asset('claude-logo-png_seeklogo-554534 (1).png')}style={{position: 'absolute',diff --git a/packages/jonnys-videos/src/disco-light-show/ArrowLogoRemotion.tsx b/packages/jonnys-videos/src/disco-light-show/ArrowLogoRemotion.tsxindex f95e0942fb..eaf740dc95 100644--- a/packages/jonnys-videos/src/disco-light-show/ArrowLogoRemotion.tsx+++ b/packages/jonnys-videos/src/disco-light-show/ArrowLogoRemotion.tsx@@ -3,14 +3,16 @@ import {scale} from '@remotion/effects/scale';import {noise2D} from '@remotion/noise';import {Arrow} from '@remotion/shapes';import React from 'react';-import {Img, useCurrentFrame} from 'remotion';+import {useVideoConfig, CanvasImage, useCurrentFrame} from 'remotion';import {asset} from './assets';export const ArrowLogoRemotion: React.FC = () => {+ const {fps} = useVideoConfig();const frame = useCurrentFrame();return (<><Arrow+ premountFor={fps}length={300}headWidth={185}headLength={120}@@ -35,7 +37,8 @@ export const ArrowLogoRemotion: React.FC = () => {}),]}/>- <Img+ <CanvasImage+ premountFor={fps}src={asset('remotion-logo.svg')}style={{position: 'absolute',diff --git a/packages/jonnys-videos/src/disco-light-show/BirthdayPartyCompilation.tsx b/packages/jonnys-videos/src/disco-light-show/BirthdayPartyCompilation.tsxindex 62aa65c064..521e2504f6 100644--- a/packages/jonnys-videos/src/disco-light-show/BirthdayPartyCompilation.tsx+++ b/packages/jonnys-videos/src/disco-light-show/BirthdayPartyCompilation.tsx@@ -1,12 +1,20 @@import {Video} from '@remotion/media';import React from 'react';-import {Sequence, Solid, interpolate, useCurrentFrame, Easing} from 'remotion';+import {+ useVideoConfig,+ Sequence,+ Solid,+ interpolate,+ useCurrentFrame,+ Easing,+} from 'remotion';import {asset} from './assets';import {Clip1} from './Clip1';import {Clip3} from './Clip3';import {Clip4} from './Clip4';export const BirthdayPartyCompilation: React.FC = () => {+ const {fps} = useVideoConfig();const frame = useCurrentFrame();return (<>@@ -19,7 +27,7 @@ export const BirthdayPartyCompilation: React.FC = () => {position: 'absolute',}}from={93}- premountFor={30}+ premountFor={fps}><Clip1 /></Sequence>@@ -32,7 +40,7 @@ export const BirthdayPartyCompilation: React.FC = () => {position: 'absolute',}}from={37}- premountFor={30}+ premountFor={fps}><Clip3 /></Sequence>@@ -45,7 +53,7 @@ export const BirthdayPartyCompilation: React.FC = () => {position: 'absolute',}}from={134}- premountFor={30}+ premountFor={fps}><Clip4 /></Sequence>@@ -59,10 +67,11 @@ export const BirthdayPartyCompilation: React.FC = () => {from={4}durationInFrames={33}trimBefore={11}- premountFor={30}+ premountFor={fps}muted/><Solid+ premountFor={fps}width={1080}height={1920}color={'#ffffff'}diff --git a/packages/jonnys-videos/src/disco-light-show/ClientSideChad.tsx b/packages/jonnys-videos/src/disco-light-show/ClientSideChad.tsxindex 426f3e60a5..990ccb8b4f 100644--- a/packages/jonnys-videos/src/disco-light-show/ClientSideChad.tsx+++ b/packages/jonnys-videos/src/disco-light-show/ClientSideChad.tsx@@ -5,21 +5,23 @@ import {scale} from '@remotion/effects/scale';import {vignette} from '@remotion/effects/vignette';import React from 'react';import {- Img,+ useVideoConfig,+ CanvasImage,Interactive,interpolate,useCurrentFrame,Easing,- CanvasImage,} from 'remotion';import {asset} from './assets';export const ClientSideChad: React.FC = () => {+ const {fps} = useVideoConfig();const frame = useCurrentFrame();const title = 'BEN2-ONNX';return (<>- <Img+ <CanvasImage+ premountFor={fps}src={asset('Screenshot 2026-07-19 at 18.11.15.png')}style={{position: 'absolute',@@ -53,7 +55,8 @@ export const ClientSideChad: React.FC = () => {grayscale({}),]}/>- <Img+ <CanvasImage+ premountFor={fps}src={asset('images.png')}style={{position: 'absolute',@@ -102,7 +105,8 @@ export const ClientSideChad: React.FC = () => {]}from={22}/>- <Img+ <CanvasImage+ premountFor={fps}src={asset('WebGPU_logo.svg.webp')}style={{position: 'absolute',@@ -151,6 +155,7 @@ export const ClientSideChad: React.FC = () => {from={22}/><Interactive.Div+ premountFor={fps}name="BEN2-ONNX typewriter"style={{color: '#ffffff',@@ -191,6 +196,7 @@ export const ClientSideChad: React.FC = () => {{title}</Interactive.Div><CanvasImage+ premountFor={fps}src={asset('mediabunny-logo (1).svg')}style={{position: 'absolute',@@ -220,6 +226,7 @@ export const ClientSideChad: React.FC = () => {from={22}/><CanvasImage+ premountFor={fps}src={asset('image.png')}style={{position: 'absolute',@@ -245,6 +252,7 @@ export const ClientSideChad: React.FC = () => {]}/><CanvasImage+ premountFor={fps}src={asset('image-1.png')}style={{position: 'absolute',diff --git a/packages/jonnys-videos/src/disco-light-show/Clip1.tsx b/packages/jonnys-videos/src/disco-light-show/Clip1.tsxindex 670f9ebbd2..d0929f6855 100644--- a/packages/jonnys-videos/src/disco-light-show/Clip1.tsx+++ b/packages/jonnys-videos/src/disco-light-show/Clip1.tsx@@ -1,11 +1,14 @@import {Video} from '@remotion/media';import React from 'react';+import {useVideoConfig} from 'remotion';import {asset} from './assets';export const Clip1: React.FC = () => {+ const {fps} = useVideoConfig();return (<><Video+ premountFor={fps}src={asset('clip1-source.mp4')}style={{position: 'absolute',diff --git a/packages/jonnys-videos/src/disco-light-show/Clip3.tsx b/packages/jonnys-videos/src/disco-light-show/Clip3.tsxindex 74abc2beca..4a590dadfa 100644--- a/packages/jonnys-videos/src/disco-light-show/Clip3.tsx+++ b/packages/jonnys-videos/src/disco-light-show/Clip3.tsx@@ -1,10 +1,11 @@import {linearProgressiveBlur} from '@remotion/effects/linear-progressive-blur';import {Video} from '@remotion/media';import React from 'react';-import {interpolate, useCurrentFrame} from 'remotion';+import {useVideoConfig, interpolate, useCurrentFrame} from 'remotion';import {asset} from './assets';export const Clip3: React.FC = () => {+ const {fps} = useVideoConfig();const frame = useCurrentFrame();return (<>@@ -30,7 +31,7 @@ export const Clip3: React.FC = () => {}),]}muted- premountFor={30}+ premountFor={fps}/></>);diff --git a/packages/jonnys-videos/src/disco-light-show/Clip4.tsx b/packages/jonnys-videos/src/disco-light-show/Clip4.tsxindex 79f1c86f10..533e31d93b 100644--- a/packages/jonnys-videos/src/disco-light-show/Clip4.tsx+++ b/packages/jonnys-videos/src/disco-light-show/Clip4.tsx@@ -1,11 +1,14 @@import {Video} from '@remotion/media';import React from 'react';+import {useVideoConfig} from 'remotion';import {asset} from './assets';export const Clip4: React.FC = () => {+ const {fps} = useVideoConfig();return (<><Video+ premountFor={fps}src={asset('IMG_8549.mp4')}style={{position: 'absolute',diff --git a/packages/jonnys-videos/src/disco-light-show/Clip5.tsx b/packages/jonnys-videos/src/disco-light-show/Clip5.tsxindex 986d668f0e..f7e36d7d05 100644--- a/packages/jonnys-videos/src/disco-light-show/Clip5.tsx+++ b/packages/jonnys-videos/src/disco-light-show/Clip5.tsx@@ -1,11 +1,14 @@import {Video} from '@remotion/media';import React from 'react';+import {useVideoConfig} from 'remotion';import {asset} from './assets';export const Clip5: React.FC = () => {+ const {fps} = useVideoConfig();return (<><Video+ premountFor={fps}src={asset('clip5-source.mp4')}style={{position: 'absolute',diff --git a/packages/jonnys-videos/src/disco-light-show/Composition.tsx b/packages/jonnys-videos/src/disco-light-show/Composition.tsxindex 49031f4cb7..6f44035b4f 100644--- a/packages/jonnys-videos/src/disco-light-show/Composition.tsx+++ b/packages/jonnys-videos/src/disco-light-show/Composition.tsx@@ -1,13 +1,13 @@import {Audio, Video} from '@remotion/media';import {- CalculateMetadataFunction,+ useVideoConfig,Composition,Easing,Folder,Sequence,interpolate,useCurrentFrame,- Img,+ CanvasImage,} from 'remotion';import {AnimatedCaptions} from './AnimatedCaptions';import {AnimatedCaptionsBigWords} from './AnimatedCaptionsBigWords';@@ -39,14 +39,8 @@ import {import {TextBehindVideoStackComposition} from './TextBehindVideoStack';import {VibeCoded} from './VibeCoded';-type Props = {};-export const MASTER_DURATION_IN_FRAMES = 1816;-const calculateMetadata: CalculateMetadataFunction<Props> = () => {- return {};-};-export const MyComposition = () => {return (<>@@ -57,7 +51,6 @@ export const MyComposition = () => {fps={30}width={1080}height={1920}- calculateMetadata={calculateMetadata}/><Folder name="backgrounds"><Composition@@ -81,11 +74,13 @@ export const MyComposition = () => {);};-export const MyComponent: React.FC<Props> = () => {+export const MyComponent: React.FC = () => {+ const {fps} = useVideoConfig();const frame = useCurrentFrame();return (<><Sequence+ premountFor={fps}name="DiscoBallBg"width={1080}height={1920}@@ -97,6 +92,7 @@ export const MyComponent: React.FC<Props> = () => {<DiscoBallBg /></Sequence><Sequence+ premountFor={fps}name="Text background"width={1920}height={1080}@@ -177,12 +173,17 @@ export const MyComponent: React.FC<Props> = () => {position: 'absolute',}}from={182}- premountFor={30}+ premountFor={fps}><BirthdayPartyCompilation /></Sequence>- <Audio src={asset('text-behind-video-2.wav')} />+ <Audio+ premountFor={fps}+ name="Voiceover"+ src={asset('text-behind-video-2.wav')}+ /><Sequence+ premountFor={fps}name="AnimatedCaptions"width={1080}height={360}@@ -195,6 +196,7 @@ export const MyComponent: React.FC<Props> = () => {<AnimatedCaptions /></Sequence><Sequence+ premountFor={fps}name="AnimatedCaptions"width={1080}height={360}@@ -209,6 +211,7 @@ export const MyComponent: React.FC<Props> = () => {<AnimatedCaptions /></Sequence><Sequence+ premountFor={fps}name="AnimatedCaptions"width={1080}height={360}@@ -241,6 +244,7 @@ export const MyComponent: React.FC<Props> = () => {<AnimatedCaptions /></Sequence><Sequence+ premountFor={fps}name="AnimatedCaptionsBigWords"width={1080}height={1920}@@ -316,7 +320,7 @@ export const MyComponent: React.FC<Props> = () => {}),}}from={337}- premountFor={30}+ premountFor={fps}><EffectShow /></Sequence>@@ -363,7 +367,7 @@ export const MyComponent: React.FC<Props> = () => {}),}}from={537}- premountFor={30}+ premountFor={fps}><HuggingFace /></Sequence>@@ -380,7 +384,7 @@ export const MyComponent: React.FC<Props> = () => {}),}}from={694}- premountFor={30}+ premountFor={fps}><ClientSideChad /></Sequence>@@ -450,7 +454,7 @@ export const MyComponent: React.FC<Props> = () => {},),}}- premountFor={30}+ premountFor={fps}><Separate /></Sequence>@@ -508,11 +512,12 @@ export const MyComponent: React.FC<Props> = () => {),}}from={953}- premountFor={30}+ premountFor={fps}><Fork /></Sequence><Sequence+ premountFor={fps}name="ForkDrop"width={1080}height={1920}@@ -588,7 +593,7 @@ export const MyComponent: React.FC<Props> = () => {}),}}from={1093}- premountFor={30}+ premountFor={fps}><OneShot /></Sequence>@@ -635,7 +640,7 @@ export const MyComponent: React.FC<Props> = () => {scale: 0.9999999983052765,}}from={1125}- premountFor={30}+ premountFor={fps}trimBefore={35}><VibeCoded />@@ -649,11 +654,12 @@ export const MyComponent: React.FC<Props> = () => {style={{position: 'absolute',}}- premountFor={30}+ premountFor={fps}><Mediabunny /></Sequence><Sequence+ premountFor={fps}name="DragInDemo"width={1080}height={1920}@@ -710,11 +716,12 @@ export const MyComponent: React.FC<Props> = () => {),}}from={1337}- premountFor={30}+ premountFor={fps}><TextBehindVideoStackComposition /></Sequence>- <Img+ <CanvasImage+ premountFor={fps}src={asset('Screenshot 2026-07-19 at 18.28.52.png')}style={{position: 'absolute',@@ -782,13 +789,15 @@ export const MyComponent: React.FC<Props> = () => {durationInFrames={205}/><Audio+ name="Fork sound effect"src={asset('fahhhh.mp3')}from={1036}- premountFor={30}+ premountFor={fps}volume={0.1}durationInFrames={772}/><Video+ name="Drumsticks"src={asset('drumsticks.mp4')}style={{position: 'absolute',@@ -799,13 +808,13 @@ export const MyComponent: React.FC<Props> = () => {}}from={1615}durationInFrames={66}- premountFor={30}+ premountFor={fps}playbackRate={0.8}/><Sequencename="TextBehindVideoSeriesFirst20s"from={1648}- premountFor={30}+ premountFor={fps}durationInFrames={TEXT_BEHIND_VIDEO_SERIES_FIRST_20S_DURATION_IN_FRAMES}width={1080}height={1920}@@ -813,6 +822,7 @@ export const MyComponent: React.FC<Props> = () => {<TextBehindVideoSeriesFirst20sComposition /></Sequence><Sequence+ premountFor={fps}name="Countdown"from={1556}durationInFrames={COUNTDOWN_DURATION_IN_FRAMES}diff --git a/packages/jonnys-videos/src/disco-light-show/Countdown.tsx b/packages/jonnys-videos/src/disco-light-show/Countdown.tsxindex 3eadee4568..afbdf58627 100644--- a/packages/jonnys-videos/src/disco-light-show/Countdown.tsx+++ b/packages/jonnys-videos/src/disco-light-show/Countdown.tsx@@ -1,38 +1,37 @@import React from 'react';import {+ useVideoConfig,AbsoluteFill,Easing,Interactive,+ type InteractivitySchema,interpolate,- Sequence,useCurrentFrame,} from 'remotion';export const COUNTDOWN_DURATION_IN_FRAMES = 59;-const PAGES = [- {number: '3', from: 0, durationInFrames: 20},- {number: '2', from: 20, durationInFrames: 20},- {number: '1', from: 40, durationInFrames: 19},-] as const;--const CountdownPage: React.FC<{- number: string;- durationInFrames: number;-}> = ({number, durationInFrames}) => {+const CountdownPageInner: React.FC<{+ readonly number: string;+ readonly style: React.CSSProperties | null;+}> = ({number, style}) => {+ const {fps, durationInFrames} = useVideoConfig();const frame = useCurrentFrame();return (<AbsoluteFill+ premountFor={fps}style={{alignItems: 'center',justifyContent: 'center',overflow: 'hidden',pointerEvents: 'none',+ ...style,}}><Interactive.Div- name={`Countdown number ${number}`}+ premountFor={fps}+ name="Countdown number"style={{color: '#ffffff',filter:@@ -44,7 +43,7 @@ const CountdownPage: React.FC<{lineHeight: 1,opacity: interpolate(frame,- [0, Math.max(1, durationInFrames - 4), durationInFrames - 1],+ [0, durationInFrames - 4, durationInFrames - 1],[1, 1, 0],{extrapolateLeft: 'clamp',@@ -70,22 +69,44 @@ const CountdownPage: React.FC<{);};+const countdownPageSchema = {+ number: {type: 'string', default: '3', description: 'Number'},+} as const satisfies InteractivitySchema;++const CountdownPage = Interactive.withSchema({+ Component: CountdownPageInner,+ componentName: '<CountdownPage>',+ schema: countdownPageSchema,+ wrapInSequence: true,+});+export const Countdown: React.FC = () => {+ const {fps} = useVideoConfig();return (- <AbsoluteFill>- {PAGES.map((page) => (- <Sequence- key={page.number}- name={`Countdown page ${page.number}`}- from={page.from}- durationInFrames={page.durationInFrames}- >- <CountdownPage- number={page.number}- durationInFrames={page.durationInFrames}- />- </Sequence>- ))}+ <AbsoluteFill premountFor={fps}>+ <CountdownPage+ style={null}+ name="Countdown 3"+ number="3"+ durationInFrames={20}+ premountFor={fps}+ />+ <CountdownPage+ style={null}+ name="Countdown 2"+ number="2"+ from={20}+ durationInFrames={20}+ premountFor={fps}+ />+ <CountdownPage+ style={null}+ name="Countdown 1"+ number="1"+ from={40}+ durationInFrames={19}+ premountFor={fps}+ /></AbsoluteFill>);};diff --git a/packages/jonnys-videos/src/disco-light-show/DiscoBallBg.tsx b/packages/jonnys-videos/src/disco-light-show/DiscoBallBg.tsxindex 1501693c38..db60e74089 100644--- a/packages/jonnys-videos/src/disco-light-show/DiscoBallBg.tsx+++ b/packages/jonnys-videos/src/disco-light-show/DiscoBallBg.tsx@@ -6,25 +6,35 @@ import {rings} from '@remotion/effects/rings';import {wave} from '@remotion/effects/wave';import {Video} from '@remotion/media';import React from 'react';-import {Solid, Sequence, useCurrentFrame, interpolate} from 'remotion';+import {+ useVideoConfig,+ Solid,+ Sequence,+ useCurrentFrame,+ interpolate,+} from 'remotion';import {asset} from './assets';export const DiscoBallBg: React.FC = () => {+ const {fps} = useVideoConfig();const frame = useCurrentFrame();return (<><Solid+ premountFor={fps}color={'#1e1c1c'}width={1080}height={1920}style={{position: 'absolute'}}/><Sequence+ premountFor={fps}style={{opacity: 0.1,}}><Solid+ premountFor={fps}width={1080}height={1920}color={'#010101'}@@ -70,6 +80,7 @@ export const DiscoBallBg: React.FC = () => {/><Solid+ premountFor={fps}width={1080}height={1920}color={'rgba(255, 255, 255, 0)'}@@ -78,6 +89,7 @@ export const DiscoBallBg: React.FC = () => {}}/><Video+ premountFor={fps}src={asset('disco-ball-3d-loop.mov')}style={{position: 'absolute',diff --git a/packages/jonnys-videos/src/disco-light-show/DragInDemo.tsx b/packages/jonnys-videos/src/disco-light-show/DragInDemo.tsxindex 8c31171714..8df417baa2 100644--- a/packages/jonnys-videos/src/disco-light-show/DragInDemo.tsx+++ b/packages/jonnys-videos/src/disco-light-show/DragInDemo.tsx@@ -1,11 +1,14 @@import {Video} from '@remotion/media';import React from 'react';+import {useVideoConfig} from 'remotion';import {asset} from './assets';export const DragInDemo: React.FC = () => {+ const {fps} = useVideoConfig();return (<><Video+ premountFor={fps}src={asset('Screen Recording 2026-07-19 at 18.16.56.mov')}style={{position: 'absolute',diff --git a/packages/jonnys-videos/src/disco-light-show/EffectShow.tsx b/packages/jonnys-videos/src/disco-light-show/EffectShow.tsxindex cf6d226a2f..05f18aaf10 100644--- a/packages/jonnys-videos/src/disco-light-show/EffectShow.tsx+++ b/packages/jonnys-videos/src/disco-light-show/EffectShow.tsx@@ -1,8 +1,10 @@import {Video} from '@remotion/media';import React from 'react';+import {useVideoConfig} from 'remotion';import {asset} from './assets';export const EffectShow: React.FC = () => {+ const {fps} = useVideoConfig();return (<><Video@@ -18,7 +20,7 @@ export const EffectShow: React.FC = () => {}}mutedtrimBefore={151}- premountFor={30}+ premountFor={fps}/></>);diff --git a/packages/jonnys-videos/src/disco-light-show/Fork.tsx b/packages/jonnys-videos/src/disco-light-show/Fork.tsxindex f24e190298..035a318293 100644--- a/packages/jonnys-videos/src/disco-light-show/Fork.tsx+++ b/packages/jonnys-videos/src/disco-light-show/Fork.tsx@@ -1,9 +1,16 @@import {Video} from '@remotion/media';import React from 'react';-import {Img, interpolate, useCurrentFrame, Easing} from 'remotion';+import {+ useVideoConfig,+ CanvasImage,+ interpolate,+ useCurrentFrame,+ Easing,+} from 'remotion';import {asset} from './assets';export const Fork: React.FC = () => {+ const {fps} = useVideoConfig();const frame = useCurrentFrame();return (<>@@ -15,9 +22,10 @@ export const Fork: React.FC = () => {scale: 1.519,}}from={62}- premountFor={30}+ premountFor={fps}/>- <Img+ <CanvasImage+ premountFor={fps}pauseWhenLoading={false}src={asset('elegant-silver-fork-free-png.webp')}style={{@@ -45,7 +53,8 @@ export const Fork: React.FC = () => {durationInFrames={133}trimBefore={7}/>- <Img+ <CanvasImage+ premountFor={fps}src={asset('Screenshot 2026-07-19 at 14.35.33.png')}style={{position: 'absolute',diff --git a/packages/jonnys-videos/src/disco-light-show/ForkDrop.tsx b/packages/jonnys-videos/src/disco-light-show/ForkDrop.tsxindex adf39286af..15e0473fa2 100644--- a/packages/jonnys-videos/src/disco-light-show/ForkDrop.tsx+++ b/packages/jonnys-videos/src/disco-light-show/ForkDrop.tsx@@ -1,8 +1,9 @@import React from 'react';import {+ useVideoConfig,AbsoluteFill,Easing,- Img,+ CanvasImage,Interactive,interpolate,useCurrentFrame,@@ -10,11 +11,13 @@ import {import {asset} from './assets';export const ForkDrop: React.FC = () => {+ const {fps} = useVideoConfig();const frame = useCurrentFrame();return (- <AbsoluteFill style={{overflow: 'hidden'}}>- <Img+ <AbsoluteFill premountFor={fps} style={{overflow: 'hidden'}}>+ <CanvasImage+ premountFor={fps}name="Cursor chat window"src={asset('Screenshot 2026-07-19 at 16.26.01.png')}style={{@@ -26,6 +29,7 @@ export const ForkDrop: React.FC = () => {}}/><Interactive.Div+ premountFor={fps}name="Chat drop highlight"style={{position: 'absolute',@@ -52,6 +56,7 @@ export const ForkDrop: React.FC = () => {}}/><Interactive.Div+ premountFor={fps}name="Forked Hugging Face page"style={{position: 'absolute',@@ -86,13 +91,15 @@ export const ForkDrop: React.FC = () => {transformOrigin: '50% 50%',}}>- <Img+ <CanvasImage+ premountFor={fps}src={asset('Screenshot 2026-07-19 at 14.35.33.png')}style={{width: 1428, height: 786}}showInTimeline={false}/></Interactive.Div>- <Img+ <CanvasImage+ premountFor={fps}name="Dragging fork"src={asset('elegant-silver-fork-free-png.webp')}style={{diff --git a/packages/jonnys-videos/src/disco-light-show/HuggingFace.tsx b/packages/jonnys-videos/src/disco-light-show/HuggingFace.tsxindex 9969448cdd..5b776547f4 100644--- a/packages/jonnys-videos/src/disco-light-show/HuggingFace.tsx+++ b/packages/jonnys-videos/src/disco-light-show/HuggingFace.tsx@@ -1,11 +1,14 @@import {Video} from '@remotion/media';import React from 'react';+import {useVideoConfig} from 'remotion';import {asset} from './assets';export const HuggingFace: React.FC = () => {+ const {fps} = useVideoConfig();return (<><Video+ premountFor={fps}src={asset('Screen Recording 2026-07-19 at 10.04.18.mov')}style={{position: 'absolute',diff --git a/packages/jonnys-videos/src/disco-light-show/Mediabunny.tsx b/packages/jonnys-videos/src/disco-light-show/Mediabunny.tsxindex 6496034ca5..1a6e4051d6 100644--- a/packages/jonnys-videos/src/disco-light-show/Mediabunny.tsx+++ b/packages/jonnys-videos/src/disco-light-show/Mediabunny.tsx@@ -1,12 +1,19 @@import React from 'react';-import {Img, interpolate, useCurrentFrame} from 'remotion';+import {+ useVideoConfig,+ CanvasImage,+ interpolate,+ useCurrentFrame,+} from 'remotion';import {asset} from './assets';export const Mediabunny: React.FC = () => {+ const {fps} = useVideoConfig();const frame = useCurrentFrame();return (<>- <Img+ <CanvasImage+ premountFor={fps}src={asset('mediabunny-logo.png')}style={{position: 'absolute',diff --git a/packages/jonnys-videos/src/disco-light-show/OneShot.tsx b/packages/jonnys-videos/src/disco-light-show/OneShot.tsxindex d6509901ea..cab22837da 100644--- a/packages/jonnys-videos/src/disco-light-show/OneShot.tsx+++ b/packages/jonnys-videos/src/disco-light-show/OneShot.tsx@@ -1,6 +1,7 @@import {grayscale} from '@remotion/effects/grayscale';import React from 'react';import {+ useVideoConfig,AnimatedImage,Interactive,interpolate,@@ -9,10 +10,12 @@ import {import {asset} from './assets';export const OneShot: React.FC = () => {+ const {fps} = useVideoConfig();const frame = useCurrentFrame();return (<><AnimatedImage+ premountFor={fps}src={asset('Eu0CBaxXpj8DK85e61.webp')}style={{position: 'absolute',@@ -25,6 +28,7 @@ export const OneShot: React.FC = () => {playbackRate={0.5}/><Interactive.Div+ premountFor={fps}name="One-Shot title"style={{position: 'absolute',diff --git a/packages/jonnys-videos/src/disco-light-show/ScreenRecordingComposition.tsx b/packages/jonnys-videos/src/disco-light-show/ScreenRecordingComposition.tsxindex 37e7264dc1..6be99654be 100644--- a/packages/jonnys-videos/src/disco-light-show/ScreenRecordingComposition.tsx+++ b/packages/jonnys-videos/src/disco-light-show/ScreenRecordingComposition.tsx@@ -14,11 +14,12 @@ export const SCREEN_RECORDING_DURATION_IN_FRAMES = 280;export const ScreenRecordingComposition: React.FC = () => {const frame = useCurrentFrame();- const {durationInFrames} = useVideoConfig();+ const {fps, durationInFrames} = useVideoConfig();return (- <AbsoluteFill>+ <AbsoluteFill premountFor={fps}><Solid+ premountFor={fps}width={1080}height={1920}color={'#191919'}diff --git a/packages/jonnys-videos/src/disco-light-show/Separate.tsx b/packages/jonnys-videos/src/disco-light-show/Separate.tsxindex d699dc0af1..9749614d0d 100644--- a/packages/jonnys-videos/src/disco-light-show/Separate.tsx+++ b/packages/jonnys-videos/src/disco-light-show/Separate.tsx@@ -1,11 +1,14 @@import {Video} from '@remotion/media';import React from 'react';+import {useVideoConfig} from 'remotion';import {asset} from './assets';export const Separate: React.FC = () => {+ const {fps} = useVideoConfig();return (<><Video+ premountFor={fps}src={asset('Screen Recording 2026-07-19 at 17.05.25.mov')}style={{position: 'absolute',diff --git a/packages/jonnys-videos/src/disco-light-show/TextBackgroundComposition.tsx b/packages/jonnys-videos/src/disco-light-show/TextBackgroundComposition.tsxindex d23d3739d3..7e8827ef1a 100644--- a/packages/jonnys-videos/src/disco-light-show/TextBackgroundComposition.tsx+++ b/packages/jonnys-videos/src/disco-light-show/TextBackgroundComposition.tsx@@ -1,5 +1,11 @@import {Video} from '@remotion/media';-import {Sequence, interpolate, useCurrentFrame, Easing} from 'remotion';+import {+ useVideoConfig,+ Sequence,+ interpolate,+ useCurrentFrame,+ Easing,+} from 'remotion';import {ArrowLogo} from './ArrowLogo';import {ArrowLogoRemotion} from './ArrowLogoRemotion';import {asset} from './assets';@@ -7,22 +13,23 @@ import {asset} from './assets';export const TEXT_BACKGROUND_DURATION_IN_FRAMES = 226;export const TextBackgroundComposition: React.FC = () => {+ const {fps} = useVideoConfig();const frame = useCurrentFrame();return (<>- <Sequence>- <Video- src={asset('text-background.mov')}- style={{- width: 1920,- height: 1080,- }}- muted- trimBefore={2916}- durationInFrames={TEXT_BACKGROUND_DURATION_IN_FRAMES}- />- </Sequence>+ <Video+ premountFor={fps}+ src={asset('text-background.mov')}+ style={{+ width: 1920,+ height: 1080,+ }}+ muted+ trimBefore={2916}+ durationInFrames={TEXT_BACKGROUND_DURATION_IN_FRAMES}+ /><Sequence+ premountFor={fps}name="ArrowLogo"width={1920}height={1080}@@ -87,6 +94,7 @@ export const TextBackgroundComposition: React.FC = () => {<ArrowLogo /></Sequence><Sequence+ premountFor={fps}name="ArrowLogoRemotion"width={1920}height={1080}diff --git a/packages/jonnys-videos/src/disco-light-show/TextBehindVideoSeriesFirst20s.tsx b/packages/jonnys-videos/src/disco-light-show/TextBehindVideoSeriesFirst20s.tsxindex f350faa022..655f6eaac5 100644--- a/packages/jonnys-videos/src/disco-light-show/TextBehindVideoSeriesFirst20s.tsx+++ b/packages/jonnys-videos/src/disco-light-show/TextBehindVideoSeriesFirst20s.tsx@@ -1,5 +1,6 @@import {Video} from '@remotion/media';import {+ useVideoConfig,Composition,Easing,interpolate,@@ -12,11 +13,13 @@ import {Clip5} from './Clip5';export const TEXT_BEHIND_VIDEO_SERIES_FIRST_20S_DURATION_IN_FRAMES = 190;export const TextBehindVideoSeriesFirst20sComposition: React.FC = () => {+ const {fps} = useVideoConfig();const frame = useCurrentFrame();return (<><Sequence+ premountFor={fps}name="Clip5"width={1080}height={1920}@@ -49,6 +52,7 @@ export const TextBehindVideoSeriesFirst20sComposition: React.FC = () => {<Clip5 /></Sequence><Sequence+ premountFor={fps}name="Clip5-copy"width={1080}height={1920}@@ -80,43 +84,44 @@ export const TextBehindVideoSeriesFirst20sComposition: React.FC = () => {><Clip5 /></Sequence>- <Sequence showInTimeline={false}>- <Video- src={asset('text-behind-video-series-first-20s.mp4')}- style={{- position: 'absolute',- translate: '-420px 311.8px',- width: 1920,- height: 1080,- scale: interpolate(frame, [9, 14, 19], [0, 0.585, 0.594], {- extrapolateLeft: 'clamp',- extrapolateRight: 'clamp',- output: 'perceptual-scale',- easing: [- Easing.spring({- damping: 200,- mass: 1,- stiffness: 100,- allowTail: true,- durationRestThreshold: 0.02,- overshootClamping: false,- }),- Easing.spring({- damping: 200,- mass: 1,- stiffness: 100,- allowTail: true,- durationRestThreshold: 0.02,- overshootClamping: false,- }),- ],- }),- }}- muted- durationInFrames={190}- trimBefore={31}- />- </Sequence>+ <Video+ premountFor={fps}+ name="Text behind video"+ showInTimeline={false}+ src={asset('text-behind-video-series-first-20s.mp4')}+ style={{+ position: 'absolute',+ translate: '-420px 311.8px',+ width: 1920,+ height: 1080,+ scale: interpolate(frame, [9, 14, 19], [0, 0.585, 0.594], {+ extrapolateLeft: 'clamp',+ extrapolateRight: 'clamp',+ output: 'perceptual-scale',+ easing: [+ Easing.spring({+ damping: 200,+ mass: 1,+ stiffness: 100,+ allowTail: true,+ durationRestThreshold: 0.02,+ overshootClamping: false,+ }),+ Easing.spring({+ damping: 200,+ mass: 1,+ stiffness: 100,+ allowTail: true,+ durationRestThreshold: 0.02,+ overshootClamping: false,+ }),+ ],+ }),+ }}+ muted+ durationInFrames={190}+ trimBefore={31}+ /></>);};diff --git a/packages/jonnys-videos/src/disco-light-show/TextBehindVideoStack.tsx b/packages/jonnys-videos/src/disco-light-show/TextBehindVideoStack.tsxindex 3ff536c82f..022a58bbe9 100644--- a/packages/jonnys-videos/src/disco-light-show/TextBehindVideoStack.tsx+++ b/packages/jonnys-videos/src/disco-light-show/TextBehindVideoStack.tsx@@ -1,5 +1,6 @@import {Video} from '@remotion/media';import {+ useVideoConfig,AbsoluteFill,Composition,Easing,@@ -10,11 +11,13 @@ import {import {asset} from './assets';export const TextBehindVideoStackComposition: React.FC = () => {+ const {fps} = useVideoConfig();const frame = useCurrentFrame();return (- <AbsoluteFill style={{overflow: 'hidden'}}>+ <AbsoluteFill premountFor={fps} style={{overflow: 'hidden'}}><Interactive.Div+ premountFor={fps}name="Background video"style={{position: 'absolute',@@ -46,6 +49,7 @@ export const TextBehindVideoStackComposition: React.FC = () => {}}><Video+ premountFor={fps}src={asset('text-behind-video-background.webm')}from={0}trimBefore={330}@@ -61,6 +65,7 @@ export const TextBehindVideoStackComposition: React.FC = () => {/></Interactive.Div><Interactive.Div+ premountFor={fps}name="Text video"style={{position: 'absolute',@@ -102,10 +107,11 @@ export const TextBehindVideoStackComposition: React.FC = () => {boxShadow: '0px 0px 50px rgba(255, 255, 255, 0.5)',borderRadius: 60,}}- premountFor={30}+ premountFor={fps}/></Interactive.Div><Interactive.Div+ premountFor={fps}name="Foreground video"style={{position: 'absolute',@@ -137,6 +143,7 @@ export const TextBehindVideoStackComposition: React.FC = () => {}}><Video+ premountFor={fps}src={asset('text-behind-video-foreground.webm')}from={0}trimBefore={330}diff --git a/packages/jonnys-videos/src/disco-light-show/VibeCoded.tsx b/packages/jonnys-videos/src/disco-light-show/VibeCoded.tsxindex 973b01ac15..331b6fd59e 100644--- a/packages/jonnys-videos/src/disco-light-show/VibeCoded.tsx+++ b/packages/jonnys-videos/src/disco-light-show/VibeCoded.tsx@@ -1,13 +1,15 @@import {Video} from '@remotion/media';import React from 'react';-import {interpolate, useCurrentFrame} from 'remotion';+import {useVideoConfig, interpolate, useCurrentFrame} from 'remotion';import {asset} from './assets';export const VibeCoded: React.FC = () => {+ const {fps} = useVideoConfig();const frame = useCurrentFrame();return (<><Video+ premountFor={fps}src={asset('Screen Recording 2026-07-19 at 17.43.33.mov')}style={{position: 'absolute',