@remotion/lambda 3.2.31 → 3.2.32
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 +4 -2
- package/dist/api/render-media-on-lambda.js +3 -1
- package/dist/cli/commands/render/render.js +3 -1
- package/dist/cli/helpers/get-cloudwatch-stream-url.d.ts +8 -0
- package/dist/cli/helpers/get-cloudwatch-stream-url.js +7 -0
- package/dist/functions/chunk-optimization/plan-frame-ranges.d.ts +1 -4
- package/dist/functions/launch.js +4 -0
- package/dist/functions/renderer.js +2 -0
- package/dist/functions/start.js +2 -0
- package/dist/index.d.ts +2 -1
- package/dist/shared/constants.d.ts +6 -0
- package/package.json +6 -6
- package/remotionlambda.zip +0 -0
|
@@ -31,6 +31,8 @@ export declare type RenderMediaOnLambdaInput = {
|
|
|
31
31
|
downloadBehavior?: DownloadBehavior | null;
|
|
32
32
|
muted?: boolean;
|
|
33
33
|
overwrite?: boolean;
|
|
34
|
+
audioBitrate?: string | null;
|
|
35
|
+
videoBitrate?: string | null;
|
|
34
36
|
webhook?: {
|
|
35
37
|
url: string;
|
|
36
38
|
secret: string | null;
|
|
@@ -60,8 +62,8 @@ export declare type RenderMediaOnLambdaOutput = {
|
|
|
60
62
|
* @param params.webhook Configuration for webhook called upon completion or timeout of the render.
|
|
61
63
|
* @returns {Promise<RenderMediaOnLambdaOutput>} See documentation for detailed structure
|
|
62
64
|
*/
|
|
63
|
-
export declare const renderMediaOnLambda: ({ functionName, serveUrl, inputProps, codec, imageFormat, crf, envVariables, pixelFormat, proResProfile, quality, region, maxRetries, composition, framesPerLambda, privacy, logLevel, frameRange, outName, timeoutInMilliseconds, chromiumOptions, scale, numberOfGifLoops, everyNthFrame, concurrencyPerLambda, downloadBehavior, muted, overwrite, webhook, }: RenderMediaOnLambdaInput) => Promise<RenderMediaOnLambdaOutput>;
|
|
65
|
+
export declare const renderMediaOnLambda: ({ functionName, serveUrl, inputProps, codec, imageFormat, crf, envVariables, pixelFormat, proResProfile, quality, region, maxRetries, composition, framesPerLambda, privacy, logLevel, frameRange, outName, timeoutInMilliseconds, chromiumOptions, scale, numberOfGifLoops, everyNthFrame, concurrencyPerLambda, downloadBehavior, muted, overwrite, audioBitrate, videoBitrate, webhook, }: RenderMediaOnLambdaInput) => Promise<RenderMediaOnLambdaOutput>;
|
|
64
66
|
/**
|
|
65
67
|
* @deprecated Renamed to renderMediaOnLambda()
|
|
66
68
|
*/
|
|
67
|
-
export declare const renderVideoOnLambda: ({ functionName, serveUrl, inputProps, codec, imageFormat, crf, envVariables, pixelFormat, proResProfile, quality, region, maxRetries, composition, framesPerLambda, privacy, logLevel, frameRange, outName, timeoutInMilliseconds, chromiumOptions, scale, numberOfGifLoops, everyNthFrame, concurrencyPerLambda, downloadBehavior, muted, overwrite, webhook, }: RenderMediaOnLambdaInput) => Promise<RenderMediaOnLambdaOutput>;
|
|
69
|
+
export declare const renderVideoOnLambda: ({ functionName, serveUrl, inputProps, codec, imageFormat, crf, envVariables, pixelFormat, proResProfile, quality, region, maxRetries, composition, framesPerLambda, privacy, logLevel, frameRange, outName, timeoutInMilliseconds, chromiumOptions, scale, numberOfGifLoops, everyNthFrame, concurrencyPerLambda, downloadBehavior, muted, overwrite, audioBitrate, videoBitrate, webhook, }: RenderMediaOnLambdaInput) => Promise<RenderMediaOnLambdaOutput>;
|
|
@@ -29,7 +29,7 @@ const validate_serveurl_1 = require("../shared/validate-serveurl");
|
|
|
29
29
|
* @param params.webhook Configuration for webhook called upon completion or timeout of the render.
|
|
30
30
|
* @returns {Promise<RenderMediaOnLambdaOutput>} See documentation for detailed structure
|
|
31
31
|
*/
|
|
32
|
-
const renderMediaOnLambda = async ({ functionName, serveUrl, inputProps, codec, imageFormat, crf, envVariables, pixelFormat, proResProfile, quality, region, maxRetries, composition, framesPerLambda, privacy, logLevel, frameRange, outName, timeoutInMilliseconds, chromiumOptions, scale, numberOfGifLoops, everyNthFrame, concurrencyPerLambda, downloadBehavior, muted, overwrite, webhook, }) => {
|
|
32
|
+
const renderMediaOnLambda = async ({ functionName, serveUrl, inputProps, codec, imageFormat, crf, envVariables, pixelFormat, proResProfile, quality, region, maxRetries, composition, framesPerLambda, privacy, logLevel, frameRange, outName, timeoutInMilliseconds, chromiumOptions, scale, numberOfGifLoops, everyNthFrame, concurrencyPerLambda, downloadBehavior, muted, overwrite, audioBitrate, videoBitrate, webhook, }) => {
|
|
33
33
|
var _a;
|
|
34
34
|
const actualCodec = (0, validate_lambda_codec_1.validateLambdaCodec)(codec);
|
|
35
35
|
(0, validate_serveurl_1.validateServeUrl)(serveUrl);
|
|
@@ -70,6 +70,8 @@ const renderMediaOnLambda = async ({ functionName, serveUrl, inputProps, codec,
|
|
|
70
70
|
muted: muted !== null && muted !== void 0 ? muted : false,
|
|
71
71
|
version: version_1.VERSION,
|
|
72
72
|
overwrite: overwrite !== null && overwrite !== void 0 ? overwrite : false,
|
|
73
|
+
audioBitrate: audioBitrate !== null && audioBitrate !== void 0 ? audioBitrate : null,
|
|
74
|
+
videoBitrate: videoBitrate !== null && videoBitrate !== void 0 ? videoBitrate : null,
|
|
73
75
|
webhook: webhook !== null && webhook !== void 0 ? webhook : null,
|
|
74
76
|
},
|
|
75
77
|
region,
|
|
@@ -42,7 +42,7 @@ const renderCommand = async (args) => {
|
|
|
42
42
|
downloadName,
|
|
43
43
|
outName: outName !== null && outName !== void 0 ? outName : null,
|
|
44
44
|
});
|
|
45
|
-
const { chromiumOptions, crf, envVariables, frameRange, imageFormat, inputProps, logLevel, pixelFormat, proResProfile, puppeteerTimeout, quality, scale, everyNthFrame, numberOfGifLoops, muted, overwrite, } = await cli_1.CliInternals.getCliOptions({
|
|
45
|
+
const { chromiumOptions, crf, envVariables, frameRange, imageFormat, inputProps, logLevel, pixelFormat, proResProfile, puppeteerTimeout, quality, scale, everyNthFrame, numberOfGifLoops, muted, overwrite, audioBitrate, videoBitrate, } = await cli_1.CliInternals.getCliOptions({
|
|
46
46
|
type: 'series',
|
|
47
47
|
isLambda: true,
|
|
48
48
|
codec,
|
|
@@ -82,6 +82,8 @@ const renderCommand = async (args) => {
|
|
|
82
82
|
concurrencyPerLambda: args_1.parsedLambdaCli['concurrency-per-lambda'],
|
|
83
83
|
muted,
|
|
84
84
|
overwrite,
|
|
85
|
+
audioBitrate,
|
|
86
|
+
videoBitrate,
|
|
85
87
|
webhook: args_1.parsedLambdaCli.webhook
|
|
86
88
|
? {
|
|
87
89
|
url: args_1.parsedLambdaCli.webhook,
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { AwsRegion } from '../../client';
|
|
2
|
+
import type { LambdaRoutines } from '../../shared/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/dist/functions/launch.js
CHANGED
|
@@ -140,6 +140,8 @@ const innerLaunchHandler = async (params, options) => {
|
|
|
140
140
|
remotion_1.Internals.validateFps(comp.fps, 'passed to a Lambda render', false);
|
|
141
141
|
remotion_1.Internals.validateDimension(comp.height, 'height', 'passed to a Lambda render');
|
|
142
142
|
remotion_1.Internals.validateDimension(comp.width, 'width', 'passed to a Lambda render');
|
|
143
|
+
renderer_1.RenderInternals.validateBitrate(params.audioBitrate, 'audioBitrate');
|
|
144
|
+
renderer_1.RenderInternals.validateBitrate(params.videoBitrate, 'videoBitrate');
|
|
143
145
|
renderer_1.RenderInternals.validateConcurrency(params.concurrencyPerLambda, 'concurrencyPerLambda');
|
|
144
146
|
const realFrameRange = renderer_1.RenderInternals.getRealFrameRange(comp.durationInFrames, params.frameRange);
|
|
145
147
|
const frameCount = renderer_1.RenderInternals.getFramesToRender(realFrameRange, params.everyNthFrame);
|
|
@@ -198,6 +200,8 @@ const innerLaunchHandler = async (params, options) => {
|
|
|
198
200
|
everyNthFrame: params.everyNthFrame,
|
|
199
201
|
concurrencyPerLambda: params.concurrencyPerLambda,
|
|
200
202
|
muted: params.muted,
|
|
203
|
+
audioBitrate: params.audioBitrate,
|
|
204
|
+
videoBitrate: params.videoBitrate,
|
|
201
205
|
};
|
|
202
206
|
return payload;
|
|
203
207
|
});
|
|
@@ -136,6 +136,8 @@ const renderHandler = async (params, options, logs) => {
|
|
|
136
136
|
downloadMap,
|
|
137
137
|
muted: params.muted,
|
|
138
138
|
enforceAudioTrack: true,
|
|
139
|
+
audioBitrate: params.audioBitrate,
|
|
140
|
+
videoBitrate: params.videoBitrate,
|
|
139
141
|
onSlowestFrames: (slowestFrames) => {
|
|
140
142
|
console.log();
|
|
141
143
|
console.log(`Slowest frames:`);
|
package/dist/functions/start.js
CHANGED
|
@@ -64,6 +64,8 @@ const startHandler = async (params, options) => {
|
|
|
64
64
|
muted: params.muted,
|
|
65
65
|
overwrite: params.overwrite,
|
|
66
66
|
webhook: params.webhook,
|
|
67
|
+
audioBitrate: params.audioBitrate,
|
|
68
|
+
videoBitrate: params.videoBitrate,
|
|
67
69
|
};
|
|
68
70
|
await (0, aws_clients_1.getLambdaClient)((0, get_current_region_1.getCurrentRegionInFunction)()).send(new client_lambda_1.InvokeCommand({
|
|
69
71
|
FunctionName: process.env.AWS_LAMBDA_FUNCTION_NAME,
|
package/dist/index.d.ts
CHANGED
|
@@ -34,6 +34,7 @@ import type { RenderStillOnLambdaInput, RenderStillOnLambdaOutput } from './api/
|
|
|
34
34
|
import { renderStillOnLambda } from './api/render-still-on-lambda';
|
|
35
35
|
import { validateWebhookSignature } from './api/validate-webhook-signature';
|
|
36
36
|
import type { LambdaLSInput, LambdaLsReturnType } from './functions/helpers/io';
|
|
37
|
+
import type { LambdaErrorInfo } from './functions/helpers/write-lambda-error';
|
|
37
38
|
import { LambdaInternals } from './internals';
|
|
38
39
|
import type { AwsRegion } from './pricing/aws-regions';
|
|
39
40
|
import type { CustomCredentials } from './shared/aws-clients';
|
|
@@ -41,4 +42,4 @@ import type { RenderProgress } from './shared/constants';
|
|
|
41
42
|
import type { WebhookPayload } from './shared/invoke-webhook';
|
|
42
43
|
import type { LambdaArchitecture } from './shared/validate-architecture';
|
|
43
44
|
export { deleteSite, deployFunction, deploySite, downloadMedia, downloadVideo, getFunctions, getUserPolicy, getRolePolicy, getSites, getOrCreateBucket, getRenderProgress, renderVideoOnLambda, renderMediaOnLambda, simulatePermissions, deleteFunction, getFunctionInfo, estimatePrice, LambdaInternals, renderStillOnLambda, getRegions, getAwsClient, presignUrl, deleteRender, validateWebhookSignature, };
|
|
44
|
-
export type { AwsRegion, RenderProgress, DeploySiteInput, DeploySiteOutput, LambdaLsReturnType, LambdaLSInput, DeleteSiteInput, DeleteSiteOutput, EstimatePriceInput, DeployFunctionInput, DeployFunctionOutput, DeleteFunctionInput, GetFunctionInfoInput, FunctionInfo, GetFunctionsInput, GetSitesInput, GetSitesOutput, DownloadMediaInput, DownloadMediaOutput, GetOrCreateBucketInput, GetOrCreateBucketOutput, GetRenderInput, RenderMediaOnLambdaInput, RenderMediaOnLambdaOutput, RenderStillOnLambdaInput, RenderStillOnLambdaOutput, SimulatePermissionsInput, SimulatePermissionsOutput, GetAwsClientInput, GetAwsClientOutput, LambdaArchitecture, CustomCredentials, WebhookPayload, };
|
|
45
|
+
export type { AwsRegion, RenderProgress, DeploySiteInput, DeploySiteOutput, LambdaLsReturnType, LambdaLSInput, DeleteSiteInput, DeleteSiteOutput, EstimatePriceInput, DeployFunctionInput, DeployFunctionOutput, DeleteFunctionInput, GetFunctionInfoInput, FunctionInfo, GetFunctionsInput, GetSitesInput, GetSitesOutput, DownloadMediaInput, DownloadMediaOutput, GetOrCreateBucketInput, GetOrCreateBucketOutput, GetRenderInput, RenderMediaOnLambdaInput, RenderMediaOnLambdaOutput, RenderStillOnLambdaInput, RenderStillOnLambdaOutput, SimulatePermissionsInput, SimulatePermissionsOutput, GetAwsClientInput, GetAwsClientOutput, LambdaArchitecture, CustomCredentials, WebhookPayload, LambdaErrorInfo, };
|
|
@@ -129,6 +129,8 @@ export declare type LambdaPayloads = {
|
|
|
129
129
|
muted: boolean;
|
|
130
130
|
version: string;
|
|
131
131
|
overwrite: boolean;
|
|
132
|
+
audioBitrate: string | null;
|
|
133
|
+
videoBitrate: string | null;
|
|
132
134
|
webhook: WebhookOption;
|
|
133
135
|
};
|
|
134
136
|
launch: {
|
|
@@ -160,6 +162,8 @@ export declare type LambdaPayloads = {
|
|
|
160
162
|
downloadBehavior: DownloadBehavior;
|
|
161
163
|
muted: boolean;
|
|
162
164
|
overwrite: boolean;
|
|
165
|
+
audioBitrate: string | null;
|
|
166
|
+
videoBitrate: string | null;
|
|
163
167
|
webhook: WebhookOption;
|
|
164
168
|
};
|
|
165
169
|
status: {
|
|
@@ -199,6 +203,8 @@ export declare type LambdaPayloads = {
|
|
|
199
203
|
scale: number;
|
|
200
204
|
everyNthFrame: number;
|
|
201
205
|
muted: boolean;
|
|
206
|
+
audioBitrate: string | null;
|
|
207
|
+
videoBitrate: string | null;
|
|
202
208
|
};
|
|
203
209
|
still: {
|
|
204
210
|
type: LambdaRoutines.still;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@remotion/lambda",
|
|
3
|
-
"version": "3.2.
|
|
3
|
+
"version": "3.2.32",
|
|
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.32",
|
|
36
|
+
"@remotion/cli": "3.2.32",
|
|
37
|
+
"@remotion/renderer": "3.2.32",
|
|
38
38
|
"aws-policies": "^1.0.1",
|
|
39
39
|
"mime-types": "2.1.34",
|
|
40
|
-
"remotion": "3.2.
|
|
40
|
+
"remotion": "3.2.32"
|
|
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": "4f7ab3637405d140041f898f95f78c99943d1b40"
|
|
66
66
|
}
|
package/remotionlambda.zip
CHANGED
|
Binary file
|