@remotion/cloudrun 4.0.351 → 4.0.352
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.
- package/.turbo/turbo-make.log +1 -1
- package/dist/api/render-media-on-cloudrun.d.ts +2 -2
- package/dist/api/render-media-on-cloudrun.js +4 -2
- package/dist/api/render-still-on-cloudrun.js +4 -2
- package/dist/api/test/payloads.test.js +1 -0
- package/dist/cli/commands/render/index.js +6 -1
- package/dist/cli/commands/still.js +5 -1
- package/dist/functions/helpers/get-composition-from-body.js +1 -0
- package/dist/functions/helpers/payloads.d.ts +6 -0
- package/dist/functions/helpers/payloads.js +2 -0
- package/dist/functions/render-media-single-thread.js +1 -0
- package/dist/functions/render-still-single-thread.js +1 -0
- package/dist/index.d.ts +1 -1
- package/package.json +7 -7
package/.turbo/turbo-make.log
CHANGED
|
@@ -70,7 +70,7 @@ export type RenderMediaOnCloudrunInput = {
|
|
|
70
70
|
renderIdOverride?: z.infer<typeof CloudRunPayload>['renderIdOverride'];
|
|
71
71
|
renderStatusWebhook?: z.infer<typeof CloudRunPayload>['renderStatusWebhook'];
|
|
72
72
|
} & Partial<ToOptions<typeof BrowserSafeApis.optionsMap.renderMediaOnCloudRun>>;
|
|
73
|
-
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>;
|
|
73
|
+
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, mediaCacheSizeInBytes, }: InternalRenderMediaOnCloudrun) => Promise<RenderMediaOnCloudrunOutput | CloudRunCrashResponse>;
|
|
74
74
|
export declare const internalRenderMediaOnCloudrun: typeof internalRenderMediaOnCloudrunRaw;
|
|
75
|
-
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, offthreadVideoThreads, }: RenderMediaOnCloudrunInput) => Promise<RenderMediaOnCloudrunOutput | CloudRunCrashResponse>;
|
|
75
|
+
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, offthreadVideoThreads, mediaCacheSizeInBytes, }: RenderMediaOnCloudrunInput) => Promise<RenderMediaOnCloudrunOutput | CloudRunCrashResponse>;
|
|
76
76
|
export {};
|
|
@@ -11,7 +11,7 @@ const validate_serveurl_1 = require("../shared/validate-serveurl");
|
|
|
11
11
|
const get_or_create_bucket_1 = require("./get-or-create-bucket");
|
|
12
12
|
const get_auth_client_for_url_1 = require("./helpers/get-auth-client-for-url");
|
|
13
13
|
const get_cloudrun_endpoint_1 = require("./helpers/get-cloudrun-endpoint");
|
|
14
|
-
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
|
+
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, mediaCacheSizeInBytes, }) => {
|
|
15
15
|
const actualCodec = (0, validate_gcp_codec_1.validateCloudrunCodec)(codec);
|
|
16
16
|
(0, validate_serveurl_1.validateServeUrl)(serveUrl);
|
|
17
17
|
if (privacy)
|
|
@@ -68,6 +68,7 @@ const internalRenderMediaOnCloudrunRaw = async ({ cloudRunUrl, serviceName, regi
|
|
|
68
68
|
metadata: metadata !== null && metadata !== void 0 ? metadata : null,
|
|
69
69
|
renderIdOverride,
|
|
70
70
|
renderStatusWebhook,
|
|
71
|
+
mediaCacheSizeInBytes: mediaCacheSizeInBytes !== null && mediaCacheSizeInBytes !== void 0 ? mediaCacheSizeInBytes : null,
|
|
71
72
|
};
|
|
72
73
|
const client = await (0, get_auth_client_for_url_1.getAuthClientForUrl)(cloudRunEndpoint);
|
|
73
74
|
const postResponse = await client.request({
|
|
@@ -137,7 +138,7 @@ exports.internalRenderMediaOnCloudrun = (0, error_handling_1.wrapWithErrorHandli
|
|
|
137
138
|
* @description Initiates a media rendering process on the Remotion Cloud Run service, facilitating configurations like service region, project composition, and output settings.
|
|
138
139
|
* @see [Documentation](https://remotion.dev/docs/cloudrun/rendermediaoncloudrun)
|
|
139
140
|
*/
|
|
140
|
-
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, }) => {
|
|
141
|
+
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, }) => {
|
|
141
142
|
return (0, exports.internalRenderMediaOnCloudrun)({
|
|
142
143
|
cloudRunUrl: cloudRunUrl !== null && cloudRunUrl !== void 0 ? cloudRunUrl : undefined,
|
|
143
144
|
serviceName: serviceName !== null && serviceName !== void 0 ? serviceName : undefined,
|
|
@@ -185,6 +186,7 @@ const renderMediaOnCloudrun = ({ cloudRunUrl, serviceName, region, serveUrl, com
|
|
|
185
186
|
renderIdOverride: renderIdOverride !== null && renderIdOverride !== void 0 ? renderIdOverride : undefined,
|
|
186
187
|
renderStatusWebhook: renderStatusWebhook !== null && renderStatusWebhook !== void 0 ? renderStatusWebhook : undefined,
|
|
187
188
|
offthreadVideoThreads: offthreadVideoThreads !== null && offthreadVideoThreads !== void 0 ? offthreadVideoThreads : null,
|
|
189
|
+
mediaCacheSizeInBytes: mediaCacheSizeInBytes !== null && mediaCacheSizeInBytes !== void 0 ? mediaCacheSizeInBytes : null,
|
|
188
190
|
});
|
|
189
191
|
};
|
|
190
192
|
exports.renderMediaOnCloudrun = renderMediaOnCloudrun;
|
|
@@ -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, offthreadVideoThreads, 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, mediaCacheSizeInBytes, }) => {
|
|
39
39
|
(0, validate_serveurl_1.validateServeUrl)(serveUrl);
|
|
40
40
|
if (privacy)
|
|
41
41
|
(0, validate_privacy_1.validatePrivacy)(privacy);
|
|
@@ -73,6 +73,7 @@ const internalRenderStillOnCloudRun = async ({ cloudRunUrl, serviceName, region,
|
|
|
73
73
|
downloadBehavior,
|
|
74
74
|
renderIdOverride,
|
|
75
75
|
renderStatusWebhook,
|
|
76
|
+
mediaCacheSizeInBytes,
|
|
76
77
|
};
|
|
77
78
|
const client = await (0, get_auth_client_for_url_1.getAuthClientForUrl)(cloudRunEndpoint);
|
|
78
79
|
const postResponse = await client.request({
|
|
@@ -132,7 +133,7 @@ const internalRenderStillOnCloudRun = async ({ cloudRunUrl, serviceName, region,
|
|
|
132
133
|
};
|
|
133
134
|
const errorHandled = (0, error_handling_1.wrapWithErrorHandling)(internalRenderStillOnCloudRun);
|
|
134
135
|
const renderStillOnCloudrun = (options) => {
|
|
135
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w;
|
|
136
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x;
|
|
136
137
|
return errorHandled({
|
|
137
138
|
chromiumOptions: (_a = options.chromiumOptions) !== null && _a !== void 0 ? _a : {},
|
|
138
139
|
cloudRunUrl: (_b = options.cloudRunUrl) !== null && _b !== void 0 ? _b : null,
|
|
@@ -159,6 +160,7 @@ const renderStillOnCloudrun = (options) => {
|
|
|
159
160
|
downloadBehavior: (_u = options.downloadBehavior) !== null && _u !== void 0 ? _u : { type: 'play-in-browser' },
|
|
160
161
|
renderIdOverride: (_v = options.renderIdOverride) !== null && _v !== void 0 ? _v : undefined,
|
|
161
162
|
renderStatusWebhook: (_w = options.renderStatusWebhook) !== null && _w !== void 0 ? _w : undefined,
|
|
163
|
+
mediaCacheSizeInBytes: (_x = options.mediaCacheSizeInBytes) !== null && _x !== void 0 ? _x : null,
|
|
162
164
|
});
|
|
163
165
|
};
|
|
164
166
|
exports.renderStillOnCloudrun = renderStillOnCloudrun;
|
|
@@ -20,6 +20,7 @@ const payloads_1 = require("../../functions/helpers/payloads");
|
|
|
20
20
|
outName: null,
|
|
21
21
|
offthreadVideoCacheSizeInBytes: null,
|
|
22
22
|
offthreadVideoThreads: null,
|
|
23
|
+
mediaCacheSizeInBytes: null,
|
|
23
24
|
serializedInputPropsWithCustomSchema: JSON.stringify({}),
|
|
24
25
|
};
|
|
25
26
|
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, offthreadVideoThreadsOption, 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, mediaCacheSizeInBytesOption, } = client_1.BrowserSafeApis.options;
|
|
18
18
|
const renderCommand = async (args, remotionRoot, logLevel) => {
|
|
19
19
|
var _a, _b, _c, _d;
|
|
20
20
|
const { serveUrl, cloudRunUrl, outName, forceBucketName, downloadName, privacy, region, } = await (0, renderArgsCheck_1.renderArgsCheck)(exports.RENDER_COMMAND, args, logLevel);
|
|
@@ -53,6 +53,9 @@ const renderCommand = async (args, remotionRoot, logLevel) => {
|
|
|
53
53
|
const binariesDirectory = binariesDirectoryOption.getValue({
|
|
54
54
|
commandLine: cli_1.CliInternals.parsedCli,
|
|
55
55
|
}).value;
|
|
56
|
+
const mediaCacheSizeInBytes = mediaCacheSizeInBytesOption.getValue({
|
|
57
|
+
commandLine: cli_1.CliInternals.parsedCli,
|
|
58
|
+
}).value;
|
|
56
59
|
let composition = args[1];
|
|
57
60
|
const chromiumOptions = {
|
|
58
61
|
disableWebSecurity,
|
|
@@ -109,6 +112,7 @@ const renderCommand = async (args, remotionRoot, logLevel) => {
|
|
|
109
112
|
quiet: cli_1.CliInternals.quietFlagProvided(),
|
|
110
113
|
}),
|
|
111
114
|
chromeMode: 'headless-shell',
|
|
115
|
+
mediaCacheSizeInBytes,
|
|
112
116
|
});
|
|
113
117
|
composition = compositionId;
|
|
114
118
|
}
|
|
@@ -251,6 +255,7 @@ ${downloadName ? ` Downloaded File = ${downloadName}` : ''}
|
|
|
251
255
|
}
|
|
252
256
|
: null,
|
|
253
257
|
offthreadVideoThreads,
|
|
258
|
+
mediaCacheSizeInBytes,
|
|
254
259
|
});
|
|
255
260
|
if (res.type === 'crash') {
|
|
256
261
|
(0, cloudrun_crash_logs_1.displayCrashLogs)(res, logLevel);
|
|
@@ -13,7 +13,7 @@ const cloudrun_crash_logs_1 = require("../helpers/cloudrun-crash-logs");
|
|
|
13
13
|
const log_1 = require("../log");
|
|
14
14
|
const renderArgsCheck_1 = require("./render/helpers/renderArgsCheck");
|
|
15
15
|
exports.STILL_COMMAND = 'still';
|
|
16
|
-
const { offthreadVideoCacheSizeInBytesOption, scaleOption, jpegQualityOption, enableMultiprocessOnLinuxOption, glOption, delayRenderTimeoutInMillisecondsOption, headlessOption, binariesDirectoryOption, } = client_1.BrowserSafeApis.options;
|
|
16
|
+
const { offthreadVideoCacheSizeInBytesOption, scaleOption, jpegQualityOption, enableMultiprocessOnLinuxOption, glOption, delayRenderTimeoutInMillisecondsOption, headlessOption, binariesDirectoryOption, mediaCacheSizeInBytesOption, } = client_1.BrowserSafeApis.options;
|
|
17
17
|
const stillCommand = async (args, remotionRoot, logLevel) => {
|
|
18
18
|
var _a, _b;
|
|
19
19
|
const { serveUrl, cloudRunUrl, outName, forceBucketName, privacy, downloadName, region, } = await (0, renderArgsCheck_1.renderArgsCheck)(exports.STILL_COMMAND, args, logLevel);
|
|
@@ -47,6 +47,9 @@ const stillCommand = async (args, remotionRoot, logLevel) => {
|
|
|
47
47
|
const binariesDirectory = binariesDirectoryOption.getValue({
|
|
48
48
|
commandLine: cli_1.CliInternals.parsedCli,
|
|
49
49
|
}).value;
|
|
50
|
+
const mediaCacheSizeInBytes = mediaCacheSizeInBytesOption.getValue({
|
|
51
|
+
commandLine: cli_1.CliInternals.parsedCli,
|
|
52
|
+
}).value;
|
|
50
53
|
if (!composition) {
|
|
51
54
|
log_1.Log.info({ indent: false, logLevel }, 'No compositions passed. Fetching compositions...');
|
|
52
55
|
(0, validate_serveurl_1.validateServeUrl)(serveUrl);
|
|
@@ -94,6 +97,7 @@ const stillCommand = async (args, remotionRoot, logLevel) => {
|
|
|
94
97
|
}),
|
|
95
98
|
chromeMode: 'headless-shell',
|
|
96
99
|
offthreadVideoThreads: 1,
|
|
100
|
+
mediaCacheSizeInBytes,
|
|
97
101
|
});
|
|
98
102
|
composition = compositionId;
|
|
99
103
|
}
|
|
@@ -29,6 +29,7 @@ const getCompositionFromBody = async (body) => {
|
|
|
29
29
|
},
|
|
30
30
|
onServeUrlVisited: () => undefined,
|
|
31
31
|
chromeMode: 'headless-shell',
|
|
32
|
+
mediaCacheSizeInBytes: body.mediaCacheSizeInBytes,
|
|
32
33
|
});
|
|
33
34
|
if (propsSize > 10000000) {
|
|
34
35
|
renderer_1.RenderInternals.Log.warn({ indent: false, logLevel: body.logLevel }, `The props of your composition are large (${propsSize} bytes). This may cause slowdown.`);
|
|
@@ -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
|
+
mediaCacheSizeInBytes: z.ZodNullable<z.ZodNumber>;
|
|
72
73
|
offthreadVideoThreads: z.ZodNullable<z.ZodNumber>;
|
|
73
74
|
colorSpace: z.ZodNullable<z.ZodEnum<["default", "bt709", "bt2020-ncl"]>>;
|
|
74
75
|
clientVersion: z.ZodString;
|
|
@@ -136,6 +137,7 @@ export declare const CloudRunPayload: z.ZodDiscriminatedUnion<"type", [z.ZodObje
|
|
|
136
137
|
enforceAudioTrack: boolean;
|
|
137
138
|
preferLossless: boolean;
|
|
138
139
|
offthreadVideoCacheSizeInBytes: number | null;
|
|
140
|
+
mediaCacheSizeInBytes: number | null;
|
|
139
141
|
offthreadVideoThreads: number | null;
|
|
140
142
|
colorSpace: "default" | "bt709" | "bt2020-ncl" | null;
|
|
141
143
|
clientVersion: string;
|
|
@@ -194,6 +196,7 @@ export declare const CloudRunPayload: z.ZodDiscriminatedUnion<"type", [z.ZodObje
|
|
|
194
196
|
enforceAudioTrack: boolean;
|
|
195
197
|
preferLossless: boolean;
|
|
196
198
|
offthreadVideoCacheSizeInBytes: number | null;
|
|
199
|
+
mediaCacheSizeInBytes: number | null;
|
|
197
200
|
offthreadVideoThreads: number | null;
|
|
198
201
|
colorSpace: "default" | "bt709" | "bt2020-ncl" | null;
|
|
199
202
|
clientVersion: string;
|
|
@@ -258,6 +261,7 @@ export declare const CloudRunPayload: z.ZodDiscriminatedUnion<"type", [z.ZodObje
|
|
|
258
261
|
frame: z.ZodNumber;
|
|
259
262
|
delayRenderTimeoutInMilliseconds: z.ZodNumber;
|
|
260
263
|
logLevel: z.ZodEnum<["trace", "verbose", "info", "warn", "error"]>;
|
|
264
|
+
mediaCacheSizeInBytes: z.ZodNullable<z.ZodNumber>;
|
|
261
265
|
offthreadVideoCacheSizeInBytes: z.ZodNullable<z.ZodNumber>;
|
|
262
266
|
offthreadVideoThreads: z.ZodNullable<z.ZodNumber>;
|
|
263
267
|
clientVersion: z.ZodString;
|
|
@@ -309,6 +313,7 @@ export declare const CloudRunPayload: z.ZodDiscriminatedUnion<"type", [z.ZodObje
|
|
|
309
313
|
logLevel: "trace" | "verbose" | "info" | "warn" | "error";
|
|
310
314
|
delayRenderTimeoutInMilliseconds: number;
|
|
311
315
|
offthreadVideoCacheSizeInBytes: number | null;
|
|
316
|
+
mediaCacheSizeInBytes: number | null;
|
|
312
317
|
offthreadVideoThreads: number | null;
|
|
313
318
|
clientVersion: string;
|
|
314
319
|
downloadBehavior: {
|
|
@@ -350,6 +355,7 @@ export declare const CloudRunPayload: z.ZodDiscriminatedUnion<"type", [z.ZodObje
|
|
|
350
355
|
logLevel: "trace" | "verbose" | "info" | "warn" | "error";
|
|
351
356
|
delayRenderTimeoutInMilliseconds: number;
|
|
352
357
|
offthreadVideoCacheSizeInBytes: number | null;
|
|
358
|
+
mediaCacheSizeInBytes: number | null;
|
|
353
359
|
offthreadVideoThreads: number | null;
|
|
354
360
|
clientVersion: string;
|
|
355
361
|
downloadBehavior: {
|
|
@@ -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
|
+
mediaCacheSizeInBytes: zod_1.z.number().nullable(),
|
|
66
67
|
offthreadVideoThreads: zod_1.z.number().nullable(),
|
|
67
68
|
colorSpace: zod_1.z.enum(client_1.BrowserSafeApis.validColorSpaces).nullable(),
|
|
68
69
|
clientVersion: zod_1.z.string(),
|
|
@@ -97,6 +98,7 @@ exports.CloudRunPayload = zod_1.z.discriminatedUnion('type', [
|
|
|
97
98
|
frame: zod_1.z.number(),
|
|
98
99
|
delayRenderTimeoutInMilliseconds: zod_1.z.number(),
|
|
99
100
|
logLevel,
|
|
101
|
+
mediaCacheSizeInBytes: zod_1.z.number().nullable(),
|
|
100
102
|
offthreadVideoCacheSizeInBytes: zod_1.z.number().nullable(),
|
|
101
103
|
offthreadVideoThreads: zod_1.z.number().nullable(),
|
|
102
104
|
clientVersion: zod_1.z.string(),
|
|
@@ -130,6 +130,7 @@ const renderMediaSingleThread = async (body, res) => {
|
|
|
130
130
|
puppeteerInstance: undefined,
|
|
131
131
|
server: undefined,
|
|
132
132
|
offthreadVideoCacheSizeInBytes: body.offthreadVideoCacheSizeInBytes,
|
|
133
|
+
mediaCacheSizeInBytes: body.mediaCacheSizeInBytes,
|
|
133
134
|
offthreadVideoThreads: body.offthreadVideoThreads,
|
|
134
135
|
colorSpace: body.colorSpace,
|
|
135
136
|
repro: false,
|
|
@@ -74,6 +74,7 @@ const renderStillSingleThread = async (body, res) => {
|
|
|
74
74
|
throw new Error('Emitting artifacts is not supported in Cloud Run');
|
|
75
75
|
},
|
|
76
76
|
chromeMode: 'headless-shell',
|
|
77
|
+
mediaCacheSizeInBytes: body.mediaCacheSizeInBytes,
|
|
77
78
|
});
|
|
78
79
|
log_1.Log.info({ indent: false, logLevel: body.logLevel }, 'Still rendered');
|
|
79
80
|
const storage = new storage_1.Storage();
|
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, }: RenderMediaOnCloudrunInput) => Promise<RenderMediaOnCloudrunOutput | import("./functions/helpers/payloads").CloudRunCrashResponse>;
|
|
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<RenderMediaOnCloudrunOutput | import("./functions/helpers/payloads").CloudRunCrashResponse>;
|
|
20
20
|
/**
|
|
21
21
|
* @deprecated Import this from `@remotion/cloudrun/client` instead
|
|
22
22
|
*/
|
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.
|
|
6
|
+
"version": "4.0.352",
|
|
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.2.0",
|
|
17
17
|
"google-auth-library": "8.7.0",
|
|
18
18
|
"zod": "3.22.3",
|
|
19
|
-
"@remotion/
|
|
20
|
-
"remotion": "4.0.
|
|
21
|
-
"@remotion/
|
|
22
|
-
"
|
|
19
|
+
"@remotion/bundler": "4.0.352",
|
|
20
|
+
"@remotion/cli": "4.0.352",
|
|
21
|
+
"@remotion/renderer": "4.0.352",
|
|
22
|
+
"remotion": "4.0.352"
|
|
23
23
|
},
|
|
24
24
|
"devDependencies": {
|
|
25
25
|
"@types/minimist": "1.2.2",
|
|
26
26
|
"eslint": "9.19.0",
|
|
27
|
-
"@remotion/
|
|
28
|
-
"@remotion/
|
|
27
|
+
"@remotion/eslint-config-internal": "4.0.352",
|
|
28
|
+
"@remotion/compositor-linux-x64-gnu": "4.0.352"
|
|
29
29
|
},
|
|
30
30
|
"exports": {
|
|
31
31
|
"./package.json": "./package.json",
|