@remotion/lambda 3.3.59 → 3.3.61
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/functions/chunk-optimization/plan-frame-ranges.d.ts +1 -4
- package/dist/functions/helpers/get-current-region.d.ts +1 -1
- package/dist/functions/helpers/get-encoding-metadata.d.ts +2 -1
- package/dist/functions/helpers/get-encoding-metadata.js +6 -2
- package/dist/functions/helpers/get-progress.js +7 -6
- package/dist/functions/launch.js +7 -3
- package/dist/shared/constants.d.ts +1 -0
- package/dist/shared/constants.js +2 -1
- package/dist/shared/invoke-webhook.d.ts +2 -0
- package/package.json +8 -8
- package/remotionlambda-arm64.zip +0 -0
- package/remotionlambda-x64.zip +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const getCurrentRegionInFunction: () => "eu-central-1" | "eu-west-1" | "eu-west-2" | "eu-west-3" | "eu-north-1" | "us-east-1" | "us-east-2" | "us-west-1" | "us-west-2" | "
|
|
1
|
+
export declare const getCurrentRegionInFunction: () => "eu-central-1" | "eu-west-1" | "eu-west-2" | "eu-west-3" | "eu-south-1" | "eu-north-1" | "us-east-1" | "us-east-2" | "us-west-1" | "us-west-2" | "af-south-1" | "ap-south-1" | "ap-east-1" | "ap-southeast-1" | "ap-southeast-2" | "ap-northeast-1" | "ap-northeast-2" | "ap-northeast-3" | "ca-central-1" | "me-south-1" | "sa-east-1";
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { _Object } from '@aws-sdk/client-s3';
|
|
2
2
|
import type { EncodingProgress } from '../../defaults';
|
|
3
|
-
export declare const getEncodingMetadata: ({ exists, }: {
|
|
3
|
+
export declare const getEncodingMetadata: ({ exists, frameCount, }: {
|
|
4
4
|
exists: _Object | undefined;
|
|
5
|
+
frameCount: number;
|
|
5
6
|
}) => EncodingProgress | null;
|
|
@@ -1,12 +1,16 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.getEncodingMetadata = void 0;
|
|
4
|
+
const defaults_1 = require("../../defaults");
|
|
4
5
|
const chunk_progress_1 = require("../../shared/chunk-progress");
|
|
5
|
-
const getEncodingMetadata = ({ exists, }) => {
|
|
6
|
+
const getEncodingMetadata = ({ exists, frameCount, }) => {
|
|
6
7
|
if (!exists) {
|
|
7
8
|
return null;
|
|
8
9
|
}
|
|
9
10
|
const framesEncoded = (0, chunk_progress_1.getProgressOfChunk)(exists.ETag);
|
|
10
|
-
|
|
11
|
+
// We only report every 100 frames encoded so that we are able to report up to 2000 * 100 ETags => 200000 frames
|
|
12
|
+
return {
|
|
13
|
+
framesEncoded: Math.min(frameCount, framesEncoded * defaults_1.ENCODING_PROGRESS_STEP_SIZE),
|
|
14
|
+
};
|
|
11
15
|
};
|
|
12
16
|
exports.getEncodingMetadata = getEncodingMetadata;
|
|
@@ -82,9 +82,6 @@ const getProgress = async ({ bucketName, renderId, expectedBucketOwner, region,
|
|
|
82
82
|
expectedBucketOwner,
|
|
83
83
|
});
|
|
84
84
|
const renderMetadataExists = Boolean(contents.find((c) => c.Key === (0, constants_1.renderMetadataKey)(renderId)));
|
|
85
|
-
const encodingStatus = (0, get_encoding_metadata_1.getEncodingMetadata)({
|
|
86
|
-
exists: contents.find((c) => c.Key === (0, constants_1.encodingProgressKey)(renderId)),
|
|
87
|
-
});
|
|
88
85
|
const [renderMetadata, errorExplanations] = await Promise.all([
|
|
89
86
|
renderMetadataExists
|
|
90
87
|
? (0, get_render_metadata_1.getRenderMetadata)({
|
|
@@ -162,6 +159,13 @@ const getProgress = async ({ bucketName, renderId, expectedBucketOwner, region,
|
|
|
162
159
|
contents,
|
|
163
160
|
renderId,
|
|
164
161
|
});
|
|
162
|
+
const frameCount = renderMetadata
|
|
163
|
+
? renderer_1.RenderInternals.getFramesToRender(renderMetadata.frameRange, renderMetadata.everyNthFrame).length
|
|
164
|
+
: null;
|
|
165
|
+
const encodingStatus = (0, get_encoding_metadata_1.getEncodingMetadata)({
|
|
166
|
+
exists: contents.find((c) => c.Key === (0, constants_1.encodingProgressKey)(renderId)),
|
|
167
|
+
frameCount: frameCount === null ? 0 : frameCount,
|
|
168
|
+
});
|
|
165
169
|
const finalEncodingStatus = (0, get_final_encoding_status_1.getFinalEncodingStatus)({
|
|
166
170
|
encodingProgress: encodingStatus,
|
|
167
171
|
outputFileExists: Boolean(outputFile),
|
|
@@ -179,9 +183,6 @@ const getProgress = async ({ bucketName, renderId, expectedBucketOwner, region,
|
|
|
179
183
|
: null,
|
|
180
184
|
...errorExplanations,
|
|
181
185
|
].filter(remotion_1.Internals.truthy);
|
|
182
|
-
const frameCount = renderMetadata
|
|
183
|
-
? renderer_1.RenderInternals.getFramesToRender(renderMetadata.frameRange, renderMetadata.everyNthFrame).length
|
|
184
|
-
: null;
|
|
185
186
|
return {
|
|
186
187
|
framesRendered,
|
|
187
188
|
chunks: chunkCount,
|
package/dist/functions/launch.js
CHANGED
|
@@ -157,7 +157,11 @@ const innerLaunchHandler = async (params, options) => {
|
|
|
157
157
|
forceHeight: params.forceHeight,
|
|
158
158
|
forceWidth: params.forceWidth,
|
|
159
159
|
});
|
|
160
|
-
remotion_1.Internals.validateDurationInFrames(
|
|
160
|
+
remotion_1.Internals.validateDurationInFrames({
|
|
161
|
+
durationInFrames: comp.durationInFrames,
|
|
162
|
+
component: 'passed to a Lambda render',
|
|
163
|
+
allowFloats: false,
|
|
164
|
+
});
|
|
161
165
|
remotion_1.Internals.validateFps(comp.fps, 'passed to a Lambda render', false);
|
|
162
166
|
remotion_1.Internals.validateDimension(comp.height, 'height', 'passed to a Lambda render');
|
|
163
167
|
remotion_1.Internals.validateDimension(comp.width, 'width', 'passed to a Lambda render');
|
|
@@ -305,7 +309,7 @@ const innerLaunchHandler = async (params, options) => {
|
|
|
305
309
|
(0, io_1.lambdaWriteFile)({
|
|
306
310
|
bucketName: params.bucketName,
|
|
307
311
|
key: (0, constants_1.encodingProgressKey)(params.renderId),
|
|
308
|
-
body: String(framesEncoded),
|
|
312
|
+
body: String(Math.round(framesEncoded / constants_1.ENCODING_PROGRESS_STEP_SIZE)),
|
|
309
313
|
region: (0, get_current_region_1.getCurrentRegionInFunction)(),
|
|
310
314
|
privacy: 'private',
|
|
311
315
|
expectedBucketOwner: options.expectedBucketOwner,
|
|
@@ -409,7 +413,7 @@ const innerLaunchHandler = async (params, options) => {
|
|
|
409
413
|
const finalEncodingProgressProm = (0, io_1.lambdaWriteFile)({
|
|
410
414
|
bucketName: params.bucketName,
|
|
411
415
|
key: (0, constants_1.encodingProgressKey)(params.renderId),
|
|
412
|
-
body: String(frameCount.length),
|
|
416
|
+
body: String(Math.ceil(frameCount.length / constants_1.ENCODING_PROGRESS_STEP_SIZE)),
|
|
413
417
|
region: (0, get_current_region_1.getCurrentRegionInFunction)(),
|
|
414
418
|
privacy: 'private',
|
|
415
419
|
expectedBucketOwner: options.expectedBucketOwner,
|
|
@@ -27,6 +27,7 @@ export declare const MIN_EPHEMERAL_STORAGE_IN_MB = 512;
|
|
|
27
27
|
export declare const MAX_EPHEMERAL_STORAGE_IN_MB = 10240;
|
|
28
28
|
export declare const DEFAULT_OUTPUT_PRIVACY: Privacy;
|
|
29
29
|
export declare const DEFAULT_CLOUDWATCH_RETENTION_PERIOD = 14;
|
|
30
|
+
export declare const ENCODING_PROGRESS_STEP_SIZE = 100;
|
|
30
31
|
export declare const REMOTION_BUCKET_PREFIX = "remotionlambda-";
|
|
31
32
|
export declare const RENDER_FN_PREFIX = "remotion-render-";
|
|
32
33
|
export declare const LOG_GROUP_PREFIX = "/aws/lambda/";
|
package/dist/shared/constants.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.LAMBDA_BURST_LIMIT_QUOTA = exports.LAMBDA_CONCURRENCY_LIMIT_QUOTA = exports.LambdaRoutines = exports.REMOTION_FILELIST_TOKEN = exports.REMOTION_CONCATED_TOKEN = exports.CONCAT_FOLDER_TOKEN = exports.RENDERER_PATH_TOKEN = exports.inputPropsKey = exports.postRenderDataKey = exports.customOutName = exports.outStillName = exports.outName = exports.getSitesKey = exports.getErrorFileName = exports.getErrorKeyPrefix = exports.chunkKeyForIndex = exports.chunkKey = exports.lambdaTimingsKey = exports.lambdaLogsPrefix = exports.lambdaTimingsPrefixForChunk = exports.lambdaTimingsPrefix = exports.lambdaChunkInitializedKey = exports.lambdaChunkInitializedPrefix = exports.initalizedMetadataKey = exports.renderMetadataKey = exports.encodingProgressKey = exports.rendersPrefix = exports.LOG_GROUP_PREFIX = exports.RENDER_FN_PREFIX = exports.REMOTION_BUCKET_PREFIX = exports.DEFAULT_CLOUDWATCH_RETENTION_PERIOD = exports.DEFAULT_OUTPUT_PRIVACY = exports.MAX_EPHEMERAL_STORAGE_IN_MB = exports.MIN_EPHEMERAL_STORAGE_IN_MB = exports.DEFAULT_EPHEMERAL_STORAGE_IN_MB = exports.MAX_FUNCTIONS_PER_RENDER = exports.DEFAULT_MAX_RETRIES = exports.DEFAULT_REGION = exports.COMMAND_NOT_FOUND = exports.BINARY_NAME = exports.DEFAULT_FRAMES_PER_LAMBDA = exports.MINIMUM_FRAMES_PER_LAMBDA = exports.MAX_TIMEOUT = exports.MIN_TIMEOUT = exports.DEFAULT_TIMEOUT = exports.DEFAULT_ARCHITECTURE = exports.DEFAULT_MEMORY_SIZE = exports.MAX_MEMORY = exports.MIN_MEMORY = void 0;
|
|
3
|
+
exports.LAMBDA_BURST_LIMIT_QUOTA = exports.LAMBDA_CONCURRENCY_LIMIT_QUOTA = exports.LambdaRoutines = exports.REMOTION_FILELIST_TOKEN = exports.REMOTION_CONCATED_TOKEN = exports.CONCAT_FOLDER_TOKEN = exports.RENDERER_PATH_TOKEN = exports.inputPropsKey = exports.postRenderDataKey = exports.customOutName = exports.outStillName = exports.outName = exports.getSitesKey = exports.getErrorFileName = exports.getErrorKeyPrefix = exports.chunkKeyForIndex = exports.chunkKey = exports.lambdaTimingsKey = exports.lambdaLogsPrefix = exports.lambdaTimingsPrefixForChunk = exports.lambdaTimingsPrefix = exports.lambdaChunkInitializedKey = exports.lambdaChunkInitializedPrefix = exports.initalizedMetadataKey = exports.renderMetadataKey = exports.encodingProgressKey = exports.rendersPrefix = exports.LOG_GROUP_PREFIX = exports.RENDER_FN_PREFIX = exports.REMOTION_BUCKET_PREFIX = exports.ENCODING_PROGRESS_STEP_SIZE = exports.DEFAULT_CLOUDWATCH_RETENTION_PERIOD = exports.DEFAULT_OUTPUT_PRIVACY = exports.MAX_EPHEMERAL_STORAGE_IN_MB = exports.MIN_EPHEMERAL_STORAGE_IN_MB = exports.DEFAULT_EPHEMERAL_STORAGE_IN_MB = exports.MAX_FUNCTIONS_PER_RENDER = exports.DEFAULT_MAX_RETRIES = exports.DEFAULT_REGION = exports.COMMAND_NOT_FOUND = exports.BINARY_NAME = exports.DEFAULT_FRAMES_PER_LAMBDA = exports.MINIMUM_FRAMES_PER_LAMBDA = exports.MAX_TIMEOUT = exports.MIN_TIMEOUT = exports.DEFAULT_TIMEOUT = exports.DEFAULT_ARCHITECTURE = exports.DEFAULT_MEMORY_SIZE = exports.MAX_MEMORY = exports.MIN_MEMORY = void 0;
|
|
4
4
|
exports.MIN_MEMORY = 512;
|
|
5
5
|
exports.MAX_MEMORY = 10240;
|
|
6
6
|
exports.DEFAULT_MEMORY_SIZE = 2048;
|
|
@@ -20,6 +20,7 @@ exports.MIN_EPHEMERAL_STORAGE_IN_MB = 512;
|
|
|
20
20
|
exports.MAX_EPHEMERAL_STORAGE_IN_MB = 10240;
|
|
21
21
|
exports.DEFAULT_OUTPUT_PRIVACY = 'public';
|
|
22
22
|
exports.DEFAULT_CLOUDWATCH_RETENTION_PERIOD = 14;
|
|
23
|
+
exports.ENCODING_PROGRESS_STEP_SIZE = 100;
|
|
23
24
|
exports.REMOTION_BUCKET_PREFIX = 'remotionlambda-';
|
|
24
25
|
exports.RENDER_FN_PREFIX = 'remotion-render-';
|
|
25
26
|
exports.LOG_GROUP_PREFIX = '/aws/lambda/';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@remotion/lambda",
|
|
3
|
-
"version": "3.3.
|
|
3
|
+
"version": "3.3.61",
|
|
4
4
|
"description": "Distributed renderer for Remotion based on AWS Lambda",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"sideEffects": false,
|
|
@@ -33,18 +33,18 @@
|
|
|
33
33
|
"@aws-sdk/credential-providers": "3.272.0",
|
|
34
34
|
"@aws-sdk/lib-storage": "3.272.0",
|
|
35
35
|
"@aws-sdk/s3-request-presigner": "3.272.0",
|
|
36
|
-
"@remotion/bundler": "3.3.
|
|
37
|
-
"@remotion/cli": "3.3.
|
|
38
|
-
"@remotion/renderer": "3.3.
|
|
36
|
+
"@remotion/bundler": "3.3.61",
|
|
37
|
+
"@remotion/cli": "3.3.61",
|
|
38
|
+
"@remotion/renderer": "3.3.61",
|
|
39
39
|
"aws-policies": "^1.0.1",
|
|
40
40
|
"mime-types": "2.1.34",
|
|
41
|
-
"remotion": "3.3.
|
|
41
|
+
"remotion": "3.3.61"
|
|
42
42
|
},
|
|
43
43
|
"devDependencies": {
|
|
44
44
|
"@jonny/eslint-config": "3.0.266",
|
|
45
45
|
"@remotion/bundler": "3.3.58",
|
|
46
|
-
"@remotion/compositor-linux-arm64-musl": "3.3.
|
|
47
|
-
"@remotion/compositor-linux-x64-musl": "3.3.
|
|
46
|
+
"@remotion/compositor-linux-arm64-musl": "3.3.61",
|
|
47
|
+
"@remotion/compositor-linux-x64-musl": "3.3.61",
|
|
48
48
|
"@types/mime-types": "2.1.1",
|
|
49
49
|
"@types/minimist": "1.2.2",
|
|
50
50
|
"@types/node": "^14.14.14",
|
|
@@ -87,5 +87,5 @@
|
|
|
87
87
|
]
|
|
88
88
|
}
|
|
89
89
|
},
|
|
90
|
-
"gitHead": "
|
|
90
|
+
"gitHead": "c2d7a7088e4a9939c95168e03d7e29e3f6d63973"
|
|
91
91
|
}
|
package/remotionlambda-arm64.zip
CHANGED
|
Binary file
|
package/remotionlambda-x64.zip
CHANGED
|
Binary file
|