@remotion/lambda 3.2.44 → 3.3.0

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.
@@ -1,2 +1,2 @@
1
1
  export declare const RENDER_COMMAND = "render";
2
- export declare const renderCommand: (args: string[]) => Promise<never>;
2
+ export declare const renderCommand: (args: string[], remotionRoot: string) => Promise<never>;
@@ -20,7 +20,7 @@ const quit_1 = require("../../helpers/quit");
20
20
  const log_1 = require("../../log");
21
21
  const progress_1 = require("./progress");
22
22
  exports.RENDER_COMMAND = 'render';
23
- const renderCommand = async (args) => {
23
+ const renderCommand = async (args, remotionRoot) => {
24
24
  var _a, _b, _c, _d, _e;
25
25
  const serveUrl = args[0];
26
26
  if (!serveUrl) {
@@ -49,6 +49,7 @@ const renderCommand = async (args) => {
49
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
+ remotionRoot,
52
53
  });
53
54
  const imageFormat = cli_1.CliInternals.getImageFormat(codec);
54
55
  const functionName = await (0, find_function_name_1.findFunctionName)();
@@ -1,2 +1,2 @@
1
1
  export declare const STILL_COMMAND = "still";
2
- export declare const stillCommand: (args: string[]) => Promise<void>;
2
+ export declare const stillCommand: (args: string[], remotionRoot: string) => Promise<void>;
@@ -16,7 +16,7 @@ const find_function_name_1 = require("../helpers/find-function-name");
16
16
  const quit_1 = require("../helpers/quit");
17
17
  const log_1 = require("../log");
18
18
  exports.STILL_COMMAND = 'still';
19
- const stillCommand = async (args) => {
19
+ const stillCommand = async (args, remotionRoot) => {
20
20
  var _a, _b, _c, _d, _e, _f;
21
21
  const serveUrl = args[0];
22
22
  if (!serveUrl) {
@@ -43,6 +43,7 @@ const stillCommand = async (args) => {
43
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
+ remotionRoot,
46
47
  });
47
48
  const functionName = await (0, find_function_name_1.findFunctionName)();
48
49
  const maxRetries = (_b = args_1.parsedLambdaCli['max-retries']) !== null && _b !== void 0 ? _b : constants_1.DEFAULT_MAX_RETRIES;
package/dist/cli/index.js CHANGED
@@ -2,6 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.cli = exports.executeCommand = void 0;
4
4
  const cli_1 = require("@remotion/cli");
5
+ const renderer_1 = require("@remotion/renderer");
5
6
  const suggested_policy_1 = require("../api/iam-validation/suggested-policy");
6
7
  const defaults_1 = require("../defaults");
7
8
  const check_credentials_1 = require("../shared/check-credentials");
@@ -43,10 +44,10 @@ const matchCommand = (args, remotionRoot) => {
43
44
  (0, check_credentials_1.checkCredentials)();
44
45
  }
45
46
  if (args[0] === render_1.RENDER_COMMAND) {
46
- return (0, render_1.renderCommand)(args.slice(1));
47
+ return (0, render_1.renderCommand)(args.slice(1), remotionRoot);
47
48
  }
48
49
  if (args[0] === still_1.STILL_COMMAND) {
49
- return (0, still_1.stillCommand)(args.slice(1));
50
+ return (0, still_1.stillCommand)(args.slice(1), remotionRoot);
50
51
  }
51
52
  if (args[0] === functions_1.FUNCTIONS_COMMAND) {
52
53
  return (0, functions_1.functionsCommand)(args.slice(1));
@@ -133,7 +134,7 @@ AWS returned an "TooManyRequestsException" error message which could mean you re
133
134
  };
134
135
  exports.executeCommand = executeCommand;
135
136
  const cli = async () => {
136
- const remotionRoot = cli_1.CliInternals.findRemotionRoot();
137
+ const remotionRoot = renderer_1.RenderInternals.findRemotionRoot();
137
138
  await cli_1.CliInternals.initializeCli(remotionRoot);
138
139
  await (0, exports.executeCommand)(args_1.parsedLambdaCli._, remotionRoot);
139
140
  };
@@ -1,7 +1,8 @@
1
+ import type { FfmpegExecutable } from '@remotion/renderer';
1
2
  import type { AwsRegion } from '../../pricing/aws-regions';
2
3
  import type { LambdaCodec } from '../../shared/validate-lambda-codec';
3
4
  import type { EnhancedErrorInfo } from './write-lambda-error';
4
- export declare const concatVideosS3: ({ bucket, expectedFiles, onProgress, numberOfFrames, renderId, region, codec, expectedBucketOwner, fps, numberOfGifLoops, onErrors, }: {
5
+ export declare const concatVideosS3: ({ bucket, expectedFiles, onProgress, numberOfFrames, renderId, region, codec, expectedBucketOwner, fps, numberOfGifLoops, ffmpegExecutable, remotionRoot, onErrors, }: {
5
6
  bucket: string;
6
7
  expectedFiles: number;
7
8
  onProgress: (frames: number, encodingStart: number) => void;
@@ -13,6 +14,8 @@ export declare const concatVideosS3: ({ bucket, expectedFiles, onProgress, numbe
13
14
  expectedBucketOwner: string;
14
15
  fps: number;
15
16
  numberOfGifLoops: number | null;
17
+ ffmpegExecutable: FfmpegExecutable;
18
+ remotionRoot: string;
16
19
  }) => Promise<{
17
20
  outfile: string;
18
21
  cleanupChunksProm: Promise<void>;
@@ -127,7 +127,7 @@ const getAllFilesS3 = ({ bucket, expectedFiles, outdir, renderId, region, expect
127
127
  loop().catch((err) => reject(err));
128
128
  });
129
129
  };
130
- const concatVideosS3 = async ({ bucket, expectedFiles, onProgress, numberOfFrames, renderId, region, codec, expectedBucketOwner, fps, numberOfGifLoops, onErrors, }) => {
130
+ const concatVideosS3 = async ({ bucket, expectedFiles, onProgress, numberOfFrames, renderId, region, codec, expectedBucketOwner, fps, numberOfGifLoops, ffmpegExecutable, remotionRoot, onErrors, }) => {
131
131
  var _a;
132
132
  const outdir = (0, path_1.join)(renderer_1.RenderInternals.tmpDir(constants_1.CONCAT_FOLDER_TOKEN), 'bucket');
133
133
  if ((0, fs_1.existsSync)(outdir)) {
@@ -159,6 +159,8 @@ const concatVideosS3 = async ({ bucket, expectedFiles, onProgress, numberOfFrame
159
159
  codec: codecForCombining,
160
160
  fps,
161
161
  numberOfGifLoops,
162
+ ffmpegExecutable,
163
+ remotionRoot,
162
164
  });
163
165
  combine.end();
164
166
  const cleanupChunksProm = ((_a = fs_1.default.promises.rm) !== null && _a !== void 0 ? _a : fs_1.default.promises.rmdir)(outdir, {
@@ -45,7 +45,7 @@ const getBrowserInstance = async (shouldDumpIo, chromiumOptions) => {
45
45
  });
46
46
  _browserInstance.on('disconnected', () => {
47
47
  console.log('Browser disconnected / crashed');
48
- _browserInstance === null || _browserInstance === void 0 ? void 0 : _browserInstance.close().catch(() => undefined);
48
+ _browserInstance === null || _browserInstance === void 0 ? void 0 : _browserInstance.close(true).catch(() => undefined);
49
49
  _browserInstance = null;
50
50
  });
51
51
  launching = false;
@@ -349,6 +349,8 @@ const innerLaunchHandler = async (params, options) => {
349
349
  expectedBucketOwner: options.expectedBucketOwner,
350
350
  fps,
351
351
  numberOfGifLoops: params.numberOfGifLoops,
352
+ ffmpegExecutable: null,
353
+ remotionRoot: process.cwd(),
352
354
  onErrors,
353
355
  });
354
356
  if (!encodingStop) {
@@ -110,7 +110,6 @@ const renderHandler = async (params, options, logs) => {
110
110
  outputLocation,
111
111
  codec: chunkCodec,
112
112
  crf: (_a = params.crf) !== null && _a !== void 0 ? _a : undefined,
113
- ffmpegExecutable: process.env.NODE_ENV === 'test' ? null : '/opt/bin/ffmpeg',
114
113
  pixelFormat: params.pixelFormat,
115
114
  proResProfile: params.proResProfile,
116
115
  onDownload: (src) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@remotion/lambda",
3
- "version": "3.2.44",
3
+ "version": "3.3.0",
4
4
  "description": "Distributed renderer for Remotion based on AWS Lambda",
5
5
  "main": "dist/index.js",
6
6
  "sideEffects": false,
@@ -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.44",
35
- "@remotion/cli": "3.2.44",
36
- "@remotion/renderer": "3.2.44",
34
+ "@remotion/bundler": "3.3.0",
35
+ "@remotion/cli": "3.3.0",
36
+ "@remotion/renderer": "3.3.0",
37
37
  "aws-policies": "^1.0.1",
38
38
  "mime-types": "2.1.34",
39
- "remotion": "3.2.44"
39
+ "remotion": "3.3.0"
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": "443b4b387b78905e747ebe69b3b91ee85966796d"
62
+ "gitHead": "29322c95729df0229eecc5f674d019145a783b46"
63
63
  }
Binary file