@remotion/lambda 3.2.1 → 3.2.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.
|
@@ -18,7 +18,7 @@ const get_folder_size_1 = require("./helpers/get-folder-size");
|
|
|
18
18
|
const io_1 = require("./helpers/io");
|
|
19
19
|
const write_lambda_error_1 = require("./helpers/write-lambda-error");
|
|
20
20
|
const renderHandler = async (params, options, logs) => {
|
|
21
|
-
var _a
|
|
21
|
+
var _a;
|
|
22
22
|
if (params.type !== constants_1.LambdaRoutines.renderer) {
|
|
23
23
|
throw new Error('Params must be renderer');
|
|
24
24
|
}
|
|
@@ -41,80 +41,85 @@ const renderHandler = async (params, options, logs) => {
|
|
|
41
41
|
const outputLocation = path_1.default.join(outdir, `localchunk-${String(params.chunk).padStart(8, '0')}.${renderer_1.RenderInternals.getFileExtensionFromCodec(params.codec, 'chunk')}`);
|
|
42
42
|
const chunkCodec = params.codec === 'gif' ? 'h264-mkv' : params.codec;
|
|
43
43
|
const downloadMap = renderer_1.RenderInternals.makeDownloadMap();
|
|
44
|
-
await (
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
44
|
+
await new Promise((resolve, reject) => {
|
|
45
|
+
var _a;
|
|
46
|
+
(0, renderer_1.renderMedia)({
|
|
47
|
+
composition: {
|
|
48
|
+
id: params.composition,
|
|
49
|
+
durationInFrames: params.durationInFrames,
|
|
50
|
+
fps: params.fps,
|
|
51
|
+
height: params.height,
|
|
52
|
+
width: params.width,
|
|
53
|
+
},
|
|
54
|
+
imageFormat: params.imageFormat,
|
|
55
|
+
inputProps: params.inputProps,
|
|
56
|
+
frameRange: params.frameRange,
|
|
57
|
+
onProgress: ({ renderedFrames, encodedFrames, stitchStage }) => {
|
|
58
|
+
if (renderedFrames % 10 === 0 &&
|
|
59
|
+
renderer_1.RenderInternals.isEqualOrBelowLogLevel(params.logLevel, 'verbose')) {
|
|
60
|
+
console.log(`Rendered ${renderedFrames} frames, encoded ${encodedFrames} frames, stage = ${stitchStage}`);
|
|
61
|
+
}
|
|
62
|
+
const allFrames = renderer_1.RenderInternals.getFramesToRender(params.frameRange, params.everyNthFrame);
|
|
63
|
+
if (renderedFrames === allFrames.length) {
|
|
64
|
+
console.log('Rendered all frames!');
|
|
65
|
+
}
|
|
66
|
+
chunkTimingData.timings[renderedFrames] = Date.now() - start;
|
|
67
|
+
},
|
|
68
|
+
parallelism: params.concurrencyPerLambda,
|
|
69
|
+
onStart: () => {
|
|
70
|
+
(0, io_1.lambdaWriteFile)({
|
|
71
|
+
privacy: 'private',
|
|
72
|
+
bucketName: params.bucketName,
|
|
73
|
+
body: JSON.stringify({
|
|
74
|
+
filesCleaned: clean_tmpdir_1.deletedFilesSize,
|
|
75
|
+
filesInTmp: fs_1.default.readdirSync('/tmp'),
|
|
76
|
+
isWarm: options.isWarm,
|
|
77
|
+
deletedFiles: clean_tmpdir_1.deletedFiles,
|
|
78
|
+
tmpSize: (0, get_folder_size_1.getFolderSizeRecursively)('/tmp'),
|
|
79
|
+
tmpDirFiles: (0, get_files_in_folder_1.getFolderFiles)('/tmp'),
|
|
80
|
+
}),
|
|
81
|
+
key: (0, constants_1.lambdaInitializedKey)({
|
|
82
|
+
renderId: params.renderId,
|
|
83
|
+
chunk: params.chunk,
|
|
84
|
+
attempt: params.attempt,
|
|
85
|
+
}),
|
|
86
|
+
region: (0, get_current_region_1.getCurrentRegionInFunction)(),
|
|
87
|
+
expectedBucketOwner: options.expectedBucketOwner,
|
|
88
|
+
downloadBehavior: null,
|
|
89
|
+
}).catch((err) => reject(err));
|
|
90
|
+
},
|
|
91
|
+
puppeteerInstance: browserInstance,
|
|
92
|
+
serveUrl: params.serveUrl,
|
|
93
|
+
quality: params.quality,
|
|
94
|
+
envVariables: params.envVariables,
|
|
95
|
+
dumpBrowserLogs: renderer_1.RenderInternals.isEqualOrBelowLogLevel(params.logLevel, 'verbose'),
|
|
96
|
+
verbose: renderer_1.RenderInternals.isEqualOrBelowLogLevel(params.logLevel, 'verbose'),
|
|
97
|
+
onBrowserLog: (log) => {
|
|
98
|
+
logs.push(log);
|
|
99
|
+
},
|
|
100
|
+
outputLocation,
|
|
101
|
+
codec: chunkCodec,
|
|
102
|
+
crf: (_a = params.crf) !== null && _a !== void 0 ? _a : undefined,
|
|
103
|
+
ffmpegExecutable: process.env.NODE_ENV === 'test' ? null : '/opt/bin/ffmpeg',
|
|
104
|
+
pixelFormat: params.pixelFormat,
|
|
105
|
+
proResProfile: params.proResProfile,
|
|
106
|
+
onDownload: (src) => {
|
|
107
|
+
console.log('Downloading', src);
|
|
108
|
+
return () => undefined;
|
|
109
|
+
},
|
|
110
|
+
overwrite: false,
|
|
111
|
+
chromiumOptions: params.chromiumOptions,
|
|
112
|
+
scale: params.scale,
|
|
113
|
+
timeoutInMilliseconds: params.timeoutInMilliseconds,
|
|
114
|
+
port: null,
|
|
115
|
+
everyNthFrame: params.everyNthFrame,
|
|
116
|
+
numberOfGifLoops: null,
|
|
117
|
+
downloadMap,
|
|
118
|
+
muted: params.muted,
|
|
119
|
+
enforceAudioTrack: true,
|
|
120
|
+
})
|
|
121
|
+
.then(() => resolve())
|
|
122
|
+
.catch((err) => reject(err));
|
|
118
123
|
});
|
|
119
124
|
const endRendered = Date.now();
|
|
120
125
|
const condensedTimingData = {
|
|
@@ -227,7 +227,7 @@ export declare type RenderMetadata = {
|
|
|
227
227
|
renderId: string;
|
|
228
228
|
outName: OutNameInput | undefined;
|
|
229
229
|
};
|
|
230
|
-
export declare type LambdaVersions = '2022-08-10' | '2022-08-04' | '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';
|
|
230
|
+
export declare type LambdaVersions = '2022-08-16' | '2022-08-13' | '2022-08-11' | '2022-08-10' | '2022-08-04' | '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';
|
|
231
231
|
export declare const CURRENT_VERSION: LambdaVersions;
|
|
232
232
|
export declare type PostRenderData = {
|
|
233
233
|
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-16';
|
|
88
88
|
exports.LAMBDA_CONCURRENCY_LIMIT_QUOTA = 'L-B99A9384';
|
|
89
89
|
exports.LAMBDA_BURST_LIMIT_QUOTA = 'L-548AE339';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@remotion/lambda",
|
|
3
|
-
"version": "3.2.
|
|
3
|
+
"version": "3.2.4",
|
|
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": "3.2.
|
|
36
|
-
"@remotion/cli": "3.2.
|
|
37
|
-
"@remotion/renderer": "3.2.
|
|
35
|
+
"@remotion/bundler": "3.2.4",
|
|
36
|
+
"@remotion/cli": "3.2.4",
|
|
37
|
+
"@remotion/renderer": "3.2.4",
|
|
38
38
|
"aws-policies": "^1.0.1",
|
|
39
39
|
"mime-types": "2.1.34",
|
|
40
|
-
"remotion": "3.2.
|
|
40
|
+
"remotion": "3.2.4"
|
|
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": "ee420b99227e0e5bcf093c108e3695f5d46e3658"
|
|
66
66
|
}
|
package/remotionlambda.zip
CHANGED
|
Binary file
|