🎥 Make videos programmatically with React
remove entry point from a lot of places
Jonny Burgereef963d12f85
diff --git a/packages/docs/docs/cli/cli.md b/packages/docs/docs/cli/cli.mdindex c238c00e5a..29cd43dc8c 100644--- a/packages/docs/docs/cli/cli.md+++ b/packages/docs/docs/cli/cli.md@@ -21,7 +21,7 @@ The following commands are available - you can always run them using `npx remoti## Example command```-npx remotion render --codec=vp8 src/index.ts HelloWorld out/video.webm+npx remotion render --codec=vp8 HelloWorld out/video.webm```## Fig.io autocompletiondiff --git a/packages/docs/docs/get-input-props.md b/packages/docs/docs/get-input-props.mdindex 5d5edc829a..ca60fe3518 100644--- a/packages/docs/docs/get-input-props.md+++ b/packages/docs/docs/get-input-props.md@@ -18,7 +18,7 @@ This method is not available when inside a Remotion Player. Instead, get the proPass in a [parseable](/docs/cli) JSON representation using the `--props` flag to either `remotion preview` or `remotion render`:```bash-npx remotion render --props='{"hello": "world"}' src/index.ts my-composition out/video.mp4+npx remotion render --props='{"hello": "world"}' my-composition out/video.mp4```You can then access the props in JavaScript:diff --git a/packages/docs/docs/parametrized-rendering.md b/packages/docs/docs/parametrized-rendering.mdindex 410e9ea9f5..461f85ae30 100644--- a/packages/docs/docs/parametrized-rendering.md+++ b/packages/docs/docs/parametrized-rendering.md@@ -73,13 +73,13 @@ When rendering (for example using the `npm run build` script defined in `package**Using inline JSON**```bash-npx remotion render src/index.ts HelloWorld out/helloworld.mp4 --props='{"propOne": "Hi", "propTwo": 10}'+npx remotion render HelloWorld out/helloworld.mp4 --props='{"propOne": "Hi", "propTwo": 10}'```**Using a file path:**```bash-npx remotion render src/index.ts HelloWorld out/helloworld.mp4 --props=./path/to/props.json+npx remotion render HelloWorld out/helloworld.mp4 --props=./path/to/props.json```[See also: CLI flags](/docs/cli)diff --git a/packages/docs/docs/render.md b/packages/docs/docs/render.mdindex 1eb662c3b0..68e44a107c 100644--- a/packages/docs/docs/render.md+++ b/packages/docs/docs/render.md@@ -12,7 +12,7 @@ npm run buildThe underlying command in package.json is defined as follows:```bash-npx remotion render src/index.ts HelloWorld out/video.mp4+npx remotion render HelloWorld out/video.mp4```Modify it to select a different video to render, or change its output location.diff --git a/packages/docs/docs/skia/skia.md b/packages/docs/docs/skia/skia.mdindex e7290a3236..a882fd4323 100644--- a/packages/docs/docs/skia/skia.md+++ b/packages/docs/docs/skia/skia.md@@ -70,11 +70,11 @@ Config.Bundling.overrideWebpackConfig((currentConfiguration) => {});```-Next, you need to refactor entrypoint file (most commonly `src/index.ts`) to first load the Skia WebAssembly binary before calling registerRoot():+Next, you need to refactor the [entry point](/docs/terminology#entry-point) file to first load the Skia WebAssembly binary before calling registerRoot():```ts twoslash title="src/index.ts"// @filename: ./Video.tsx-export const RemotionVideo = () => <></>;+export const RemotionRoot = () => <></>;// @filename: index.tsx// ---cut---@@ -83,8 +83,8 @@ import { registerRoot } from "remotion";(async () => {await LoadSkia();- const { RemotionVideo } = await import("./Video");- registerRoot(RemotionVideo);+ const { RemotionRoot } = await import("./Video");+ registerRoot(RemotionRoot);})();```@@ -132,7 +132,7 @@ pnpm create video -- --skiaBy default Remotion rendering are done on the CPU. Some Skia effects rely on advanced GPU features, which may be slow to run on the CPU depending on the kind of effect you are using. If your Skia export is extremely slow, we found that enabling the GPU via the `--gl=angle` option improves things substantially. Please check out the documentation on [GPU rendering](/docs/gpu).```sh-remotion render src/index.ts Main out/video.mp4 --gl=angle+remotion render Main out/video.mp4 --gl=angle```## Resourcesdiff --git a/packages/docs/docs/stills.md b/packages/docs/docs/stills.mdindex ed64536ad8..a130a62bfb 100644--- a/packages/docs/docs/stills.md+++ b/packages/docs/docs/stills.md@@ -18,7 +18,7 @@ Use the [`<Still />`](/docs/still) component instead of the [`<Composition />`](You can use the [`npx remotion still`](/docs/cli/#npx-remotion-still) command to render a still image. Example command:```bash-npx remotion still --props='{"custom": "data"}' src/index.ts my-comp out.png+npx remotion still --props='{"custom": "data"}' my-comp out.png```You can use the `--image-format` flag to determine the output format. The default format is `png`, with `jpeg` being the other option.diff --git a/packages/docs/docs/terminology.md b/packages/docs/docs/terminology.mdindex c9d158e75e..405db3416d 100644--- a/packages/docs/docs/terminology.md+++ b/packages/docs/docs/terminology.md@@ -44,7 +44,7 @@ The Remotion Root is the directory in which Remotion commands get executed in. I## Entry point-The entry point is the file where the Remotion CLI and Node.JS APIs will look for a Remotion project. By default in most templates, it is `src/index.ts`. The entry point can be passed to the render command, for example: `npx remotion render src/index.ts`. The entry point should call [`registerRoot()`](/docs/register-root).+The entry point is the file where the Remotion CLI and Node.JS APIs will look for a Remotion project. By default in most templates, it is `src/index.ts`. In older projects, it may have an `.tsx` extension instead of `.ts`. The entry point can be passed to the render command, for example: `npx remotion render src/index.ts`. The entry point should call [`registerRoot()`](/docs/register-root).In the [Remotion Player](#remotion-player), there is no concept of an entry point. You directly pass a React component and metadata to the [`<Player>`](/docs/player/player).diff --git a/packages/docs/docs/timeline.md b/packages/docs/docs/timeline.mdindex 7de676af65..13bdbf82d3 100644--- a/packages/docs/docs/timeline.md+++ b/packages/docs/docs/timeline.md@@ -12,11 +12,9 @@ npm startThis is a shorthand for```bash-npx remotion preview src/index.ts+npx remotion preview```-where `src/index.ts` is the file where [`registerRoot()`](/docs/register-root) is called.-A server will be started on port 3000 (or 3001 if it's not available, and so on) and the preview should open in the browser.<img src="/img/timeline.png"></img>diff --git a/packages/docs/docs/transparent-videos.md b/packages/docs/docs/transparent-videos.mdindex 6526c1ff4f..6eaae7d3bc 100644--- a/packages/docs/docs/transparent-videos.md+++ b/packages/docs/docs/transparent-videos.md@@ -101,8 +101,8 @@ You can then have separate render commands in your package.json:```json"scripts": {- "render": "remotion render src/index.ts my-video video.mp4",- "render-transparent": "remotion render src/index.ts --image-format=png --pixel-format=yuva420p --codec=vp8 my-video video-transparent.webm"+ "render": "remotion render my-video video.mp4",+ "render-transparent": "remotion render --image-format=png --pixel-format=yuva420p --codec=vp8 my-video video-transparent.webm"}```