@remotion/cloudrun 4.0.424 → 4.0.426

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.
@@ -35,6 +35,8 @@ exports.CloudRunPayload = zod_1.z.discriminatedUnion('type', [
35
35
  composition: zod_1.z.string(),
36
36
  forceHeight: zod_1.z.number().optional().nullable(),
37
37
  forceWidth: zod_1.z.number().optional().nullable(),
38
+ forceFps: zod_1.z.number().optional().nullable(),
39
+ forceDurationInFrames: zod_1.z.number().optional().nullable(),
38
40
  codec,
39
41
  serializedInputPropsWithCustomSchema: zod_1.z.string(),
40
42
  jpegQuality: zod_1.z.number().nullable(),
@@ -55,7 +57,7 @@ exports.CloudRunPayload = zod_1.z.discriminatedUnion('type', [
55
57
  .tuple([zod_1.z.number(), zod_1.z.number().nullable()])
56
58
  .or(zod_1.z.number())
57
59
  .nullable(),
58
- envVariables: zod_1.z.record(zod_1.z.string()),
60
+ envVariables: zod_1.z.record(zod_1.z.string(), zod_1.z.string()),
59
61
  chromiumOptions: chromiumOptions.optional(),
60
62
  muted: zod_1.z.boolean(),
61
63
  outputBucket: zod_1.z.string(),
@@ -72,12 +74,12 @@ exports.CloudRunPayload = zod_1.z.discriminatedUnion('type', [
72
74
  colorSpace: zod_1.z.enum(client_1.BrowserSafeApis.validColorSpaces).nullable(),
73
75
  clientVersion: zod_1.z.string(),
74
76
  downloadBehavior,
75
- metadata: zod_1.z.record(zod_1.z.string()).optional().nullable(),
77
+ metadata: zod_1.z.record(zod_1.z.string(), zod_1.z.string()).optional().nullable(),
76
78
  renderIdOverride: zod_1.z.string().optional().nullable(),
77
79
  renderStatusWebhook: zod_1.z
78
80
  .object({
79
81
  url: zod_1.z.string(),
80
- headers: zod_1.z.record(zod_1.z.string()),
82
+ headers: zod_1.z.record(zod_1.z.string(), zod_1.z.string()),
81
83
  data: zod_1.z.any(),
82
84
  webhookProgressInterval: zod_1.z.number().min(0).max(1).optional().nullable(),
83
85
  })
@@ -90,12 +92,14 @@ exports.CloudRunPayload = zod_1.z.discriminatedUnion('type', [
90
92
  composition: zod_1.z.string(),
91
93
  forceHeight: zod_1.z.number().optional().nullable(),
92
94
  forceWidth: zod_1.z.number().optional().nullable(),
95
+ forceFps: zod_1.z.number().optional().nullable(),
96
+ forceDurationInFrames: zod_1.z.number().optional().nullable(),
93
97
  serializedInputPropsWithCustomSchema: zod_1.z.string(),
94
98
  jpegQuality: zod_1.z.number().optional(),
95
99
  imageFormat: stillImageFormat,
96
100
  scale: zod_1.z.number(),
97
101
  privacy: zod_1.z.enum(['public', 'private', 'no-acl']),
98
- envVariables: zod_1.z.record(zod_1.z.string()),
102
+ envVariables: zod_1.z.record(zod_1.z.string(), zod_1.z.string()),
99
103
  chromiumOptions: chromiumOptions.optional(),
100
104
  outputBucket: zod_1.z.string(),
101
105
  outName: zod_1.z.string().nullable(),
@@ -107,12 +111,12 @@ exports.CloudRunPayload = zod_1.z.discriminatedUnion('type', [
107
111
  offthreadVideoThreads: zod_1.z.number().nullable(),
108
112
  clientVersion: zod_1.z.string(),
109
113
  downloadBehavior,
110
- metadata: zod_1.z.record(zod_1.z.string()).optional().nullable(),
114
+ metadata: zod_1.z.record(zod_1.z.string(), zod_1.z.string()).optional().nullable(),
111
115
  renderIdOverride: zod_1.z.string().optional().nullable(),
112
116
  renderStatusWebhook: zod_1.z
113
117
  .object({
114
118
  url: zod_1.z.string(),
115
- headers: zod_1.z.record(zod_1.z.string()),
119
+ headers: zod_1.z.record(zod_1.z.string(), zod_1.z.string()),
116
120
  data: zod_1.z.any(),
117
121
  webhookProgressInterval: zod_1.z.number().min(0).max(1).optional().nullable(),
118
122
  })
@@ -5,6 +5,8 @@ export declare const renderMediaSingleThread: (body: {
5
5
  composition: string;
6
6
  forceHeight?: number | null | undefined;
7
7
  forceWidth?: number | null | undefined;
8
+ forceFps?: number | null | undefined;
9
+ forceDurationInFrames?: number | null | undefined;
8
10
  codec: "aac" | "gif" | "h264" | "h264-mkv" | "h264-ts" | "h265" | "mp3" | "prores" | "vp8" | "vp9" | "wav";
9
11
  serializedInputPropsWithCustomSchema: string;
10
12
  jpegQuality: number | null;
@@ -21,7 +23,7 @@ export declare const renderMediaSingleThread: (body: {
21
23
  x264Preset: "fast" | "faster" | "medium" | "placebo" | "slow" | "slower" | "superfast" | "ultrafast" | "veryfast" | "veryslow" | null;
22
24
  everyNthFrame: number;
23
25
  numberOfGifLoops: number | null;
24
- frameRange: ((number | [number, number | null]) & (number | [number, number | null] | undefined)) | null;
26
+ frameRange: number | [number, number | null] | null;
25
27
  envVariables: Record<string, string>;
26
28
  chromiumOptions?: {
27
29
  ignoreCertificateErrors?: boolean | undefined;
@@ -56,7 +58,7 @@ export declare const renderMediaSingleThread: (body: {
56
58
  renderStatusWebhook?: {
57
59
  url: string;
58
60
  headers: Record<string, string>;
59
- data?: any;
61
+ data: any;
60
62
  webhookProgressInterval?: number | null | undefined;
61
63
  } | null | undefined;
62
64
  } | {
@@ -65,6 +67,8 @@ export declare const renderMediaSingleThread: (body: {
65
67
  composition: string;
66
68
  forceHeight?: number | null | undefined;
67
69
  forceWidth?: number | null | undefined;
70
+ forceFps?: number | null | undefined;
71
+ forceDurationInFrames?: number | null | undefined;
68
72
  serializedInputPropsWithCustomSchema: string;
69
73
  jpegQuality?: number | undefined;
70
74
  imageFormat: "jpeg" | "pdf" | "png" | "webp";
@@ -99,7 +103,7 @@ export declare const renderMediaSingleThread: (body: {
99
103
  renderStatusWebhook?: {
100
104
  url: string;
101
105
  headers: Record<string, string>;
102
- data?: any;
106
+ data: any;
103
107
  webhookProgressInterval?: number | null | undefined;
104
108
  } | null | undefined;
105
109
  }, res: ff.Response<any, Record<string, any>>) => Promise<void>;
@@ -11,7 +11,7 @@ const get_download_behavior_setting_1 = require("./helpers/get-download-behavior
11
11
  const write_cloudrun_error_1 = require("./helpers/write-cloudrun-error");
12
12
  const renderMediaSingleThread = async (body, res) => {
13
13
  var _a, _b, _c, _d, _e, _f;
14
- var _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z;
14
+ var _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1;
15
15
  if (body.type !== 'media') {
16
16
  throw new Error('expected type media');
17
17
  }
@@ -88,6 +88,8 @@ const renderMediaSingleThread = async (body, res) => {
88
88
  ...composition,
89
89
  height: (_p = body.forceHeight) !== null && _p !== void 0 ? _p : composition.height,
90
90
  width: (_q = body.forceWidth) !== null && _q !== void 0 ? _q : composition.width,
91
+ fps: (_r = body.forceFps) !== null && _r !== void 0 ? _r : composition.fps,
92
+ durationInFrames: (_s = body.forceDurationInFrames) !== null && _s !== void 0 ? _s : composition.durationInFrames,
91
93
  },
92
94
  serveUrl: body.serveUrl,
93
95
  codec: body.codec,
@@ -98,17 +100,17 @@ const renderMediaSingleThread = async (body, res) => {
98
100
  indent: undefined,
99
101
  staticBase: null,
100
102
  }).serializedString,
101
- jpegQuality: (_r = body.jpegQuality) !== null && _r !== void 0 ? _r : renderer_1.RenderInternals.DEFAULT_JPEG_QUALITY,
103
+ jpegQuality: (_t = body.jpegQuality) !== null && _t !== void 0 ? _t : renderer_1.RenderInternals.DEFAULT_JPEG_QUALITY,
102
104
  audioCodec: body.audioCodec,
103
- audioBitrate: (_s = body.audioBitrate) !== null && _s !== void 0 ? _s : null,
105
+ audioBitrate: (_u = body.audioBitrate) !== null && _u !== void 0 ? _u : null,
104
106
  videoBitrate: body.videoBitrate,
105
107
  encodingMaxRate: body.encodingMaxRate,
106
108
  encodingBufferSize: body.encodingBufferSize,
107
109
  crf: body.crf,
108
- pixelFormat: (_t = body.pixelFormat) !== null && _t !== void 0 ? _t : renderer_1.RenderInternals.DEFAULT_PIXEL_FORMAT,
109
- imageFormat: (_u = body.imageFormat) !== null && _u !== void 0 ? _u : renderer_1.RenderInternals.DEFAULT_VIDEO_IMAGE_FORMAT,
110
+ pixelFormat: (_v = body.pixelFormat) !== null && _v !== void 0 ? _v : renderer_1.RenderInternals.DEFAULT_PIXEL_FORMAT,
111
+ imageFormat: (_w = body.imageFormat) !== null && _w !== void 0 ? _w : renderer_1.RenderInternals.DEFAULT_VIDEO_IMAGE_FORMAT,
110
112
  scale: body.scale,
111
- proResProfile: (_v = body.proResProfile) !== null && _v !== void 0 ? _v : undefined,
113
+ proResProfile: (_x = body.proResProfile) !== null && _x !== void 0 ? _x : undefined,
112
114
  x264Preset: body.x264Preset,
113
115
  everyNthFrame: body.everyNthFrame,
114
116
  numberOfGifLoops: body.numberOfGifLoops,
@@ -119,9 +121,9 @@ const renderMediaSingleThread = async (body, res) => {
119
121
  muted: body.muted,
120
122
  logLevel: body.logLevel,
121
123
  browserExecutable: null,
122
- timeoutInMilliseconds: (_w = body.delayRenderTimeoutInMilliseconds) !== null && _w !== void 0 ? _w : renderer_1.RenderInternals.DEFAULT_TIMEOUT,
124
+ timeoutInMilliseconds: (_y = body.delayRenderTimeoutInMilliseconds) !== null && _y !== void 0 ? _y : renderer_1.RenderInternals.DEFAULT_TIMEOUT,
123
125
  cancelSignal: undefined,
124
- concurrency: (_x = body.concurrency) !== null && _x !== void 0 ? _x : null,
126
+ concurrency: (_z = body.concurrency) !== null && _z !== void 0 ? _z : null,
125
127
  disallowParallelEncoding: false,
126
128
  enforceAudioTrack: body.enforceAudioTrack,
127
129
  ffmpegOverride: undefined,
@@ -148,7 +150,7 @@ const renderMediaSingleThread = async (body, res) => {
148
150
  throw new Error('Should not download a browser in Cloud Run');
149
151
  },
150
152
  onArtifact,
151
- metadata: (_y = body.metadata) !== null && _y !== void 0 ? _y : null,
153
+ metadata: (_0 = body.metadata) !== null && _0 !== void 0 ? _0 : null,
152
154
  hardwareAcceleration: 'disable',
153
155
  chromeMode: 'headless-shell',
154
156
  onLog: renderer_1.RenderInternals.defaultOnLog,
@@ -160,7 +162,7 @@ const renderMediaSingleThread = async (body, res) => {
160
162
  const uploadedResponse = await storage
161
163
  .bucket(body.outputBucket)
162
164
  .upload(tempFilePath, {
163
- destination: `renders/${renderId}/${(_z = body.outName) !== null && _z !== void 0 ? _z : defaultOutName}`,
165
+ destination: `renders/${renderId}/${(_1 = body.outName) !== null && _1 !== void 0 ? _1 : defaultOutName}`,
164
166
  predefinedAcl: publicUpload ? 'publicRead' : 'projectPrivate',
165
167
  metadata: (0, get_download_behavior_setting_1.getDownloadBehaviorSetting)(body.downloadBehavior),
166
168
  });
@@ -5,6 +5,8 @@ export declare const renderStillSingleThread: (body: {
5
5
  composition: string;
6
6
  forceHeight?: number | null | undefined;
7
7
  forceWidth?: number | null | undefined;
8
+ forceFps?: number | null | undefined;
9
+ forceDurationInFrames?: number | null | undefined;
8
10
  codec: "aac" | "gif" | "h264" | "h264-mkv" | "h264-ts" | "h265" | "mp3" | "prores" | "vp8" | "vp9" | "wav";
9
11
  serializedInputPropsWithCustomSchema: string;
10
12
  jpegQuality: number | null;
@@ -21,7 +23,7 @@ export declare const renderStillSingleThread: (body: {
21
23
  x264Preset: "fast" | "faster" | "medium" | "placebo" | "slow" | "slower" | "superfast" | "ultrafast" | "veryfast" | "veryslow" | null;
22
24
  everyNthFrame: number;
23
25
  numberOfGifLoops: number | null;
24
- frameRange: ((number | [number, number | null]) & (number | [number, number | null] | undefined)) | null;
26
+ frameRange: number | [number, number | null] | null;
25
27
  envVariables: Record<string, string>;
26
28
  chromiumOptions?: {
27
29
  ignoreCertificateErrors?: boolean | undefined;
@@ -56,7 +58,7 @@ export declare const renderStillSingleThread: (body: {
56
58
  renderStatusWebhook?: {
57
59
  url: string;
58
60
  headers: Record<string, string>;
59
- data?: any;
61
+ data: any;
60
62
  webhookProgressInterval?: number | null | undefined;
61
63
  } | null | undefined;
62
64
  } | {
@@ -65,6 +67,8 @@ export declare const renderStillSingleThread: (body: {
65
67
  composition: string;
66
68
  forceHeight?: number | null | undefined;
67
69
  forceWidth?: number | null | undefined;
70
+ forceFps?: number | null | undefined;
71
+ forceDurationInFrames?: number | null | undefined;
68
72
  serializedInputPropsWithCustomSchema: string;
69
73
  jpegQuality?: number | undefined;
70
74
  imageFormat: "jpeg" | "pdf" | "png" | "webp";
@@ -99,7 +103,7 @@ export declare const renderStillSingleThread: (body: {
99
103
  renderStatusWebhook?: {
100
104
  url: string;
101
105
  headers: Record<string, string>;
102
- data?: any;
106
+ data: any;
103
107
  webhookProgressInterval?: number | null | undefined;
104
108
  } | null | undefined;
105
109
  }, res: ff.Response<any, Record<string, any>>) => Promise<void>;
@@ -12,7 +12,7 @@ const get_download_behavior_setting_1 = require("./helpers/get-download-behavior
12
12
  const write_cloudrun_error_1 = require("./helpers/write-cloudrun-error");
13
13
  const renderStillSingleThread = async (body, res) => {
14
14
  var _a, _b, _c, _d, _e, _f;
15
- var _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s;
15
+ var _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u;
16
16
  if (body.type !== 'still') {
17
17
  throw new Error('expected type still');
18
18
  }
@@ -44,6 +44,8 @@ const renderStillSingleThread = async (body, res) => {
44
44
  ...composition,
45
45
  height: (_p = body.forceHeight) !== null && _p !== void 0 ? _p : composition.height,
46
46
  width: (_q = body.forceWidth) !== null && _q !== void 0 ? _q : composition.width,
47
+ fps: (_r = body.forceFps) !== null && _r !== void 0 ? _r : composition.fps,
48
+ durationInFrames: (_s = body.forceDurationInFrames) !== null && _s !== void 0 ? _s : composition.durationInFrames,
47
49
  },
48
50
  serveUrl: body.serveUrl,
49
51
  output: tempFilePath,
@@ -53,7 +55,7 @@ const renderStillSingleThread = async (body, res) => {
53
55
  indent: undefined,
54
56
  staticBase: null,
55
57
  }).serializedString,
56
- jpegQuality: (_r = body.jpegQuality) !== null && _r !== void 0 ? _r : renderer_1.RenderInternals.DEFAULT_JPEG_QUALITY,
58
+ jpegQuality: (_t = body.jpegQuality) !== null && _t !== void 0 ? _t : renderer_1.RenderInternals.DEFAULT_JPEG_QUALITY,
57
59
  imageFormat: body.imageFormat,
58
60
  scale: body.scale,
59
61
  envVariables: body.envVariables,
@@ -91,7 +93,7 @@ const renderStillSingleThread = async (body, res) => {
91
93
  const uploadedResponse = await storage
92
94
  .bucket(body.outputBucket)
93
95
  .upload(tempFilePath, {
94
- destination: `renders/${renderId}/${(_s = body.outName) !== null && _s !== void 0 ? _s : 'out.png'}`,
96
+ destination: `renders/${renderId}/${(_u = body.outName) !== null && _u !== void 0 ? _u : 'out.png'}`,
95
97
  predefinedAcl: publicUpload ? 'publicRead' : 'projectPrivate',
96
98
  metadata: (0, get_download_behavior_setting_1.getDownloadBehaviorSetting)(body.downloadBehavior),
97
99
  });
package/dist/index.d.ts CHANGED
@@ -16,7 +16,7 @@ import type { GcpRegion } from './pricing/gcp-regions';
16
16
  /**
17
17
  * @deprecated Import this from `@remotion/cloudrun/client` instead
18
18
  */
19
- 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, offthreadVideoThreads, mediaCacheSizeInBytes, }: RenderMediaOnCloudrunInput) => Promise<{
19
+ 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, forceFps, forceDurationInFrames, logLevel, delayRenderTimeoutInMilliseconds, concurrency, enforceAudioTrack, preferLossless, offthreadVideoCacheSizeInBytes, colorSpace, downloadBehavior, metadata, renderIdOverride, renderStatusWebhook, offthreadVideoThreads, mediaCacheSizeInBytes, }: RenderMediaOnCloudrunInput) => Promise<{
20
20
  type: "success";
21
21
  publicUrl?: string | null | undefined;
22
22
  cloudStorageUri: string;
@@ -36,18 +36,6 @@ declare const renderMediaOnCloudrun: ({ cloudRunUrl, serviceName, region, serveU
36
36
  * @deprecated Import this from `@remotion/cloudrun/client` instead
37
37
  */
38
38
  declare const renderStillOnCloudrun: (options: import("./client").RenderStillOnCloudrunInput) => Promise<{
39
- type: "crash";
40
- cloudRunEndpoint: string;
41
- message: "Service crashed without sending a response. Check the logs in GCP console.";
42
- requestStartTime: string;
43
- requestCrashTime: string;
44
- requestElapsedTimeInSeconds: number;
45
- } | {
46
- type: "error";
47
- message: string;
48
- name: string;
49
- stack: string;
50
- } | {
51
39
  type: "success";
52
40
  publicUrl?: string | null | undefined;
53
41
  cloudStorageUri: string;
@@ -55,6 +43,18 @@ declare const renderStillOnCloudrun: (options: import("./client").RenderStillOnC
55
43
  bucketName: string;
56
44
  renderId: string;
57
45
  privacy: "project-private" | "public-read";
46
+ } | {
47
+ type: "error";
48
+ message: string;
49
+ name: string;
50
+ stack: string;
51
+ } | {
52
+ type: "crash";
53
+ cloudRunEndpoint: string;
54
+ message: "Service crashed without sending a response. Check the logs in GCP console.";
55
+ requestStartTime: string;
56
+ requestCrashTime: string;
57
+ requestElapsedTimeInSeconds: number;
58
58
  }>;
59
59
  /**
60
60
  * @deprecated Import this from `@remotion/lambda/client` instead
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.424",
6
+ "version": "4.0.426",
7
7
  "description": "Render Remotion videos on Google Cloud Run",
8
8
  "main": "dist/index.js",
9
9
  "sideEffects": false,
@@ -21,17 +21,17 @@
21
21
  "@google-cloud/storage": "7.15.2",
22
22
  "@google-cloud/resource-manager": "5.3.1",
23
23
  "@google-cloud/logging": "11.2.0",
24
- "@remotion/bundler": "4.0.424",
25
- "@remotion/cli": "4.0.424",
26
- "@remotion/renderer": "4.0.424",
24
+ "@remotion/bundler": "4.0.426",
25
+ "@remotion/cli": "4.0.426",
26
+ "@remotion/renderer": "4.0.426",
27
27
  "google-auth-library": "8.7.0",
28
- "remotion": "4.0.424",
29
- "zod": "3.22.3"
28
+ "remotion": "4.0.426",
29
+ "zod": "4.3.6"
30
30
  },
31
31
  "devDependencies": {
32
- "@remotion/compositor-linux-x64-gnu": "4.0.424",
32
+ "@remotion/compositor-linux-x64-gnu": "4.0.426",
33
33
  "@types/minimist": "1.2.2",
34
- "@remotion/eslint-config-internal": "4.0.424",
34
+ "@remotion/eslint-config-internal": "4.0.426",
35
35
  "eslint": "9.19.0",
36
36
  "@types/node": "20.12.14",
37
37
  "@typescript/native-preview": "7.0.0-dev.20260217.1"