@remotion/lambda 4.0.44 → 4.0.46
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/log.d.ts +4 -4
- package/dist/functions/chunk-optimization/plan-frame-ranges.d.ts +4 -1
- package/dist/functions/helpers/concat-videos.d.ts +2 -1
- package/dist/functions/helpers/concat-videos.js +2 -1
- package/dist/functions/helpers/merge-chunks.d.ts +1 -0
- package/dist/functions/helpers/merge-chunks.js +4 -4
- package/dist/functions/index.js +1 -0
- package/dist/functions/launch.js +4 -0
- package/dist/functions/merge.js +1 -0
- package/dist/functions/still.js +1 -0
- package/dist/shared/constants.d.ts +2 -0
- package/dist/shared/invoke-webhook.d.ts +0 -2
- package/package.json +9 -9
- package/remotionlambda-arm64.zip +0 -0
package/dist/cli/log.d.ts
CHANGED
|
@@ -2,24 +2,24 @@ export declare const Log: {
|
|
|
2
2
|
verbose: (message?: any, ...optionalParams: any[]) => void;
|
|
3
3
|
verboseAdvanced: (options: {
|
|
4
4
|
indent: boolean;
|
|
5
|
-
logLevel: "
|
|
5
|
+
logLevel: "error" | "verbose" | "info" | "warn";
|
|
6
6
|
} & {
|
|
7
7
|
tag?: string | undefined;
|
|
8
8
|
}, message?: any, ...optionalParams: any[]) => void;
|
|
9
9
|
info: (message?: any, ...optionalParams: any[]) => void;
|
|
10
10
|
infoAdvanced: (options: {
|
|
11
11
|
indent: boolean;
|
|
12
|
-
logLevel: "
|
|
12
|
+
logLevel: "error" | "verbose" | "info" | "warn";
|
|
13
13
|
}, message?: any, ...optionalParams: any[]) => void;
|
|
14
14
|
warn: (message?: any, ...optionalParams: any[]) => void;
|
|
15
15
|
warnAdvanced: (options: {
|
|
16
16
|
indent: boolean;
|
|
17
|
-
logLevel: "
|
|
17
|
+
logLevel: "error" | "verbose" | "info" | "warn";
|
|
18
18
|
}, message?: any, ...optionalParams: any[]) => void;
|
|
19
19
|
error: (message?: any, ...optionalParams: any[]) => void;
|
|
20
20
|
errorAdvanced: (options: {
|
|
21
21
|
indent: boolean;
|
|
22
|
-
logLevel: "
|
|
22
|
+
logLevel: "error" | "verbose" | "info" | "warn";
|
|
23
23
|
} & {
|
|
24
24
|
tag?: string | undefined;
|
|
25
25
|
}, message?: any, ...optionalParams: any[]) => void;
|
|
@@ -11,7 +11,7 @@ export declare const getAllFilesS3: ({ bucket, expectedFiles, outdir, renderId,
|
|
|
11
11
|
expectedBucketOwner: string;
|
|
12
12
|
onErrors: (errors: EnhancedErrorInfo[]) => void;
|
|
13
13
|
}) => Promise<string[]>;
|
|
14
|
-
export declare const concatVideosS3: ({ onProgress, numberOfFrames, codec, fps, numberOfGifLoops, files, outdir, audioCodec, }: {
|
|
14
|
+
export declare const concatVideosS3: ({ onProgress, numberOfFrames, codec, fps, numberOfGifLoops, files, outdir, audioCodec, audioBitrate, }: {
|
|
15
15
|
onProgress: (frames: number) => void;
|
|
16
16
|
numberOfFrames: number;
|
|
17
17
|
codec: LambdaCodec;
|
|
@@ -20,6 +20,7 @@ export declare const concatVideosS3: ({ onProgress, numberOfFrames, codec, fps,
|
|
|
20
20
|
files: string[];
|
|
21
21
|
outdir: string;
|
|
22
22
|
audioCodec: AudioCodec | null;
|
|
23
|
+
audioBitrate: string | null;
|
|
23
24
|
}) => Promise<{
|
|
24
25
|
outfile: string;
|
|
25
26
|
cleanupChunksProm: Promise<void>;
|
|
@@ -133,7 +133,7 @@ const getAllFilesS3 = ({ bucket, expectedFiles, outdir, renderId, region, expect
|
|
|
133
133
|
});
|
|
134
134
|
};
|
|
135
135
|
exports.getAllFilesS3 = getAllFilesS3;
|
|
136
|
-
const concatVideosS3 = async ({ onProgress, numberOfFrames, codec, fps, numberOfGifLoops, files, outdir, audioCodec, }) => {
|
|
136
|
+
const concatVideosS3 = async ({ onProgress, numberOfFrames, codec, fps, numberOfGifLoops, files, outdir, audioCodec, audioBitrate, }) => {
|
|
137
137
|
const outfile = (0, node_path_1.join)(renderer_1.RenderInternals.tmpDir(constants_1.REMOTION_CONCATED_TOKEN), 'concat.' + renderer_1.RenderInternals.getFileExtensionFromCodec(codec, audioCodec));
|
|
138
138
|
const combine = (0, timer_1.timer)('Combine videos');
|
|
139
139
|
const filelistDir = renderer_1.RenderInternals.tmpDir(constants_1.REMOTION_FILELIST_TOKEN);
|
|
@@ -147,6 +147,7 @@ const concatVideosS3 = async ({ onProgress, numberOfFrames, codec, fps, numberOf
|
|
|
147
147
|
fps,
|
|
148
148
|
numberOfGifLoops,
|
|
149
149
|
audioCodec,
|
|
150
|
+
audioBitrate,
|
|
150
151
|
});
|
|
151
152
|
combine.end();
|
|
152
153
|
const cleanupChunksProm = node_fs_1.default.promises.rm(outdir, {
|
|
@@ -23,12 +23,11 @@ const write_post_render_data_1 = require("./write-post-render-data");
|
|
|
23
23
|
const mergeChunksAndFinishRender = async (options) => {
|
|
24
24
|
let lastProgressUploaded = 0;
|
|
25
25
|
const onProgress = (framesEncoded) => {
|
|
26
|
-
const
|
|
27
|
-
|
|
28
|
-
if (deltaSinceLastProgressUploaded < 0.1) {
|
|
26
|
+
const deltaSinceLastProgressUploaded = framesEncoded - lastProgressUploaded;
|
|
27
|
+
if (deltaSinceLastProgressUploaded < 200) {
|
|
29
28
|
return;
|
|
30
29
|
}
|
|
31
|
-
lastProgressUploaded =
|
|
30
|
+
lastProgressUploaded = framesEncoded;
|
|
32
31
|
(0, io_1.lambdaWriteFile)({
|
|
33
32
|
bucketName: options.bucketName,
|
|
34
33
|
key: (0, constants_1.encodingProgressKey)(options.renderId),
|
|
@@ -100,6 +99,7 @@ const mergeChunksAndFinishRender = async (options) => {
|
|
|
100
99
|
files,
|
|
101
100
|
outdir,
|
|
102
101
|
audioCodec: options.audioCodec,
|
|
102
|
+
audioBitrate: options.audioBitrate,
|
|
103
103
|
});
|
|
104
104
|
const encodingStop = Date.now();
|
|
105
105
|
const outputSize = fs_1.default.statSync(outfile);
|
package/dist/functions/index.js
CHANGED
|
@@ -129,6 +129,7 @@ const innerHandler = async (params, responseStream, context) => {
|
|
|
129
129
|
renderId: params.renderId,
|
|
130
130
|
isWarm,
|
|
131
131
|
});
|
|
132
|
+
renderer_1.RenderInternals.setLogLevel(params.logLevel);
|
|
132
133
|
const response = await (0, merge_1.mergeHandler)(params, {
|
|
133
134
|
expectedBucketOwner: currentUserId,
|
|
134
135
|
});
|
package/dist/functions/launch.js
CHANGED
|
@@ -206,6 +206,7 @@ const innerLaunchHandler = async ({ functionName, params, options, onAllChunksAv
|
|
|
206
206
|
deleteAfter: params.deleteAfter,
|
|
207
207
|
numberOfGifLoops: params.numberOfGifLoops,
|
|
208
208
|
downloadBehavior: params.downloadBehavior,
|
|
209
|
+
audioBitrate: params.audioBitrate,
|
|
209
210
|
};
|
|
210
211
|
const { key, renderBucketName, customCredentials } = (0, expected_out_name_1.getExpectedOutName)(renderMetadata, params.bucketName, typeof params.outName === 'string' || typeof params.outName === 'undefined'
|
|
211
212
|
? null
|
|
@@ -265,6 +266,7 @@ const innerLaunchHandler = async ({ functionName, params, options, onAllChunksAv
|
|
|
265
266
|
verbose,
|
|
266
267
|
renderMetadata,
|
|
267
268
|
onAllChunks: onAllChunksAvailable,
|
|
269
|
+
audioBitrate: params.audioBitrate,
|
|
268
270
|
});
|
|
269
271
|
return postRenderData;
|
|
270
272
|
};
|
|
@@ -292,6 +294,7 @@ const launchHandler = async (params, options) => {
|
|
|
292
294
|
outName: params.outName,
|
|
293
295
|
serializedResolvedProps: allChunksAvailable.serializedResolvedProps,
|
|
294
296
|
inputProps: allChunksAvailable.inputProps,
|
|
297
|
+
logLevel: params.logLevel,
|
|
295
298
|
},
|
|
296
299
|
retries: 2,
|
|
297
300
|
});
|
|
@@ -467,6 +470,7 @@ const launchHandler = async (params, options) => {
|
|
|
467
470
|
expectedBucketOwner: options.expectedBucketOwner,
|
|
468
471
|
renderId: params.renderId,
|
|
469
472
|
});
|
|
473
|
+
renderer_1.RenderInternals.Log.error('Wrote error to S3');
|
|
470
474
|
clearTimeout(webhookDueToTimeout);
|
|
471
475
|
if (params.webhook && !webhookInvoked) {
|
|
472
476
|
try {
|
package/dist/functions/merge.js
CHANGED
|
@@ -50,6 +50,7 @@ const mergeHandler = async (params, options) => {
|
|
|
50
50
|
onAllChunks: () => {
|
|
51
51
|
renderer_1.RenderInternals.Log.info('All chunks have been downloaded now.');
|
|
52
52
|
},
|
|
53
|
+
audioBitrate: renderMetadata.audioBitrate,
|
|
53
54
|
});
|
|
54
55
|
return { type: 'success', postRenderData };
|
|
55
56
|
};
|
package/dist/functions/still.js
CHANGED
|
@@ -117,6 +117,7 @@ const innerStillHandler = async ({ params: lambdaParams, expectedBucketOwner, re
|
|
|
117
117
|
deleteAfter: lambdaParams.deleteAfter,
|
|
118
118
|
numberOfGifLoops: null,
|
|
119
119
|
downloadBehavior: lambdaParams.downloadBehavior,
|
|
120
|
+
audioBitrate: null,
|
|
120
121
|
};
|
|
121
122
|
await (0, io_1.lambdaWriteFile)({
|
|
122
123
|
bucketName,
|
|
@@ -293,6 +293,7 @@ export type LambdaPayloads = {
|
|
|
293
293
|
inputProps: SerializedInputProps;
|
|
294
294
|
serializedResolvedProps: SerializedInputProps;
|
|
295
295
|
verbose: boolean;
|
|
296
|
+
logLevel: LogLevel;
|
|
296
297
|
};
|
|
297
298
|
};
|
|
298
299
|
export type LambdaPayload = LambdaPayloads[LambdaRoutines];
|
|
@@ -328,6 +329,7 @@ export type RenderMetadata = Discriminated & {
|
|
|
328
329
|
everyNthFrame: number;
|
|
329
330
|
deleteAfter: DeleteAfter | null;
|
|
330
331
|
numberOfGifLoops: number | null;
|
|
332
|
+
audioBitrate: string | null;
|
|
331
333
|
downloadBehavior: DownloadBehavior;
|
|
332
334
|
};
|
|
333
335
|
export type AfterRenderCost = {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@remotion/lambda",
|
|
3
|
-
"version": "4.0.
|
|
3
|
+
"version": "4.0.46",
|
|
4
4
|
"description": "Distributed renderer for Remotion based on AWS Lambda",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"sideEffects": false,
|
|
@@ -25,11 +25,11 @@
|
|
|
25
25
|
"@aws-sdk/s3-request-presigner": "3.382.0",
|
|
26
26
|
"aws-policies": "^1.0.1",
|
|
27
27
|
"mime-types": "2.1.34",
|
|
28
|
-
"zod": "3.
|
|
29
|
-
"@remotion/bundler": "4.0.
|
|
30
|
-
"
|
|
31
|
-
"remotion": "4.0.
|
|
32
|
-
"@remotion/cli": "4.0.
|
|
28
|
+
"zod": "3.22.3",
|
|
29
|
+
"@remotion/bundler": "4.0.46",
|
|
30
|
+
"remotion": "4.0.46",
|
|
31
|
+
"@remotion/renderer": "4.0.46",
|
|
32
|
+
"@remotion/cli": "4.0.46"
|
|
33
33
|
},
|
|
34
34
|
"devDependencies": {
|
|
35
35
|
"@jonny/eslint-config": "3.0.266",
|
|
@@ -43,11 +43,11 @@
|
|
|
43
43
|
"ts-node": "^10.8.0",
|
|
44
44
|
"vitest": "0.31.1",
|
|
45
45
|
"zip-lib": "^0.7.2",
|
|
46
|
-
"@remotion/bundler": "4.0.
|
|
47
|
-
"@remotion/compositor-linux-arm64-gnu": "4.0.
|
|
46
|
+
"@remotion/bundler": "4.0.46",
|
|
47
|
+
"@remotion/compositor-linux-arm64-gnu": "4.0.46"
|
|
48
48
|
},
|
|
49
49
|
"peerDependencies": {
|
|
50
|
-
"@remotion/bundler": "4.0.
|
|
50
|
+
"@remotion/bundler": "4.0.46"
|
|
51
51
|
},
|
|
52
52
|
"publishConfig": {
|
|
53
53
|
"access": "public"
|
package/remotionlambda-arm64.zip
CHANGED
|
Binary file
|