Skip to content

🎥 Make videos programmatically with React

Skills: Show root registration for multi-scene videos

JonnyBurger0559c96a2a00
diff --git a/packages/skills/skills/remotion-markup/multi-scene-video.md b/packages/skills/skills/remotion-markup/multi-scene-video.md
index 391d3126de..b6e87f472e 100644
--- a/packages/skills/skills/remotion-markup/multi-scene-video.md
+++ b/packages/skills/skills/remotion-markup/multi-scene-video.md
@@ -1,8 +1,13 @@
# Multi-scene videos
-Put each substantial scene in its own component and file. Register those components as [connected compositions](connected-compositions.md) so each scene has an editable Studio timeline. The main video uses the same components as the sole direct children of its scene sequences.
+Put each substantial scene in its own component and file.
+Register those components as [connected compositions](connected-compositions.md) so each scene has an editable Studio timeline.
-Use `<TransitionSeries>` when the scenes may have transitions. Install `@remotion/transitions` if it is missing. Give each sequence an inline `durationInFrames` value so Studio can edit its timing. The component inside a sequence may contain as many layers and nested sequences as the scene needs.
+Use `<TransitionSeries>` when the scenes may have transitions.
+Install `@remotion/transitions` if it is missing.
+Give each sequence an inline `durationInFrames` value so Studio can edit its timing.
+
+Example:
```tsx
// MyVideo.tsx
@@ -28,6 +33,49 @@ export const MyVideo = () => (
);
```
-Register `OpeningScene`, `FeatureScene`, and `MyVideo` as `<Composition>` entries in the root, as shown in [connected compositions](connected-compositions.md). Keep each scene's standalone metadata and `defaultProps` consistent with how it is used in the main video. With no transition, this example needs a 210-frame main composition. If you add a transition, account for its overlap in the main duration; see [transitions](transitions.md).
+Register the same scene components, plus the parent video, in the root:
+
+```tsx
+// Root.tsx
+import {Composition, Folder} from 'remotion';
+import {OpeningScene} from './OpeningScene';
+import {FeatureScene} from './FeatureScene';
+import {MyVideo} from './MyVideo';
+
+export const RemotionRoot = () => (
+ <>
+ <Folder name="MyVideo-Scenes">
+ <Composition
+ id="Opening"
+ component={OpeningScene}
+ width={1920}
+ height={1080}
+ fps={30}
+ durationInFrames={90}
+ />
+ <Composition
+ id="Feature"
+ component={FeatureScene}
+ width={1920}
+ height={1080}
+ fps={30}
+ durationInFrames={120}
+ />
+ </Folder>
+ <Composition
+ id="MyVideo"
+ component={MyVideo}
+ width={1920}
+ height={1080}
+ fps={30}
+ durationInFrames={210}
+ />
+ </>
+);
+```
+
+Keep each scene's standalone metadata and `defaultProps` consistent with how it is used in the main video.
+
+With no transition, this example needs a 210-frame main composition. If you add a transition, account for its overlap in the main duration; see [transitions](transitions.md).
Use `<Series>` for consecutive scenes that do not need transitions. Use `<Sequence>` for scenes placed independently on the parent timeline.