@remotion/lambda 3.1.10 → 4.0.0-alpha.4
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/helpers/create-post-render-data.js +7 -1
- package/dist/functions/helpers/get-lambdas-invoked-stats.d.ts +7 -1
- package/dist/functions/helpers/get-lambdas-invoked-stats.js +8 -3
- package/dist/functions/helpers/get-progress.js +11 -5
- package/dist/functions/launch.js +7 -1
- package/dist/shared/constants.d.ts +1 -1
- package/dist/shared/constants.js +1 -1
- package/dist/shared/validate-lambda-codec.d.ts +1 -1
- package/dist/shared/validate-lambda-codec.js +1 -0
- package/package.json +6 -6
- package/remotionlambda.zip +0 -0
|
@@ -41,7 +41,13 @@ const createPostRenderData = ({ renderId, region, memorySizeInMb, renderMetadata
|
|
|
41
41
|
const renderSize = contents
|
|
42
42
|
.map((c) => { var _a; return (_a = c.Size) !== null && _a !== void 0 ? _a : 0; })
|
|
43
43
|
.reduce((a, b) => a + b, 0);
|
|
44
|
-
const { timeToInvokeLambdas } = (0, get_lambdas_invoked_stats_1.getLambdasInvokedStats)(
|
|
44
|
+
const { timeToInvokeLambdas } = (0, get_lambdas_invoked_stats_1.getLambdasInvokedStats)({
|
|
45
|
+
contents,
|
|
46
|
+
renderId,
|
|
47
|
+
estimatedRenderLambdaInvokations: renderMetadata.estimatedRenderLambdaInvokations,
|
|
48
|
+
startDate: renderMetadata.startedDate,
|
|
49
|
+
checkIfAllLambdasWereInvoked: false,
|
|
50
|
+
});
|
|
45
51
|
const retriesInfo = (0, get_retry_stats_1.getRetryStats)({ contents, renderId });
|
|
46
52
|
if (timeToInvokeLambdas === null) {
|
|
47
53
|
throw new Error('should have timing for all lambdas');
|
|
@@ -3,4 +3,10 @@ export declare type LambdaInvokeStats = {
|
|
|
3
3
|
timeToInvokeLambdas: number | null;
|
|
4
4
|
lambdasInvoked: number;
|
|
5
5
|
};
|
|
6
|
-
export declare const getLambdasInvokedStats: (contents
|
|
6
|
+
export declare const getLambdasInvokedStats: ({ contents, renderId, estimatedRenderLambdaInvokations, startDate, checkIfAllLambdasWereInvoked, }: {
|
|
7
|
+
contents: _Object[];
|
|
8
|
+
renderId: string;
|
|
9
|
+
estimatedRenderLambdaInvokations: number | null;
|
|
10
|
+
startDate: number | null;
|
|
11
|
+
checkIfAllLambdasWereInvoked: boolean;
|
|
12
|
+
}) => LambdaInvokeStats;
|
|
@@ -2,11 +2,16 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.getLambdasInvokedStats = void 0;
|
|
4
4
|
const constants_1 = require("../../shared/constants");
|
|
5
|
+
const parse_lambda_initialized_key_1 = require("../../shared/parse-lambda-initialized-key");
|
|
5
6
|
const min_max_1 = require("./min-max");
|
|
6
|
-
const getLambdasInvokedStats = (contents, renderId, startDate) => {
|
|
7
|
+
const getLambdasInvokedStats = ({ contents, renderId, estimatedRenderLambdaInvokations, startDate, checkIfAllLambdasWereInvoked, }) => {
|
|
7
8
|
var _a;
|
|
8
|
-
const lambdasInvoked = contents
|
|
9
|
-
|
|
9
|
+
const lambdasInvoked = contents
|
|
10
|
+
.filter((c) => { var _a; return (_a = c.Key) === null || _a === void 0 ? void 0 : _a.startsWith((0, constants_1.lambdaInitializedPrefix)(renderId)); })
|
|
11
|
+
.filter((c) => (0, parse_lambda_initialized_key_1.parseLambdaInitializedKey)(c.Key).attempt === 1);
|
|
12
|
+
const allLambdasInvoked = !checkIfAllLambdasWereInvoked ||
|
|
13
|
+
lambdasInvoked.length === estimatedRenderLambdaInvokations;
|
|
14
|
+
const timeToInvokeLambdas = !allLambdasInvoked || startDate === null
|
|
10
15
|
? null
|
|
11
16
|
: ((_a = (0, min_max_1.max)(lambdasInvoked.map((l) => { var _a; return (_a = l.LastModified) === null || _a === void 0 ? void 0 : _a.getTime(); }))) !== null && _a !== void 0 ? _a : 0) - startDate;
|
|
12
17
|
return {
|
|
@@ -23,7 +23,7 @@ const get_time_to_finish_1 = require("./get-time-to-finish");
|
|
|
23
23
|
const inspect_errors_1 = require("./inspect-errors");
|
|
24
24
|
const io_1 = require("./io");
|
|
25
25
|
const getProgress = async ({ bucketName, renderId, expectedBucketOwner, region, memorySizeInMb, timeoutInMiliseconds, }) => {
|
|
26
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
26
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
|
|
27
27
|
const postRenderData = await (0, get_post_render_data_1.getPostRenderData)({
|
|
28
28
|
bucketName,
|
|
29
29
|
region,
|
|
@@ -135,7 +135,13 @@ const getProgress = async ({ bucketName, renderId, expectedBucketOwner, region,
|
|
|
135
135
|
const renderSize = contents
|
|
136
136
|
.map((c) => { var _a; return (_a = c.Size) !== null && _a !== void 0 ? _a : 0; })
|
|
137
137
|
.reduce((a, b) => a + b, 0);
|
|
138
|
-
const lambdasInvokedStats = (0, get_lambdas_invoked_stats_1.getLambdasInvokedStats)(
|
|
138
|
+
const lambdasInvokedStats = (0, get_lambdas_invoked_stats_1.getLambdasInvokedStats)({
|
|
139
|
+
contents,
|
|
140
|
+
renderId,
|
|
141
|
+
estimatedRenderLambdaInvokations: (_g = renderMetadata === null || renderMetadata === void 0 ? void 0 : renderMetadata.estimatedRenderLambdaInvokations) !== null && _g !== void 0 ? _g : null,
|
|
142
|
+
startDate: (_h = renderMetadata === null || renderMetadata === void 0 ? void 0 : renderMetadata.startedDate) !== null && _h !== void 0 ? _h : null,
|
|
143
|
+
checkIfAllLambdasWereInvoked: true,
|
|
144
|
+
});
|
|
139
145
|
const retriesInfo = (0, get_retry_stats_1.getRetryStats)({
|
|
140
146
|
contents,
|
|
141
147
|
renderId,
|
|
@@ -147,7 +153,7 @@ const getProgress = async ({ bucketName, renderId, expectedBucketOwner, region,
|
|
|
147
153
|
lambdaInvokeStatus: lambdasInvokedStats,
|
|
148
154
|
});
|
|
149
155
|
const chunkCount = outputFile
|
|
150
|
-
? (
|
|
156
|
+
? (_j = renderMetadata === null || renderMetadata === void 0 ? void 0 : renderMetadata.totalChunks) !== null && _j !== void 0 ? _j : 0
|
|
151
157
|
: chunks.length;
|
|
152
158
|
// We add a 20 second buffer for it, since AWS timeshifts can be quite a lot. Once it's 20sec over the limit, we consider it timed out
|
|
153
159
|
const isBeyondTimeout = renderMetadata &&
|
|
@@ -178,7 +184,7 @@ const getProgress = async ({ bucketName, renderId, expectedBucketOwner, region,
|
|
|
178
184
|
renderId,
|
|
179
185
|
renderMetadata,
|
|
180
186
|
bucket: bucketName,
|
|
181
|
-
outputFile: (
|
|
187
|
+
outputFile: (_k = outputFile === null || outputFile === void 0 ? void 0 : outputFile.url) !== null && _k !== void 0 ? _k : null,
|
|
182
188
|
timeToFinish,
|
|
183
189
|
errors: allErrors,
|
|
184
190
|
fatalErrorEncountered: allErrors.some((f) => f.isFatal && !f.willRetry),
|
|
@@ -193,7 +199,7 @@ const getProgress = async ({ bucketName, renderId, expectedBucketOwner, region,
|
|
|
193
199
|
type: 'absolute-time',
|
|
194
200
|
})
|
|
195
201
|
: null,
|
|
196
|
-
timeToInvokeLambdas: (
|
|
202
|
+
timeToInvokeLambdas: (_l = encodingStatus === null || encodingStatus === void 0 ? void 0 : encodingStatus.timeToInvoke) !== null && _l !== void 0 ? _l : lambdasInvokedStats.timeToInvokeLambdas,
|
|
197
203
|
overallProgress: (0, get_overall_progress_1.getOverallProgress)({
|
|
198
204
|
cleanup: cleanup ? cleanup.filesDeleted / cleanup.minFilesToDelete : 0,
|
|
199
205
|
encoding: finalEncodingStatus && renderMetadata
|
package/dist/functions/launch.js
CHANGED
|
@@ -295,7 +295,13 @@ const innerLaunchHandler = async (params, options) => {
|
|
|
295
295
|
framesEncoded: frameCount.length,
|
|
296
296
|
totalFrames: frameCount.length,
|
|
297
297
|
doneIn: encodingStop ? encodingStop - encodingStart : null,
|
|
298
|
-
timeToInvoke: (0, get_lambdas_invoked_stats_1.getLambdasInvokedStats)(
|
|
298
|
+
timeToInvoke: (0, get_lambdas_invoked_stats_1.getLambdasInvokedStats)({
|
|
299
|
+
contents,
|
|
300
|
+
renderId: params.renderId,
|
|
301
|
+
estimatedRenderLambdaInvokations: renderMetadata.estimatedRenderLambdaInvokations,
|
|
302
|
+
checkIfAllLambdasWereInvoked: false,
|
|
303
|
+
startDate: renderMetadata.startedDate,
|
|
304
|
+
}).timeToInvokeLambdas,
|
|
299
305
|
};
|
|
300
306
|
const finalEncodingProgressProm = (0, io_1.lambdaWriteFile)({
|
|
301
307
|
bucketName: params.bucketName,
|
|
@@ -224,7 +224,7 @@ export declare type RenderMetadata = {
|
|
|
224
224
|
renderId: string;
|
|
225
225
|
outName: OutNameInput | undefined;
|
|
226
226
|
};
|
|
227
|
-
export declare type LambdaVersions = '2022-08-01' | '2022-07-28' | '2022-07-27' | '2022-07-25' | '2022-07-23' | '2022-07-20' | '2022-07-18' | '2022-07-15' | '2022-07-14' | '2022-07-12' | '2022-07-10' | '2022-07-09' | '2022-07-08' | '2022-07-04' | '2022-06-30' | '2022-06-29' | '2022-06-25' | '2022-06-22' | '2022-06-21' | '2022-06-14' | '2022-06-08' | '2022-06-07' | '2022-06-02' | '2022-05-31' | '2022-05-28' | '2022-05-27' | '2022-05-19' | '2022-05-16' | '2022-05-11' | '2022-05-07' | '2022-05-06' | '2022-05-03' | '2022-04-20' | '2022-04-19' | '2022-04-18' | '2022-04-09' | '2022-04-08' | '2022-04-05' | '2022-04-02' | '2022-03-29' | '2022-03-17' | '2022-03-02' | '2022-03-01' | '2022-02-27' | '2022-02-14' | '2022-02-12' | '2022-02-09' | '2022-02-08' | '2022-02-07' | '2022-02-06' | '2022-02-05' | '2022-02-04' | '2022-02-03' | '2022-01-23' | '2022-01-19' | '2022-01-11' | '2022-01-10' | '2022-01-09' | '2022-01-06' | '2022-01-05' | '2021-12-22' | '2021-12-17' | '2021-12-16' | '2021-12-15' | '2021-12-14' | '2021-12-13' | '2021-12-11' | '2021-12-10' | '2021-12-04' | '2021-11-29' | '2021-11-27' | '2021-11-24' | '2021-11-22' | '2021-11-19' | '2021-11-18' | '2021-11-15' | '2021-11-12' | '2021-11-10' | '2021-11-01' | '2021-10-29' | '2021-10-27' | '2021-10-21' | '2021-10-19' | '2021-10-07' | '2021-10-03' | '2021-10-01' | '2021-09-15' | '2021-09-06' | '2021-08-06' | '2021-07-14' | '2021-07-05' | '2021-07-02' | '2021-06-23' | 'n/a';
|
|
227
|
+
export declare type LambdaVersions = '2022-08-02' | '2022-08-01' | '2022-07-28' | '2022-07-27' | '2022-07-25' | '2022-07-23' | '2022-07-20' | '2022-07-18' | '2022-07-15' | '2022-07-14' | '2022-07-12' | '2022-07-10' | '2022-07-09' | '2022-07-08' | '2022-07-04' | '2022-06-30' | '2022-06-29' | '2022-06-25' | '2022-06-22' | '2022-06-21' | '2022-06-14' | '2022-06-08' | '2022-06-07' | '2022-06-02' | '2022-05-31' | '2022-05-28' | '2022-05-27' | '2022-05-19' | '2022-05-16' | '2022-05-11' | '2022-05-07' | '2022-05-06' | '2022-05-03' | '2022-04-20' | '2022-04-19' | '2022-04-18' | '2022-04-09' | '2022-04-08' | '2022-04-05' | '2022-04-02' | '2022-03-29' | '2022-03-17' | '2022-03-02' | '2022-03-01' | '2022-02-27' | '2022-02-14' | '2022-02-12' | '2022-02-09' | '2022-02-08' | '2022-02-07' | '2022-02-06' | '2022-02-05' | '2022-02-04' | '2022-02-03' | '2022-01-23' | '2022-01-19' | '2022-01-11' | '2022-01-10' | '2022-01-09' | '2022-01-06' | '2022-01-05' | '2021-12-22' | '2021-12-17' | '2021-12-16' | '2021-12-15' | '2021-12-14' | '2021-12-13' | '2021-12-11' | '2021-12-10' | '2021-12-04' | '2021-11-29' | '2021-11-27' | '2021-11-24' | '2021-11-22' | '2021-11-19' | '2021-11-18' | '2021-11-15' | '2021-11-12' | '2021-11-10' | '2021-11-01' | '2021-10-29' | '2021-10-27' | '2021-10-21' | '2021-10-19' | '2021-10-07' | '2021-10-03' | '2021-10-01' | '2021-09-15' | '2021-09-06' | '2021-08-06' | '2021-07-14' | '2021-07-05' | '2021-07-02' | '2021-06-23' | 'n/a';
|
|
228
228
|
export declare const CURRENT_VERSION: LambdaVersions;
|
|
229
229
|
export declare type PostRenderData = {
|
|
230
230
|
cost: {
|
package/dist/shared/constants.js
CHANGED
|
@@ -84,6 +84,6 @@ var LambdaRoutines;
|
|
|
84
84
|
LambdaRoutines["renderer"] = "renderer";
|
|
85
85
|
LambdaRoutines["still"] = "still";
|
|
86
86
|
})(LambdaRoutines = exports.LambdaRoutines || (exports.LambdaRoutines = {}));
|
|
87
|
-
exports.CURRENT_VERSION = '2022-08-
|
|
87
|
+
exports.CURRENT_VERSION = '2022-08-02';
|
|
88
88
|
exports.LAMBDA_CONCURRENCY_LIMIT_QUOTA = 'L-B99A9384';
|
|
89
89
|
exports.LAMBDA_BURST_LIMIT_QUOTA = 'L-548AE339';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
declare const lambdaCodecs: readonly ["h264-mkv", "h264", "vp8", "mp3", "aac", "wav", "gif"];
|
|
1
|
+
declare const lambdaCodecs: readonly ["h264-mkv", "h264", "vp8", "mp3", "aac", "wav", "gif", "prores"];
|
|
2
2
|
export declare type LambdaCodec = typeof lambdaCodecs[number];
|
|
3
3
|
export declare const validateLambdaCodec: (codec: unknown) => LambdaCodec;
|
|
4
4
|
export {};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@remotion/lambda",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "4.0.0-alpha.4+3602b2a81",
|
|
4
4
|
"description": "Distributed renderer for Remotion based on AWS Lambda",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"sideEffects": false,
|
|
@@ -32,12 +32,12 @@
|
|
|
32
32
|
"@aws-sdk/client-service-quotas": "3.58.0",
|
|
33
33
|
"@aws-sdk/lib-storage": "3.58.0",
|
|
34
34
|
"@aws-sdk/s3-request-presigner": "3.58.0",
|
|
35
|
-
"@remotion/bundler": "
|
|
36
|
-
"@remotion/cli": "
|
|
37
|
-
"@remotion/renderer": "
|
|
35
|
+
"@remotion/bundler": "4.0.0-alpha.4+3602b2a81",
|
|
36
|
+
"@remotion/cli": "4.0.0-alpha.4+3602b2a81",
|
|
37
|
+
"@remotion/renderer": "4.0.0-alpha.4+3602b2a81",
|
|
38
38
|
"aws-policies": "^1.0.1",
|
|
39
39
|
"mime-types": "2.1.34",
|
|
40
|
-
"remotion": "
|
|
40
|
+
"remotion": "4.0.0-alpha.4+3602b2a81"
|
|
41
41
|
},
|
|
42
42
|
"peerDependencies": {
|
|
43
43
|
"react": ">=16.8.0",
|
|
@@ -62,5 +62,5 @@
|
|
|
62
62
|
"publishConfig": {
|
|
63
63
|
"access": "public"
|
|
64
64
|
},
|
|
65
|
-
"gitHead": "
|
|
65
|
+
"gitHead": "3602b2a812b66c04d318a858b5bcb725ba5496d1"
|
|
66
66
|
}
|
package/remotionlambda.zip
CHANGED
|
Binary file
|