Skip to content

🎥 Make videos programmatically with React

make first corrections

Jonny Burger5f6f0b58cf2f
diff --git a/packages/ai-improvements/improve-docs.ts b/packages/ai-improvements/improve-docs.ts
index 40591da548..7dfeff934c 100644
--- a/packages/ai-improvements/improve-docs.ts
+++ b/packages/ai-improvements/improve-docs.ts
@@ -48,8 +48,10 @@ for (const article of articles) {
"respond if you think the API documentation is missing parameters the user can pass or the return value is not right.",
"Also point out typos.",
"Do only point out obvious mistakes.",
+ "Sometimes props are documented like ### `delayRenderRetries`<AvailableFrom v='4.0.140' />, which is fine",
"Consider that the documentation may contain backticks and html tags, which are not mistakes.",
"Point out if the markdown is not formatted correctly.",
+ "Rewrite paragraphs and sentences that we need to correct.",
"Otherwise, just say OK.",
].join("\n"),
},
@@ -68,5 +70,6 @@ for (const article of articles) {
process.stdout.write(chunk.choices[0]?.delta?.content || "");
}
await Bun.write(flag, "txt");
+ process.exit(0);
}
}
diff --git a/packages/cloudrun/src/api/render-media-on-cloudrun.ts b/packages/cloudrun/src/api/render-media-on-cloudrun.ts
index eafcafafff..e0b6e0308d 100644
--- a/packages/cloudrun/src/api/render-media-on-cloudrun.ts
+++ b/packages/cloudrun/src/api/render-media-on-cloudrun.ts
@@ -281,7 +281,7 @@ export const internalRenderMediaOnCloudrun = NoReactAPIs.wrapWithErrorHandling(
* @param params.codec The media codec which should be used for encoding.
* @param params.forceBucketName The name of the bucket that the output file should be uploaded to.
* @param params.privacy Whether the output file should be public or private.
- * @param params.outputFile The name of the output file.
+ * @param params.outName The name of the output file.
* @param params.updateRenderProgress A callback that is called with the progress of the render.
* @param params.jpegQuality JPEG quality if JPEG was selected as the image format.
* @param params.audioCodec The encoding of the audio of the output video.
diff --git a/packages/docs/docs/cloudrun/deploysite.md b/packages/docs/docs/cloudrun/deploysite.md
index 45f23afbc9..a9e704c0b0 100644
--- a/packages/docs/docs/cloudrun/deploysite.md
+++ b/packages/docs/docs/cloudrun/deploysite.md
@@ -112,20 +112,36 @@ Ignore an error that gets thrown if you pass an entry point file which does not
An object with the following values:
-- `serveUrl` _(string)_: An URL such as `https://storage.googleapis.com/remotioncloudrun-123asd321/sites/abcdefgh/index.html`.
+### `serveUrl`
- You can use this "Serve URL" to render a video on Remotion Cloud Run using:
+string\_
- - The [`npx remotion cloudrun render`](/docs/cloudrun/cli/render) command
- - The [`renderMediaOnCloudrun()`](/docs/cloudrun/rendermediaoncloudrun) and [`renderStillOnCloudrun()`](/docs/cloudrun/renderstilloncloudrun) functions.
- - Locally using the [`renderMedia()`](/docs/renderer/render-media) and [`renderStill()`](/docs/renderer/render-still) functions.
- - Locally using the [`npx remotion render`](/docs/cli) and [`npx remotion still`](/docs/cli) commands
+An URL such as `https://storage.googleapis.com/remotioncloudrun-123asd321/sites/abcdefgh/index.html`.
- If you are rendering on Cloud Run, you can also pass the site name (in this case `abcdefgh`) as an abbreviation.
+You can use this "Serve URL" to render a video on Remotion Cloud Run using:
-- `siteName` _(string)_: The identifier of the site that was given. Is either the site name that you have passed into this function, or a random string that was generated if you didn't pass a site name.
+- The [`npx remotion cloudrun render`](/docs/cloudrun/cli/render) command
+- The [`renderMediaOnCloudrun()`](/docs/cloudrun/rendermediaoncloudrun) and [`renderStillOnCloudrun()`](/docs/cloudrun/renderstilloncloudrun) functions.
+- Locally using the [`renderMedia()`](/docs/renderer/render-media) and [`renderStill()`](/docs/renderer/render-still) functions.
+- Locally using the [`npx remotion render`](/docs/cli) and [`npx remotion still`](/docs/cli) commands
-- `stats`: An object with 3 entries: `uploadedFiles`, `deletedFiles` and `untouchedFiles`. Each one is a `number`.
+If you are rendering on Cloud Run, you can also pass the site name (in this case `abcdefgh`) as an abbreviation.
+
+### `siteName`
+
+_string_
+
+The identifier of the site that was given. Is either the site name that you have passed into this function, or a random string that was generated if you didn't pass a site name.
+
+### `stats`
+
+An object with 3 entries:
+
+- `uploadedFiles`
+- `deletedFiles`
+- `untouchedFiles`
+
+Each one is a `number`.
## See also
diff --git a/packages/docs/docs/cloudrun/getServiceinfo.md b/packages/docs/docs/cloudrun/getServiceinfo.md
index 7a597e511e..6a3617d1c5 100644
--- a/packages/docs/docs/cloudrun/getServiceinfo.md
+++ b/packages/docs/docs/cloudrun/getServiceinfo.md
@@ -10,7 +10,7 @@ crumb: "Cloud Run API"
<p>Cloud Run is in <a href="/docs/cloudrun-alpha">Alpha</a>, which means APIs may change in any version and documentation is not yet finished. See the <a href="https://remotion.dev/changelog">changelog to stay up to date with breaking changes</a>.</p>
</ExperimentalBadge>
-Gets information about a service given it's name and region.
+Gets information about a service given its name and region.
To get a list of deployed services, use [`getServices()`](/docs/cloudrun/getservices).
@@ -30,8 +30,8 @@ const info = await getServiceInfo({
});
console.log(info.serviceName); // remotion--3-3-82--mem512mi--cpu1-0--t-500
console.log(info.timeoutInSeconds); // 500
-console.log(info.memoryLimit); // 1500
-console.log(info.cpuLimit); // 2048
+console.log(info.memoryLimit); // "2Gi"
+console.log(info.cpuLimit); // "1.0"
console.log(info.remotionVersion); // '4.0.1'
console.log(info.uri); // "https://remotion--3-3-82--mem512mi--cpu1-0--t-500-1a2b3c4d5e-ue.a.run.app"
console.log(info.region); // "us-east1"
diff --git a/packages/docs/docs/cloudrun/getsites.md b/packages/docs/docs/cloudrun/getsites.md
index 2d6b7bc1be..71860e8366 100644
--- a/packages/docs/docs/cloudrun/getsites.md
+++ b/packages/docs/docs/cloudrun/getsites.md
@@ -63,7 +63,7 @@ A promise resolving to an object with the following properties:
An array of deployed Remotion projects that you can use for rendering.
-Each items contains the following properties:
+Each item contains the following properties:
#### `id`
diff --git a/packages/docs/docs/freeze.mdx b/packages/docs/docs/freeze.mdx
index 266026e83e..c9c0b751bc 100644
--- a/packages/docs/docs/freeze.mdx
+++ b/packages/docs/docs/freeze.mdx
@@ -14,7 +14,7 @@ const BlueSquare: React.FC = () => <div></div>
_Available from v2.2.0._
-When using the `<Freeze/>` component, all of it's children will freeze to the frame that you specify as a prop.
+When using the `<Freeze/>` component, all of its children will freeze to the frame that you specify as a prop.
If a component is a child of `<Freeze/>`, calling the [`useCurrentFrame()`](/docs/use-current-frame) hook will always return the frame number you specify, irrespective of any [`<Sequence>`](/docs/sequence).
diff --git a/packages/docs/docs/install-whisper-cpp/convert-to-captions.mdx b/packages/docs/docs/install-whisper-cpp/convert-to-captions.mdx
index 08cf204962..a1329cb421 100644
--- a/packages/docs/docs/install-whisper-cpp/convert-to-captions.mdx
+++ b/packages/docs/docs/install-whisper-cpp/convert-to-captions.mdx
@@ -54,13 +54,17 @@ Recommendation: `200`.
## Return value
-An array with objects of the following shape:
+An object objects of the following shape:
```ts twoslash
type Caption = {
text: string;
startInSeconds: number;
};
+
+type ReturnValue = {
+ captions: Caption[];
+};
```
## Suggested usage
diff --git a/packages/docs/docs/install-whisper-cpp/download-whisper-model.mdx b/packages/docs/docs/install-whisper-cpp/download-whisper-model.mdx
index 15d2fe6db8..5127de261d 100644
--- a/packages/docs/docs/install-whisper-cpp/download-whisper-model.mdx
+++ b/packages/docs/docs/install-whisper-cpp/download-whisper-model.mdx
@@ -52,8 +52,11 @@ Print human-readable progress to the console. Default: `true`.
## Return Value
-Whether a file at the output path already existed.
-If it did, the function did not do anything and returned `true`.
+Returns an object with the following property:
+
+### `alreadyExisted`
+
+Indicates whether a file at the output path already existed. If it did, the function did not do anything and this property is set to `true`.
## See also
diff --git a/packages/docs/docs/install-whisper-cpp/install-whisper-cpp.mdx b/packages/docs/docs/install-whisper-cpp/install-whisper-cpp.mdx
index b1098f9fd3..87b9fc1212 100644
--- a/packages/docs/docs/install-whisper-cpp/install-whisper-cpp.mdx
+++ b/packages/docs/docs/install-whisper-cpp/install-whisper-cpp.mdx
@@ -21,7 +21,8 @@ const { alreadyExisted } = await installWhisperCpp({
});
```
-On Windows, a binary is downloaded if there is a precompiled release for this version, otherwise it will fail.
+On Windows, if the provided version is not in semantic version format (e.g., `1.5.4`), the installation will throw an error. The function expects a precompiled semantic versioned release available for download.
+
On other platforms, the source is cloned from GitHub and built.
If you install Whisper.cpp into a folder which is in a Git repository, you should add the folder to the `.gitignore` file.
@@ -51,9 +52,11 @@ Whether to print the output of the installation process to the console. Defaults
## Return value
+Returns a `Promise` that resolves to an object with the following property:
+
### `alreadyExisted`
-Whether the folder already existed. If it did, the function did not do anything and returned `true`.
+Whether the folder already existed. If it did, and contains the necessary executable, the function did not perform any installation and returned `true`. If the executable is missing in the existing folder, the function expects manual deletion of the folder before attempting another installation.
## See also
diff --git a/packages/docs/docs/lambda/getsites.md b/packages/docs/docs/lambda/getsites.md
index 89ab3e2025..a287a1b198 100644
--- a/packages/docs/docs/lambda/getsites.md
+++ b/packages/docs/docs/lambda/getsites.md
@@ -64,7 +64,7 @@ A promise resolving to an object with the following properties:
An array of deployed Remotion projects that you can use for rendering.
-Each items contains the following properties:
+Each item contains the following properties:
#### `id`