@remotion/lambda 4.0.487 → 4.0.489
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/deploy-site.d.ts +1 -0
- package/dist/api/deploy-site.js +6 -5
- package/dist/cli/args.d.ts +3 -0
- package/dist/cli/args.js +1 -0
- package/dist/cli/commands/render/render.js +23 -10
- package/dist/cli/commands/still.js +13 -2
- package/dist/cli/helpers/get-s3-output-provider-from-cli.d.ts +14 -0
- package/dist/cli/helpers/get-s3-output-provider-from-cli.js +43 -0
- package/dist/esm/index.mjs +89 -20
- package/package.json +12 -12
- package/remotionlambda-arm64.zip +0 -0
package/dist/api/deploy-site.js
CHANGED
|
@@ -14,7 +14,7 @@ const get_s3_operations_1 = require("../shared/get-s3-operations");
|
|
|
14
14
|
const validate_site_name_1 = require("../shared/validate-site-name");
|
|
15
15
|
const mandatoryDeploySite = async ({ bucketName, entryPoint, siteName, options, region, privacy, gitSource, throwIfSiteExists, providerSpecifics, forcePathStyle, fullClientSpecifics, requestHandler, }) => {
|
|
16
16
|
var _a, _b;
|
|
17
|
-
var _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o;
|
|
17
|
+
var _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p;
|
|
18
18
|
lambda_client_1.LambdaClientInternals.validateAwsRegion(region);
|
|
19
19
|
(0, serverless_1.validateBucketName)({
|
|
20
20
|
bucketName,
|
|
@@ -64,11 +64,12 @@ const mandatoryDeploySite = async ({ bucketName, entryPoint, siteName, options,
|
|
|
64
64
|
onSymlinkDetected: () => undefined,
|
|
65
65
|
outDir: null,
|
|
66
66
|
askAIEnabled: (_j = options === null || options === void 0 ? void 0 : options.askAIEnabled) !== null && _j !== void 0 ? _j : true,
|
|
67
|
+
interactivityEnabled: (_k = options === null || options === void 0 ? void 0 : options.interactivityEnabled) !== null && _k !== void 0 ? _k : true,
|
|
67
68
|
audioLatencyHint: null,
|
|
68
|
-
experimentalClientSideRenderingEnabled: (
|
|
69
|
-
keyboardShortcutsEnabled: (
|
|
69
|
+
experimentalClientSideRenderingEnabled: (_l = options === null || options === void 0 ? void 0 : options.experimentalClientSideRenderingEnabled) !== null && _l !== void 0 ? _l : false,
|
|
70
|
+
keyboardShortcutsEnabled: (_m = options === null || options === void 0 ? void 0 : options.keyboardShortcutsEnabled) !== null && _m !== void 0 ? _m : true,
|
|
70
71
|
renderDefaults: null,
|
|
71
|
-
rspack: (
|
|
72
|
+
rspack: (_o = options === null || options === void 0 ? void 0 : options.rspack) !== null && _o !== void 0 ? _o : false,
|
|
72
73
|
symlinkPublicDir: false,
|
|
73
74
|
}),
|
|
74
75
|
]);
|
|
@@ -98,7 +99,7 @@ const mandatoryDeploySite = async ({ bucketName, entryPoint, siteName, options,
|
|
|
98
99
|
bucket: bucketName,
|
|
99
100
|
region,
|
|
100
101
|
localDir: bundled,
|
|
101
|
-
onProgress: (
|
|
102
|
+
onProgress: (_p = options === null || options === void 0 ? void 0 : options.onUploadProgress) !== null && _p !== void 0 ? _p : (() => undefined),
|
|
102
103
|
keyPrefix: subFolder,
|
|
103
104
|
privacy: privacy !== null && privacy !== void 0 ? privacy : 'public',
|
|
104
105
|
toUpload,
|
package/dist/cli/args.d.ts
CHANGED
|
@@ -22,6 +22,9 @@ type LambdaCommandLineOptions = {
|
|
|
22
22
|
['concurrency']?: number;
|
|
23
23
|
['concurrency-per-lambda']?: number;
|
|
24
24
|
['out-name']: string | undefined;
|
|
25
|
+
['s3-output-provider-endpoint']: string | undefined;
|
|
26
|
+
['s3-output-provider-region']: AwsRegion | (string & {}) | undefined;
|
|
27
|
+
['s3-output-provider-force-path-style']: boolean;
|
|
25
28
|
['custom-role-arn']: string | undefined;
|
|
26
29
|
privacy: Privacy;
|
|
27
30
|
webhook: string | undefined;
|
package/dist/cli/args.js
CHANGED
|
@@ -19,6 +19,7 @@ const validate_retries_1 = require("../../../shared/validate-retries");
|
|
|
19
19
|
const args_1 = require("../../args");
|
|
20
20
|
const get_aws_region_1 = require("../../get-aws-region");
|
|
21
21
|
const find_function_name_1 = require("../../helpers/find-function-name");
|
|
22
|
+
const get_s3_output_provider_from_cli_1 = require("../../helpers/get-s3-output-provider-from-cli");
|
|
22
23
|
const get_webhook_custom_data_1 = require("../../helpers/get-webhook-custom-data");
|
|
23
24
|
const quit_1 = require("../../helpers/quit");
|
|
24
25
|
const log_1 = require("../../log");
|
|
@@ -26,7 +27,7 @@ const progress_1 = require("./progress");
|
|
|
26
27
|
exports.RENDER_COMMAND = 'render';
|
|
27
28
|
const { x264Option, audioBitrateOption, offthreadVideoCacheSizeInBytesOption, offthreadVideoThreadsOption, scaleOption, crfOption, gopSizeOption, jpegQualityOption, videoBitrateOption, mutedOption, colorSpaceOption, deleteAfterOption, enableMultiprocessOnLinuxOption, glOption, headlessOption, numberOfGifLoopsOption, encodingMaxRateOption, encodingBufferSizeOption, delayRenderTimeoutInMillisecondsOption, overwriteOption, binariesDirectoryOption, preferLosslessOption, metadataOption, mediaCacheSizeInBytesOption, darkModeOption, pixelFormatOption, browserExecutableOption, everyNthFrameOption, proResProfileOption, userAgentOption, disableWebSecurityOption, ignoreCertificateErrorsOption, audioCodecOption, videoCodecOption, overrideHeightOption, overrideWidthOption, overrideFpsOption, overrideDurationOption, sampleRateOption, } = client_1.BrowserSafeApis.options;
|
|
28
29
|
const renderCommand = async ({ args, remotionRoot, logLevel, providerSpecifics, }) => {
|
|
29
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p
|
|
30
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p;
|
|
30
31
|
const serveUrl = args[0];
|
|
31
32
|
if (!serveUrl) {
|
|
32
33
|
log_1.Log.error({ indent: false, logLevel }, 'No serve URL passed.');
|
|
@@ -221,6 +222,16 @@ const renderCommand = async ({ args, remotionRoot, logLevel, providerSpecifics,
|
|
|
221
222
|
composition = compositionId;
|
|
222
223
|
}
|
|
223
224
|
const outName = args_1.parsedLambdaCli['out-name'];
|
|
225
|
+
const s3OutputProvider = (0, get_s3_output_provider_from_cli_1.getS3OutputProviderFromCli)({
|
|
226
|
+
endpoint: args_1.parsedLambdaCli['s3-output-provider-endpoint'],
|
|
227
|
+
region: args_1.parsedLambdaCli['s3-output-provider-region'],
|
|
228
|
+
forcePathStyle: args_1.parsedLambdaCli['s3-output-provider-force-path-style'] || undefined,
|
|
229
|
+
});
|
|
230
|
+
const resolvedOutName = (0, get_s3_output_provider_from_cli_1.makeOutNameWithCustomCredentials)({
|
|
231
|
+
bucketName: args_1.parsedLambdaCli['force-bucket-name'],
|
|
232
|
+
key: outName,
|
|
233
|
+
s3OutputProvider,
|
|
234
|
+
});
|
|
224
235
|
const downloadName = (_a = args[2]) !== null && _a !== void 0 ? _a : null;
|
|
225
236
|
const { value: codec, source: reason } = videoCodecOption.getValue({
|
|
226
237
|
commandLine: cli_1.CliInternals.parsedCli,
|
|
@@ -270,7 +281,7 @@ const renderCommand = async ({ args, remotionRoot, logLevel, providerSpecifics,
|
|
|
270
281
|
privacy,
|
|
271
282
|
logLevel,
|
|
272
283
|
frameRange: frameRange !== null && frameRange !== void 0 ? frameRange : null,
|
|
273
|
-
outName:
|
|
284
|
+
outName: resolvedOutName,
|
|
274
285
|
timeoutInMilliseconds,
|
|
275
286
|
chromiumOptions,
|
|
276
287
|
scale,
|
|
@@ -290,12 +301,12 @@ const renderCommand = async ({ args, remotionRoot, logLevel, providerSpecifics,
|
|
|
290
301
|
webhook: args_1.parsedLambdaCli.webhook
|
|
291
302
|
? {
|
|
292
303
|
url: args_1.parsedLambdaCli.webhook,
|
|
293
|
-
secret: (
|
|
304
|
+
secret: (_h = args_1.parsedLambdaCli['webhook-secret']) !== null && _h !== void 0 ? _h : null,
|
|
294
305
|
customData: webhookCustomData,
|
|
295
306
|
}
|
|
296
307
|
: null,
|
|
297
|
-
rendererFunctionName: (
|
|
298
|
-
forceBucketName: (
|
|
308
|
+
rendererFunctionName: (_j = args_1.parsedLambdaCli['renderer-function-name']) !== null && _j !== void 0 ? _j : null,
|
|
309
|
+
forceBucketName: (_k = args_1.parsedLambdaCli['force-bucket-name']) !== null && _k !== void 0 ? _k : null,
|
|
299
310
|
audioCodec,
|
|
300
311
|
deleteAfter: deleteAfter !== null && deleteAfter !== void 0 ? deleteAfter : null,
|
|
301
312
|
colorSpace,
|
|
@@ -306,12 +317,12 @@ const renderCommand = async ({ args, remotionRoot, logLevel, providerSpecifics,
|
|
|
306
317
|
x264Preset: x264Preset !== null && x264Preset !== void 0 ? x264Preset : null,
|
|
307
318
|
preferLossless,
|
|
308
319
|
indent: false,
|
|
309
|
-
forcePathStyle: (
|
|
320
|
+
forcePathStyle: (_l = args_1.parsedLambdaCli['force-path-style']) !== null && _l !== void 0 ? _l : false,
|
|
310
321
|
metadata: metadata !== null && metadata !== void 0 ? metadata : null,
|
|
311
|
-
licenseKey: (
|
|
312
|
-
storageClass: (
|
|
322
|
+
licenseKey: (_m = args_1.parsedLambdaCli[client_1.BrowserSafeApis.options.licenseKeyOption.cliFlag]) !== null && _m !== void 0 ? _m : null,
|
|
323
|
+
storageClass: (_o = args_1.parsedLambdaCli['storage-class']) !== null && _o !== void 0 ? _o : null,
|
|
313
324
|
requestHandler: null,
|
|
314
|
-
isProduction: (
|
|
325
|
+
isProduction: (_p = args_1.parsedLambdaCli[client_1.BrowserSafeApis.options.isProductionOption.cliFlag]) !== null && _p !== void 0 ? _p : true,
|
|
315
326
|
sampleRate,
|
|
316
327
|
});
|
|
317
328
|
const progressBar = cli_1.CliInternals.createOverwriteableCliOutput({
|
|
@@ -369,6 +380,7 @@ const renderCommand = async ({ args, remotionRoot, logLevel, providerSpecifics,
|
|
|
369
380
|
region: (0, get_aws_region_1.getAwsRegion)(),
|
|
370
381
|
logLevel,
|
|
371
382
|
skipLambdaInvocation: Boolean(adheresToFunctionNameConvention),
|
|
383
|
+
s3OutputProvider: s3OutputProvider !== null && s3OutputProvider !== void 0 ? s3OutputProvider : undefined,
|
|
372
384
|
});
|
|
373
385
|
progressBar.update((0, progress_1.makeProgressString)({
|
|
374
386
|
downloadInfo: null,
|
|
@@ -383,6 +395,7 @@ const renderCommand = async ({ args, remotionRoot, logLevel, providerSpecifics,
|
|
|
383
395
|
renderId: res.renderId,
|
|
384
396
|
region: (0, get_aws_region_1.getAwsRegion)(),
|
|
385
397
|
logLevel,
|
|
398
|
+
s3OutputProvider: s3OutputProvider !== null && s3OutputProvider !== void 0 ? s3OutputProvider : undefined,
|
|
386
399
|
});
|
|
387
400
|
progressBar.update((0, progress_1.makeProgressString)({
|
|
388
401
|
downloadInfo: null,
|
|
@@ -411,7 +424,7 @@ const renderCommand = async ({ args, remotionRoot, logLevel, providerSpecifics,
|
|
|
411
424
|
providerSpecifics: providerSpecifics,
|
|
412
425
|
forcePathStyle: args_1.parsedLambdaCli['force-path-style'],
|
|
413
426
|
signal: new AbortController().signal,
|
|
414
|
-
customCredentials:
|
|
427
|
+
customCredentials: s3OutputProvider,
|
|
415
428
|
requestHandler: null,
|
|
416
429
|
});
|
|
417
430
|
downloadOrNothing = download;
|
|
@@ -18,6 +18,7 @@ const validate_retries_1 = require("../../shared/validate-retries");
|
|
|
18
18
|
const args_1 = require("../args");
|
|
19
19
|
const get_aws_region_1 = require("../get-aws-region");
|
|
20
20
|
const find_function_name_1 = require("../helpers/find-function-name");
|
|
21
|
+
const get_s3_output_provider_from_cli_1 = require("../helpers/get-s3-output-provider-from-cli");
|
|
21
22
|
const quit_1 = require("../helpers/quit");
|
|
22
23
|
const log_1 = require("../log");
|
|
23
24
|
const progress_1 = require("./render/progress");
|
|
@@ -148,6 +149,16 @@ const stillCommand = async ({ args, remotionRoot, logLevel, providerSpecifics, }
|
|
|
148
149
|
}
|
|
149
150
|
const downloadName = (_a = args[2]) !== null && _a !== void 0 ? _a : null;
|
|
150
151
|
const outName = args_1.parsedLambdaCli['out-name'];
|
|
152
|
+
const s3OutputProvider = (0, get_s3_output_provider_from_cli_1.getS3OutputProviderFromCli)({
|
|
153
|
+
endpoint: args_1.parsedLambdaCli['s3-output-provider-endpoint'],
|
|
154
|
+
region: args_1.parsedLambdaCli['s3-output-provider-region'],
|
|
155
|
+
forcePathStyle: args_1.parsedLambdaCli['s3-output-provider-force-path-style'] || undefined,
|
|
156
|
+
});
|
|
157
|
+
const resolvedOutName = (0, get_s3_output_provider_from_cli_1.makeOutNameWithCustomCredentials)({
|
|
158
|
+
bucketName: args_1.parsedLambdaCli['force-bucket-name'],
|
|
159
|
+
key: outName,
|
|
160
|
+
s3OutputProvider,
|
|
161
|
+
});
|
|
151
162
|
const functionName = await (0, find_function_name_1.findFunctionName)({ logLevel, providerSpecifics });
|
|
152
163
|
const maxRetries = (_b = args_1.parsedLambdaCli['max-retries']) !== null && _b !== void 0 ? _b : constants_1.DEFAULT_MAX_RETRIES;
|
|
153
164
|
(0, validate_retries_1.validateMaxRetries)(maxRetries);
|
|
@@ -185,7 +196,7 @@ const stillCommand = async ({ args, remotionRoot, logLevel, providerSpecifics, }
|
|
|
185
196
|
frame: stillFrame,
|
|
186
197
|
jpegQuality,
|
|
187
198
|
logLevel,
|
|
188
|
-
outName:
|
|
199
|
+
outName: resolvedOutName,
|
|
189
200
|
chromiumOptions,
|
|
190
201
|
timeoutInMilliseconds,
|
|
191
202
|
scale,
|
|
@@ -242,7 +253,7 @@ const stillCommand = async ({ args, remotionRoot, logLevel, providerSpecifics, }
|
|
|
242
253
|
providerSpecifics: providerSpecifics,
|
|
243
254
|
forcePathStyle: args_1.parsedLambdaCli['force-path-style'],
|
|
244
255
|
signal: new AbortController().signal,
|
|
245
|
-
customCredentials:
|
|
256
|
+
customCredentials: s3OutputProvider,
|
|
246
257
|
onProgress: () => undefined,
|
|
247
258
|
requestHandler: null,
|
|
248
259
|
});
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { CustomCredentials, OutNameInput } from '@remotion/serverless';
|
|
2
|
+
import type { AwsProvider } from '../../client';
|
|
3
|
+
export declare const S3_OUTPUT_PROVIDER_ACCESS_KEY_ID_ENV_NAME = "REMOTION_S3_OUTPUT_PROVIDER_ACCESS_KEY_ID";
|
|
4
|
+
export declare const S3_OUTPUT_PROVIDER_SECRET_ACCESS_KEY_ENV_NAME = "REMOTION_S3_OUTPUT_PROVIDER_SECRET_ACCESS_KEY";
|
|
5
|
+
export declare const getS3OutputProviderFromCli: ({ endpoint, region, forcePathStyle, }: {
|
|
6
|
+
endpoint: string | undefined;
|
|
7
|
+
region: "af-south-1" | "ap-east-1" | "ap-northeast-1" | "ap-northeast-2" | "ap-northeast-3" | "ap-south-1" | "ap-southeast-1" | "ap-southeast-2" | "ap-southeast-4" | "ap-southeast-5" | "ca-central-1" | "eu-central-1" | "eu-central-2" | "eu-north-1" | "eu-south-1" | "eu-west-1" | "eu-west-2" | "eu-west-3" | "sa-east-1" | "us-east-1" | "us-east-2" | "us-west-1" | "us-west-2" | (string & {}) | undefined;
|
|
8
|
+
forcePathStyle: boolean | undefined;
|
|
9
|
+
}) => CustomCredentials<AwsProvider> | null;
|
|
10
|
+
export declare const makeOutNameWithCustomCredentials: ({ bucketName, key, s3OutputProvider, }: {
|
|
11
|
+
bucketName: string | undefined;
|
|
12
|
+
key: string | undefined;
|
|
13
|
+
s3OutputProvider: CustomCredentials<AwsProvider> | null;
|
|
14
|
+
}) => OutNameInput<AwsProvider> | null;
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.makeOutNameWithCustomCredentials = exports.getS3OutputProviderFromCli = exports.S3_OUTPUT_PROVIDER_SECRET_ACCESS_KEY_ENV_NAME = exports.S3_OUTPUT_PROVIDER_ACCESS_KEY_ID_ENV_NAME = void 0;
|
|
4
|
+
const lambda_client_1 = require("@remotion/lambda-client");
|
|
5
|
+
exports.S3_OUTPUT_PROVIDER_ACCESS_KEY_ID_ENV_NAME = 'REMOTION_S3_OUTPUT_PROVIDER_ACCESS_KEY_ID';
|
|
6
|
+
exports.S3_OUTPUT_PROVIDER_SECRET_ACCESS_KEY_ENV_NAME = 'REMOTION_S3_OUTPUT_PROVIDER_SECRET_ACCESS_KEY';
|
|
7
|
+
const getS3OutputProviderFromCli = ({ endpoint, region, forcePathStyle, }) => {
|
|
8
|
+
var _a, _b;
|
|
9
|
+
const hasAnyS3OutputProviderFlag = endpoint !== undefined ||
|
|
10
|
+
region !== undefined ||
|
|
11
|
+
forcePathStyle !== undefined;
|
|
12
|
+
if (!hasAnyS3OutputProviderFlag) {
|
|
13
|
+
return null;
|
|
14
|
+
}
|
|
15
|
+
if (!endpoint) {
|
|
16
|
+
throw new Error('Pass --s3-output-provider-endpoint when using S3 output provider flags.');
|
|
17
|
+
}
|
|
18
|
+
return {
|
|
19
|
+
endpoint,
|
|
20
|
+
accessKeyId: (_a = lambda_client_1.LambdaClientInternals.getEnvVariable(exports.S3_OUTPUT_PROVIDER_ACCESS_KEY_ID_ENV_NAME)) !== null && _a !== void 0 ? _a : null,
|
|
21
|
+
secretAccessKey: (_b = lambda_client_1.LambdaClientInternals.getEnvVariable(exports.S3_OUTPUT_PROVIDER_SECRET_ACCESS_KEY_ENV_NAME)) !== null && _b !== void 0 ? _b : null,
|
|
22
|
+
region,
|
|
23
|
+
forcePathStyle,
|
|
24
|
+
};
|
|
25
|
+
};
|
|
26
|
+
exports.getS3OutputProviderFromCli = getS3OutputProviderFromCli;
|
|
27
|
+
const makeOutNameWithCustomCredentials = ({ bucketName, key, s3OutputProvider, }) => {
|
|
28
|
+
if (!s3OutputProvider) {
|
|
29
|
+
return key !== null && key !== void 0 ? key : null;
|
|
30
|
+
}
|
|
31
|
+
if (!bucketName) {
|
|
32
|
+
throw new Error('Pass --force-bucket-name when using S3 output provider flags.');
|
|
33
|
+
}
|
|
34
|
+
if (!key) {
|
|
35
|
+
throw new Error('Pass --out-name when using S3 output provider flags.');
|
|
36
|
+
}
|
|
37
|
+
return {
|
|
38
|
+
bucketName,
|
|
39
|
+
key,
|
|
40
|
+
s3OutputProvider,
|
|
41
|
+
};
|
|
42
|
+
};
|
|
43
|
+
exports.makeOutNameWithCustomCredentials = makeOutNameWithCustomCredentials;
|
package/dist/esm/index.mjs
CHANGED
|
@@ -8604,7 +8604,7 @@ var require_package = __commonJS((exports, module) => {
|
|
|
8604
8604
|
url: "https://github.com/remotion-dev/remotion/tree/main/packages/lambda"
|
|
8605
8605
|
},
|
|
8606
8606
|
name: "@remotion/lambda",
|
|
8607
|
-
version: "4.0.
|
|
8607
|
+
version: "4.0.489",
|
|
8608
8608
|
description: "Render Remotion videos on AWS Lambda",
|
|
8609
8609
|
main: "dist/index.js",
|
|
8610
8610
|
scripts: {
|
|
@@ -10178,6 +10178,7 @@ var mandatoryDeploySite = async ({
|
|
|
10178
10178
|
},
|
|
10179
10179
|
outDir: null,
|
|
10180
10180
|
askAIEnabled: options?.askAIEnabled ?? true,
|
|
10181
|
+
interactivityEnabled: options?.interactivityEnabled ?? true,
|
|
10181
10182
|
audioLatencyHint: null,
|
|
10182
10183
|
experimentalClientSideRenderingEnabled: options?.experimentalClientSideRenderingEnabled ?? false,
|
|
10183
10184
|
keyboardShortcutsEnabled: options?.keyboardShortcutsEnabled ?? true,
|
|
@@ -10528,7 +10529,7 @@ var simulatePermissions = async (options) => {
|
|
|
10528
10529
|
|
|
10529
10530
|
// src/cli/index.ts
|
|
10530
10531
|
import { CliInternals as CliInternals23 } from "@remotion/cli";
|
|
10531
|
-
import { LambdaClientInternals as
|
|
10532
|
+
import { LambdaClientInternals as LambdaClientInternals22 } from "@remotion/lambda-client";
|
|
10532
10533
|
import { BINARY_NAME as BINARY_NAME14 } from "@remotion/lambda-client/constants";
|
|
10533
10534
|
import { RenderInternals as RenderInternals7 } from "@remotion/renderer";
|
|
10534
10535
|
import {
|
|
@@ -10546,7 +10547,8 @@ var LambdaBooleanFlags = [
|
|
|
10546
10547
|
"y",
|
|
10547
10548
|
"default-only",
|
|
10548
10549
|
"compatible-only",
|
|
10549
|
-
"force-path-style"
|
|
10550
|
+
"force-path-style",
|
|
10551
|
+
"s3-output-provider-force-path-style"
|
|
10550
10552
|
];
|
|
10551
10553
|
var parsedLambdaCli = CliInternals.minimist(process.argv.slice(2), {
|
|
10552
10554
|
boolean: LambdaBooleanFlags,
|
|
@@ -11381,7 +11383,7 @@ import { CliInternals as CliInternals14 } from "@remotion/cli";
|
|
|
11381
11383
|
import { ConfigInternals } from "@remotion/cli/config";
|
|
11382
11384
|
import {
|
|
11383
11385
|
getRenderProgress,
|
|
11384
|
-
LambdaClientInternals as
|
|
11386
|
+
LambdaClientInternals as LambdaClientInternals20
|
|
11385
11387
|
} from "@remotion/lambda-client";
|
|
11386
11388
|
import {
|
|
11387
11389
|
BINARY_NAME as BINARY_NAME9,
|
|
@@ -11419,6 +11421,51 @@ function validateMaxRetries(maxRetries) {
|
|
|
11419
11421
|
}
|
|
11420
11422
|
}
|
|
11421
11423
|
|
|
11424
|
+
// src/cli/helpers/get-s3-output-provider-from-cli.ts
|
|
11425
|
+
import { LambdaClientInternals as LambdaClientInternals19 } from "@remotion/lambda-client";
|
|
11426
|
+
var S3_OUTPUT_PROVIDER_ACCESS_KEY_ID_ENV_NAME = "REMOTION_S3_OUTPUT_PROVIDER_ACCESS_KEY_ID";
|
|
11427
|
+
var S3_OUTPUT_PROVIDER_SECRET_ACCESS_KEY_ENV_NAME = "REMOTION_S3_OUTPUT_PROVIDER_SECRET_ACCESS_KEY";
|
|
11428
|
+
var getS3OutputProviderFromCli = ({
|
|
11429
|
+
endpoint,
|
|
11430
|
+
region,
|
|
11431
|
+
forcePathStyle
|
|
11432
|
+
}) => {
|
|
11433
|
+
const hasAnyS3OutputProviderFlag = endpoint !== undefined || region !== undefined || forcePathStyle !== undefined;
|
|
11434
|
+
if (!hasAnyS3OutputProviderFlag) {
|
|
11435
|
+
return null;
|
|
11436
|
+
}
|
|
11437
|
+
if (!endpoint) {
|
|
11438
|
+
throw new Error("Pass --s3-output-provider-endpoint when using S3 output provider flags.");
|
|
11439
|
+
}
|
|
11440
|
+
return {
|
|
11441
|
+
endpoint,
|
|
11442
|
+
accessKeyId: LambdaClientInternals19.getEnvVariable(S3_OUTPUT_PROVIDER_ACCESS_KEY_ID_ENV_NAME) ?? null,
|
|
11443
|
+
secretAccessKey: LambdaClientInternals19.getEnvVariable(S3_OUTPUT_PROVIDER_SECRET_ACCESS_KEY_ENV_NAME) ?? null,
|
|
11444
|
+
region,
|
|
11445
|
+
forcePathStyle
|
|
11446
|
+
};
|
|
11447
|
+
};
|
|
11448
|
+
var makeOutNameWithCustomCredentials = ({
|
|
11449
|
+
bucketName,
|
|
11450
|
+
key,
|
|
11451
|
+
s3OutputProvider
|
|
11452
|
+
}) => {
|
|
11453
|
+
if (!s3OutputProvider) {
|
|
11454
|
+
return key ?? null;
|
|
11455
|
+
}
|
|
11456
|
+
if (!bucketName) {
|
|
11457
|
+
throw new Error("Pass --force-bucket-name when using S3 output provider flags.");
|
|
11458
|
+
}
|
|
11459
|
+
if (!key) {
|
|
11460
|
+
throw new Error("Pass --out-name when using S3 output provider flags.");
|
|
11461
|
+
}
|
|
11462
|
+
return {
|
|
11463
|
+
bucketName,
|
|
11464
|
+
key,
|
|
11465
|
+
s3OutputProvider
|
|
11466
|
+
};
|
|
11467
|
+
};
|
|
11468
|
+
|
|
11422
11469
|
// src/cli/helpers/get-webhook-custom-data.ts
|
|
11423
11470
|
import fs5 from "node:fs";
|
|
11424
11471
|
import os from "node:os";
|
|
@@ -11786,7 +11833,7 @@ var renderCommand = async ({
|
|
|
11786
11833
|
let composition = args[1];
|
|
11787
11834
|
if (!composition) {
|
|
11788
11835
|
Log.info({ indent: false, logLevel }, "No compositions passed. Fetching compositions...");
|
|
11789
|
-
|
|
11836
|
+
LambdaClientInternals20.validateServeUrl(serveUrl);
|
|
11790
11837
|
if (!serveUrl.startsWith("https://") && !serveUrl.startsWith("http://")) {
|
|
11791
11838
|
throw Error(`Passing the shorthand serve URL without composition name is currently not supported.
|
|
11792
11839
|
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.`);
|
|
@@ -11843,6 +11890,16 @@ var renderCommand = async ({
|
|
|
11843
11890
|
composition = compositionId;
|
|
11844
11891
|
}
|
|
11845
11892
|
const outName = parsedLambdaCli["out-name"];
|
|
11893
|
+
const s3OutputProvider = getS3OutputProviderFromCli({
|
|
11894
|
+
endpoint: parsedLambdaCli["s3-output-provider-endpoint"],
|
|
11895
|
+
region: parsedLambdaCli["s3-output-provider-region"],
|
|
11896
|
+
forcePathStyle: parsedLambdaCli["s3-output-provider-force-path-style"] || undefined
|
|
11897
|
+
});
|
|
11898
|
+
const resolvedOutName = makeOutNameWithCustomCredentials({
|
|
11899
|
+
bucketName: parsedLambdaCli["force-bucket-name"],
|
|
11900
|
+
key: outName,
|
|
11901
|
+
s3OutputProvider
|
|
11902
|
+
});
|
|
11846
11903
|
const downloadName = args[2] ?? null;
|
|
11847
11904
|
const { value: codec, source: reason } = videoCodecOption.getValue({
|
|
11848
11905
|
commandLine: CliInternals14.parsedCli
|
|
@@ -11872,7 +11929,7 @@ var renderCommand = async ({
|
|
|
11872
11929
|
const concurrency = parsedLambdaCli["concurrency"] ?? undefined;
|
|
11873
11930
|
const concurrencyPerLambda = parsedLambdaCli["concurrency-per-lambda"] ?? 1;
|
|
11874
11931
|
const webhookCustomData = getWebhookCustomData(logLevel);
|
|
11875
|
-
const res = await
|
|
11932
|
+
const res = await LambdaClientInternals20.internalRenderMediaOnLambdaRaw({
|
|
11876
11933
|
functionName,
|
|
11877
11934
|
serveUrl,
|
|
11878
11935
|
inputProps,
|
|
@@ -11892,7 +11949,7 @@ var renderCommand = async ({
|
|
|
11892
11949
|
privacy,
|
|
11893
11950
|
logLevel,
|
|
11894
11951
|
frameRange: frameRange ?? null,
|
|
11895
|
-
outName:
|
|
11952
|
+
outName: resolvedOutName,
|
|
11896
11953
|
timeoutInMilliseconds,
|
|
11897
11954
|
chromiumOptions,
|
|
11898
11955
|
scale,
|
|
@@ -11980,14 +12037,15 @@ var renderCommand = async ({
|
|
|
11980
12037
|
fallback: `Render folder: ${res.folderInS3Console}`
|
|
11981
12038
|
}));
|
|
11982
12039
|
}
|
|
11983
|
-
const adheresToFunctionNameConvention =
|
|
12040
|
+
const adheresToFunctionNameConvention = LambdaClientInternals20.parseFunctionName(functionName);
|
|
11984
12041
|
const status = await getRenderProgress({
|
|
11985
12042
|
functionName,
|
|
11986
12043
|
bucketName: res.bucketName,
|
|
11987
12044
|
renderId: res.renderId,
|
|
11988
12045
|
region: getAwsRegion(),
|
|
11989
12046
|
logLevel,
|
|
11990
|
-
skipLambdaInvocation: Boolean(adheresToFunctionNameConvention)
|
|
12047
|
+
skipLambdaInvocation: Boolean(adheresToFunctionNameConvention),
|
|
12048
|
+
s3OutputProvider: s3OutputProvider ?? undefined
|
|
11991
12049
|
});
|
|
11992
12050
|
progressBar.update(makeProgressString({
|
|
11993
12051
|
downloadInfo: null,
|
|
@@ -12000,7 +12058,8 @@ var renderCommand = async ({
|
|
|
12000
12058
|
bucketName: res.bucketName,
|
|
12001
12059
|
renderId: res.renderId,
|
|
12002
12060
|
region: getAwsRegion(),
|
|
12003
|
-
logLevel
|
|
12061
|
+
logLevel,
|
|
12062
|
+
s3OutputProvider: s3OutputProvider ?? undefined
|
|
12004
12063
|
});
|
|
12005
12064
|
progressBar.update(makeProgressString({
|
|
12006
12065
|
downloadInfo: null,
|
|
@@ -12029,7 +12088,7 @@ var renderCommand = async ({
|
|
|
12029
12088
|
providerSpecifics,
|
|
12030
12089
|
forcePathStyle: parsedLambdaCli["force-path-style"],
|
|
12031
12090
|
signal: new AbortController().signal,
|
|
12032
|
-
customCredentials:
|
|
12091
|
+
customCredentials: s3OutputProvider,
|
|
12033
12092
|
requestHandler: null
|
|
12034
12093
|
});
|
|
12035
12094
|
downloadOrNothing = download;
|
|
@@ -12558,7 +12617,7 @@ var sitesCommand = (args, remotionRoot, logLevel, providerSpecifics) => {
|
|
|
12558
12617
|
import path8 from "path";
|
|
12559
12618
|
import { CliInternals as CliInternals21 } from "@remotion/cli";
|
|
12560
12619
|
import { ConfigInternals as ConfigInternals3 } from "@remotion/cli/config";
|
|
12561
|
-
import { LambdaClientInternals as
|
|
12620
|
+
import { LambdaClientInternals as LambdaClientInternals21 } from "@remotion/lambda-client";
|
|
12562
12621
|
import {
|
|
12563
12622
|
BINARY_NAME as BINARY_NAME12,
|
|
12564
12623
|
DEFAULT_MAX_RETRIES as DEFAULT_MAX_RETRIES2,
|
|
@@ -12672,7 +12731,7 @@ var stillCommand = async ({
|
|
|
12672
12731
|
}).value;
|
|
12673
12732
|
if (!composition) {
|
|
12674
12733
|
Log.info({ indent: false, logLevel }, "No compositions passed. Fetching compositions...");
|
|
12675
|
-
|
|
12734
|
+
LambdaClientInternals21.validateServeUrl(serveUrl);
|
|
12676
12735
|
if (!serveUrl.startsWith("https://") && !serveUrl.startsWith("http://")) {
|
|
12677
12736
|
throw Error(`Passing the shorthand serve URL without composition name is currently not supported.
|
|
12678
12737
|
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.`);
|
|
@@ -12730,6 +12789,16 @@ var stillCommand = async ({
|
|
|
12730
12789
|
}
|
|
12731
12790
|
const downloadName = args[2] ?? null;
|
|
12732
12791
|
const outName = parsedLambdaCli["out-name"];
|
|
12792
|
+
const s3OutputProvider = getS3OutputProviderFromCli({
|
|
12793
|
+
endpoint: parsedLambdaCli["s3-output-provider-endpoint"],
|
|
12794
|
+
region: parsedLambdaCli["s3-output-provider-region"],
|
|
12795
|
+
forcePathStyle: parsedLambdaCli["s3-output-provider-force-path-style"] || undefined
|
|
12796
|
+
});
|
|
12797
|
+
const resolvedOutName = makeOutNameWithCustomCredentials({
|
|
12798
|
+
bucketName: parsedLambdaCli["force-bucket-name"],
|
|
12799
|
+
key: outName,
|
|
12800
|
+
s3OutputProvider
|
|
12801
|
+
});
|
|
12733
12802
|
const functionName = await findFunctionName({ logLevel, providerSpecifics });
|
|
12734
12803
|
const maxRetries = parsedLambdaCli["max-retries"] ?? DEFAULT_MAX_RETRIES2;
|
|
12735
12804
|
validateMaxRetries(maxRetries);
|
|
@@ -12754,7 +12823,7 @@ var stillCommand = async ({
|
|
|
12754
12823
|
const jpegQuality = jpegQualityOption2.getValue({
|
|
12755
12824
|
commandLine: parsedCli
|
|
12756
12825
|
}).value;
|
|
12757
|
-
const res = await
|
|
12826
|
+
const res = await LambdaClientInternals21.internalRenderStillOnLambda({
|
|
12758
12827
|
functionName,
|
|
12759
12828
|
serveUrl,
|
|
12760
12829
|
inputProps,
|
|
@@ -12767,7 +12836,7 @@ var stillCommand = async ({
|
|
|
12767
12836
|
frame: stillFrame,
|
|
12768
12837
|
jpegQuality,
|
|
12769
12838
|
logLevel,
|
|
12770
|
-
outName:
|
|
12839
|
+
outName: resolvedOutName,
|
|
12771
12840
|
chromiumOptions,
|
|
12772
12841
|
timeoutInMilliseconds,
|
|
12773
12842
|
scale,
|
|
@@ -12800,7 +12869,7 @@ var stillCommand = async ({
|
|
|
12800
12869
|
mediaCacheSizeInBytes,
|
|
12801
12870
|
isProduction: parsedLambdaCli[BrowserSafeApis5.options.isProductionOption.cliFlag] ?? true
|
|
12802
12871
|
});
|
|
12803
|
-
Log.info({ indent: false, logLevel }, CliInternals21.chalk.gray(`Render ID: ${CliInternals21.makeHyperlink({ text: res.renderId, fallback: res.renderId, url:
|
|
12872
|
+
Log.info({ indent: false, logLevel }, CliInternals21.chalk.gray(`Render ID: ${CliInternals21.makeHyperlink({ text: res.renderId, fallback: res.renderId, url: LambdaClientInternals21.getS3RenderUrl({ bucketName: res.bucketName, renderId: res.renderId, region: getAwsRegion() }) })}`));
|
|
12804
12873
|
Log.info({ indent: false, logLevel }, CliInternals21.chalk.gray(`Bucket: ${CliInternals21.makeHyperlink({ text: res.bucketName, fallback: res.bucketName, url: `https://${getAwsRegion()}.console.aws.amazon.com/s3/buckets/${res.bucketName}/?region=${getAwsRegion()}` })}`));
|
|
12805
12874
|
const artifactProgress = makeArtifactProgress(res.artifacts);
|
|
12806
12875
|
if (artifactProgress) {
|
|
@@ -12824,7 +12893,7 @@ var stillCommand = async ({
|
|
|
12824
12893
|
providerSpecifics,
|
|
12825
12894
|
forcePathStyle: parsedLambdaCli["force-path-style"],
|
|
12826
12895
|
signal: new AbortController().signal,
|
|
12827
|
-
customCredentials:
|
|
12896
|
+
customCredentials: s3OutputProvider,
|
|
12828
12897
|
onProgress: () => {
|
|
12829
12898
|
return;
|
|
12830
12899
|
},
|
|
@@ -12974,7 +13043,7 @@ var matchCommand = ({
|
|
|
12974
13043
|
};
|
|
12975
13044
|
var executeCommand = async (args, remotionRoot, logLevel, _providerSpecifics, fullClientSpecifics) => {
|
|
12976
13045
|
try {
|
|
12977
|
-
const providerSpecifics = _providerSpecifics ??
|
|
13046
|
+
const providerSpecifics = _providerSpecifics ?? LambdaClientInternals22.awsImplementation;
|
|
12978
13047
|
await matchCommand({
|
|
12979
13048
|
args,
|
|
12980
13049
|
remotionRoot,
|
|
@@ -13018,8 +13087,8 @@ AWS returned an "ConcurrentInvocationLimitExceeded" error message which could me
|
|
|
13018
13087
|
`.trim());
|
|
13019
13088
|
}
|
|
13020
13089
|
if (error.stack?.includes("The security token included in the request is invalid")) {
|
|
13021
|
-
const keyButDoesntStartWithAki =
|
|
13022
|
-
const pureKeyButDoesntStartWithAki =
|
|
13090
|
+
const keyButDoesntStartWithAki = LambdaClientInternals22.getEnvVariable("REMOTION_AWS_ACCESS_KEY_ID") && !LambdaClientInternals22.getEnvVariable("REMOTION_AWS_ACCESS_KEY_ID").startsWith("AKI");
|
|
13091
|
+
const pureKeyButDoesntStartWithAki = LambdaClientInternals22.getEnvVariable("AWS_ACCESS_KEY_ID") && !LambdaClientInternals22.getEnvVariable("AWS_ACCESS_KEY_ID").startsWith("AKI");
|
|
13023
13092
|
if (keyButDoesntStartWithAki || pureKeyButDoesntStartWithAki) {
|
|
13024
13093
|
Log.error({ indent: false, logLevel }, `
|
|
13025
13094
|
AWS returned an error message "The security token included in the request is invalid". A possible reason is that your AWS Access key ID is set but doesn't start with "AKI", which it usually should. The original message is:
|
package/package.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"url": "https://github.com/remotion-dev/remotion/tree/main/packages/lambda"
|
|
4
4
|
},
|
|
5
5
|
"name": "@remotion/lambda",
|
|
6
|
-
"version": "4.0.
|
|
6
|
+
"version": "4.0.489",
|
|
7
7
|
"description": "Render Remotion videos on AWS Lambda",
|
|
8
8
|
"main": "dist/index.js",
|
|
9
9
|
"scripts": {
|
|
@@ -28,22 +28,22 @@
|
|
|
28
28
|
"@aws-sdk/client-cloudwatch-logs": "3.986.0",
|
|
29
29
|
"@aws-sdk/client-service-quotas": "3.986.0",
|
|
30
30
|
"@aws-sdk/lib-storage": "3.986.0",
|
|
31
|
-
"@remotion/bundler": "4.0.
|
|
32
|
-
"@remotion/cli": "4.0.
|
|
33
|
-
"@remotion/lambda-client": "4.0.
|
|
34
|
-
"@remotion/renderer": "4.0.
|
|
35
|
-
"@remotion/serverless": "4.0.
|
|
36
|
-
"@remotion/streaming": "4.0.
|
|
31
|
+
"@remotion/bundler": "4.0.489",
|
|
32
|
+
"@remotion/cli": "4.0.489",
|
|
33
|
+
"@remotion/lambda-client": "4.0.489",
|
|
34
|
+
"@remotion/renderer": "4.0.489",
|
|
35
|
+
"@remotion/serverless": "4.0.489",
|
|
36
|
+
"@remotion/streaming": "4.0.489",
|
|
37
37
|
"@smithy/abort-controller": "4.0.1",
|
|
38
|
-
"remotion": "4.0.
|
|
38
|
+
"remotion": "4.0.489",
|
|
39
39
|
"zod": "4.3.6"
|
|
40
40
|
},
|
|
41
41
|
"devDependencies": {
|
|
42
|
-
"@remotion/bundler": "4.0.
|
|
42
|
+
"@remotion/bundler": "4.0.489",
|
|
43
43
|
"@types/express": "5.0.1",
|
|
44
44
|
"express": "4.21.0",
|
|
45
|
-
"@remotion/compositor-linux-arm64-gnu": "4.0.
|
|
46
|
-
"@remotion/eslint-config-internal": "4.0.
|
|
45
|
+
"@remotion/compositor-linux-arm64-gnu": "4.0.489",
|
|
46
|
+
"@remotion/eslint-config-internal": "4.0.489",
|
|
47
47
|
"mime-types": "2.1.34",
|
|
48
48
|
"@types/mime-types": "2.1.1",
|
|
49
49
|
"@types/minimist": "1.2.2",
|
|
@@ -54,7 +54,7 @@
|
|
|
54
54
|
"@typescript/native-preview": "7.0.0-dev.20260217.1"
|
|
55
55
|
},
|
|
56
56
|
"peerDependencies": {
|
|
57
|
-
"@remotion/bundler": "4.0.
|
|
57
|
+
"@remotion/bundler": "4.0.489"
|
|
58
58
|
},
|
|
59
59
|
"publishConfig": {
|
|
60
60
|
"access": "public"
|
package/remotionlambda-arm64.zip
CHANGED
|
Binary file
|