@remotion/lambda 4.0.192 → 4.0.194
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/api/get-compositions-on-lambda.js +1 -0
- package/dist/api/make-lambda-payload.js +5 -1
- package/dist/functions/index.js +3 -0
- package/dist/functions/launch.js +1 -0
- package/dist/functions/renderer.js +5 -1
- package/dist/functions/start.d.ts +1 -0
- package/dist/functions/start.js +8 -5
- package/package.json +11 -11
- package/remotionlambda-arm64.zip +0 -0
|
@@ -28,6 +28,7 @@ const getCompositionsOnLambda = async ({ chromiumOptions, serveUrl, region, inpu
|
|
|
28
28
|
propsType: 'input-props',
|
|
29
29
|
needsToUpload: (0, client_1.getNeedsToUpload)('video-or-audio', [
|
|
30
30
|
stringifiedInputProps.length,
|
|
31
|
+
JSON.stringify(envVariables).length,
|
|
31
32
|
]),
|
|
32
33
|
providerSpecifics: aws_implementation_1.awsImplementation,
|
|
33
34
|
});
|
|
@@ -25,6 +25,7 @@ const makeLambdaRenderMediaPayload = async ({ rendererFunctionName, frameRange,
|
|
|
25
25
|
region,
|
|
26
26
|
needsToUpload: (0, client_1.getNeedsToUpload)('video-or-audio', [
|
|
27
27
|
stringifiedInputProps.length,
|
|
28
|
+
JSON.stringify(envVariables).length,
|
|
28
29
|
]),
|
|
29
30
|
userSpecifiedBucketName: bucketName !== null && bucketName !== void 0 ? bucketName : null,
|
|
30
31
|
propsType: 'input-props',
|
|
@@ -95,7 +96,10 @@ const makeLambdaRenderStillPayload = async ({ serveUrl, inputProps, imageFormat,
|
|
|
95
96
|
const serializedInputProps = await (0, client_1.compressInputProps)({
|
|
96
97
|
stringifiedInputProps,
|
|
97
98
|
region,
|
|
98
|
-
needsToUpload: (0, client_1.getNeedsToUpload)('still', [
|
|
99
|
+
needsToUpload: (0, client_1.getNeedsToUpload)('still', [
|
|
100
|
+
stringifiedInputProps.length,
|
|
101
|
+
JSON.stringify(envVariables).length,
|
|
102
|
+
]),
|
|
99
103
|
userSpecifiedBucketName: forceBucketName !== null && forceBucketName !== void 0 ? forceBucketName : null,
|
|
100
104
|
propsType: 'input-props',
|
|
101
105
|
providerSpecifics: aws_implementation_1.awsImplementation,
|
package/dist/functions/index.js
CHANGED
|
@@ -87,8 +87,10 @@ const innerHandler = async ({ params, responseWriter, context, providerSpecifics
|
|
|
87
87
|
return;
|
|
88
88
|
}
|
|
89
89
|
if (params.type === client_1.ServerlessRoutines.start) {
|
|
90
|
+
const renderId = (0, lifecycle_1.generateRandomHashWithLifeCycleRule)(params.deleteAfter, providerSpecifics);
|
|
90
91
|
if (providerSpecifics.printLoggingHelper) {
|
|
91
92
|
(0, print_logging_helper_1.printLoggingGrepHelper)(client_1.ServerlessRoutines.start, {
|
|
93
|
+
renderId,
|
|
92
94
|
inputProps: JSON.stringify(params.inputProps),
|
|
93
95
|
isWarm,
|
|
94
96
|
}, params.logLevel);
|
|
@@ -96,6 +98,7 @@ const innerHandler = async ({ params, responseWriter, context, providerSpecifics
|
|
|
96
98
|
const response = await (0, start_1.startHandler)(params, {
|
|
97
99
|
expectedBucketOwner: currentUserId,
|
|
98
100
|
timeoutInMilliseconds,
|
|
101
|
+
renderId,
|
|
99
102
|
}, providerSpecifics);
|
|
100
103
|
await responseWriter.write(Buffer.from(JSON.stringify(response)));
|
|
101
104
|
await responseWriter.end();
|
package/dist/functions/launch.js
CHANGED
|
@@ -119,6 +119,7 @@ const innerLaunchHandler = async ({ functionName, params, options, overallProgre
|
|
|
119
119
|
params.inputProps.type === 'bucket-url'
|
|
120
120
|
? params.inputProps.hash.length
|
|
121
121
|
: params.inputProps.payload.length,
|
|
122
|
+
JSON.stringify(params.envVariables).length,
|
|
122
123
|
]);
|
|
123
124
|
const serializedResolvedProps = await (0, client_1.compressInputProps)({
|
|
124
125
|
propsType: 'resolved-props',
|
|
@@ -70,7 +70,11 @@ const renderHandler = async ({ params, options, logs, onStream, providerSpecific
|
|
|
70
70
|
const seamlessAudio = (0, can_concat_seamlessly_1.canConcatAudioSeamlessly)(defaultAudioCodec, params.framesPerLambda);
|
|
71
71
|
const seamlessVideo = (0, can_concat_seamlessly_1.canConcatVideoSeamlessly)(params.codec);
|
|
72
72
|
renderer_1.RenderInternals.Log.verbose({ indent: false, logLevel: params.logLevel }, `Preparing for rendering a chunk. Audio = ${seamlessAudio ? 'seamless' : 'normal'}, Video = ${seamlessVideo ? 'seamless' : 'normal'}`, params.logLevel);
|
|
73
|
-
const chunkCodec = seamlessVideo && params.codec === 'h264'
|
|
73
|
+
const chunkCodec = seamlessVideo && params.codec === 'h264'
|
|
74
|
+
? 'h264-ts'
|
|
75
|
+
: params.codec === 'gif'
|
|
76
|
+
? 'h264-ts'
|
|
77
|
+
: params.codec;
|
|
74
78
|
const audioCodec = defaultAudioCodec === null
|
|
75
79
|
? null
|
|
76
80
|
: seamlessAudio
|
|
@@ -3,6 +3,7 @@ import type { ServerlessPayload } from '@remotion/serverless/client';
|
|
|
3
3
|
type Options = {
|
|
4
4
|
expectedBucketOwner: string;
|
|
5
5
|
timeoutInMilliseconds: number;
|
|
6
|
+
renderId: string;
|
|
6
7
|
};
|
|
7
8
|
export declare const startHandler: <Provider extends CloudProvider<string, Record<string, unknown>>>(params: ServerlessPayload<Provider>, options: Options, providerSpecifics: ProviderSpecifics<Provider>) => Promise<{
|
|
8
9
|
type: "success";
|
package/dist/functions/start.js
CHANGED
|
@@ -31,14 +31,13 @@ const startHandler = async (params, options, providerSpecifics) => {
|
|
|
31
31
|
bucketName,
|
|
32
32
|
});
|
|
33
33
|
(0, lifecycle_1.validateDeleteAfter)(params.deleteAfter);
|
|
34
|
-
const renderId = (0, lifecycle_1.generateRandomHashWithLifeCycleRule)(params.deleteAfter, providerSpecifics);
|
|
35
34
|
const initialFile = providerSpecifics.writeFile({
|
|
36
35
|
bucketName,
|
|
37
36
|
downloadBehavior: null,
|
|
38
37
|
region,
|
|
39
38
|
body: JSON.stringify((0, overall_render_progress_1.makeInitialOverallRenderProgress)(options.timeoutInMilliseconds + Date.now())),
|
|
40
39
|
expectedBucketOwner: options.expectedBucketOwner,
|
|
41
|
-
key: (0, client_1.overallProgressKey)(renderId),
|
|
40
|
+
key: (0, client_1.overallProgressKey)(options.renderId),
|
|
42
41
|
privacy: 'private',
|
|
43
42
|
customCredentials: null,
|
|
44
43
|
});
|
|
@@ -49,7 +48,7 @@ const startHandler = async (params, options, providerSpecifics) => {
|
|
|
49
48
|
serveUrl: realServeUrl,
|
|
50
49
|
inputProps: params.inputProps,
|
|
51
50
|
bucketName,
|
|
52
|
-
renderId,
|
|
51
|
+
renderId: options.renderId,
|
|
53
52
|
codec: params.codec,
|
|
54
53
|
imageFormat: params.imageFormat,
|
|
55
54
|
crf: params.crf,
|
|
@@ -86,10 +85,14 @@ const startHandler = async (params, options, providerSpecifics) => {
|
|
|
86
85
|
colorSpace: params.colorSpace,
|
|
87
86
|
preferLossless: params.preferLossless,
|
|
88
87
|
};
|
|
88
|
+
const stringifiedPayload = JSON.stringify(payload);
|
|
89
|
+
if (stringifiedPayload.length > 256 * 1024) {
|
|
90
|
+
throw new Error(`Payload is too big: ${stringifiedPayload.length} bytes. Maximum size is 256 KB. This should not happen, please report this to the Remotion team. Payload: ${stringifiedPayload}`);
|
|
91
|
+
}
|
|
89
92
|
// Don't replace with callLambda(), we want to return before the render is snone
|
|
90
93
|
const result = await (0, aws_clients_1.getLambdaClient)(providerSpecifics.getCurrentRegionInFunction()).send(new client_lambda_1.InvokeCommand({
|
|
91
94
|
FunctionName: process.env.AWS_LAMBDA_FUNCTION_NAME,
|
|
92
|
-
Payload:
|
|
95
|
+
Payload: stringifiedPayload,
|
|
93
96
|
InvocationType: 'Event',
|
|
94
97
|
}));
|
|
95
98
|
if (result.FunctionError) {
|
|
@@ -99,7 +102,7 @@ const startHandler = async (params, options, providerSpecifics) => {
|
|
|
99
102
|
return {
|
|
100
103
|
type: 'success',
|
|
101
104
|
bucketName,
|
|
102
|
-
renderId,
|
|
105
|
+
renderId: options.renderId,
|
|
103
106
|
};
|
|
104
107
|
};
|
|
105
108
|
exports.startHandler = startHandler;
|
package/package.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"url": "https://github.com/remotion-dev/remotion/tree/main/packages/lambda"
|
|
4
4
|
},
|
|
5
5
|
"name": "@remotion/lambda",
|
|
6
|
-
"version": "4.0.
|
|
6
|
+
"version": "4.0.194",
|
|
7
7
|
"description": "Render Remotion videos on AWS Lambda",
|
|
8
8
|
"main": "dist/index.js",
|
|
9
9
|
"sideEffects": false,
|
|
@@ -22,13 +22,13 @@
|
|
|
22
22
|
"@aws-sdk/s3-request-presigner": "3.583.0",
|
|
23
23
|
"mime-types": "2.1.34",
|
|
24
24
|
"zod": "3.22.3",
|
|
25
|
-
"@remotion/bundler": "4.0.
|
|
26
|
-
"@remotion/
|
|
27
|
-
"@remotion/
|
|
28
|
-
"@remotion/
|
|
29
|
-
"@remotion/
|
|
30
|
-
"remotion": "4.0.
|
|
31
|
-
"
|
|
25
|
+
"@remotion/bundler": "4.0.194",
|
|
26
|
+
"@remotion/cli": "4.0.194",
|
|
27
|
+
"@remotion/renderer": "4.0.194",
|
|
28
|
+
"@remotion/streaming": "4.0.194",
|
|
29
|
+
"@remotion/serverless": "4.0.194",
|
|
30
|
+
"@remotion/studio-server": "4.0.194",
|
|
31
|
+
"remotion": "4.0.194"
|
|
32
32
|
},
|
|
33
33
|
"devDependencies": {
|
|
34
34
|
"@types/mime-types": "2.1.1",
|
|
@@ -37,11 +37,11 @@
|
|
|
37
37
|
"pureimage": "0.4.13",
|
|
38
38
|
"vitest": "0.31.1",
|
|
39
39
|
"zip-lib": "^0.7.2",
|
|
40
|
-
"@remotion/bundler": "4.0.
|
|
41
|
-
"@remotion/compositor-linux-arm64-gnu": "4.0.
|
|
40
|
+
"@remotion/bundler": "4.0.194",
|
|
41
|
+
"@remotion/compositor-linux-arm64-gnu": "4.0.194"
|
|
42
42
|
},
|
|
43
43
|
"peerDependencies": {
|
|
44
|
-
"@remotion/bundler": "4.0.
|
|
44
|
+
"@remotion/bundler": "4.0.194"
|
|
45
45
|
},
|
|
46
46
|
"publishConfig": {
|
|
47
47
|
"access": "public"
|
package/remotionlambda-arm64.zip
CHANGED
|
Binary file
|