🎥 Make videos programmatically with React
better docs about the remotion studio
Jonny Burger5c1758856111
diff --git a/packages/docs/blog/2021-04-15-remotion-2-0.md b/packages/docs/blog/2021-04-15-remotion-2-0.mdindex 63734eedc9..2ec6211cf5 100644--- a/packages/docs/blog/2021-04-15-remotion-2-0.md+++ b/packages/docs/blog/2021-04-15-remotion-2-0.md@@ -49,7 +49,7 @@ All of them except the last one are completely independent from the ideas of RemWith the normal timeline, you don't see the full picture of all the media that you have placed in your composition. The reason is that the visualization you see is based on what's currently rendered at the position of your playhead.-Introducing a new timeline mode: The [**rich timeline**](/docs/timeline) will render additional frames other than the current one to gather enough information to visualize a full timeline.+Introducing a new timeline mode: The [**rich timeline**](/docs/studio) will render additional frames other than the current one to gather enough information to visualize a full timeline.Sequences which are normally not rendered because the playback head is not within the time range of the sequence, will appear because Remotion is doing an additional render at a time where the sequence is visible.<img src="/img/timeline.png"></img>@@ -120,7 +120,7 @@ In the editor, you can now resize the timeline as well as the left sidebar. Thanconst opacity = interpolate(frame,[0, 10, durationInFrames - 10, durationInFrames],- [0, 1, 1, 0]+ [0, 1, 1, 0],);```diff --git a/packages/docs/docs/4-0-migration.md b/packages/docs/docs/4-0-migration.mdindex 4f767e8515..d0239a2596 100644--- a/packages/docs/docs/4-0-migration.md+++ b/packages/docs/docs/4-0-migration.md@@ -399,7 +399,7 @@ The recommended way is to get the `composition` object using [`selectComposition- **@remotion/cli** Allow open of the project in editor from the Remotion Studio- **@remotion/cli**: `Date` objects now work properly in `defaultProps`- **@remotion/cli**: Remotion Studio is tested to work well offline.-- **@remotion/cli**: "Remotion Preview" has been renamed to ["Remotion Studio"](/docs/timeline)+- **@remotion/cli**: "Remotion Preview" has been renamed to ["Remotion Studio"](/docs/studio)- **@remotion/eslint-config**: `eslint-plugin-react` has been updated to `7.32.2`- **@remotion/eslint-config**: `eslint-plugin-react-hooks` has been updated to `4.6.0`- **@remotion/eslint-plugin**: New ESLint rule: Use the right import in the config filediff --git a/packages/docs/docs/getting-started.md b/packages/docs/docs/getting-started.mdindex 19db552614..693a34f4d7 100644--- a/packages/docs/docs/getting-started.md+++ b/packages/docs/docs/getting-started.md@@ -65,7 +65,7 @@ Bun as a runtime is mostly supported. [Read more here](/docs/bun).Choose the template that is most suitable for you. For your first project, we recommend the [Hello World](/templates/hello-world) template.-After the project has been scaffolded, we recommend to open the project in your text editor and starting the [Remotion Studio](/docs/timeline):+After the project has been scaffolded, we recommend to open the project in your text editor and starting the [Remotion Studio](/docs/studio):```bashnpm startdiff --git a/packages/docs/docs/studio.mdx b/packages/docs/docs/studio.mdxnew file mode 100644index 0000000000..6fd056bf4b--- /dev/null+++ b/packages/docs/docs/studio.mdx@@ -0,0 +1,150 @@+---+image: /generated/articles-docs-timeline.png+sidebar_label: Preview your video+title: Remotion Studio+id: studio+crumb: "Timeline basics"+---++import Tabs from "@theme/Tabs";+import TabItem from "@theme/TabItem";++You can preview your video by starting the Remotion Studio:++<Tabs+defaultValue="Regular templates"+values={[+{ label: 'Regular templates', value: 'Regular templates', },+{ label: 'Next.js and Remix templates', value: 'Next.js and Remix templates', },+]+}>+<TabItem value="Regular templates">++```bash+npm start+```++ </TabItem>++ <TabItem value="Next.js and Remix templates">++```bash+npm run remotion+```++ </TabItem>+</Tabs>++This is a shorthand for the [`studio`](/docs/cli/studio) command of the [Remotion CLI](/docs/cli):++```bash+npx remotion studio+```++A server will be started on port `3000` (or a higher port if it isn't available) and the Remotion Studio should open in the browser.++<img src="/img/timeline.png"></img>++## Playback controls++Use the <svg+aria-hidden="true"+focusable="false"+data-prefix="fas"+data-icon="play"+className="svg-inline--fa fa-play fa-w-14"+role="img"+xmlns="http://www.w3.org/2000/svg"+viewBox="0 0 448 512" style={{height: 16, width: 16}}><path+ fill="currentColor"+ d="M424.4 214.7L72.4 6.6C43.8-10.3 0 6.1 0 47.9V464c0 37.5 40.7 60.1 72.4 41.3l352-208c31.4-18.5 31.5-64.1 0-82.6z"+ /></svg> button or <kbd>Space</kbd> to play your video.++Use the <svg viewBox="0 0 448 512" style={{height: 18, width: 18}}><path fill="currentColor" d="M64 468V44c0-6.6 5.4-12 12-12h48c6.6 0 12 5.4 12 12v176.4l195.5-181C352.1 22.3 384 36.6 384 64v384c0 27.4-31.9 41.7-52.5 24.6L136 292.7V468c0 6.6-5.4 12-12 12H76c-6.6 0-12-5.4-12-12z" /></svg>+and <svg viewBox="0 0 448 512" style={{height: 18, width: 18}}><path fill="currentColor" d="M384 44v424c0 6.6-5.4 12-12 12h-48c-6.6 0-12-5.4-12-12V291.6l-195.5 181C95.9 489.7 64 475.4 64 448V64c0-27.4 31.9-41.7 52.5-24.6L312 219.3V44c0-6.6 5.4-12 12-12h48c6.6 0 12 5.4 12 12z" /></svg> buttons to jump 1 frame backwards or forwards.+You can also use the arrow keys <kbd>◀︎</kbd> and <kbd>▶︎</kbd> to do so.+If you hold the <kbd>Shift</kbd> key, you jump 1 second at a time.++<details>+<summary>+Advanced playback controls+</summary>++<kbd>L</kbd> will play the video forward. Pressing it repeatedly will play it faster.+<br />++<kbd>J</kbd> will play the video backwards. Pressing it repeatedly will play it faster.+<br />++<kbd>K</kbd> will pause the video and reset the speed to 1x.+</details>++## Toggling transparent background++By default, the background of your video is a checkerboard pattern signifying that the pixels are transparent. You can press <svg viewBox="0 0 512 512" style={{width: 16, height: 16}}> <path d="M480 0H32A32 32 0 0 0 0 32v448a32 32 0 0 0 32 32h448a32 32 0 0 0 32-32V32a32 32 0 0 0-32-32zm-32 256H256v192H64V256h192V64h192z" fill="currentcolor"/></svg> button to disable this behavior which will render a black background.++## In / Out Markers++Using In and Out markers, you can play only a certain range of your video.++Click <svg viewBox="0 0 256 256" fill="none" style={{width: 16, height: 16}}><path d="M158 25H99V230.5H158" stroke="currentcolor" strokeWidth="42" strokeLinecap="round" strokeLinejoin="round"/></svg> or press <kbd>I</kbd> to set an in marker.<br/>+Click <svg viewBox="0 0 256 256" fill="none" style={{width: 16, height: 16}}><path d="M98 25H157V230.5H98" stroke="currentcolor" strokeWidth="42" strokeLinecap="round" strokeLinejoin="round"/></svg> or press <kbd>O</kbd> to set an out marker.++To clear a marker, press <kbd>X</kbd>. Alternatively, you can toggle a marker by clicking on it.++To move a marker, drag a marker somewhere else.++## Change the canvas size++By default the video scales to fit in the preview window.+To change the canvas size:++<Step>1</Step> Pinch to zoom <br />+<Step>2</Step> Hold <kbd>Shift</kbd> and use the scroll wheel or <br />+<Step>3</Step>+Use the dropdown that says <code>Fit</code>++## Change the playback speed++By default the video will play in regular speed. You can speed up or slow down the video by clicking on the dropdown that says `1x`.++You may also choose a negative value which will play the video in reverse. Note that [`<Audio/>`](/docs/audio), [`<Video/>`](/docs/video) and [`<OffthreadVideo/>`](/docs/video) tags cannot be played in reverse, this is a browser limitation.++## Render a composition++Click on the `Render` button or press <kbd>R</kbd> to open the Render dialog from where you can adjust settings and render your composition.++If you are using In and Out Markers, the render dialog will by default only render the selected portion.++## Quick Switcher++Use <kbd>⌘K</kbd> / <kbd>Ctrl+K</kbd> to access the Quick Switcher to quickly change compositions.+Start your input with `>` to switch to the command palette.+Start your input with `?` to search the documentation.++## Compositions panel++Click on the `Compositions` panel to view all registered [`<Composition />`](/docs/composition)'s in your project.<br/>+Click on a composition to preview it or click the rocket icon to render it.++## Assets panel++Click on the `Assets` panel to view a representation of your `public/` folder.<br/>+Click on an asset to preview it.++## Renders panel++Click on the `Renders` panel to see the progress of a render you have triggered via the studio.<br/>You may cancel, retry and preview renders from here.++## Props panel++Click on the `Props` panel to view and edit the props of the currently selected composition. To do so you, you need to define a [Zod schema](/docs/schemas).++## Keyboard shortcuts and help++Press <kbd>?</kbd> to open the help dialog which shows you all available keyboard shortcuts.+In the opened dialog, enter a search term to search our documentation.++## See also++- [Deploying the Remotion Studio](/docs/deploy-studio)diff --git a/packages/docs/docs/timeline.md b/packages/docs/docs/timeline.mddeleted file mode 100644index fc5e40cd8a..0000000000--- a/packages/docs/docs/timeline.md+++ /dev/null@@ -1,100 +0,0 @@-----image: /generated/articles-docs-timeline.png-title: Preview your video-id: timeline-crumb: "Timeline basics"------You can start preview your video using:--```bash-npm start-```--This is a shorthand for the [`studio`](/docs/cli/studio) command of the [Remotion CLI](/docs/cli):--```bash-npx remotion studio-```--A server will be started on port `3000` (or a higher port if it isn't available) and the Remotion Studio should open in the browser.--<img src="/img/timeline.png"></img>--## Playback controls--Use the <svg-aria-hidden="true"-focusable="false"-data-prefix="fas"-data-icon="play"-className="svg-inline--fa fa-play fa-w-14"-role="img"-xmlns="http://www.w3.org/2000/svg"-viewBox="0 0 448 512" style={{height: 16, width: 16}}><path- fill="currentColor"- d="M424.4 214.7L72.4 6.6C43.8-10.3 0 6.1 0 47.9V464c0 37.5 40.7 60.1 72.4 41.3l352-208c31.4-18.5 31.5-64.1 0-82.6z"- /></svg> button or <kbd>Space</kbd> to play your video.--Use the <svg viewBox="0 0 448 512" style={{height: 18, width: 18}}><path fill="currentColor" d="M64 468V44c0-6.6 5.4-12 12-12h48c6.6 0 12 5.4 12 12v176.4l195.5-181C352.1 22.3 384 36.6 384 64v384c0 27.4-31.9 41.7-52.5 24.6L136 292.7V468c0 6.6-5.4 12-12 12H76c-6.6 0-12-5.4-12-12z" /></svg>-and <svg viewBox="0 0 448 512" style={{height: 18, width: 18}}><path fill="currentColor" d="M384 44v424c0 6.6-5.4 12-12 12h-48c-6.6 0-12-5.4-12-12V291.6l-195.5 181C95.9 489.7 64 475.4 64 448V64c0-27.4 31.9-41.7 52.5-24.6L312 219.3V44c0-6.6 5.4-12 12-12h48c6.6 0 12 5.4 12 12z" /></svg> buttons to jump 1 frame backwards or forwards. You can also use the left arrow or right arrow to do so. If you hold the <kbd>Shift</kbd> key, you jump 1 second at a time.--## Toggling transparency mode--By default, the background of your video is a checkerboard pattern signifying that the pixels are transparent. You can press <svg viewBox="0 0 512 512" style={{width: 16, height: 16}}> <path d="M480 0H32A32 32 0 0 0 0 32v448a32 32 0 0 0 32 32h448a32 32 0 0 0 32-32V32a32 32 0 0 0-32-32zm-32 256H256v192H64V256h192V64h192z" fill="currentcolor"/></svg> button to disable this behavior which will render a black background.--## In / Out Markers--Use the <svg viewBox="0 0 256 256" fill="none" style={{width: 16, height: 16}}><path d="M158 25H99V230.5H158" stroke="currentcolor" strokeWidth="42" strokeLinecap="round" strokeLinejoin="round"/></svg> and <svg viewBox="0 0 256 256" fill="none" style={{width: 16, height: 16}}><path d="M98 25H157V230.5H98" stroke="currentcolor" strokeWidth="42" strokeLinecap="round" strokeLinejoin="round"/></svg> buttons to set an In or Out marker. When you play the video again, only the range within the markers will play.-To clear a marker, make sure your playback head is at the point of a marker and press the button you pressed to activate it again.--You may also use the keyboard shortcuts:--- <kbd>I</kbd>: Set an in marker-- <kbd>O</kbd> (the letter "O"): Set an out marker-- <kbd>X</kbd>: Clear both markers.--## Change the canvas size--By default the video scales to fit in the preview window.-You can:--- Pinch to zoom-- Hold <kbd>Shift</kbd> and use the scrollwheel or-- Use the dropdown that says `Fit`--to change the size of the canvas.--## Change the playback speed--By default the video will play with 1x speed. You can speed up or slow down the video by clicking on the dropdown that says `1x`.--You may also choose a negative value which will play the video in reverse. Note that [`<Audio/>`](/docs/audio) and [`<Video/>`](/docs/video) tags cannot be played in reverse, this is a browser limitation.--## Render a composition--Click on the `Render` button or press <kbd>R</kbd> to open the Render dialog from where you can adjust settings and render your composition.--If you are using `In / Out Markers`, the render dialog will automatically set the `Start Frame` and `End Frame` to your selected markers.--## Quick Switcher--Use <kbd>⌘K</kbd> / <kbd>Ctrl+K</kbd> to access the Quick Switcher to quickly change compositions.-Start your input with `>` to switch to the command palette.-Start your input with `?` to search the documentation.--## Advanced playback controls--Use the <kbd>J</kbd>, <kbd>K</kbd>, <kbd>L</kbd> keys to quickly move around the timeline while your video is playing.--<kbd>L</kbd> will play the video forward, pressing it repeatedly will play it faster.-<br />--<kbd>J</kbd> will play the video backwards, pressing it repeatedly will play it faster.-<br />--<kbd>K</kbd> will pause the video and reset the speed to 1x.--## Keyboard shortcuts and help--Press <kbd>?</kbd> to open the help dialog which shows you all available keyboard shortcuts. In the opened dialog, enter a search term to search our vast documentation.diff --git a/packages/docs/docs/using-audio.md b/packages/docs/docs/using-audio.mdindex b77a23aa50..2a5ca145b0 100644--- a/packages/docs/docs/using-audio.md+++ b/packages/docs/docs/using-audio.md@@ -151,7 +151,7 @@ export const MyComposition = () => {## Use audio from `<Video />` tags-Audio from [`<Video />`](/docs/video) and [`<OffthreadVideo />`](/docs/offthreadvideo) tags are also included in the output. You may use the [`startFrom`, `endAt`](/docs/video/#startfrom--endat), [`volume`](/docs/video/#volume) and [`muted`](/docs/video/#muted) props in the same way.+Audio from [`<Video />`](/docs/video) and [`<OffthreadVideo />`](/docs/offthreadvideo) tags are also included in the output. You may use the [`startFrom`, `endAt`](/docs/video/#startfrom), [`volume`](/docs/video/#volume) and [`muted`](/docs/video/#muted) props in the same way.## Controlling playback speeddiff --git a/packages/docs/sidebars.js b/packages/docs/sidebars.jsindex 3071120359..9478010a2e 100644--- a/packages/docs/sidebars.js+++ b/packages/docs/sidebars.js@@ -456,7 +456,7 @@ module.exports = {"the-fundamentals","animating-properties","reusability",- "timeline",+ "studio","render",],},diff --git a/vercel.json b/vercel.jsonindex ca64e37aed..5cae31d08d 100644--- a/vercel.json+++ b/vercel.json@@ -256,6 +256,16 @@"source": "/repro","destination": "https://stackblitz.com/fork/github/remotion-dev/template-helloworld","permanent": false+ },+ {+ "source": "/docs/timeline",+ "destination": "/docs/studio",+ "permanent": false+ },+ {+ "source": "/studio",+ "destination": "/docs/studio",+ "permanent": false}]}