@remotion/lambda 3.2.44 → 3.3.1
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/cli/commands/render/render.d.ts +1 -1
- package/dist/cli/commands/render/render.js +2 -1
- package/dist/cli/commands/sites/create.js +3 -0
- package/dist/cli/commands/still.d.ts +1 -1
- package/dist/cli/commands/still.js +2 -1
- package/dist/cli/index.js +4 -3
- package/dist/functions/chunk-optimization/plan-frame-ranges.d.ts +1 -4
- package/dist/functions/helpers/concat-videos.d.ts +4 -1
- package/dist/functions/helpers/concat-videos.js +3 -1
- package/dist/functions/helpers/get-browser-instance.js +1 -1
- package/dist/functions/launch.js +3 -1
- package/dist/functions/renderer.js +0 -1
- package/package.json +6 -6
- package/remotionlambda.zip +0 -0
|
@@ -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)();
|
|
@@ -115,5 +115,8 @@ const sitesCreateSubcommand = async (args, remotionRoot) => {
|
|
|
115
115
|
log_1.Log.info('Deployed to S3!');
|
|
116
116
|
log_1.Log.info(`Serve URL: ${serveUrl}`);
|
|
117
117
|
log_1.Log.info(`Site Name: ${siteName}`);
|
|
118
|
+
log_1.Log.info();
|
|
119
|
+
log_1.Log.info(cli_1.CliInternals.chalk.blueBright('ℹ️ If you make changes to your code, you need to redeploy the site. You can overwrite the existing site by running:'));
|
|
120
|
+
log_1.Log.info(cli_1.CliInternals.chalk.blueBright(`npx remotion lambda sites create ${args[0]} --site-name=${siteName}`));
|
|
118
121
|
};
|
|
119
122
|
exports.sitesCreateSubcommand = sitesCreateSubcommand;
|
|
@@ -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 =
|
|
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;
|
package/dist/functions/launch.js
CHANGED
|
@@ -148,7 +148,7 @@ const innerLaunchHandler = async (params, options) => {
|
|
|
148
148
|
});
|
|
149
149
|
const chunkCount = Math.ceil(frameCount.length / framesPerLambda);
|
|
150
150
|
if (chunkCount > constants_1.MAX_FUNCTIONS_PER_RENDER) {
|
|
151
|
-
throw new Error(`Too many functions: This render would cause ${chunkCount} functions to spawn. We limit this amount to ${constants_1.MAX_FUNCTIONS_PER_RENDER} functions as more would result in diminishing returns. Values set: frameCount = ${frameCount}, framesPerLambda=${framesPerLambda}. See ${docs_url_1.DOCS_URL}/docs/lambda/concurrency for
|
|
151
|
+
throw new Error(`Too many functions: This render would cause ${chunkCount} functions to spawn. We limit this amount to ${constants_1.MAX_FUNCTIONS_PER_RENDER} functions as more would result in diminishing returns. Values set: frameCount = ${frameCount}, framesPerLambda=${framesPerLambda}. See ${docs_url_1.DOCS_URL}/docs/lambda/concurrency#too-many-functions for help.`);
|
|
152
152
|
}
|
|
153
153
|
(0, validate_outname_1.validateOutname)(params.outName, params.codec);
|
|
154
154
|
(0, validate_privacy_1.validatePrivacy)(params.privacy);
|
|
@@ -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.
|
|
3
|
+
"version": "3.3.1",
|
|
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.
|
|
35
|
-
"@remotion/cli": "3.
|
|
36
|
-
"@remotion/renderer": "3.
|
|
34
|
+
"@remotion/bundler": "3.3.1",
|
|
35
|
+
"@remotion/cli": "3.3.1",
|
|
36
|
+
"@remotion/renderer": "3.3.1",
|
|
37
37
|
"aws-policies": "^1.0.1",
|
|
38
38
|
"mime-types": "2.1.34",
|
|
39
|
-
"remotion": "3.
|
|
39
|
+
"remotion": "3.3.1"
|
|
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": "
|
|
62
|
+
"gitHead": "f56a29f8ab19e279e1a9950d3a3ccbb3c8ae42e0"
|
|
63
63
|
}
|
package/remotionlambda.zip
CHANGED
|
Binary file
|