@remotion/lambda 3.2.39 → 3.2.41

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/LICENSE.md CHANGED
@@ -36,6 +36,6 @@ Support is provided on a best-we-can-do basis via GitHub Issues and Discord.
36
36
 
37
37
  ## Company license
38
38
 
39
- You are required to obtain a company license to use Remotion if you are not within the group of entities eligible for a free license. This license will enable you to use Remotion for the allowed use cases specified in the free license, and give you access to prioritized support.
39
+ You are required to obtain a company license to use Remotion if you are not within the group of entities eligible for a free license. This license will enable you to use Remotion for the allowed use cases specified in the free license, and give you access to prioritized support (read the [Support Policy](/docs/support)).
40
40
 
41
41
  Visit [companies.remotion.dev](https://companies.remotion.dev) for pricing and to buy a license.
@@ -37,6 +37,8 @@ export declare type RenderMediaOnLambdaInput = {
37
37
  url: string;
38
38
  secret: string | null;
39
39
  };
40
+ forceWidth?: number | null;
41
+ forceHeight?: number | null;
40
42
  };
41
43
  export declare type RenderMediaOnLambdaOutput = {
42
44
  renderId: string;
@@ -62,8 +64,8 @@ export declare type RenderMediaOnLambdaOutput = {
62
64
  * @param params.webhook Configuration for webhook called upon completion or timeout of the render.
63
65
  * @returns {Promise<RenderMediaOnLambdaOutput>} See documentation for detailed structure
64
66
  */
65
- export declare const renderMediaOnLambda: ({ functionName, serveUrl, inputProps, codec, imageFormat, crf, envVariables, pixelFormat, proResProfile, quality, region, maxRetries, composition, framesPerLambda, privacy, logLevel, frameRange, outName, timeoutInMilliseconds, chromiumOptions, scale, numberOfGifLoops, everyNthFrame, concurrencyPerLambda, downloadBehavior, muted, overwrite, audioBitrate, videoBitrate, webhook, }: RenderMediaOnLambdaInput) => Promise<RenderMediaOnLambdaOutput>;
67
+ export declare const renderMediaOnLambda: ({ functionName, serveUrl, inputProps, codec, imageFormat, crf, envVariables, pixelFormat, proResProfile, quality, region, maxRetries, composition, framesPerLambda, privacy, logLevel, frameRange, outName, timeoutInMilliseconds, chromiumOptions, scale, numberOfGifLoops, everyNthFrame, concurrencyPerLambda, downloadBehavior, muted, overwrite, audioBitrate, videoBitrate, webhook, forceHeight, forceWidth, }: RenderMediaOnLambdaInput) => Promise<RenderMediaOnLambdaOutput>;
66
68
  /**
67
69
  * @deprecated Renamed to renderMediaOnLambda()
68
70
  */
69
- export declare const renderVideoOnLambda: ({ functionName, serveUrl, inputProps, codec, imageFormat, crf, envVariables, pixelFormat, proResProfile, quality, region, maxRetries, composition, framesPerLambda, privacy, logLevel, frameRange, outName, timeoutInMilliseconds, chromiumOptions, scale, numberOfGifLoops, everyNthFrame, concurrencyPerLambda, downloadBehavior, muted, overwrite, audioBitrate, videoBitrate, webhook, }: RenderMediaOnLambdaInput) => Promise<RenderMediaOnLambdaOutput>;
71
+ export declare const renderVideoOnLambda: ({ functionName, serveUrl, inputProps, codec, imageFormat, crf, envVariables, pixelFormat, proResProfile, quality, region, maxRetries, composition, framesPerLambda, privacy, logLevel, frameRange, outName, timeoutInMilliseconds, chromiumOptions, scale, numberOfGifLoops, everyNthFrame, concurrencyPerLambda, downloadBehavior, muted, overwrite, audioBitrate, videoBitrate, webhook, forceHeight, forceWidth, }: RenderMediaOnLambdaInput) => Promise<RenderMediaOnLambdaOutput>;
@@ -30,7 +30,7 @@ const validate_serveurl_1 = require("../shared/validate-serveurl");
30
30
  * @param params.webhook Configuration for webhook called upon completion or timeout of the render.
31
31
  * @returns {Promise<RenderMediaOnLambdaOutput>} See documentation for detailed structure
32
32
  */
33
- const renderMediaOnLambda = async ({ functionName, serveUrl, inputProps, codec, imageFormat, crf, envVariables, pixelFormat, proResProfile, quality, region, maxRetries, composition, framesPerLambda, privacy, logLevel, frameRange, outName, timeoutInMilliseconds, chromiumOptions, scale, numberOfGifLoops, everyNthFrame, concurrencyPerLambda, downloadBehavior, muted, overwrite, audioBitrate, videoBitrate, webhook, }) => {
33
+ const renderMediaOnLambda = async ({ functionName, serveUrl, inputProps, codec, imageFormat, crf, envVariables, pixelFormat, proResProfile, quality, region, maxRetries, composition, framesPerLambda, privacy, logLevel, frameRange, outName, timeoutInMilliseconds, chromiumOptions, scale, numberOfGifLoops, everyNthFrame, concurrencyPerLambda, downloadBehavior, muted, overwrite, audioBitrate, videoBitrate, webhook, forceHeight, forceWidth, }) => {
34
34
  var _a;
35
35
  const actualCodec = (0, validate_lambda_codec_1.validateLambdaCodec)(codec);
36
36
  (0, validate_serveurl_1.validateServeUrl)(serveUrl);
@@ -81,6 +81,8 @@ const renderMediaOnLambda = async ({ functionName, serveUrl, inputProps, codec,
81
81
  audioBitrate: audioBitrate !== null && audioBitrate !== void 0 ? audioBitrate : null,
82
82
  videoBitrate: videoBitrate !== null && videoBitrate !== void 0 ? videoBitrate : null,
83
83
  webhook: webhook !== null && webhook !== void 0 ? webhook : null,
84
+ forceHeight: forceHeight !== null && forceHeight !== void 0 ? forceHeight : null,
85
+ forceWidth: forceWidth !== null && forceWidth !== void 0 ? forceWidth : null,
84
86
  },
85
87
  region,
86
88
  });
@@ -20,6 +20,8 @@ export declare type RenderStillOnLambdaInput = {
20
20
  chromiumOptions?: ChromiumOptions;
21
21
  scale?: number;
22
22
  downloadBehavior?: DownloadBehavior;
23
+ forceWidth?: number | null;
24
+ forceHeight?: number | null;
23
25
  };
24
26
  export declare type RenderStillOnLambdaOutput = {
25
27
  estimatedPrice: CostsInfo;
@@ -45,4 +47,4 @@ export declare type RenderStillOnLambdaOutput = {
45
47
  * @param params.privacy Whether the item in the S3 bucket should be public. Possible values: `"private"` and `"public"`
46
48
  * @returns {Promise<RenderStillOnLambdaOutput>} See documentation for exact response structure.
47
49
  */
48
- export declare const renderStillOnLambda: ({ functionName, serveUrl, inputProps, imageFormat, envVariables, quality, region, maxRetries, composition, privacy, frame, logLevel, outName, timeoutInMilliseconds, chromiumOptions, scale, downloadBehavior, }: RenderStillOnLambdaInput) => Promise<RenderStillOnLambdaOutput>;
50
+ export declare const renderStillOnLambda: ({ functionName, serveUrl, inputProps, imageFormat, envVariables, quality, region, maxRetries, composition, privacy, frame, logLevel, outName, timeoutInMilliseconds, chromiumOptions, scale, downloadBehavior, forceHeight, forceWidth, }: RenderStillOnLambdaInput) => Promise<RenderStillOnLambdaOutput>;
@@ -23,7 +23,7 @@ const serialize_input_props_1 = require("../shared/serialize-input-props");
23
23
  * @param params.privacy Whether the item in the S3 bucket should be public. Possible values: `"private"` and `"public"`
24
24
  * @returns {Promise<RenderStillOnLambdaOutput>} See documentation for exact response structure.
25
25
  */
26
- const renderStillOnLambda = async ({ functionName, serveUrl, inputProps, imageFormat, envVariables, quality, region, maxRetries, composition, privacy, frame, logLevel, outName, timeoutInMilliseconds, chromiumOptions, scale, downloadBehavior, }) => {
26
+ const renderStillOnLambda = async ({ functionName, serveUrl, inputProps, imageFormat, envVariables, quality, region, maxRetries, composition, privacy, frame, logLevel, outName, timeoutInMilliseconds, chromiumOptions, scale, downloadBehavior, forceHeight, forceWidth, }) => {
27
27
  var _a;
28
28
  const realServeUrl = await (0, convert_to_serve_url_1.convertToServeUrl)(serveUrl, region);
29
29
  const serializedInputProps = await (0, serialize_input_props_1.serializeInputProps)({
@@ -53,6 +53,8 @@ const renderStillOnLambda = async ({ functionName, serveUrl, inputProps, imageFo
53
53
  scale: scale !== null && scale !== void 0 ? scale : 1,
54
54
  downloadBehavior: downloadBehavior !== null && downloadBehavior !== void 0 ? downloadBehavior : { type: 'play-in-browser' },
55
55
  version: version_1.VERSION,
56
+ forceHeight: forceHeight !== null && forceHeight !== void 0 ? forceHeight : null,
57
+ forceWidth: forceWidth !== null && forceWidth !== void 0 ? forceWidth : null,
56
58
  },
57
59
  region,
58
60
  });
@@ -46,11 +46,11 @@ const renderCommand = async (args) => {
46
46
  downloadName,
47
47
  outName: outName !== null && outName !== void 0 ? outName : null,
48
48
  });
49
- const { chromiumOptions, crf, envVariables, frameRange, imageFormat, inputProps, logLevel, pixelFormat, proResProfile, puppeteerTimeout, quality, scale, everyNthFrame, numberOfGifLoops, muted, overwrite, audioBitrate, videoBitrate, } = await cli_1.CliInternals.getCliOptions({
49
+ const { chromiumOptions, crf, envVariables, frameRange, inputProps, logLevel, pixelFormat, proResProfile, puppeteerTimeout, quality, scale, everyNthFrame, numberOfGifLoops, muted, overwrite, audioBitrate, videoBitrate, height, width, } = await cli_1.CliInternals.getCliOptions({
50
50
  type: 'series',
51
51
  isLambda: true,
52
- codec,
53
52
  });
53
+ const imageFormat = cli_1.CliInternals.getImageFormat(codec);
54
54
  const functionName = await (0, find_function_name_1.findFunctionName)();
55
55
  const maxRetries = (_b = args_1.parsedLambdaCli['max-retries']) !== null && _b !== void 0 ? _b : constants_1.DEFAULT_MAX_RETRIES;
56
56
  (0, validate_retries_1.validateMaxRetries)(maxRetries);
@@ -87,6 +87,8 @@ const renderCommand = async (args) => {
87
87
  overwrite,
88
88
  audioBitrate,
89
89
  videoBitrate,
90
+ forceHeight: height,
91
+ forceWidth: width,
90
92
  webhook: args_1.parsedLambdaCli.webhook
91
93
  ? {
92
94
  url: args_1.parsedLambdaCli.webhook,
@@ -1,2 +1,2 @@
1
1
  export declare const SITES_CREATE_SUBCOMMAND = "create";
2
- export declare const sitesCreateSubcommand: (args: string[]) => Promise<void>;
2
+ export declare const sitesCreateSubcommand: (args: string[], remotionRoot: string) => Promise<void>;
@@ -17,17 +17,19 @@ const progress_bar_1 = require("../../helpers/progress-bar");
17
17
  const quit_1 = require("../../helpers/quit");
18
18
  const log_1 = require("../../log");
19
19
  exports.SITES_CREATE_SUBCOMMAND = 'create';
20
- const sitesCreateSubcommand = async (args) => {
20
+ const sitesCreateSubcommand = async (args, remotionRoot) => {
21
21
  var _a, _b;
22
- const fileName = args[0];
23
- if (!fileName) {
22
+ const { file, reason } = cli_1.CliInternals.findEntryPoint(args, remotionRoot);
23
+ if (!file) {
24
24
  log_1.Log.error('No entry file passed.');
25
25
  log_1.Log.info('Pass an additional argument specifying the entry file of your Remotion project:');
26
26
  log_1.Log.info();
27
27
  log_1.Log.info(`${constants_1.BINARY_NAME} deploy <entry-file.ts>`);
28
28
  (0, quit_1.quit)(1);
29
+ return;
29
30
  }
30
- const absoluteFile = path_1.default.join(process.cwd(), fileName);
31
+ log_1.Log.verbose('Entry point:', file, 'Reason:', reason);
32
+ const absoluteFile = path_1.default.join(process.cwd(), file);
31
33
  if (!(0, fs_1.existsSync)(absoluteFile)) {
32
34
  log_1.Log.error(`No file exists at ${absoluteFile}. Make sure the path exists and try again.`);
33
35
  (0, quit_1.quit)(1);
@@ -1,2 +1,2 @@
1
1
  export declare const SITES_COMMAND = "sites";
2
- export declare const sitesCommand: (args: string[]) => Promise<void> | undefined;
2
+ export declare const sitesCommand: (args: string[], remotionRoot: string) => Promise<void> | undefined;
@@ -24,7 +24,7 @@ const printSitesHelp = () => {
24
24
  log_1.Log.info(`${constants_1.BINARY_NAME} ${exports.SITES_COMMAND} ${rm_1.SITES_RM_COMMAND} <site-id>`);
25
25
  log_1.Log.info(cli_1.CliInternals.chalk.gray('Remove a site from the S3 bucket.'));
26
26
  };
27
- const sitesCommand = (args) => {
27
+ const sitesCommand = (args, remotionRoot) => {
28
28
  if (args[0] === ls_1.SITES_LS_SUBCOMMAND) {
29
29
  return (0, ls_1.sitesLsSubcommand)();
30
30
  }
@@ -35,7 +35,7 @@ const sitesCommand = (args) => {
35
35
  return (0, rmall_1.sitesRmallSubcommand)();
36
36
  }
37
37
  if (args[0] === create_1.SITES_CREATE_SUBCOMMAND) {
38
- return (0, create_1.sitesCreateSubcommand)(args.slice(1));
38
+ return (0, create_1.sitesCreateSubcommand)(args.slice(1), remotionRoot);
39
39
  }
40
40
  if (args[0]) {
41
41
  log_1.Log.error(`Subcommand ${args[0]} not found.`);
@@ -40,10 +40,9 @@ const stillCommand = async (args) => {
40
40
  }
41
41
  const downloadName = (_a = args[2]) !== null && _a !== void 0 ? _a : null;
42
42
  const outName = args_1.parsedLambdaCli['out-name'];
43
- const { chromiumOptions, envVariables, inputProps, logLevel, puppeteerTimeout, quality, stillFrame, scale, } = await cli_1.CliInternals.getCliOptions({
43
+ const { chromiumOptions, envVariables, inputProps, logLevel, puppeteerTimeout, quality, stillFrame, scale, height, width, } = await cli_1.CliInternals.getCliOptions({
44
44
  type: 'still',
45
45
  isLambda: true,
46
- codec: 'h264',
47
46
  });
48
47
  const functionName = await (0, find_function_name_1.findFunctionName)();
49
48
  const maxRetries = (_b = args_1.parsedLambdaCli['max-retries']) !== null && _b !== void 0 ? _b : constants_1.DEFAULT_MAX_RETRIES;
@@ -76,6 +75,8 @@ const stillCommand = async (args) => {
76
75
  chromiumOptions,
77
76
  timeoutInMilliseconds: puppeteerTimeout,
78
77
  scale,
78
+ forceHeight: height,
79
+ forceWidth: width,
79
80
  });
80
81
  log_1.Log.info(cli_1.CliInternals.chalk.gray(`Bucket = ${res.bucketName}, renderId = ${res.renderId}`));
81
82
  log_1.Log.verbose(`CloudWatch logs (if enabled): ${res.cloudWatchLogs}`);
@@ -1,2 +1,2 @@
1
- export declare const executeCommand: (args: string[]) => Promise<void>;
1
+ export declare const executeCommand: (args: string[], remotionRoot: string) => Promise<void>;
2
2
  export declare const cli: () => Promise<void>;
package/dist/cli/index.js CHANGED
@@ -34,7 +34,7 @@ const requiresCredentials = (args) => {
34
34
  }
35
35
  return true;
36
36
  };
37
- const matchCommand = (args) => {
37
+ const matchCommand = (args, remotionRoot) => {
38
38
  if (args_1.parsedLambdaCli.help || args.length === 0) {
39
39
  (0, help_1.printHelp)();
40
40
  (0, quit_1.quit)(0);
@@ -61,7 +61,7 @@ const matchCommand = (args) => {
61
61
  return (0, regions_1.regionsCommand)();
62
62
  }
63
63
  if (args[0] === sites_1.SITES_COMMAND) {
64
- return (0, sites_1.sitesCommand)(args.slice(1));
64
+ return (0, sites_1.sitesCommand)(args.slice(1), remotionRoot);
65
65
  }
66
66
  if (args[0] === 'upload') {
67
67
  log_1.Log.info('The command has been renamed.');
@@ -91,11 +91,11 @@ const matchCommand = (args) => {
91
91
  (0, help_1.printHelp)();
92
92
  (0, quit_1.quit)(1);
93
93
  };
94
- const executeCommand = async (args) => {
94
+ const executeCommand = async (args, remotionRoot) => {
95
95
  var _a, _b;
96
96
  try {
97
97
  (0, is_cli_1.setIsCli)(true);
98
- await matchCommand(args);
98
+ await matchCommand(args, remotionRoot);
99
99
  }
100
100
  catch (err) {
101
101
  const error = err;
@@ -133,7 +133,8 @@ AWS returned an "TooManyRequestsException" error message which could mean you re
133
133
  };
134
134
  exports.executeCommand = executeCommand;
135
135
  const cli = async () => {
136
- await cli_1.CliInternals.initializeCli(cli_1.CliInternals.findRemotionRoot());
137
- await (0, exports.executeCommand)(args_1.parsedLambdaCli._);
136
+ const remotionRoot = cli_1.CliInternals.findRemotionRoot();
137
+ await cli_1.CliInternals.initializeCli(remotionRoot);
138
+ await (0, exports.executeCommand)(args_1.parsedLambdaCli._, remotionRoot);
138
139
  };
139
140
  exports.cli = cli;
@@ -3,8 +3,5 @@ export declare const planFrameRanges: ({ framesPerLambda, frameRange, everyNthFr
3
3
  frameRange: [number, number];
4
4
  everyNthFrame: number;
5
5
  }) => {
6
- chunks: [
7
- number,
8
- number
9
- ][];
6
+ chunks: [number, number][];
10
7
  };
@@ -13,6 +13,8 @@ declare type ValidateCompositionOptions = {
13
13
  chromiumOptions: ChromiumOptions;
14
14
  port: number | null;
15
15
  downloadMap: DownloadMap;
16
+ forceHeight: number | null;
17
+ forceWidth: number | null;
16
18
  };
17
- export declare const validateComposition: ({ serveUrl, composition, browserInstance, inputProps, envVariables, timeoutInMilliseconds, ffmpegExecutable, ffprobeExecutable, chromiumOptions, port, downloadMap, }: ValidateCompositionOptions) => Promise<TCompMetadata>;
19
+ export declare const validateComposition: ({ serveUrl, composition, browserInstance, inputProps, envVariables, timeoutInMilliseconds, ffmpegExecutable, ffprobeExecutable, chromiumOptions, port, downloadMap, forceHeight, forceWidth, }: ValidateCompositionOptions) => Promise<TCompMetadata>;
18
20
  export {};
@@ -2,7 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.validateComposition = void 0;
4
4
  const renderer_1 = require("@remotion/renderer");
5
- const validateComposition = async ({ serveUrl, composition, browserInstance, inputProps, envVariables, timeoutInMilliseconds, ffmpegExecutable, ffprobeExecutable, chromiumOptions, port, downloadMap, }) => {
5
+ const validateComposition = async ({ serveUrl, composition, browserInstance, inputProps, envVariables, timeoutInMilliseconds, ffmpegExecutable, ffprobeExecutable, chromiumOptions, port, downloadMap, forceHeight, forceWidth, }) => {
6
6
  const compositions = await (0, renderer_1.getCompositions)(serveUrl, {
7
7
  puppeteerInstance: browserInstance,
8
8
  inputProps: inputProps,
@@ -20,6 +20,10 @@ const validateComposition = async ({ serveUrl, composition, browserInstance, inp
20
20
  .map((c) => c.id)
21
21
  .join(', ')}`);
22
22
  }
23
- return found;
23
+ return {
24
+ ...found,
25
+ height: forceHeight !== null && forceHeight !== void 0 ? forceHeight : found.height,
26
+ width: forceWidth !== null && forceWidth !== void 0 ? forceWidth : found.width,
27
+ };
24
28
  };
25
29
  exports.validateComposition = validateComposition;
@@ -128,6 +128,8 @@ const innerLaunchHandler = async (params, options) => {
128
128
  chromiumOptions: params.chromiumOptions,
129
129
  port: null,
130
130
  downloadMap,
131
+ forceHeight: params.forceHeight,
132
+ forceWidth: params.forceWidth,
131
133
  });
132
134
  remotion_1.Internals.validateDurationInFrames(comp.durationInFrames, 'passed to a Lambda render');
133
135
  remotion_1.Internals.validateFps(comp.fps, 'passed to a Lambda render', false);
@@ -12,9 +12,9 @@ const progressHandler = (lambdaParams, options) => {
12
12
  }
13
13
  if (lambdaParams.version !== version_1.VERSION) {
14
14
  if (!lambdaParams.version) {
15
- throw new Error(`Version mismatch: When calling getRenderProgress(), the deployed Lambda function had version ${version_1.VERSION} but the @remotion/lambda package is an older version. Align the versions.`);
15
+ throw new Error(`Version mismatch: When calling renderStillOnLambda(), you called the function ${process.env.AWS_LAMBDA_FUNCTION_NAME} which has the version ${version_1.VERSION} but the @remotion/lambda package is an older version. Deploy a new function and use it to call renderStillOnLambda(). See: https://www.remotion.dev/docs/lambda/upgrading`);
16
16
  }
17
- throw new Error(`Version mismatch: When calling getRenderProgress(), get deployed Lambda function had version ${version_1.VERSION} and the @remotion/lambda package has version ${lambdaParams.version}. Align the versions.`);
17
+ throw new Error(`Version mismatch: When calling renderStillOnLambda(), you passed ${process.env.AWS_LAMBDA_FUNCTION_NAME} as the function, which has the version ${version_1.VERSION}, but the @remotion/lambda package you used to invoke the function has version ${lambdaParams.version}. Deploy a new function and use it to call renderStillOnLambda(). See: https://www.remotion.dev/docs/lambda/upgrading`);
18
18
  }
19
19
  return (0, get_progress_1.getProgress)({
20
20
  bucketName: lambdaParams.bucketName,
@@ -16,9 +16,9 @@ const startHandler = async (params, options) => {
16
16
  }
17
17
  if (params.version !== version_1.VERSION) {
18
18
  if (!params.version) {
19
- throw new Error(`Version mismatch: When calling renderMediaOnLambda(), the deployed Lambda function had version ${version_1.VERSION} but the @remotion/lambda package is an older version. Align the versions.`);
19
+ throw new Error(`Version mismatch: When calling renderMediaOnLambda(), you called the function ${process.env.AWS_LAMBDA_FUNCTION_NAME} which has the version ${version_1.VERSION} but the @remotion/lambda package is an older version. Deploy a new function and use it to call renderMediaOnLambda(). See: https://www.remotion.dev/docs/lambda/upgrading`);
20
20
  }
21
- throw new Error(`Version mismatch: When calling renderMediaOnLambda(), get deployed Lambda function had version ${version_1.VERSION} and the @remotion/lambda package has version ${params.version}. Align the versions.`);
21
+ throw new Error(`Version mismatch: When calling renderMediaOnLambda(), you passed ${process.env.AWS_LAMBDA_FUNCTION_NAME} as the function, which has the version ${version_1.VERSION}, but the @remotion/lambda package you used to invoke the function has version ${params.version}. Deploy a new function and use it to call renderMediaOnLambda(). See: https://www.remotion.dev/docs/lambda/upgrading`);
22
22
  }
23
23
  const { bucketName } = await (0, get_or_create_bucket_1.getOrCreateBucket)({
24
24
  region: (0, get_current_region_1.getCurrentRegionInFunction)(),
@@ -66,6 +66,8 @@ const startHandler = async (params, options) => {
66
66
  webhook: params.webhook,
67
67
  audioBitrate: params.audioBitrate,
68
68
  videoBitrate: params.videoBitrate,
69
+ forceHeight: params.forceHeight,
70
+ forceWidth: params.forceWidth,
69
71
  };
70
72
  await (0, aws_clients_1.getLambdaClient)((0, get_current_region_1.getCurrentRegionInFunction)()).send(new client_lambda_1.InvokeCommand({
71
73
  FunctionName: process.env.AWS_LAMBDA_FUNCTION_NAME,
@@ -35,10 +35,12 @@ const innerStillHandler = async (lambdaParams, renderId, options) => {
35
35
  throw new TypeError('Expected still type');
36
36
  }
37
37
  if (lambdaParams.version !== version_1.VERSION) {
38
- if (!lambdaParams.version) {
39
- throw new Error(`Version mismatch: When calling renderStillOnLambda(), the deployed Lambda function had version ${version_1.VERSION} but the @remotion/lambda package is an older version. Align the versions.`);
38
+ if (lambdaParams.version !== version_1.VERSION) {
39
+ if (!lambdaParams.version) {
40
+ throw new Error(`Version mismatch: When calling renderMediaOnLambda(), you called the function ${process.env.AWS_LAMBDA_FUNCTION_NAME} which has the version ${version_1.VERSION} but the @remotion/lambda package is an older version. Deploy a new function and use it to call renderMediaOnLambda(). See: https://www.remotion.dev/docs/lambda/upgrading`);
41
+ }
42
+ throw new Error(`Version mismatch: When calling renderMediaOnLambda(), you passed ${process.env.AWS_LAMBDA_FUNCTION_NAME} as the function, which has the version ${version_1.VERSION}, but the @remotion/lambda package you used to invoke the function has version ${lambdaParams.version}. Deploy a new function and use it to call renderMediaOnLambda(). See: https://www.remotion.dev/docs/lambda/upgrading`);
40
43
  }
41
- throw new Error(`Version mismatch: When calling renderStillOnLambda(), get deployed Lambda function had version ${version_1.VERSION} and the @remotion/lambda package has version ${lambdaParams.version}. Align the versions.`);
42
44
  }
43
45
  (0, validate_download_behavior_1.validateDownloadBehavior)(lambdaParams.downloadBehavior);
44
46
  (0, validate_privacy_1.validatePrivacy)(lambdaParams.privacy);
@@ -71,6 +73,8 @@ const innerStillHandler = async (lambdaParams, renderId, options) => {
71
73
  timeoutInMilliseconds: lambdaParams.timeoutInMilliseconds,
72
74
  port: null,
73
75
  downloadMap,
76
+ forceHeight: lambdaParams.forceHeight,
77
+ forceWidth: lambdaParams.forceWidth,
74
78
  });
75
79
  const renderMetadata = {
76
80
  startedDate: Date.now(),
@@ -1,3 +1,3 @@
1
1
  export declare const LambdaInternals: {
2
- executeCommand: (args: string[]) => Promise<void>;
2
+ executeCommand: (args: string[], remotionRoot: string) => Promise<void>;
3
3
  };
@@ -139,6 +139,8 @@ export declare type LambdaPayloads = {
139
139
  audioBitrate: string | null;
140
140
  videoBitrate: string | null;
141
141
  webhook: WebhookOption;
142
+ forceHeight: number | null;
143
+ forceWidth: number | null;
142
144
  };
143
145
  launch: {
144
146
  type: LambdaRoutines.launch;
@@ -172,6 +174,8 @@ export declare type LambdaPayloads = {
172
174
  audioBitrate: string | null;
173
175
  videoBitrate: string | null;
174
176
  webhook: WebhookOption;
177
+ forceHeight: number | null;
178
+ forceWidth: number | null;
175
179
  };
176
180
  status: {
177
181
  type: LambdaRoutines.status;
@@ -232,6 +236,8 @@ export declare type LambdaPayloads = {
232
236
  scale: number;
233
237
  downloadBehavior: DownloadBehavior | null;
234
238
  version: string;
239
+ forceHeight: number | null;
240
+ forceWidth: number | null;
235
241
  };
236
242
  };
237
243
  export declare type LambdaPayload = LambdaPayloads[LambdaRoutines];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@remotion/lambda",
3
- "version": "3.2.39",
3
+ "version": "3.2.41",
4
4
  "description": "Distributed renderer for Remotion based on AWS Lambda",
5
5
  "main": "dist/index.js",
6
6
  "sideEffects": false,
@@ -15,7 +15,7 @@
15
15
  "build": "tsc -d && pnpm run buildlambda",
16
16
  "buildlambda": "ts-node src/admin/bundle-lambda.ts",
17
17
  "start": "ts-node src/run.ts",
18
- "prepublish": "ts-node src/admin/bundle-lambda.ts && node ensure-version-match.js"
18
+ "prepublishOnly": "ts-node src/admin/bundle-lambda.ts && node ensure-version-match.js"
19
19
  },
20
20
  "author": "",
21
21
  "license": "MIT",
@@ -31,12 +31,12 @@
31
31
  "@aws-sdk/client-service-quotas": "3.190.0",
32
32
  "@aws-sdk/lib-storage": "3.190.0",
33
33
  "@aws-sdk/s3-request-presigner": "3.190.0",
34
- "@remotion/bundler": "3.2.39",
35
- "@remotion/cli": "3.2.39",
36
- "@remotion/renderer": "3.2.39",
34
+ "@remotion/bundler": "3.2.41",
35
+ "@remotion/cli": "3.2.41",
36
+ "@remotion/renderer": "3.2.41",
37
37
  "aws-policies": "^1.0.1",
38
38
  "mime-types": "2.1.34",
39
- "remotion": "3.2.39"
39
+ "remotion": "3.2.41"
40
40
  },
41
41
  "peerDependencies": {
42
42
  "react": ">=16.8.0",
@@ -59,5 +59,5 @@
59
59
  "publishConfig": {
60
60
  "access": "public"
61
61
  },
62
- "gitHead": "406632092cb2b96ac34d489808283508298c4e1f"
62
+ "gitHead": "017d1f002dfe81d451e4707ca0a58f30e3a080b9"
63
63
  }
Binary file