@remotion/lambda 3.2.9 → 3.2.12-crf.5
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/render-media-on-lambda.d.ts +1 -0
- package/dist/api/render-media-on-lambda.js +7 -0
- package/dist/api/render-still-on-lambda.d.ts +1 -0
- package/dist/api/render-still-on-lambda.js +7 -0
- package/dist/cli/commands/render/render.js +1 -7
- package/dist/cli/commands/still.js +1 -7
- package/dist/functions/helpers/concat-videos.d.ts +2 -1
- package/dist/functions/helpers/concat-videos.js +2 -1
- package/dist/functions/launch.js +2 -1
- package/dist/shared/get-cloudwatch-stream-url.d.ts +8 -0
- package/dist/shared/get-cloudwatch-stream-url.js +7 -0
- package/package.json +6 -6
- package/remotionlambda.zip +0 -0
|
@@ -34,6 +34,7 @@ export declare type RenderMediaOnLambdaInput = {
|
|
|
34
34
|
export declare type RenderMediaOnLambdaOutput = {
|
|
35
35
|
renderId: string;
|
|
36
36
|
bucketName: string;
|
|
37
|
+
cloudWatchLogs: string;
|
|
37
38
|
};
|
|
38
39
|
/**
|
|
39
40
|
* @description Triggers a render on a lambda given a composition and a lambda function.
|
|
@@ -5,6 +5,7 @@ const version_1 = require("remotion/version");
|
|
|
5
5
|
const call_lambda_1 = require("../shared/call-lambda");
|
|
6
6
|
const constants_1 = require("../shared/constants");
|
|
7
7
|
const convert_to_serve_url_1 = require("../shared/convert-to-serve-url");
|
|
8
|
+
const get_cloudwatch_stream_url_1 = require("../shared/get-cloudwatch-stream-url");
|
|
8
9
|
const validate_download_behavior_1 = require("../shared/validate-download-behavior");
|
|
9
10
|
const validate_frames_per_lambda_1 = require("../shared/validate-frames-per-lambda");
|
|
10
11
|
const validate_lambda_codec_1 = require("../shared/validate-lambda-codec");
|
|
@@ -70,6 +71,12 @@ const renderMediaOnLambda = async ({ functionName, serveUrl, inputProps, codec,
|
|
|
70
71
|
return {
|
|
71
72
|
renderId: res.renderId,
|
|
72
73
|
bucketName: res.bucketName,
|
|
74
|
+
cloudWatchLogs: (0, get_cloudwatch_stream_url_1.getCloudwatchStreamUrl)({
|
|
75
|
+
functionName,
|
|
76
|
+
method: constants_1.LambdaRoutines.renderer,
|
|
77
|
+
region,
|
|
78
|
+
renderId: res.renderId,
|
|
79
|
+
}),
|
|
73
80
|
};
|
|
74
81
|
}
|
|
75
82
|
catch (err) {
|
|
@@ -5,6 +5,7 @@ const version_1 = require("remotion/version");
|
|
|
5
5
|
const call_lambda_1 = require("../shared/call-lambda");
|
|
6
6
|
const constants_1 = require("../shared/constants");
|
|
7
7
|
const convert_to_serve_url_1 = require("../shared/convert-to-serve-url");
|
|
8
|
+
const get_cloudwatch_stream_url_1 = require("../shared/get-cloudwatch-stream-url");
|
|
8
9
|
/**
|
|
9
10
|
* @description Renders a still frame on Lambda
|
|
10
11
|
* @link https://remotion.dev/docs/lambda/renderstillonlambda
|
|
@@ -55,6 +56,12 @@ const renderStillOnLambda = async ({ functionName, serveUrl, inputProps, imageFo
|
|
|
55
56
|
sizeInBytes: res.size,
|
|
56
57
|
bucketName: res.bucketName,
|
|
57
58
|
renderId: res.renderId,
|
|
59
|
+
cloudWatchLogs: (0, get_cloudwatch_stream_url_1.getCloudwatchStreamUrl)({
|
|
60
|
+
functionName,
|
|
61
|
+
method: constants_1.LambdaRoutines.still,
|
|
62
|
+
region,
|
|
63
|
+
renderId: res.renderId,
|
|
64
|
+
}),
|
|
58
65
|
};
|
|
59
66
|
}
|
|
60
67
|
catch (err) {
|
|
@@ -14,7 +14,6 @@ const validate_retries_1 = require("../../../shared/validate-retries");
|
|
|
14
14
|
const args_1 = require("../../args");
|
|
15
15
|
const get_aws_region_1 = require("../../get-aws-region");
|
|
16
16
|
const find_function_name_1 = require("../../helpers/find-function-name");
|
|
17
|
-
const get_cloudwatch_stream_url_1 = require("../../helpers/get-cloudwatch-stream-url");
|
|
18
17
|
const quit_1 = require("../../helpers/quit");
|
|
19
18
|
const log_1 = require("../../log");
|
|
20
19
|
const progress_1 = require("./progress");
|
|
@@ -80,12 +79,7 @@ const renderCommand = async (args) => {
|
|
|
80
79
|
const totalSteps = outName ? 5 : 4;
|
|
81
80
|
const progressBar = cli_1.CliInternals.createOverwriteableCliOutput(cli_1.CliInternals.quietFlagProvided());
|
|
82
81
|
log_1.Log.info(cli_1.CliInternals.chalk.gray(`Bucket = ${res.bucketName}, renderId = ${res.renderId}, functionName = ${functionName}`));
|
|
83
|
-
log_1.Log.verbose(`CloudWatch logs (if enabled): ${
|
|
84
|
-
functionName,
|
|
85
|
-
region,
|
|
86
|
-
renderId: res.renderId,
|
|
87
|
-
method: constants_1.LambdaRoutines.renderer,
|
|
88
|
-
})}`);
|
|
82
|
+
log_1.Log.verbose(`CloudWatch logs (if enabled): ${res.cloudWatchLogs}`);
|
|
89
83
|
const status = await (0, get_render_progress_1.getRenderProgress)({
|
|
90
84
|
functionName,
|
|
91
85
|
bucketName: res.bucketName,
|
|
@@ -11,7 +11,6 @@ const validate_retries_1 = require("../../shared/validate-retries");
|
|
|
11
11
|
const args_1 = require("../args");
|
|
12
12
|
const get_aws_region_1 = require("../get-aws-region");
|
|
13
13
|
const find_function_name_1 = require("../helpers/find-function-name");
|
|
14
|
-
const get_cloudwatch_stream_url_1 = require("../helpers/get-cloudwatch-stream-url");
|
|
15
14
|
const quit_1 = require("../helpers/quit");
|
|
16
15
|
const log_1 = require("../log");
|
|
17
16
|
exports.STILL_COMMAND = 'still';
|
|
@@ -63,12 +62,7 @@ const stillCommand = async (args) => {
|
|
|
63
62
|
scale,
|
|
64
63
|
});
|
|
65
64
|
log_1.Log.verbose(cli_1.CliInternals.chalk.gray(`Bucket = ${res.bucketName}, renderId = ${res.renderId}, functionName = ${functionName}`));
|
|
66
|
-
log_1.Log.verbose(`CloudWatch logs (if enabled): ${
|
|
67
|
-
functionName,
|
|
68
|
-
region: (0, get_aws_region_1.getAwsRegion)(),
|
|
69
|
-
renderId: res.renderId,
|
|
70
|
-
method: constants_1.LambdaRoutines.still,
|
|
71
|
-
})}`);
|
|
65
|
+
log_1.Log.verbose(`CloudWatch logs (if enabled): ${res.cloudWatchLogs}`);
|
|
72
66
|
if (outName) {
|
|
73
67
|
log_1.Log.info('Finished rendering. Downloading...');
|
|
74
68
|
const { outputPath, sizeInBytes } = await (0, download_media_1.downloadMedia)({
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { AwsRegion } from '../../pricing/aws-regions';
|
|
2
2
|
import type { LambdaCodec } from '../../shared/validate-lambda-codec';
|
|
3
|
-
export declare const concatVideosS3: ({ bucket, expectedFiles, onProgress, numberOfFrames, renderId, region, codec, expectedBucketOwner, fps, numberOfGifLoops, }: {
|
|
3
|
+
export declare const concatVideosS3: ({ bucket, expectedFiles, onProgress, numberOfFrames, renderId, region, codec, expectedBucketOwner, fps, numberOfGifLoops, crf, }: {
|
|
4
4
|
bucket: string;
|
|
5
5
|
expectedFiles: number;
|
|
6
6
|
onProgress: (frames: number, encodingStart: number) => void;
|
|
@@ -11,6 +11,7 @@ export declare const concatVideosS3: ({ bucket, expectedFiles, onProgress, numbe
|
|
|
11
11
|
expectedBucketOwner: string;
|
|
12
12
|
fps: number;
|
|
13
13
|
numberOfGifLoops: number | null;
|
|
14
|
+
crf: number | null;
|
|
14
15
|
}) => Promise<{
|
|
15
16
|
outfile: string;
|
|
16
17
|
cleanupChunksProm: Promise<void>;
|
|
@@ -112,7 +112,7 @@ const getAllFilesS3 = ({ bucket, expectedFiles, outdir, renderId, region, expect
|
|
|
112
112
|
loop();
|
|
113
113
|
});
|
|
114
114
|
};
|
|
115
|
-
const concatVideosS3 = async ({ bucket, expectedFiles, onProgress, numberOfFrames, renderId, region, codec, expectedBucketOwner, fps, numberOfGifLoops, }) => {
|
|
115
|
+
const concatVideosS3 = async ({ bucket, expectedFiles, onProgress, numberOfFrames, renderId, region, codec, expectedBucketOwner, fps, numberOfGifLoops, crf, }) => {
|
|
116
116
|
var _a;
|
|
117
117
|
const outdir = (0, path_1.join)(renderer_1.RenderInternals.tmpDir(constants_1.CONCAT_FOLDER_TOKEN), 'bucket');
|
|
118
118
|
if ((0, fs_1.existsSync)(outdir)) {
|
|
@@ -143,6 +143,7 @@ const concatVideosS3 = async ({ bucket, expectedFiles, onProgress, numberOfFrame
|
|
|
143
143
|
codec: codecForCombining,
|
|
144
144
|
fps,
|
|
145
145
|
numberOfGifLoops,
|
|
146
|
+
crf,
|
|
146
147
|
});
|
|
147
148
|
combine.end();
|
|
148
149
|
const cleanupChunksProm = ((_a = fs_1.default.promises.rm) !== null && _a !== void 0 ? _a : fs_1.default.promises.rmdir)(outdir, {
|
package/dist/functions/launch.js
CHANGED
|
@@ -62,7 +62,7 @@ const callFunctionWithRetry = async (payload, retries = 0) => {
|
|
|
62
62
|
}
|
|
63
63
|
};
|
|
64
64
|
const innerLaunchHandler = async (params, options) => {
|
|
65
|
-
var _a, _b;
|
|
65
|
+
var _a, _b, _c;
|
|
66
66
|
if (params.type !== constants_1.LambdaRoutines.launch) {
|
|
67
67
|
throw new Error('Expected launch type');
|
|
68
68
|
}
|
|
@@ -253,6 +253,7 @@ const innerLaunchHandler = async (params, options) => {
|
|
|
253
253
|
expectedBucketOwner: options.expectedBucketOwner,
|
|
254
254
|
fps,
|
|
255
255
|
numberOfGifLoops: params.numberOfGifLoops,
|
|
256
|
+
crf: (_c = params.crf) !== null && _c !== void 0 ? _c : null,
|
|
256
257
|
});
|
|
257
258
|
if (!encodingStop) {
|
|
258
259
|
encodingStop = Date.now();
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { AwsRegion } from '../client';
|
|
2
|
+
import type { LambdaRoutines } from './constants';
|
|
3
|
+
export declare const getCloudwatchStreamUrl: ({ region, functionName, method, renderId, }: {
|
|
4
|
+
region: AwsRegion;
|
|
5
|
+
functionName: string;
|
|
6
|
+
method: LambdaRoutines;
|
|
7
|
+
renderId: string;
|
|
8
|
+
}) => string;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getCloudwatchStreamUrl = void 0;
|
|
4
|
+
const getCloudwatchStreamUrl = ({ region, functionName, method, renderId, }) => {
|
|
5
|
+
return `https://${region}.console.aws.amazon.com/cloudwatch/home?region=${region}#logsV2:log-groups/log-group/$252Faws$252Flambda$252F${functionName}/log-events$3FfilterPattern$3D$2522method$253D${method}$252CrenderId$253D${renderId}$2522`;
|
|
6
|
+
};
|
|
7
|
+
exports.getCloudwatchStreamUrl = getCloudwatchStreamUrl;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@remotion/lambda",
|
|
3
|
-
"version": "3.2.
|
|
3
|
+
"version": "3.2.12-crf.5+14dc380ad",
|
|
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.12-crf.5+14dc380ad",
|
|
36
|
+
"@remotion/cli": "3.2.12-crf.5+14dc380ad",
|
|
37
|
+
"@remotion/renderer": "3.2.12-crf.5+14dc380ad",
|
|
38
38
|
"aws-policies": "^1.0.1",
|
|
39
39
|
"mime-types": "2.1.34",
|
|
40
|
-
"remotion": "3.2.
|
|
40
|
+
"remotion": "3.2.12-crf.5+14dc380ad"
|
|
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": "14dc380ad148868c35c5612f48eaf8e78ab42d9c"
|
|
66
66
|
}
|
package/remotionlambda.zip
CHANGED
|
Binary file
|