@remotion/cloudrun 4.0.539 → 4.0.541
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/dist/api/render-media-on-cloudrun.d.ts +4 -2
- package/dist/api/render-media-on-cloudrun.js +8 -2
- package/dist/api/render-still-on-cloudrun.d.ts +1 -0
- package/dist/api/render-still-on-cloudrun.js +8 -2
- package/dist/cli/commands/render/index.js +22 -4
- package/dist/cli/commands/still.js +11 -1
- package/dist/cli/help.js +6 -0
- package/dist/functions/helpers/get-composition-from-body.js +1 -0
- package/dist/functions/helpers/payloads.d.ts +16 -0
- package/dist/functions/helpers/payloads.js +6 -0
- package/dist/functions/render-media-single-thread.js +3 -2
- package/dist/functions/render-still-single-thread.js +4 -3
- package/package.json +8 -8
|
@@ -37,6 +37,7 @@ type InternalRenderMediaOnCloudrun = {
|
|
|
37
37
|
logLevel: LogLevel;
|
|
38
38
|
downloadBehavior: DownloadBehavior;
|
|
39
39
|
metadata?: Record<string, string> | null;
|
|
40
|
+
isProduction: boolean | null;
|
|
40
41
|
renderIdOverride: z.infer<typeof CloudRunPayload>['renderIdOverride'];
|
|
41
42
|
renderStatusWebhook: z.infer<typeof CloudRunPayload>['renderStatusWebhook'];
|
|
42
43
|
} & ToOptions<typeof BrowserSafeApis.optionsMap.renderMediaOnCloudRun>;
|
|
@@ -72,10 +73,11 @@ export type RenderMediaOnCloudrunInput = {
|
|
|
72
73
|
preferLossless?: boolean;
|
|
73
74
|
downloadBehavior?: DownloadBehavior;
|
|
74
75
|
metadata?: Record<string, string> | null;
|
|
76
|
+
isProduction?: boolean;
|
|
75
77
|
renderIdOverride?: z.infer<typeof CloudRunPayload>['renderIdOverride'];
|
|
76
78
|
renderStatusWebhook?: z.infer<typeof CloudRunPayload>['renderStatusWebhook'];
|
|
77
79
|
} & Partial<ToOptions<typeof BrowserSafeApis.optionsMap.renderMediaOnCloudRun>>;
|
|
78
|
-
declare const internalRenderMediaOnCloudrunRaw: ({ cloudRunUrl, serviceName, region, serveUrl, composition, inputProps, codec, forceBucketName, privacy, outName, updateRenderProgress, renderIdOverride, renderStatusWebhook, jpegQuality, audioCodec, audioBitrate, videoBitrate, encodingMaxRate, encodingBufferSize, proResProfile, x264Preset, gopSize, disableSharedMemoryCapture, crf, pixelFormat, imageFormat, scale, everyNthFrame, numberOfGifLoops, frameRange, envVariables, chromiumOptions, muted, forceWidth, forceHeight, forceFps, forceDurationInFrames, logLevel, delayRenderTimeoutInMilliseconds, concurrency, enforceAudioTrack, preferLossless, offthreadVideoCacheSizeInBytes, offthreadVideoThreads, colorSpace, downloadBehavior, metadata, mediaCacheSizeInBytes, sampleRate, }: InternalRenderMediaOnCloudrun) => Promise<RenderMediaOnCloudrunOutput | CloudRunCrashResponse>;
|
|
80
|
+
declare const internalRenderMediaOnCloudrunRaw: ({ cloudRunUrl, serviceName, region, serveUrl, composition, inputProps, codec, forceBucketName, privacy, outName, updateRenderProgress, renderIdOverride, renderStatusWebhook, jpegQuality, audioCodec, audioBitrate, videoBitrate, encodingMaxRate, encodingBufferSize, proResProfile, x264Preset, gopSize, disableSharedMemoryCapture, crf, pixelFormat, imageFormat, scale, everyNthFrame, numberOfGifLoops, frameRange, envVariables, chromiumOptions, muted, forceWidth, forceHeight, forceFps, forceDurationInFrames, logLevel, delayRenderTimeoutInMilliseconds, concurrency, enforceAudioTrack, preferLossless, offthreadVideoCacheSizeInBytes, offthreadVideoThreads, colorSpace, downloadBehavior, metadata, mediaCacheSizeInBytes, preferredEffectBackend, sampleRate, licenseKey, isProduction, }: InternalRenderMediaOnCloudrun) => Promise<RenderMediaOnCloudrunOutput | CloudRunCrashResponse>;
|
|
79
81
|
export declare const internalRenderMediaOnCloudrun: typeof internalRenderMediaOnCloudrunRaw;
|
|
80
|
-
export declare const renderMediaOnCloudrun: ({ cloudRunUrl, serviceName, region, serveUrl, composition, inputProps, codec, forceBucketName, privacy, outName, updateRenderProgress, jpegQuality, audioCodec, audioBitrate, videoBitrate, encodingMaxRate, encodingBufferSize, proResProfile, x264Preset, gopSize, disableSharedMemoryCapture, 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, sampleRate, }: RenderMediaOnCloudrunInput) => Promise<RenderMediaOnCloudrunOutput | CloudRunCrashResponse>;
|
|
82
|
+
export declare const renderMediaOnCloudrun: ({ cloudRunUrl, serviceName, region, serveUrl, composition, inputProps, codec, forceBucketName, privacy, outName, updateRenderProgress, jpegQuality, audioCodec, audioBitrate, videoBitrate, encodingMaxRate, encodingBufferSize, proResProfile, x264Preset, gopSize, disableSharedMemoryCapture, 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, preferredEffectBackend, sampleRate, licenseKey, isProduction, }: RenderMediaOnCloudrunInput) => Promise<RenderMediaOnCloudrunOutput | CloudRunCrashResponse>;
|
|
81
83
|
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, gopSize, disableSharedMemoryCapture, crf, pixelFormat, imageFormat, scale, everyNthFrame, numberOfGifLoops, frameRange, envVariables, chromiumOptions, muted, forceWidth, forceHeight, forceFps, forceDurationInFrames, logLevel, delayRenderTimeoutInMilliseconds, concurrency, enforceAudioTrack, preferLossless, offthreadVideoCacheSizeInBytes, offthreadVideoThreads, colorSpace, downloadBehavior, metadata, mediaCacheSizeInBytes, sampleRate, }) => {
|
|
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, gopSize, disableSharedMemoryCapture, crf, pixelFormat, imageFormat, scale, everyNthFrame, numberOfGifLoops, frameRange, envVariables, chromiumOptions, muted, forceWidth, forceHeight, forceFps, forceDurationInFrames, logLevel, delayRenderTimeoutInMilliseconds, concurrency, enforceAudioTrack, preferLossless, offthreadVideoCacheSizeInBytes, offthreadVideoThreads, colorSpace, downloadBehavior, metadata, mediaCacheSizeInBytes, preferredEffectBackend, sampleRate, licenseKey, isProduction, }) => {
|
|
15
15
|
const actualCodec = (0, validate_gcp_codec_1.validateCloudrunCodec)(codec);
|
|
16
16
|
(0, validate_serveurl_1.validateServeUrl)(serveUrl);
|
|
17
17
|
if (privacy)
|
|
@@ -74,6 +74,9 @@ const internalRenderMediaOnCloudrunRaw = async ({ cloudRunUrl, serviceName, regi
|
|
|
74
74
|
renderIdOverride,
|
|
75
75
|
renderStatusWebhook,
|
|
76
76
|
mediaCacheSizeInBytes: mediaCacheSizeInBytes !== null && mediaCacheSizeInBytes !== void 0 ? mediaCacheSizeInBytes : null,
|
|
77
|
+
preferredEffectBackend: preferredEffectBackend !== null && preferredEffectBackend !== void 0 ? preferredEffectBackend : 'auto',
|
|
78
|
+
licenseKey,
|
|
79
|
+
isProduction,
|
|
77
80
|
};
|
|
78
81
|
const client = await (0, get_auth_client_for_url_1.getAuthClientForUrl)(cloudRunEndpoint);
|
|
79
82
|
const postResponse = await client.request({
|
|
@@ -142,7 +145,7 @@ exports.internalRenderMediaOnCloudrun = (0, error_handling_1.wrapWithErrorHandli
|
|
|
142
145
|
* @description Initiates a media rendering process on the Remotion Cloud Run service, facilitating configurations like service region, project composition, and output settings.
|
|
143
146
|
* @see [Documentation](https://remotion.dev/docs/cloudrun/rendermediaoncloudrun)
|
|
144
147
|
*/
|
|
145
|
-
const renderMediaOnCloudrun = ({ cloudRunUrl, serviceName, region, serveUrl, composition, inputProps, codec, forceBucketName, privacy, outName, updateRenderProgress, jpegQuality, audioCodec, audioBitrate, videoBitrate, encodingMaxRate, encodingBufferSize, proResProfile, x264Preset, gopSize, disableSharedMemoryCapture, 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, sampleRate, }) => {
|
|
148
|
+
const renderMediaOnCloudrun = ({ cloudRunUrl, serviceName, region, serveUrl, composition, inputProps, codec, forceBucketName, privacy, outName, updateRenderProgress, jpegQuality, audioCodec, audioBitrate, videoBitrate, encodingMaxRate, encodingBufferSize, proResProfile, x264Preset, gopSize, disableSharedMemoryCapture, 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, preferredEffectBackend, sampleRate, licenseKey, isProduction, }) => {
|
|
146
149
|
if (Array.isArray(frameRange) && Array.isArray(frameRange[0])) {
|
|
147
150
|
throw new Error('Multiple frame ranges are not supported on Cloud Run. Use renderMedia() locally to render multiple ranges.');
|
|
148
151
|
}
|
|
@@ -198,7 +201,10 @@ const renderMediaOnCloudrun = ({ cloudRunUrl, serviceName, region, serveUrl, com
|
|
|
198
201
|
renderStatusWebhook: renderStatusWebhook !== null && renderStatusWebhook !== void 0 ? renderStatusWebhook : undefined,
|
|
199
202
|
offthreadVideoThreads: offthreadVideoThreads !== null && offthreadVideoThreads !== void 0 ? offthreadVideoThreads : null,
|
|
200
203
|
mediaCacheSizeInBytes: mediaCacheSizeInBytes !== null && mediaCacheSizeInBytes !== void 0 ? mediaCacheSizeInBytes : null,
|
|
204
|
+
preferredEffectBackend: preferredEffectBackend !== null && preferredEffectBackend !== void 0 ? preferredEffectBackend : 'auto',
|
|
201
205
|
sampleRate: sampleRate !== null && sampleRate !== void 0 ? sampleRate : 48000,
|
|
206
|
+
licenseKey: licenseKey !== null && licenseKey !== void 0 ? licenseKey : null,
|
|
207
|
+
isProduction: isProduction !== null && isProduction !== void 0 ? isProduction : null,
|
|
202
208
|
});
|
|
203
209
|
};
|
|
204
210
|
exports.renderMediaOnCloudrun = renderMediaOnCloudrun;
|
|
@@ -25,6 +25,7 @@ type OptionalParameters = {
|
|
|
25
25
|
forceFps: number | null;
|
|
26
26
|
forceDurationInFrames: number | null;
|
|
27
27
|
indent: boolean;
|
|
28
|
+
isProduction: boolean | null;
|
|
28
29
|
downloadBehavior: DownloadBehavior;
|
|
29
30
|
renderIdOverride: z.infer<typeof CloudRunPayload>['renderIdOverride'];
|
|
30
31
|
renderStatusWebhook: z.infer<typeof CloudRunPayload>['renderStatusWebhook'];
|
|
@@ -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, forceFps, forceDurationInFrames, logLevel, delayRenderTimeoutInMilliseconds, offthreadVideoCacheSizeInBytes, offthreadVideoThreads, downloadBehavior, renderIdOverride, renderStatusWebhook, mediaCacheSizeInBytes, }) => {
|
|
38
|
+
const internalRenderStillOnCloudRun = async ({ cloudRunUrl, serviceName, region, serveUrl, composition, inputProps, forceBucketName, privacy, outName, imageFormat, envVariables, frame, jpegQuality, chromiumOptions, scale, forceWidth, forceHeight, forceFps, forceDurationInFrames, logLevel, delayRenderTimeoutInMilliseconds, offthreadVideoCacheSizeInBytes, offthreadVideoThreads, downloadBehavior, renderIdOverride, renderStatusWebhook, mediaCacheSizeInBytes, preferredEffectBackend, licenseKey, isProduction, }) => {
|
|
39
39
|
(0, validate_serveurl_1.validateServeUrl)(serveUrl);
|
|
40
40
|
if (privacy)
|
|
41
41
|
(0, validate_privacy_1.validatePrivacy)(privacy);
|
|
@@ -76,6 +76,9 @@ const internalRenderStillOnCloudRun = async ({ cloudRunUrl, serviceName, region,
|
|
|
76
76
|
renderIdOverride,
|
|
77
77
|
renderStatusWebhook,
|
|
78
78
|
mediaCacheSizeInBytes,
|
|
79
|
+
preferredEffectBackend,
|
|
80
|
+
licenseKey,
|
|
81
|
+
isProduction,
|
|
79
82
|
};
|
|
80
83
|
const client = await (0, get_auth_client_for_url_1.getAuthClientForUrl)(cloudRunEndpoint);
|
|
81
84
|
const postResponse = await client.request({
|
|
@@ -135,7 +138,7 @@ const internalRenderStillOnCloudRun = async ({ cloudRunUrl, serviceName, region,
|
|
|
135
138
|
};
|
|
136
139
|
const errorHandled = (0, error_handling_1.wrapWithErrorHandling)(internalRenderStillOnCloudRun);
|
|
137
140
|
const renderStillOnCloudrun = (options) => {
|
|
138
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z;
|
|
141
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2;
|
|
139
142
|
return errorHandled({
|
|
140
143
|
chromiumOptions: (_a = options.chromiumOptions) !== null && _a !== void 0 ? _a : {},
|
|
141
144
|
cloudRunUrl: (_b = options.cloudRunUrl) !== null && _b !== void 0 ? _b : null,
|
|
@@ -165,6 +168,9 @@ const renderStillOnCloudrun = (options) => {
|
|
|
165
168
|
renderIdOverride: (_x = options.renderIdOverride) !== null && _x !== void 0 ? _x : undefined,
|
|
166
169
|
renderStatusWebhook: (_y = options.renderStatusWebhook) !== null && _y !== void 0 ? _y : undefined,
|
|
167
170
|
mediaCacheSizeInBytes: (_z = options.mediaCacheSizeInBytes) !== null && _z !== void 0 ? _z : null,
|
|
171
|
+
preferredEffectBackend: (_0 = options.preferredEffectBackend) !== null && _0 !== void 0 ? _0 : 'auto',
|
|
172
|
+
licenseKey: (_1 = options.licenseKey) !== null && _1 !== void 0 ? _1 : null,
|
|
173
|
+
isProduction: (_2 = options.isProduction) !== null && _2 !== void 0 ? _2 : null,
|
|
168
174
|
});
|
|
169
175
|
};
|
|
170
176
|
exports.renderStillOnCloudrun = renderStillOnCloudrun;
|
|
@@ -16,7 +16,7 @@ const command_names_1 = require("../command-names");
|
|
|
16
16
|
const renderArgsCheck_1 = require("./helpers/renderArgsCheck");
|
|
17
17
|
var command_names_2 = require("../command-names");
|
|
18
18
|
Object.defineProperty(exports, "RENDER_COMMAND", { enumerable: true, get: function () { return command_names_2.RENDER_COMMAND; } });
|
|
19
|
-
const { audioBitrateOption, x264Option, offthreadVideoCacheSizeInBytesOption, offthreadVideoThreadsOption, scaleOption, crfOption, gopSizeOption, disableSharedMemoryCaptureOption, jpegQualityOption, videoBitrateOption, enforceAudioOption, mutedOption, colorSpaceOption, numberOfGifLoopsOption, enableMultiprocessOnLinuxOption, glOption, headlessOption, encodingMaxRateOption, encodingBufferSizeOption, delayRenderTimeoutInMillisecondsOption, binariesDirectoryOption, metadataOption, mediaCacheSizeInBytesOption, darkModeOption, pixelFormatOption, browserExecutableOption, everyNthFrameOption, proResProfileOption, userAgentOption, disableWebSecurityOption, ignoreCertificateErrorsOption, overrideHeightOption, overrideWidthOption, overrideFpsOption, overrideDurationOption, sampleRateOption, concurrencyOption, } = client_1.BrowserSafeApis.options;
|
|
19
|
+
const { audioBitrateOption, x264Option, offthreadVideoCacheSizeInBytesOption, offthreadVideoThreadsOption, scaleOption, crfOption, gopSizeOption, disableSharedMemoryCaptureOption, jpegQualityOption, videoBitrateOption, enforceAudioOption, mutedOption, colorSpaceOption, numberOfGifLoopsOption, enableMultiprocessOnLinuxOption, glOption, headlessOption, encodingMaxRateOption, encodingBufferSizeOption, delayRenderTimeoutInMillisecondsOption, binariesDirectoryOption, metadataOption, mediaCacheSizeInBytesOption, preferredEffectBackendOption, darkModeOption, pixelFormatOption, browserExecutableOption, everyNthFrameOption, proResProfileOption, userAgentOption, disableWebSecurityOption, ignoreCertificateErrorsOption, overrideHeightOption, overrideWidthOption, overrideFpsOption, overrideDurationOption, sampleRateOption, concurrencyOption, } = client_1.BrowserSafeApis.options;
|
|
20
20
|
const renderCommand = async (args, remotionRoot, logLevel) => {
|
|
21
21
|
var _a, _b, _c;
|
|
22
22
|
const { serveUrl, cloudRunUrl, outName, forceBucketName, downloadName, privacy, region, } = await (0, renderArgsCheck_1.renderArgsCheck)(command_names_1.RENDER_COMMAND, args, logLevel);
|
|
@@ -103,6 +103,9 @@ const renderCommand = async (args, remotionRoot, logLevel) => {
|
|
|
103
103
|
const mediaCacheSizeInBytes = mediaCacheSizeInBytesOption.getValue({
|
|
104
104
|
commandLine: cli_1.CliInternals.parsedCli,
|
|
105
105
|
}).value;
|
|
106
|
+
const preferredEffectBackend = preferredEffectBackendOption.getValue({
|
|
107
|
+
commandLine: cli_1.CliInternals.parsedCli,
|
|
108
|
+
}).value;
|
|
106
109
|
const darkMode = darkModeOption.getValue({
|
|
107
110
|
commandLine: cli_1.CliInternals.parsedCli,
|
|
108
111
|
}).value;
|
|
@@ -168,6 +171,7 @@ const renderCommand = async (args, remotionRoot, logLevel) => {
|
|
|
168
171
|
}),
|
|
169
172
|
chromeMode: 'headless-shell',
|
|
170
173
|
mediaCacheSizeInBytes,
|
|
174
|
+
preferredEffectBackend,
|
|
171
175
|
});
|
|
172
176
|
composition = compositionId;
|
|
173
177
|
}
|
|
@@ -227,9 +231,16 @@ ${downloadName ? ` Downloaded File = ${downloadName}` : ''}
|
|
|
227
231
|
const scale = scaleOption.getValue({
|
|
228
232
|
commandLine: cli_1.CliInternals.parsedCli,
|
|
229
233
|
}).value;
|
|
230
|
-
const
|
|
234
|
+
const crfSetting = crfOption.getValue({
|
|
231
235
|
commandLine: cli_1.CliInternals.parsedCli,
|
|
232
|
-
})
|
|
236
|
+
});
|
|
237
|
+
const crf = cli_1.CliInternals.getCrfForCodec({
|
|
238
|
+
crf: crfSetting.value,
|
|
239
|
+
crfIsFromConfigFile: crfSetting.source === 'config',
|
|
240
|
+
codec,
|
|
241
|
+
indent: false,
|
|
242
|
+
logLevel,
|
|
243
|
+
});
|
|
233
244
|
const disableSharedMemoryCapture = disableSharedMemoryCaptureOption.getValue({
|
|
234
245
|
commandLine: cli_1.CliInternals.parsedCli,
|
|
235
246
|
}).value;
|
|
@@ -288,7 +299,7 @@ ${downloadName ? ` Downloaded File = ${downloadName}` : ''}
|
|
|
288
299
|
x264Preset,
|
|
289
300
|
gopSize,
|
|
290
301
|
disableSharedMemoryCapture,
|
|
291
|
-
crf,
|
|
302
|
+
crf: crf !== null && crf !== void 0 ? crf : undefined,
|
|
292
303
|
pixelFormat,
|
|
293
304
|
imageFormat: imageFormat !== null && imageFormat !== void 0 ? imageFormat : undefined,
|
|
294
305
|
scale,
|
|
@@ -325,7 +336,14 @@ ${downloadName ? ` Downloaded File = ${downloadName}` : ''}
|
|
|
325
336
|
: null,
|
|
326
337
|
offthreadVideoThreads,
|
|
327
338
|
mediaCacheSizeInBytes,
|
|
339
|
+
preferredEffectBackend,
|
|
328
340
|
sampleRate,
|
|
341
|
+
licenseKey: client_1.BrowserSafeApis.options.licenseKeyOption.getValue({
|
|
342
|
+
commandLine: cli_1.CliInternals.parsedCli,
|
|
343
|
+
}).value,
|
|
344
|
+
isProduction: client_1.BrowserSafeApis.options.isProductionOption.getValue({
|
|
345
|
+
commandLine: cli_1.CliInternals.parsedCli,
|
|
346
|
+
}).value,
|
|
329
347
|
});
|
|
330
348
|
if (res.type === 'crash') {
|
|
331
349
|
(0, cloudrun_crash_logs_1.displayCrashLogs)(res, logLevel);
|
|
@@ -15,7 +15,7 @@ const command_names_1 = require("./command-names");
|
|
|
15
15
|
const renderArgsCheck_1 = require("./render/helpers/renderArgsCheck");
|
|
16
16
|
var command_names_2 = require("./command-names");
|
|
17
17
|
Object.defineProperty(exports, "STILL_COMMAND", { enumerable: true, get: function () { return command_names_2.STILL_COMMAND; } });
|
|
18
|
-
const { offthreadVideoCacheSizeInBytesOption, scaleOption, jpegQualityOption, enableMultiprocessOnLinuxOption, glOption, delayRenderTimeoutInMillisecondsOption, headlessOption, binariesDirectoryOption, mediaCacheSizeInBytesOption, darkModeOption, browserExecutableOption, userAgentOption, disableWebSecurityOption, ignoreCertificateErrorsOption, overrideHeightOption, overrideWidthOption, overrideFpsOption, overrideDurationOption, } = client_1.BrowserSafeApis.options;
|
|
18
|
+
const { offthreadVideoCacheSizeInBytesOption, scaleOption, jpegQualityOption, enableMultiprocessOnLinuxOption, glOption, delayRenderTimeoutInMillisecondsOption, headlessOption, binariesDirectoryOption, mediaCacheSizeInBytesOption, preferredEffectBackendOption, darkModeOption, browserExecutableOption, userAgentOption, disableWebSecurityOption, ignoreCertificateErrorsOption, overrideHeightOption, overrideWidthOption, overrideFpsOption, overrideDurationOption, } = client_1.BrowserSafeApis.options;
|
|
19
19
|
const stillCommand = async (args, remotionRoot, logLevel) => {
|
|
20
20
|
const { serveUrl, cloudRunUrl, outName, forceBucketName, privacy, downloadName, region, } = await (0, renderArgsCheck_1.renderArgsCheck)(command_names_1.STILL_COMMAND, args, logLevel);
|
|
21
21
|
const { envVariables, inputProps, stillFrame } = cli_1.CliInternals.getCliOptions({
|
|
@@ -79,6 +79,9 @@ const stillCommand = async (args, remotionRoot, logLevel) => {
|
|
|
79
79
|
const mediaCacheSizeInBytes = mediaCacheSizeInBytesOption.getValue({
|
|
80
80
|
commandLine: cli_1.CliInternals.parsedCli,
|
|
81
81
|
}).value;
|
|
82
|
+
const preferredEffectBackend = preferredEffectBackendOption.getValue({
|
|
83
|
+
commandLine: cli_1.CliInternals.parsedCli,
|
|
84
|
+
}).value;
|
|
82
85
|
if (!composition) {
|
|
83
86
|
log_1.Log.info({ indent: false, logLevel }, 'No compositions passed. Fetching compositions...');
|
|
84
87
|
(0, validate_serveurl_1.validateServeUrl)(serveUrl);
|
|
@@ -131,6 +134,7 @@ const stillCommand = async (args, remotionRoot, logLevel) => {
|
|
|
131
134
|
chromeMode: 'headless-shell',
|
|
132
135
|
offthreadVideoThreads: 1,
|
|
133
136
|
mediaCacheSizeInBytes,
|
|
137
|
+
preferredEffectBackend,
|
|
134
138
|
});
|
|
135
139
|
composition = compositionId;
|
|
136
140
|
}
|
|
@@ -199,6 +203,12 @@ ${downloadName ? ` Downloaded File = ${downloadName}` : ''}
|
|
|
199
203
|
outName,
|
|
200
204
|
logLevel,
|
|
201
205
|
delayRenderTimeoutInMilliseconds: puppeteerTimeout,
|
|
206
|
+
licenseKey: client_1.BrowserSafeApis.options.licenseKeyOption.getValue({
|
|
207
|
+
commandLine: cli_1.CliInternals.parsedCli,
|
|
208
|
+
}).value,
|
|
209
|
+
isProduction: client_1.BrowserSafeApis.options.isProductionOption.getValue({
|
|
210
|
+
commandLine: cli_1.CliInternals.parsedCli,
|
|
211
|
+
}).value,
|
|
202
212
|
});
|
|
203
213
|
if (res.type === 'crash') {
|
|
204
214
|
(0, cloudrun_crash_logs_1.displayCrashLogs)(res, logLevel);
|
package/dist/cli/help.js
CHANGED
|
@@ -162,11 +162,14 @@ const renderOptions = options([
|
|
|
162
162
|
'enforce-audio-track',
|
|
163
163
|
'quiet',
|
|
164
164
|
'media-cache-size-in-bytes',
|
|
165
|
+
'preferred-effect-backend',
|
|
165
166
|
'offthreadvideo-cache-size-in-bytes',
|
|
166
167
|
'offthreadvideo-video-threads',
|
|
167
168
|
'color-space',
|
|
168
169
|
'metadata',
|
|
169
170
|
'sample-rate',
|
|
171
|
+
'license-key',
|
|
172
|
+
'is-production',
|
|
170
173
|
], {
|
|
171
174
|
'image-format': 'Video Image Format',
|
|
172
175
|
port: 'Set the local server port when no composition ID is passed.',
|
|
@@ -222,7 +225,10 @@ exports.cloudrunCommandHelp = [
|
|
|
222
225
|
'binaries-directory',
|
|
223
226
|
'quiet',
|
|
224
227
|
'media-cache-size-in-bytes',
|
|
228
|
+
'preferred-effect-backend',
|
|
225
229
|
'offthreadvideo-cache-size-in-bytes',
|
|
230
|
+
'license-key',
|
|
231
|
+
'is-production',
|
|
226
232
|
], {
|
|
227
233
|
port: 'Set the local server port when no composition ID is passed.',
|
|
228
234
|
}, 'still'),
|
|
@@ -30,6 +30,7 @@ const getCompositionFromBody = async (body) => {
|
|
|
30
30
|
onServeUrlVisited: () => undefined,
|
|
31
31
|
chromeMode: 'headless-shell',
|
|
32
32
|
mediaCacheSizeInBytes: body.mediaCacheSizeInBytes,
|
|
33
|
+
preferredEffectBackend: body.preferredEffectBackend,
|
|
33
34
|
});
|
|
34
35
|
if (propsSize > 10000000) {
|
|
35
36
|
renderer_1.RenderInternals.Log.warn({ indent: false, logLevel: body.logLevel }, `The props of your composition are large (${propsSize} bytes). This may cause slowdown.`);
|
|
@@ -120,6 +120,12 @@ export declare const CloudRunPayload: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
120
120
|
sampleRate: z.ZodNumber;
|
|
121
121
|
offthreadVideoCacheSizeInBytes: z.ZodNullable<z.ZodNumber>;
|
|
122
122
|
mediaCacheSizeInBytes: z.ZodNullable<z.ZodNumber>;
|
|
123
|
+
preferredEffectBackend: z.ZodEnum<{
|
|
124
|
+
"2d": "2d";
|
|
125
|
+
auto: "auto";
|
|
126
|
+
webgl2: "webgl2";
|
|
127
|
+
webgpu: "webgpu";
|
|
128
|
+
}>;
|
|
123
129
|
offthreadVideoThreads: z.ZodNullable<z.ZodNumber>;
|
|
124
130
|
colorSpace: z.ZodNullable<z.ZodEnum<{
|
|
125
131
|
"bt2020-ncl": "bt2020-ncl";
|
|
@@ -128,6 +134,8 @@ export declare const CloudRunPayload: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
128
134
|
default: "default";
|
|
129
135
|
}>>;
|
|
130
136
|
clientVersion: z.ZodString;
|
|
137
|
+
licenseKey: z.ZodDefault<z.ZodNullable<z.ZodString>>;
|
|
138
|
+
isProduction: z.ZodDefault<z.ZodNullable<z.ZodBoolean>>;
|
|
131
139
|
downloadBehavior: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
132
140
|
type: z.ZodLiteral<"play-in-browser">;
|
|
133
141
|
}, z.core.$strip>, z.ZodObject<{
|
|
@@ -192,9 +200,17 @@ export declare const CloudRunPayload: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
192
200
|
warn: "warn";
|
|
193
201
|
}>;
|
|
194
202
|
mediaCacheSizeInBytes: z.ZodNullable<z.ZodNumber>;
|
|
203
|
+
preferredEffectBackend: z.ZodEnum<{
|
|
204
|
+
"2d": "2d";
|
|
205
|
+
auto: "auto";
|
|
206
|
+
webgl2: "webgl2";
|
|
207
|
+
webgpu: "webgpu";
|
|
208
|
+
}>;
|
|
195
209
|
offthreadVideoCacheSizeInBytes: z.ZodNullable<z.ZodNumber>;
|
|
196
210
|
offthreadVideoThreads: z.ZodNullable<z.ZodNumber>;
|
|
197
211
|
clientVersion: z.ZodString;
|
|
212
|
+
licenseKey: z.ZodDefault<z.ZodNullable<z.ZodString>>;
|
|
213
|
+
isProduction: z.ZodDefault<z.ZodNullable<z.ZodBoolean>>;
|
|
198
214
|
downloadBehavior: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
199
215
|
type: z.ZodLiteral<"play-in-browser">;
|
|
200
216
|
}, z.core.$strip>, z.ZodObject<{
|
|
@@ -73,9 +73,12 @@ exports.CloudRunPayload = zod_1.z.discriminatedUnion('type', [
|
|
|
73
73
|
sampleRate: zod_1.z.number(),
|
|
74
74
|
offthreadVideoCacheSizeInBytes: zod_1.z.number().nullable(),
|
|
75
75
|
mediaCacheSizeInBytes: zod_1.z.number().nullable(),
|
|
76
|
+
preferredEffectBackend: zod_1.z.enum(['auto', 'webgpu', 'webgl2', '2d']),
|
|
76
77
|
offthreadVideoThreads: zod_1.z.number().nullable(),
|
|
77
78
|
colorSpace: zod_1.z.enum(client_1.BrowserSafeApis.validColorSpaces).nullable(),
|
|
78
79
|
clientVersion: zod_1.z.string(),
|
|
80
|
+
licenseKey: zod_1.z.string().nullable().default(null),
|
|
81
|
+
isProduction: zod_1.z.boolean().nullable().default(null),
|
|
79
82
|
downloadBehavior,
|
|
80
83
|
metadata: zod_1.z.record(zod_1.z.string(), zod_1.z.string()).optional().nullable(),
|
|
81
84
|
renderIdOverride: zod_1.z.string().optional().nullable(),
|
|
@@ -110,9 +113,12 @@ exports.CloudRunPayload = zod_1.z.discriminatedUnion('type', [
|
|
|
110
113
|
delayRenderTimeoutInMilliseconds: zod_1.z.number(),
|
|
111
114
|
logLevel,
|
|
112
115
|
mediaCacheSizeInBytes: zod_1.z.number().nullable(),
|
|
116
|
+
preferredEffectBackend: zod_1.z.enum(['auto', 'webgpu', 'webgl2', '2d']),
|
|
113
117
|
offthreadVideoCacheSizeInBytes: zod_1.z.number().nullable(),
|
|
114
118
|
offthreadVideoThreads: zod_1.z.number().nullable(),
|
|
115
119
|
clientVersion: zod_1.z.string(),
|
|
120
|
+
licenseKey: zod_1.z.string().nullable().default(null),
|
|
121
|
+
isProduction: zod_1.z.boolean().nullable().default(null),
|
|
116
122
|
downloadBehavior,
|
|
117
123
|
metadata: zod_1.z.record(zod_1.z.string(), zod_1.z.string()).optional().nullable(),
|
|
118
124
|
renderIdOverride: zod_1.z.string().optional().nullable(),
|
|
@@ -141,6 +141,7 @@ const renderMediaSingleThread = async (body, res) => {
|
|
|
141
141
|
server: undefined,
|
|
142
142
|
offthreadVideoCacheSizeInBytes: body.offthreadVideoCacheSizeInBytes,
|
|
143
143
|
mediaCacheSizeInBytes: body.mediaCacheSizeInBytes,
|
|
144
|
+
preferredEffectBackend: body.preferredEffectBackend,
|
|
144
145
|
offthreadVideoThreads: body.offthreadVideoThreads,
|
|
145
146
|
colorSpace: body.colorSpace,
|
|
146
147
|
repro: false,
|
|
@@ -156,8 +157,8 @@ const renderMediaSingleThread = async (body, res) => {
|
|
|
156
157
|
hardwareAcceleration: 'disable',
|
|
157
158
|
chromeMode: 'headless-shell',
|
|
158
159
|
onLog: renderer_1.RenderInternals.defaultOnLog,
|
|
159
|
-
licenseKey:
|
|
160
|
-
isProduction:
|
|
160
|
+
licenseKey: body.licenseKey,
|
|
161
|
+
isProduction: body.isProduction,
|
|
161
162
|
sampleRate: (_1 = body.sampleRate) !== null && _1 !== void 0 ? _1 : 48000,
|
|
162
163
|
});
|
|
163
164
|
const storage = new storage_1.Storage();
|
|
@@ -24,7 +24,7 @@ const renderStillSingleThread = async (body, res) => {
|
|
|
24
24
|
}
|
|
25
25
|
const renderId = (_g = body.renderIdOverride) !== null && _g !== void 0 ? _g : (0, random_hash_1.randomHash)({ randomInTests: true });
|
|
26
26
|
try {
|
|
27
|
-
log_1.Log.verbose({ indent: false, logLevel: body.logLevel }, 'Rendering still frame', body);
|
|
27
|
+
log_1.Log.verbose({ indent: false, logLevel: body.logLevel }, 'Rendering still frame', { ...body, licenseKey: body.licenseKey === null ? null : '[redacted]' });
|
|
28
28
|
const composition = await (0, get_composition_from_body_1.getCompositionFromBody)(body);
|
|
29
29
|
log_1.Log.verbose({ indent: false, logLevel: body.logLevel }, 'Composition loaded', composition);
|
|
30
30
|
const tempFilePath = '/tmp/still.png';
|
|
@@ -83,9 +83,10 @@ const renderStillSingleThread = async (body, res) => {
|
|
|
83
83
|
},
|
|
84
84
|
chromeMode: 'headless-shell',
|
|
85
85
|
mediaCacheSizeInBytes: body.mediaCacheSizeInBytes,
|
|
86
|
+
preferredEffectBackend: body.preferredEffectBackend,
|
|
86
87
|
onLog: renderer_1.RenderInternals.defaultOnLog,
|
|
87
|
-
licenseKey:
|
|
88
|
-
isProduction:
|
|
88
|
+
licenseKey: body.licenseKey,
|
|
89
|
+
isProduction: body.isProduction,
|
|
89
90
|
});
|
|
90
91
|
log_1.Log.info({ indent: false, logLevel: body.logLevel }, 'Still rendered');
|
|
91
92
|
const storage = new storage_1.Storage();
|
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.541",
|
|
7
7
|
"description": "Render Remotion videos on Google Cloud Run",
|
|
8
8
|
"main": "dist/index.js",
|
|
9
9
|
"scripts": {
|
|
@@ -20,17 +20,17 @@
|
|
|
20
20
|
"@google-cloud/storage": "7.15.2",
|
|
21
21
|
"@google-cloud/resource-manager": "5.3.1",
|
|
22
22
|
"@google-cloud/logging": "11.2.0",
|
|
23
|
-
"@remotion/bundler": "4.0.
|
|
24
|
-
"@remotion/cli": "4.0.
|
|
25
|
-
"@remotion/renderer": "4.0.
|
|
23
|
+
"@remotion/bundler": "4.0.541",
|
|
24
|
+
"@remotion/cli": "4.0.541",
|
|
25
|
+
"@remotion/renderer": "4.0.541",
|
|
26
26
|
"google-auth-library": "8.7.0",
|
|
27
|
-
"remotion": "4.0.
|
|
28
|
-
"zod": "4.
|
|
27
|
+
"remotion": "4.0.541",
|
|
28
|
+
"zod": "4.6.7"
|
|
29
29
|
},
|
|
30
30
|
"devDependencies": {
|
|
31
|
-
"@remotion/compositor-linux-x64-gnu": "4.0.
|
|
31
|
+
"@remotion/compositor-linux-x64-gnu": "4.0.541",
|
|
32
32
|
"@types/minimist": "1.2.2",
|
|
33
|
-
"@remotion/eslint-config-internal": "4.0.
|
|
33
|
+
"@remotion/eslint-config-internal": "4.0.541",
|
|
34
34
|
"eslint": "9.19.0",
|
|
35
35
|
"@types/node": "20.12.14",
|
|
36
36
|
"typescript": "7.1.0-beta"
|