Skip to content

🎥 Make videos programmatically with React

Pass Lambda Test

njho19ddf4401f47
diff --git a/packages/cloudrun/src/cli/args.ts b/packages/cloudrun/src/cli/args.ts
index 4d72c71291..4497c6d043 100644
--- a/packages/cloudrun/src/cli/args.ts
+++ b/packages/cloudrun/src/cli/args.ts
@@ -17,6 +17,8 @@ type servicesCommandLineOptions = {
['out-name']: string | undefined;
['output-bucket']: string;
['output-folder-path']: string;
+ webhook: string;
+ ['render-id-override']: string;
};
export const parsedCloudrunCli =
diff --git a/packages/cloudrun/src/cli/commands/render/index.ts b/packages/cloudrun/src/cli/commands/render/index.ts
index 7f799c9d5a..a9242916a5 100644
--- a/packages/cloudrun/src/cli/commands/render/index.ts
+++ b/packages/cloudrun/src/cli/commands/render/index.ts
@@ -325,6 +325,15 @@ ${downloadName ? ` Downloaded File = ${downloadName}` : ''}
indent: false,
downloadBehavior: {type: 'play-in-browser'},
metadata,
+ renderIdOverride: parsedCloudrunCli['render-id-override'] ?? null,
+ renderStatusWebhook: parsedCloudrunCli.webhook
+ ? {
+ url: parsedCloudrunCli.webhook,
+ headers: {},
+ data: null,
+ webhookProgressInterval: null,
+ }
+ : null,
});
if (res.type === 'crash') {
diff --git a/packages/cloudrun/src/gcpInstaller/gcpInstaller.tar b/packages/cloudrun/src/gcpInstaller/gcpInstaller.tar
index 8d24fa64f8..d0a4bc709a 100644
Binary files a/packages/cloudrun/src/gcpInstaller/gcpInstaller.tar and b/packages/cloudrun/src/gcpInstaller/gcpInstaller.tar differ
diff --git a/packages/docs/docs/cloudrun/cli/render.mdx b/packages/docs/docs/cloudrun/cli/render.mdx
index 677f9a470b..836a99fd35 100644
--- a/packages/docs/docs/cloudrun/cli/render.mdx
+++ b/packages/docs/docs/cloudrun/cli/render.mdx
@@ -130,6 +130,39 @@ Specify the name of the service which should be used to perform the render. This
<Options id="video-bitrate" />
+### `--webhook`
+
+Your webhook URL that will be called with the progress of the render. This will be sent using a POST request.
+
+Example:
+```bash
+--webhook=https://example.com/webhook
+```
+
+The webhook will receive a POST request with a JSON body containing:
+```json
+{
+ "progress": 0.1,
+ "renderedFrames": 100,
+ "encodedFrames": 100,
+ "renderId": "1234567890",
+ "projectId": "1234567890"
+}
+```
+
+### `--render-id-override`
+
+Provide a specific render ID for the render. Otherwise a random one will be generated.
+
+Example:
+```bash
+--render-id-override=my-custom-render-id
+```
+
+:::note
+You will be responsible for ensuring that the render ID is unique, otherwise it will overwrite existing renders with the same configured Render ID.
+:::
+
### `--prores-profile`
[Set the ProRes profile](/docs/config#setproresprofile). This option is only valid if the [`codec`](#--codec) has been set to `prores`. Possible values: `4444-xq`, `4444`, `hq`, `standard`, `light`, `proxy`. See [here](https://video.stackexchange.com/a/14715) for explanation of possible values. Default: `hq`.