@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.
@@ -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) {
@@ -27,6 +27,7 @@ export declare type RenderStillOnLambdaOutput = {
27
27
  sizeInBytes: number;
28
28
  bucketName: string;
29
29
  renderId: string;
30
+ cloudWatchLogs: string;
30
31
  };
31
32
  /**
32
33
  * @description Renders a still frame on Lambda
@@ -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): ${(0, get_cloudwatch_stream_url_1.getCloudwatchStreamUrl)({
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): ${(0, get_cloudwatch_stream_url_1.getCloudwatchStreamUrl)({
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, {
@@ -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.9",
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.9",
36
- "@remotion/cli": "3.2.9",
37
- "@remotion/renderer": "3.2.9",
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.9"
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": "66eceb7252865747a2808fc51cdbd2b57bb38486"
65
+ "gitHead": "14dc380ad148868c35c5612f48eaf8e78ab42d9c"
66
66
  }
Binary file