Skip to content

🎥 Make videos programmatically with React

Docs: Add Your first video guide

JonnyBurger76771af68603
diff --git a/packages/docs/components/your-first-video-preview.module.css b/packages/docs/components/your-first-video-preview.module.css
new file mode 100644
index 0000000000..38c7016bd6
--- /dev/null
+++ b/packages/docs/components/your-first-video-preview.module.css
@@ -0,0 +1,28 @@
+.container {
+ container-type: inline-size;
+ margin-bottom: var(--ifm-paragraph-margin-bottom);
+}
+
+.narrow,
+.wide {
+ height: auto;
+ width: 100%;
+}
+
+.narrow {
+ display: block;
+}
+
+.wide {
+ display: none;
+}
+
+@container (min-width: 640px) {
+ .narrow {
+ display: none;
+ }
+
+ .wide {
+ display: block;
+ }
+}
diff --git a/packages/docs/docs/your-first-video.mdx b/packages/docs/docs/your-first-video.mdx
new file mode 100644
index 0000000000..a08061897e
--- /dev/null
+++ b/packages/docs/docs/your-first-video.mdx
@@ -0,0 +1,45 @@
+---
+image: /generated/articles-docs-your-first-video.png
+title: Your first video
+---
+
+import previewStyles from '../components/your-first-video-preview.module.css';
+
+If this is your first experience with Remotion, you will have the easiest time by generating some content using [Agent Skills](/docs/ai/skills).
+
+Make sure you have:
+
+<Step>1</Step> [Set up a project](/docs). <br />
+<Step>2</Step> Opened your project in a coding agent. Popular ones are [Codex](https://developers.openai.com/codex), [Claude](https://claude.com/product/claude-code), [Cursor](https://cursor.com), [Copilot](https://github.com/features/copilot), [OpenCode](https://opencode.ai) or
+[Pi](https://pi.dev).
+
+We like these initial prompts:
+
+<SuggestedPrompt prompt="/remotion-create See the videos in my downloads folder and put them on a timeline." />
+
+<SuggestedPrompt prompt="/remotion-create Make me a promo video for a record store" />
+
+<SuggestedPrompt prompt="/remotion-create Please add captions to my video: ~/Downloads/IMG_0001.mov" />
+
+## Preview your video
+
+Ideally, your agent will open the [Remotion Studio](/docs/studio) automatically, so you can preview your video. If not, simply run:
+
+<SuggestedPrompt prompt="/remotion-studio" />
+
+You now see an interactive preview of your video!
+
+<div className={previewStyles.container}>
+ <img className={previewStyles.narrow} src="/img/your-first-video-roller-ski.png" alt="A countryside scene with cows in a Remotion Studio project named my-remotion-project, with the editing timeline visible." width={1226} height={1462} loading="lazy" decoding="async" />
+ <img className={previewStyles.wide} src="/img/your-first-video-roller-ski-wide.png" alt="A countryside scene with cows in a Remotion Studio project named my-remotion-project, with the editing timeline visible." width={2560} height={1404} loading="lazy" decoding="async" />
+</div>
+
+## Next steps
+
+Anything in Remotion can be edited in the Studio, with an agent or in code. Try:
+
+- Selecting items and pressing <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" role="img" aria-label="Backspace" focusable="false" style={{width: 22, height: 18, verticalAlign: 'text-bottom', fill: 'none', stroke: 'currentColor', strokeWidth: 1.75, strokeLinecap: 'round', strokeLinejoin: 'round'}}><path d="M10 5h10a2 2 0 0 1 2 2v10a2 2 0 0 1-2 2H10l-8-7z" /><path d="m12 9 6 6m0-6-6 6" /></svg> to delete them
+- Sending a follow-up prompt
+- Clicking the editor icon at the top to edit the code.
+
+If you are happy with the video, press <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512" role="img" aria-label="Render button" focusable="false" style={{width: 18, height: 18, verticalAlign: 'text-bottom', fill: 'currentColor'}}><path d="M188.9 372l-50.4-50.4c18.6-42.6 61.7-137.7 95.1-187C304.6 30.1 409 24.6 475.7 36.3c11.7 66.7 6.2 171.1-98.4 242c-49.4 33.5-145.5 75.6-188.4 93.7zm-79.9-62.8c-5.2 11.9-2.5 25.7 6.7 34.9l50.7 50.7c9.1 9.1 22.7 11.9 34.5 6.9c6.5-2.7 14.3-6 23-9.8L224 496c0 5.5 2.9 10.7 7.6 13.6s10.6 3.2 15.6 .7l101.5-50.7c21.7-10.8 35.4-33 35.4-57.2V312.1c4-2.5 7.7-4.9 11.3-7.3C516.1 222.9 520.1 100.9 506.7 28.1c-2.1-11.6-11.2-20.6-22.8-22.8C411.1-8.1 289.1-4.1 207.2 116.7c-2.4 3.6-4.9 7.3-7.3 11.3l-90.2 0c-24.2 0-46.4 13.7-57.2 35.4L1.7 264.8c-2.5 5-2.2 10.8 .7 15.6s8.1 7.6 13.6 7.6H118.5c-3.6 8-6.8 15.2-9.4 21.2zM256 470.1l0-92.5c30.3-13.7 65.4-30.3 96-47v71.7c0 12.1-6.8 23.2-17.7 28.6L256 470.1zM109.7 160h71.5c-16.9 30.7-34 65.8-48.1 96H41.9L81 177.7c5.4-10.8 16.5-17.7 28.6-17.7zM392 144a24 24 0 1 1 -48 0 24 24 0 1 1 48 0zM368 88a56 56 0 1 0 0 112 56 56 0 1 0 0-112z" /></svg> to render, or do it with an agent.
diff --git a/packages/docs/sidebars.ts b/packages/docs/sidebars.ts
index a7769fb14d..7fb73d4079 100644
--- a/packages/docs/sidebars.ts
+++ b/packages/docs/sidebars.ts
@@ -1167,6 +1167,7 @@ const sidebars: SidebarsConfig = {
label: 'Getting started',
items: [
'getting-started',
+ 'your-first-video',
'the-fundamentals',
'timing',
'animating-properties',
diff --git a/packages/docs/src/components/SuggestedPrompt.tsx b/packages/docs/src/components/SuggestedPrompt.tsx
index 8ce0851cfb..abbbefe013 100644
--- a/packages/docs/src/components/SuggestedPrompt.tsx
+++ b/packages/docs/src/components/SuggestedPrompt.tsx
@@ -65,7 +65,7 @@ export const SuggestedPrompt: React.FC<Props> = ({prompt}) => {
display: 'flex',
alignItems: 'flex-start',
gap: 12,
- padding: '8px 8px 16px 18px',
+ padding: '12px 8px 12px 18px',
boxShadow: '0 6px 24px rgba(0, 0, 0, 0.08)',
}}
>
@@ -78,32 +78,20 @@ export const SuggestedPrompt: React.FC<Props> = ({prompt}) => {
lineHeight: 1.6,
}}
>
- <a
- href="/docs/ai/skills"
- onMouseEnter={() => setIsSkillLinkHovered(true)}
- onMouseLeave={() => setIsSkillLinkHovered(false)}
- style={{
- color: isSkillLinkHovered
- ? 'var(--ifm-color-primary)'
- : 'var(--subtitle)',
- display: 'inline-block',
- fontSize: 13,
- fontWeight: 500,
- lineHeight: 1.2,
- marginBottom: 6,
- textDecoration: 'none',
- }}
- >
- Agent Skill
- </a>
- <br />
{command ? (
- <span
+ <a
+ href={`/docs/ai/skills#${command.replace(/^.*[/:]/, '')}`}
+ onMouseEnter={() => setIsSkillLinkHovered(true)}
+ onMouseLeave={() => setIsSkillLinkHovered(false)}
style={{
borderRadius: 6,
padding: '1px 6px',
color: 'var(--ifm-color-primary)',
- backgroundColor: 'rgba(11, 132, 243, 0.06)',
+ backgroundColor: isSkillLinkHovered
+ ? 'rgba(11, 132, 243, 0.12)'
+ : 'rgba(11, 132, 243, 0.06)',
+ textDecoration: 'none',
+ transition: 'background-color 150ms ease',
fontWeight: 700,
whiteSpace: 'nowrap',
display: 'inline-block',
@@ -112,7 +100,7 @@ export const SuggestedPrompt: React.FC<Props> = ({prompt}) => {
}}
>
{command}
- </span>
+ </a>
) : null}
{rest ? <span style={{overflowWrap: 'anywhere'}}>{rest}</span> : null}
</div>
diff --git a/packages/docs/src/data/articles.ts b/packages/docs/src/data/articles.ts
index 3dfd88949f..cae3a37ff7 100644
--- a/packages/docs/src/data/articles.ts
+++ b/packages/docs/src/data/articles.ts
@@ -10877,6 +10877,15 @@ export const articles = [
noAi: false,
slug: 'wrong-composition-mount',
},
+ {
+ id: 'your-first-video',
+ title: 'Your first video',
+ relativePath: 'docs/your-first-video.mdx',
+ compId: 'articles-docs-your-first-video',
+ crumb: null,
+ noAi: false,
+ slug: 'your-first-video',
+ },
{
id: 'zod-types/index',
title: '@remotion/zod-types',
diff --git a/packages/docs/static/generated/articles-docs-your-first-video.png b/packages/docs/static/generated/articles-docs-your-first-video.png
new file mode 100644
index 0000000000..8c66e33368
Binary files /dev/null and b/packages/docs/static/generated/articles-docs-your-first-video.png differ
diff --git a/packages/docs/static/img/your-first-video-roller-ski-wide.png b/packages/docs/static/img/your-first-video-roller-ski-wide.png
new file mode 100644
index 0000000000..c69aa4f3f4
Binary files /dev/null and b/packages/docs/static/img/your-first-video-roller-ski-wide.png differ
diff --git a/packages/docs/static/img/your-first-video-roller-ski.png b/packages/docs/static/img/your-first-video-roller-ski.png
new file mode 100644
index 0000000000..ce8f2169f1
Binary files /dev/null and b/packages/docs/static/img/your-first-video-roller-ski.png differ
diff --git a/packages/studio/src/components/InspectorOpenInEditor.tsx b/packages/studio/src/components/InspectorOpenInEditor.tsx
index ca65436f61..a87a45f14c 100644
--- a/packages/studio/src/components/InspectorOpenInEditor.tsx
+++ b/packages/studio/src/components/InspectorOpenInEditor.tsx
@@ -326,7 +326,7 @@ export const InspectorOpenInEditor: React.FC<{
}
return (
- <div ref={annotationTarget}>
+ <div ref={annotationTarget} style={{display: 'flex'}}>
<SegmentedButton segments={segments} style={null} />
</div>
);