@remotion/cloudrun 4.0.262 → 4.0.263

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
1
 
2
2
  
3
- > @remotion/cloudrun@4.0.262 make /Users/jonathanburger/remotion/packages/cloudrun
3
+ > @remotion/cloudrun@4.0.263 make /Users/jonathanburger/remotion/packages/cloudrun
4
4
  > tsc -d && bun build.ts
5
5
 
6
- [6.72ms] Made reproducible build with gtar
6
+ [21.36ms] Made reproducible build with gtar
@@ -68,7 +68,7 @@ export type RenderMediaOnCloudrunInput = {
68
68
  renderIdOverride?: z.infer<typeof CloudRunPayload>['renderIdOverride'];
69
69
  renderStatusWebhook?: z.infer<typeof CloudRunPayload>['renderStatusWebhook'];
70
70
  } & Partial<ToOptions<typeof BrowserSafeApis.optionsMap.renderMediaOnCloudRun>>;
71
- declare const internalRenderMediaOnCloudrunRaw: ({ cloudRunUrl, serviceName, region, serveUrl, composition, inputProps, codec, forceBucketName, privacy, outName, updateRenderProgress, renderIdOverride, renderStatusWebhook, jpegQuality, audioCodec, audioBitrate, videoBitrate, encodingMaxRate, encodingBufferSize, proResProfile, x264Preset, crf, pixelFormat, imageFormat, scale, everyNthFrame, numberOfGifLoops, frameRange, envVariables, chromiumOptions, muted, forceWidth, forceHeight, logLevel, delayRenderTimeoutInMilliseconds, concurrency, enforceAudioTrack, preferLossless, offthreadVideoCacheSizeInBytes, colorSpace, downloadBehavior, metadata, }: InternalRenderMediaOnCloudrun) => Promise<RenderMediaOnCloudrunOutput | CloudRunCrashResponse>;
71
+ declare const internalRenderMediaOnCloudrunRaw: ({ cloudRunUrl, serviceName, region, serveUrl, composition, inputProps, codec, forceBucketName, privacy, outName, updateRenderProgress, renderIdOverride, renderStatusWebhook, jpegQuality, audioCodec, audioBitrate, videoBitrate, encodingMaxRate, encodingBufferSize, proResProfile, x264Preset, crf, pixelFormat, imageFormat, scale, everyNthFrame, numberOfGifLoops, frameRange, envVariables, chromiumOptions, muted, forceWidth, forceHeight, logLevel, delayRenderTimeoutInMilliseconds, concurrency, enforceAudioTrack, preferLossless, offthreadVideoCacheSizeInBytes, offthreadVideoThreads, colorSpace, downloadBehavior, metadata, }: InternalRenderMediaOnCloudrun) => Promise<RenderMediaOnCloudrunOutput | CloudRunCrashResponse>;
72
72
  export declare const internalRenderMediaOnCloudrun: typeof internalRenderMediaOnCloudrunRaw;
73
73
  export declare const renderMediaOnCloudrun: ({ cloudRunUrl, serviceName, region, serveUrl, composition, inputProps, codec, forceBucketName, privacy, outName, updateRenderProgress, jpegQuality, audioCodec, audioBitrate, videoBitrate, encodingMaxRate, encodingBufferSize, proResProfile, x264Preset, crf, pixelFormat, imageFormat, scale, everyNthFrame, numberOfGifLoops, frameRange, envVariables, chromiumOptions, muted, forceWidth, forceHeight, logLevel, delayRenderTimeoutInMilliseconds, concurrency, enforceAudioTrack, preferLossless, offthreadVideoCacheSizeInBytes, colorSpace, downloadBehavior, metadata, renderIdOverride, renderStatusWebhook, }: RenderMediaOnCloudrunInput) => Promise<RenderMediaOnCloudrunOutput | CloudRunCrashResponse>;
74
74
  export {};
@@ -10,7 +10,7 @@ const validate_serveurl_1 = require("../shared/validate-serveurl");
10
10
  const get_or_create_bucket_1 = require("./get-or-create-bucket");
11
11
  const get_auth_client_for_url_1 = require("./helpers/get-auth-client-for-url");
12
12
  const get_cloudrun_endpoint_1 = require("./helpers/get-cloudrun-endpoint");
13
- const internalRenderMediaOnCloudrunRaw = async ({ cloudRunUrl, serviceName, region, serveUrl, composition, inputProps, codec, forceBucketName, privacy, outName, updateRenderProgress, renderIdOverride, renderStatusWebhook, jpegQuality, audioCodec, audioBitrate, videoBitrate, encodingMaxRate, encodingBufferSize, proResProfile, x264Preset, crf, pixelFormat, imageFormat, scale, everyNthFrame, numberOfGifLoops, frameRange, envVariables, chromiumOptions, muted, forceWidth, forceHeight, logLevel, delayRenderTimeoutInMilliseconds, concurrency, enforceAudioTrack, preferLossless, offthreadVideoCacheSizeInBytes, colorSpace, downloadBehavior, metadata, }) => {
13
+ const internalRenderMediaOnCloudrunRaw = async ({ cloudRunUrl, serviceName, region, serveUrl, composition, inputProps, codec, forceBucketName, privacy, outName, updateRenderProgress, renderIdOverride, renderStatusWebhook, jpegQuality, audioCodec, audioBitrate, videoBitrate, encodingMaxRate, encodingBufferSize, proResProfile, x264Preset, crf, pixelFormat, imageFormat, scale, everyNthFrame, numberOfGifLoops, frameRange, envVariables, chromiumOptions, muted, forceWidth, forceHeight, logLevel, delayRenderTimeoutInMilliseconds, concurrency, enforceAudioTrack, preferLossless, offthreadVideoCacheSizeInBytes, offthreadVideoThreads, colorSpace, downloadBehavior, metadata, }) => {
14
14
  const actualCodec = (0, validate_gcp_codec_1.validateCloudrunCodec)(codec);
15
15
  (0, validate_serveurl_1.validateServeUrl)(serveUrl);
16
16
  if (privacy)
@@ -60,6 +60,7 @@ const internalRenderMediaOnCloudrunRaw = async ({ cloudRunUrl, serviceName, regi
60
60
  enforceAudioTrack: enforceAudioTrack !== null && enforceAudioTrack !== void 0 ? enforceAudioTrack : false,
61
61
  preferLossless: preferLossless !== null && preferLossless !== void 0 ? preferLossless : false,
62
62
  offthreadVideoCacheSizeInBytes: offthreadVideoCacheSizeInBytes !== null && offthreadVideoCacheSizeInBytes !== void 0 ? offthreadVideoCacheSizeInBytes : null,
63
+ offthreadVideoThreads: offthreadVideoThreads !== null && offthreadVideoThreads !== void 0 ? offthreadVideoThreads : null,
63
64
  colorSpace: colorSpace !== null && colorSpace !== void 0 ? colorSpace : null,
64
65
  clientVersion: version_1.VERSION,
65
66
  downloadBehavior,
@@ -35,7 +35,7 @@ const get_cloudrun_endpoint_1 = require("./helpers/get-cloudrun-endpoint");
35
35
  * @param params.metadata Metadata to be attached to the output file.
36
36
  * @returns {Promise<RenderStillOnCloudrunOutput>} See documentation for detailed structure
37
37
  */
38
- const internalRenderStillOnCloudRun = async ({ cloudRunUrl, serviceName, region, serveUrl, composition, inputProps, forceBucketName, privacy, outName, imageFormat, envVariables, frame, jpegQuality, chromiumOptions, scale, forceWidth, forceHeight, logLevel, delayRenderTimeoutInMilliseconds, offthreadVideoCacheSizeInBytes, downloadBehavior, renderIdOverride, renderStatusWebhook, }) => {
38
+ const internalRenderStillOnCloudRun = async ({ cloudRunUrl, serviceName, region, serveUrl, composition, inputProps, forceBucketName, privacy, outName, imageFormat, envVariables, frame, jpegQuality, chromiumOptions, scale, forceWidth, forceHeight, logLevel, delayRenderTimeoutInMilliseconds, offthreadVideoCacheSizeInBytes, offthreadVideoThreads, downloadBehavior, renderIdOverride, renderStatusWebhook, }) => {
39
39
  (0, validate_serveurl_1.validateServeUrl)(serveUrl);
40
40
  if (privacy)
41
41
  (0, validate_privacy_1.validatePrivacy)(privacy);
@@ -68,6 +68,7 @@ const internalRenderStillOnCloudRun = async ({ cloudRunUrl, serviceName, region,
68
68
  logLevel,
69
69
  delayRenderTimeoutInMilliseconds,
70
70
  offthreadVideoCacheSizeInBytes,
71
+ offthreadVideoThreads,
71
72
  clientVersion: version_1.VERSION,
72
73
  downloadBehavior,
73
74
  renderIdOverride,
@@ -131,7 +132,7 @@ const internalRenderStillOnCloudRun = async ({ cloudRunUrl, serviceName, region,
131
132
  };
132
133
  const errorHandled = (0, error_handling_1.wrapWithErrorHandling)(internalRenderStillOnCloudRun);
133
134
  const renderStillOnCloudrun = (options) => {
134
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v;
135
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w;
135
136
  return errorHandled({
136
137
  chromiumOptions: (_a = options.chromiumOptions) !== null && _a !== void 0 ? _a : {},
137
138
  cloudRunUrl: (_b = options.cloudRunUrl) !== null && _b !== void 0 ? _b : null,
@@ -148,15 +149,16 @@ const renderStillOnCloudrun = (options) => {
148
149
  jpegQuality: (_l = options.jpegQuality) !== null && _l !== void 0 ? _l : client_1.BrowserSafeApis.DEFAULT_JPEG_QUALITY,
149
150
  logLevel: (_m = options.logLevel) !== null && _m !== void 0 ? _m : 'info',
150
151
  offthreadVideoCacheSizeInBytes: (_o = options.offthreadVideoCacheSizeInBytes) !== null && _o !== void 0 ? _o : null,
151
- outName: (_p = options.outName) !== null && _p !== void 0 ? _p : null,
152
- privacy: (_q = options.privacy) !== null && _q !== void 0 ? _q : 'public',
152
+ offthreadVideoThreads: (_p = options.offthreadVideoThreads) !== null && _p !== void 0 ? _p : null,
153
+ outName: (_q = options.outName) !== null && _q !== void 0 ? _q : null,
154
+ privacy: (_r = options.privacy) !== null && _r !== void 0 ? _r : 'public',
153
155
  region: options.region,
154
- scale: (_r = options.scale) !== null && _r !== void 0 ? _r : 1,
156
+ scale: (_s = options.scale) !== null && _s !== void 0 ? _s : 1,
155
157
  serveUrl: options.serveUrl,
156
- serviceName: (_s = options.serviceName) !== null && _s !== void 0 ? _s : null,
157
- downloadBehavior: (_t = options.downloadBehavior) !== null && _t !== void 0 ? _t : { type: 'play-in-browser' },
158
- renderIdOverride: (_u = options.renderIdOverride) !== null && _u !== void 0 ? _u : undefined,
159
- renderStatusWebhook: (_v = options.renderStatusWebhook) !== null && _v !== void 0 ? _v : undefined,
158
+ serviceName: (_t = options.serviceName) !== null && _t !== void 0 ? _t : null,
159
+ downloadBehavior: (_u = options.downloadBehavior) !== null && _u !== void 0 ? _u : { type: 'play-in-browser' },
160
+ renderIdOverride: (_v = options.renderIdOverride) !== null && _v !== void 0 ? _v : undefined,
161
+ renderStatusWebhook: (_w = options.renderStatusWebhook) !== null && _w !== void 0 ? _w : undefined,
160
162
  });
161
163
  };
162
164
  exports.renderStillOnCloudrun = renderStillOnCloudrun;
@@ -19,6 +19,7 @@ const payloads_1 = require("../../functions/helpers/payloads");
19
19
  downloadBehavior: { type: 'play-in-browser' },
20
20
  outName: null,
21
21
  offthreadVideoCacheSizeInBytes: null,
22
+ offthreadVideoThreads: null,
22
23
  serializedInputPropsWithCustomSchema: JSON.stringify({}),
23
24
  };
24
25
  const withWebhook = {
@@ -14,7 +14,7 @@ const cloudrun_crash_logs_1 = require("../../helpers/cloudrun-crash-logs");
14
14
  const log_1 = require("../../log");
15
15
  const renderArgsCheck_1 = require("./helpers/renderArgsCheck");
16
16
  exports.RENDER_COMMAND = 'render';
17
- const { audioBitrateOption, x264Option, offthreadVideoCacheSizeInBytesOption, scaleOption, crfOption, jpegQualityOption, videoBitrateOption, enforceAudioOption, mutedOption, colorSpaceOption, numberOfGifLoopsOption, enableMultiprocessOnLinuxOption, glOption, headlessOption, encodingMaxRateOption, encodingBufferSizeOption, delayRenderTimeoutInMillisecondsOption, binariesDirectoryOption, metadataOption, } = client_1.BrowserSafeApis.options;
17
+ const { audioBitrateOption, x264Option, offthreadVideoCacheSizeInBytesOption, offthreadVideoThreadsOption, scaleOption, crfOption, jpegQualityOption, videoBitrateOption, enforceAudioOption, mutedOption, colorSpaceOption, numberOfGifLoopsOption, enableMultiprocessOnLinuxOption, glOption, headlessOption, encodingMaxRateOption, encodingBufferSizeOption, delayRenderTimeoutInMillisecondsOption, binariesDirectoryOption, metadataOption, } = client_1.BrowserSafeApis.options;
18
18
  const renderCommand = async (args, remotionRoot, logLevel) => {
19
19
  var _a, _b, _c;
20
20
  const { serveUrl, cloudRunUrl, outName, forceBucketName, downloadName, privacy, region, } = await (0, renderArgsCheck_1.renderArgsCheck)(exports.RENDER_COMMAND, args, logLevel);
@@ -37,6 +37,9 @@ const renderCommand = async (args, remotionRoot, logLevel) => {
37
37
  const offthreadVideoCacheSizeInBytes = offthreadVideoCacheSizeInBytesOption.getValue({
38
38
  commandLine: cli_1.CliInternals.parsedCli,
39
39
  }).value;
40
+ const offthreadVideoThreads = offthreadVideoThreadsOption.getValue({
41
+ commandLine: cli_1.CliInternals.parsedCli,
42
+ }).value;
40
43
  const enableMultiProcessOnLinux = enableMultiprocessOnLinuxOption.getValue({
41
44
  commandLine: cli_1.CliInternals.parsedCli,
42
45
  }).value;
@@ -66,7 +69,7 @@ const renderCommand = async (args, remotionRoot, logLevel) => {
66
69
  throw Error('Passing the shorthand serve URL without composition name is currently not supported.\n Make sure to pass a composition name after the shorthand serve URL or pass the complete serveURL without composition name to get to choose between all compositions.');
67
70
  }
68
71
  const server = renderer_1.RenderInternals.prepareServer({
69
- concurrency: 1,
72
+ offthreadVideoThreads: 1,
70
73
  indent: false,
71
74
  port: config_1.ConfigInternals.getRendererPortFromConfigFileAndCliFlag(),
72
75
  remotionRoot,
@@ -98,6 +101,7 @@ const renderCommand = async (args, remotionRoot, logLevel) => {
98
101
  staticBase: null,
99
102
  }).serializedString,
100
103
  offthreadVideoCacheSizeInBytes,
104
+ offthreadVideoThreads,
101
105
  binariesDirectory,
102
106
  onBrowserDownload: cli_1.CliInternals.defaultBrowserDownloadProgress({
103
107
  indent,
@@ -54,7 +54,7 @@ const stillCommand = async (args, remotionRoot, logLevel) => {
54
54
  throw Error('Passing the shorthand serve URL without composition name is currently not supported.\n Make sure to pass a composition name after the shorthand serve URL or pass the complete serveURL without composition name to get to choose between all compositions.');
55
55
  }
56
56
  const server = renderer_1.RenderInternals.prepareServer({
57
- concurrency: 1,
57
+ offthreadVideoThreads: 1,
58
58
  indent: false,
59
59
  port: config_1.ConfigInternals.getRendererPortFromConfigFileAndCliFlag(),
60
60
  remotionRoot,
@@ -93,6 +93,7 @@ const stillCommand = async (args, remotionRoot, logLevel) => {
93
93
  quiet: cli_1.CliInternals.quietFlagProvided(),
94
94
  }),
95
95
  chromeMode: 'headless-shell',
96
+ offthreadVideoThreads: 1,
96
97
  });
97
98
  composition = compositionId;
98
99
  }
@@ -22,6 +22,7 @@ const getCompositionFromBody = async (body) => {
22
22
  server: undefined,
23
23
  timeoutInMilliseconds: (_c = body.delayRenderTimeoutInMilliseconds) !== null && _c !== void 0 ? _c : renderer_1.RenderInternals.DEFAULT_TIMEOUT,
24
24
  offthreadVideoCacheSizeInBytes: body.offthreadVideoCacheSizeInBytes,
25
+ offthreadVideoThreads: body.offthreadVideoThreads,
25
26
  binariesDirectory: null,
26
27
  onBrowserDownload: () => {
27
28
  throw new Error('Should not download a browser in Cloud Run');
@@ -69,6 +69,7 @@ export declare const CloudRunPayload: z.ZodDiscriminatedUnion<"type", [z.ZodObje
69
69
  enforceAudioTrack: z.ZodBoolean;
70
70
  preferLossless: z.ZodBoolean;
71
71
  offthreadVideoCacheSizeInBytes: z.ZodNullable<z.ZodNumber>;
72
+ offthreadVideoThreads: z.ZodNullable<z.ZodNumber>;
72
73
  colorSpace: z.ZodNullable<z.ZodEnum<["default", "bt709", "bt2020-ncl"]>>;
73
74
  clientVersion: z.ZodString;
74
75
  downloadBehavior: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
@@ -135,6 +136,7 @@ export declare const CloudRunPayload: z.ZodDiscriminatedUnion<"type", [z.ZodObje
135
136
  enforceAudioTrack: boolean;
136
137
  preferLossless: boolean;
137
138
  offthreadVideoCacheSizeInBytes: number | null;
139
+ offthreadVideoThreads: number | null;
138
140
  colorSpace: "default" | "bt709" | "bt2020-ncl" | null;
139
141
  clientVersion: string;
140
142
  downloadBehavior: {
@@ -192,6 +194,7 @@ export declare const CloudRunPayload: z.ZodDiscriminatedUnion<"type", [z.ZodObje
192
194
  enforceAudioTrack: boolean;
193
195
  preferLossless: boolean;
194
196
  offthreadVideoCacheSizeInBytes: number | null;
197
+ offthreadVideoThreads: number | null;
195
198
  colorSpace: "default" | "bt709" | "bt2020-ncl" | null;
196
199
  clientVersion: string;
197
200
  downloadBehavior: {
@@ -256,6 +259,7 @@ export declare const CloudRunPayload: z.ZodDiscriminatedUnion<"type", [z.ZodObje
256
259
  delayRenderTimeoutInMilliseconds: z.ZodNumber;
257
260
  logLevel: z.ZodEnum<["trace", "verbose", "info", "warn", "error"]>;
258
261
  offthreadVideoCacheSizeInBytes: z.ZodNullable<z.ZodNumber>;
262
+ offthreadVideoThreads: z.ZodNullable<z.ZodNumber>;
259
263
  clientVersion: z.ZodString;
260
264
  downloadBehavior: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
261
265
  type: z.ZodLiteral<"play-in-browser">;
@@ -305,6 +309,7 @@ export declare const CloudRunPayload: z.ZodDiscriminatedUnion<"type", [z.ZodObje
305
309
  logLevel: "error" | "trace" | "verbose" | "info" | "warn";
306
310
  delayRenderTimeoutInMilliseconds: number;
307
311
  offthreadVideoCacheSizeInBytes: number | null;
312
+ offthreadVideoThreads: number | null;
308
313
  clientVersion: string;
309
314
  downloadBehavior: {
310
315
  type: "play-in-browser";
@@ -345,6 +350,7 @@ export declare const CloudRunPayload: z.ZodDiscriminatedUnion<"type", [z.ZodObje
345
350
  logLevel: "error" | "trace" | "verbose" | "info" | "warn";
346
351
  delayRenderTimeoutInMilliseconds: number;
347
352
  offthreadVideoCacheSizeInBytes: number | null;
353
+ offthreadVideoThreads: number | null;
348
354
  clientVersion: string;
349
355
  downloadBehavior: {
350
356
  type: "play-in-browser";
@@ -63,6 +63,7 @@ exports.CloudRunPayload = zod_1.z.discriminatedUnion('type', [
63
63
  enforceAudioTrack: zod_1.z.boolean(),
64
64
  preferLossless: zod_1.z.boolean(),
65
65
  offthreadVideoCacheSizeInBytes: zod_1.z.number().nullable(),
66
+ offthreadVideoThreads: zod_1.z.number().nullable(),
66
67
  colorSpace: zod_1.z.enum(client_1.BrowserSafeApis.validColorSpaces).nullable(),
67
68
  clientVersion: zod_1.z.string(),
68
69
  downloadBehavior,
@@ -97,6 +98,7 @@ exports.CloudRunPayload = zod_1.z.discriminatedUnion('type', [
97
98
  delayRenderTimeoutInMilliseconds: zod_1.z.number(),
98
99
  logLevel,
99
100
  offthreadVideoCacheSizeInBytes: zod_1.z.number().nullable(),
101
+ offthreadVideoThreads: zod_1.z.number().nullable(),
100
102
  clientVersion: zod_1.z.string(),
101
103
  downloadBehavior,
102
104
  metadata: zod_1.z.record(zod_1.z.string()).optional().nullable(),
@@ -130,6 +130,7 @@ const renderMediaSingleThread = async (body, res) => {
130
130
  puppeteerInstance: undefined,
131
131
  server: undefined,
132
132
  offthreadVideoCacheSizeInBytes: body.offthreadVideoCacheSizeInBytes,
133
+ offthreadVideoThreads: body.offthreadVideoThreads,
133
134
  colorSpace: body.colorSpace,
134
135
  repro: false,
135
136
  binariesDirectory: null,
@@ -65,6 +65,7 @@ const renderStillSingleThread = async (body, res) => {
65
65
  puppeteerInstance: null,
66
66
  server: undefined,
67
67
  offthreadVideoCacheSizeInBytes: body.offthreadVideoCacheSizeInBytes,
68
+ offthreadVideoThreads: body.offthreadVideoThreads,
68
69
  binariesDirectory: null,
69
70
  onBrowserDownload: () => {
70
71
  throw new Error('Should not download a browser in Cloud Run');
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "url": "https://github.com/remotion-dev/remotion/tree/main/packages/cloudrun"
4
4
  },
5
5
  "name": "@remotion/cloudrun",
6
- "version": "4.0.262",
6
+ "version": "4.0.263",
7
7
  "description": "Render Remotion videos on Google Cloud Run",
8
8
  "main": "dist/index.js",
9
9
  "sideEffects": false,
@@ -16,16 +16,16 @@
16
16
  "@google-cloud/logging": "^11.1.0",
17
17
  "google-auth-library": "^8.7.0",
18
18
  "zod": "3.22.3",
19
- "@remotion/bundler": "4.0.262",
20
- "@remotion/cli": "4.0.262",
21
- "@remotion/renderer": "4.0.262",
22
- "remotion": "4.0.262"
19
+ "@remotion/bundler": "4.0.263",
20
+ "remotion": "4.0.263",
21
+ "@remotion/cli": "4.0.263",
22
+ "@remotion/renderer": "4.0.263"
23
23
  },
24
24
  "devDependencies": {
25
25
  "@types/minimist": "1.2.2",
26
26
  "eslint": "9.19.0",
27
- "@remotion/compositor-linux-x64-gnu": "4.0.262",
28
- "@remotion/eslint-config-internal": "4.0.262"
27
+ "@remotion/compositor-linux-x64-gnu": "4.0.263",
28
+ "@remotion/eslint-config-internal": "4.0.263"
29
29
  },
30
30
  "exports": {
31
31
  "./package.json": "./package.json",