🎥 Make videos programmatically with React
`@remotion/jonnys-videos`: Flatten composition root
JonnyBurgerdb6a645b70fe
diff --git a/packages/jonnys-videos/src/Root.tsx b/packages/jonnys-videos/src/Root.tsxindex cdaedfa7c5..85b1200858 100644--- a/packages/jonnys-videos/src/Root.tsx+++ b/packages/jonnys-videos/src/Root.tsx@@ -1,15 +1,320 @@-import {Folder} from 'remotion';-import {DiscoLightShowRoot} from './disco-light-show/Root';-import {HowCanRemotionBeFreeRoot} from './how-can-remotion-be-free/Root';+import {Composition, Folder} from 'remotion';+import {+ AnimatedCaptions,+ CAPTIONS_DURATION_IN_FRAMES,+ CAPTIONS_HEIGHT,+} from './disco-light-show/AnimatedCaptions';+import {+ AnimatedCaptionsBigWords,+ BIG_WORD_CAPTIONS_DURATION_IN_FRAMES,+} from './disco-light-show/AnimatedCaptionsBigWords';+import {ArrowLogo} from './disco-light-show/ArrowLogo';+import {ArrowLogoRemotion} from './disco-light-show/ArrowLogoRemotion';+import {BirthdayPartyCompilation} from './disco-light-show/BirthdayPartyCompilation';+import {ClientSideChad} from './disco-light-show/ClientSideChad';+import {Clip1} from './disco-light-show/Clip1';+import {Clip2} from './disco-light-show/Clip2';+import {Clip3} from './disco-light-show/Clip3';+import {Clip4} from './disco-light-show/Clip4';+import {Clip5} from './disco-light-show/Clip5';+import {Compilation} from './disco-light-show/Compilation';+import {MyComposition} from './disco-light-show/Composition';+import {+ Countdown,+ COUNTDOWN_DURATION_IN_FRAMES,+} from './disco-light-show/Countdown';+import {DiscoBallBg} from './disco-light-show/DiscoBallBg';+import {DragIn} from './disco-light-show/DragIn';+import {DragInDemo} from './disco-light-show/DragInDemo';+import {EffectShow} from './disco-light-show/EffectShow';+import {Fork} from './disco-light-show/Fork';+import {ForkDrop} from './disco-light-show/ForkDrop';+import {HuggingFace} from './disco-light-show/HuggingFace';+import {MasterWithEffect} from './disco-light-show/MasterWithEffect';+import {Mediabunny} from './disco-light-show/Mediabunny';+import {OneShot} from './disco-light-show/OneShot';+import {Separate} from './disco-light-show/Separate';+import {Setup} from './disco-light-show/Setup';+import {TextBehindVideoSeriesFirst20s} from './disco-light-show/TextBehindVideoSeriesFirst20s';+import {TextBehindVideoStack} from './disco-light-show/TextBehindVideoStack';+import {VibeCoded} from './disco-light-show/VibeCoded';+import {+ FIRST_CUSTOMER_CHART_DURATION_IN_FRAMES,+ FirstCustomerChart,+} from './how-can-remotion-be-free/FirstCustomerChart';+import {HowCanRemotionBeFree} from './how-can-remotion-be-free/HowCanRemotionBeFree';+import {+ PREMIUM_VERSION_DURATION_IN_FRAMES,+ PremiumVersion,+} from './how-can-remotion-be-free/PremiumVersion';+import {+ UNRULY_OUTCOME_DURATION_IN_FRAMES,+ UnrulyOutcome,+} from './how-can-remotion-be-free/UnrulyOutcome';+import {+ ZURICH_PHOTO_DURATION_IN_FRAMES,+ ZurichPhoto,+} from './how-can-remotion-be-free/ZurichPhoto';export const RemotionRoot: React.FC = () => {return (<><Folder name="DiscoLightShow">- <DiscoLightShowRoot />+ <MyComposition />+ <Composition+ id="MasterWithEffect"+ component={MasterWithEffect}+ durationInFrames={1800}+ fps={30}+ width={1080}+ height={1920}+ />+ <TextBehindVideoStack />+ <TextBehindVideoSeriesFirst20s />+ <Composition+ id="EffectShow"+ component={EffectShow}+ durationInFrames={CAPTIONS_DURATION_IN_FRAMES}+ fps={30}+ width={1080}+ height={1920}+ />+ <Composition+ id="AnimatedCaptions"+ component={AnimatedCaptions}+ durationInFrames={CAPTIONS_DURATION_IN_FRAMES}+ fps={30}+ width={1080}+ height={CAPTIONS_HEIGHT}+ />+ <Composition+ id="AnimatedCaptionsBigWords"+ component={AnimatedCaptionsBigWords}+ durationInFrames={BIG_WORD_CAPTIONS_DURATION_IN_FRAMES}+ fps={30}+ width={1080}+ height={1920}+ />+ <Composition+ id="Countdown"+ component={Countdown}+ durationInFrames={COUNTDOWN_DURATION_IN_FRAMES}+ fps={30}+ width={1080}+ height={1920}+ />+ <Composition+ id="ArrowLogo"+ component={ArrowLogo}+ durationInFrames={240}+ fps={30}+ width={1920}+ height={1080}+ />+ <Composition+ id="ArrowLogoRemotion"+ component={ArrowLogoRemotion}+ durationInFrames={240}+ fps={30}+ width={1920}+ height={1080}+ />+ <Composition+ id="HuggingFace"+ component={HuggingFace}+ durationInFrames={240}+ fps={30}+ width={1920}+ height={1080}+ />+ <Composition+ id="Fork"+ component={Fork}+ durationInFrames={140}+ fps={30}+ width={1080}+ height={1920}+ />+ <Composition+ id="ClientSideChad"+ component={ClientSideChad}+ durationInFrames={150}+ fps={30}+ width={1080}+ height={1920}+ />+ <Composition+ id="ForkDrop"+ component={ForkDrop}+ durationInFrames={1629}+ fps={30}+ width={1080}+ height={1920}+ />+ <Composition+ id="Separate"+ component={Separate}+ durationInFrames={1629}+ fps={30}+ width={1080}+ height={1920}+ />+ <Composition+ id="Mediabunny"+ component={Mediabunny}+ durationInFrames={1629}+ fps={30}+ width={1080}+ height={1920}+ />+ <Composition+ id="OneShot"+ component={OneShot}+ durationInFrames={60}+ fps={30}+ width={1080}+ height={1080}+ />+ <Composition+ id="VibeCoded"+ component={VibeCoded}+ durationInFrames={150}+ fps={30}+ width={1080}+ height={1080}+ />+ <Composition+ id="DragIn"+ component={DragIn}+ durationInFrames={1629}+ fps={30}+ width={1920}+ height={1080}+ />+ <Composition+ id="DragInDemo"+ component={DragInDemo}+ durationInFrames={60}+ fps={30}+ width={1080}+ height={1920}+ />+ <Composition+ id="DiscoBallBg"+ component={DiscoBallBg}+ durationInFrames={1850}+ fps={30}+ width={1080}+ height={1920}+ />+ <Composition+ id="Compilation"+ component={Compilation}+ durationInFrames={1629}+ fps={30}+ width={1080}+ height={1920}+ />+ <Composition+ id="BirthdayPartyCompilation"+ component={BirthdayPartyCompilation}+ durationInFrames={200}+ fps={30}+ width={1080}+ height={1920}+ />+ <Composition+ id="Clip1"+ component={Clip1}+ durationInFrames={57}+ fps={30}+ width={1080}+ height={1920}+ />+ <Composition+ id="Clip2"+ component={Clip2}+ durationInFrames={48}+ fps={30}+ width={1080}+ height={1920}+ />+ <Composition+ id="Clip3"+ component={Clip3}+ durationInFrames={66}+ fps={30}+ width={1080}+ height={1920}+ />+ <Composition+ id="Clip4"+ component={Clip4}+ durationInFrames={47}+ fps={30}+ width={1080}+ height={1920}+ />+ <Composition+ id="Clip5"+ component={Clip5}+ durationInFrames={300}+ fps={30}+ width={1080}+ height={1920}+ />+ <Composition+ id="Setup"+ component={Setup}+ durationInFrames={1800}+ fps={30}+ width={1080}+ height={1920}+ /></Folder><Folder name="HowCanRemotionBeFree">- <HowCanRemotionBeFreeRoot />+ <Composition+ id="HowCanRemotionBeFree"+ component={HowCanRemotionBeFree}+ durationInFrames={1800}+ fps={30}+ width={1080}+ height={1920}+ />+ <Folder name="Scenes">+ <Composition+ id="FirstCustomerChart"+ component={FirstCustomerChart}+ durationInFrames={FIRST_CUSTOMER_CHART_DURATION_IN_FRAMES}+ fps={30}+ width={1080}+ height={1920}+ />+ <Composition+ id="PremiumVersion"+ component={PremiumVersion}+ durationInFrames={PREMIUM_VERSION_DURATION_IN_FRAMES}+ fps={30}+ width={1080}+ height={1920}+ />+ <Composition+ id="UnrulyOutcome"+ component={UnrulyOutcome}+ durationInFrames={UNRULY_OUTCOME_DURATION_IN_FRAMES}+ fps={30}+ width={1080}+ height={1920}+ />+ <Composition+ id="ZurichPhoto"+ component={ZurichPhoto}+ durationInFrames={ZURICH_PHOTO_DURATION_IN_FRAMES}+ fps={30}+ width={1080}+ height={1920}+ />+ </Folder></Folder></>);diff --git a/packages/jonnys-videos/src/disco-light-show/Root.tsx b/packages/jonnys-videos/src/disco-light-show/Root.tsxdeleted file mode 100644index 16b2188d2b..0000000000--- a/packages/jonnys-videos/src/disco-light-show/Root.tsx+++ /dev/null@@ -1,255 +0,0 @@-import {Composition} from 'remotion';-import {- AnimatedCaptions,- CAPTIONS_DURATION_IN_FRAMES,- CAPTIONS_HEIGHT,-} from './AnimatedCaptions';-import {- AnimatedCaptionsBigWords,- BIG_WORD_CAPTIONS_DURATION_IN_FRAMES,-} from './AnimatedCaptionsBigWords';-import {ArrowLogo} from './ArrowLogo';-import {ArrowLogoRemotion} from './ArrowLogoRemotion';-import {BirthdayPartyCompilation} from './BirthdayPartyCompilation';-import {ClientSideChad} from './ClientSideChad';-import {Clip1} from './Clip1';-import {Clip2} from './Clip2';-import {Clip3} from './Clip3';-import {Clip4} from './Clip4';-import {Clip5} from './Clip5';-import {Compilation} from './Compilation';-import {MyComposition} from './Composition';-import {Countdown, COUNTDOWN_DURATION_IN_FRAMES} from './Countdown';-import {DiscoBallBg} from './DiscoBallBg';-import {DragIn} from './DragIn';-import {DragInDemo} from './DragInDemo';-import {EffectShow} from './EffectShow';-import {Fork} from './Fork';-import {ForkDrop} from './ForkDrop';-import {HuggingFace} from './HuggingFace';-import {MasterWithEffect} from './MasterWithEffect';-import {Mediabunny} from './Mediabunny';-import {OneShot} from './OneShot';-import {Separate} from './Separate';-import {Setup} from './Setup';-import {TextBehindVideoSeriesFirst20s} from './TextBehindVideoSeriesFirst20s';-import {TextBehindVideoStack} from './TextBehindVideoStack';-import {VibeCoded} from './VibeCoded';--export const DiscoLightShowRoot: React.FC = () => {- return (- <>- <MyComposition />- <Composition- id="MasterWithEffect"- component={MasterWithEffect}- durationInFrames={1800}- fps={30}- width={1080}- height={1920}- />- <TextBehindVideoStack />- <TextBehindVideoSeriesFirst20s />- <Composition- id="EffectShow"- component={EffectShow}- durationInFrames={CAPTIONS_DURATION_IN_FRAMES}- fps={30}- width={1080}- height={1920}- />- <Composition- id="AnimatedCaptions"- component={AnimatedCaptions}- durationInFrames={CAPTIONS_DURATION_IN_FRAMES}- fps={30}- width={1080}- height={CAPTIONS_HEIGHT}- />- <Composition- id="AnimatedCaptionsBigWords"- component={AnimatedCaptionsBigWords}- durationInFrames={BIG_WORD_CAPTIONS_DURATION_IN_FRAMES}- fps={30}- width={1080}- height={1920}- />- <Composition- id="Countdown"- component={Countdown}- durationInFrames={COUNTDOWN_DURATION_IN_FRAMES}- fps={30}- width={1080}- height={1920}- />- <Composition- id="ArrowLogo"- component={ArrowLogo}- durationInFrames={240}- fps={30}- width={1920}- height={1080}- />- <Composition- id="ArrowLogoRemotion"- component={ArrowLogoRemotion}- durationInFrames={240}- fps={30}- width={1920}- height={1080}- />- <Composition- id="HuggingFace"- component={HuggingFace}- durationInFrames={240}- fps={30}- width={1920}- height={1080}- />- <Composition- id="Fork"- component={Fork}- durationInFrames={140}- fps={30}- width={1080}- height={1920}- />- <Composition- id="ClientSideChad"- component={ClientSideChad}- durationInFrames={150}- fps={30}- width={1080}- height={1920}- />- <Composition- id="ForkDrop"- component={ForkDrop}- durationInFrames={1629}- fps={30}- width={1080}- height={1920}- />- <Composition- id="Separate"- component={Separate}- durationInFrames={1629}- fps={30}- width={1080}- height={1920}- />- <Composition- id="Mediabunny"- component={Mediabunny}- durationInFrames={1629}- fps={30}- width={1080}- height={1920}- />- <Composition- id="OneShot"- component={OneShot}- durationInFrames={60}- fps={30}- width={1080}- height={1080}- />- <Composition- id="VibeCoded"- component={VibeCoded}- durationInFrames={150}- fps={30}- width={1080}- height={1080}- />- <Composition- id="DragIn"- component={DragIn}- durationInFrames={1629}- fps={30}- width={1920}- height={1080}- />- <Composition- id="DragInDemo"- component={DragInDemo}- durationInFrames={60}- fps={30}- width={1080}- height={1920}- />- <Composition- id="DiscoBallBg"- component={DiscoBallBg}- durationInFrames={1850}- fps={30}- width={1080}- height={1920}- />- <Composition- id="Compilation"- component={Compilation}- durationInFrames={1629}- fps={30}- width={1080}- height={1920}- />- <Composition- id="BirthdayPartyCompilation"- component={BirthdayPartyCompilation}- durationInFrames={200}- fps={30}- width={1080}- height={1920}- />- <Composition- id="Clip1"- component={Clip1}- durationInFrames={57}- fps={30}- width={1080}- height={1920}- />- <Composition- id="Clip2"- component={Clip2}- durationInFrames={48}- fps={30}- width={1080}- height={1920}- />- <Composition- id="Clip3"- component={Clip3}- durationInFrames={66}- fps={30}- width={1080}- height={1920}- />- <Composition- id="Clip4"- component={Clip4}- durationInFrames={47}- fps={30}- width={1080}- height={1920}- />- <Composition- id="Clip5"- component={Clip5}- durationInFrames={300}- fps={30}- width={1080}- height={1920}- />- <Composition- id="Setup"- component={Setup}- durationInFrames={1800}- fps={30}- width={1080}- height={1920}- />- </>- );-};diff --git a/packages/jonnys-videos/src/how-can-remotion-be-free/Root.tsx b/packages/jonnys-videos/src/how-can-remotion-be-free/Root.tsxdeleted file mode 100644index 8ad3fe321e..0000000000--- a/packages/jonnys-videos/src/how-can-remotion-be-free/Root.tsx+++ /dev/null@@ -1,64 +0,0 @@-import {Composition, Folder} from 'remotion';-import {- FIRST_CUSTOMER_CHART_DURATION_IN_FRAMES,- FirstCustomerChart,-} from './FirstCustomerChart';-import {HowCanRemotionBeFree} from './HowCanRemotionBeFree';-import {- PREMIUM_VERSION_DURATION_IN_FRAMES,- PremiumVersion,-} from './PremiumVersion';-import {- UNRULY_OUTCOME_DURATION_IN_FRAMES,- UnrulyOutcome,-} from './UnrulyOutcome';-import {ZURICH_PHOTO_DURATION_IN_FRAMES, ZurichPhoto} from './ZurichPhoto';--export const HowCanRemotionBeFreeRoot: React.FC = () => {- return (- <>- <Composition- id="HowCanRemotionBeFree"- component={HowCanRemotionBeFree}- durationInFrames={1800}- fps={30}- width={1080}- height={1920}- />- <Folder name="Scenes">- <Composition- id="FirstCustomerChart"- component={FirstCustomerChart}- durationInFrames={FIRST_CUSTOMER_CHART_DURATION_IN_FRAMES}- fps={30}- width={1080}- height={1920}- />- <Composition- id="PremiumVersion"- component={PremiumVersion}- durationInFrames={PREMIUM_VERSION_DURATION_IN_FRAMES}- fps={30}- width={1080}- height={1920}- />- <Composition- id="UnrulyOutcome"- component={UnrulyOutcome}- durationInFrames={UNRULY_OUTCOME_DURATION_IN_FRAMES}- fps={30}- width={1080}- height={1920}- />- <Composition- id="ZurichPhoto"- component={ZurichPhoto}- durationInFrames={ZURICH_PHOTO_DURATION_IN_FRAMES}- fps={30}- width={1080}- height={1920}- />- </Folder>- </>- );-};