@remotion/lambda 4.0.0-alpha4 → 4.0.0-alpha5
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/admin/bundle-lambda.js +17 -23
- package/dist/admin/make-layer-public.js +59 -87
- package/dist/api/clean-items.js +1 -1
- package/dist/api/create-function.d.ts +1 -3
- package/dist/api/create-function.js +6 -6
- package/dist/api/deploy-function.d.ts +0 -3
- package/dist/api/deploy-function.js +1 -7
- package/dist/api/deploy-site.js +3 -8
- package/dist/api/download-media.d.ts +0 -4
- package/dist/api/download-media.js +1 -5
- package/dist/api/estimate-price.d.ts +1 -3
- package/dist/api/estimate-price.js +3 -9
- package/dist/api/get-compositions-on-lambda.d.ts +2 -2
- package/dist/api/get-or-create-bucket.d.ts +0 -1
- package/dist/api/get-or-create-bucket.js +0 -3
- package/dist/api/iam-validation/simulate.js +4 -2
- package/dist/api/render-media-on-lambda.d.ts +10 -6
- package/dist/api/render-media-on-lambda.js +6 -3
- package/dist/api/render-still-on-lambda.d.ts +7 -3
- package/dist/api/render-still-on-lambda.js +6 -3
- package/dist/cli/args.d.ts +0 -2
- package/dist/cli/commands/functions/deploy.js +7 -9
- package/dist/cli/commands/functions/ls.js +4 -1
- package/dist/cli/commands/functions/rm.js +8 -2
- package/dist/cli/commands/functions/rmall.js +8 -2
- package/dist/cli/commands/render/render.js +22 -12
- package/dist/cli/commands/sites/create.js +7 -8
- package/dist/cli/commands/still.js +7 -5
- package/dist/cli/helpers/progress-bar.d.ts +1 -2
- package/dist/cli/helpers/progress-bar.js +3 -7
- package/dist/cli/log.d.ts +12 -0
- package/dist/functions/chunk-optimization/plan-frame-ranges.d.ts +4 -1
- package/dist/functions/compositions.d.ts +1 -1
- package/dist/functions/compositions.js +0 -2
- package/dist/functions/helpers/calculate-price-from-bucket.d.ts +1 -3
- package/dist/functions/helpers/calculate-price-from-bucket.js +1 -2
- package/dist/functions/helpers/concat-videos.d.ts +2 -4
- package/dist/functions/helpers/concat-videos.js +2 -5
- package/dist/functions/helpers/create-post-render-data.js +0 -2
- package/dist/functions/helpers/get-chromium-executable-path.js +6 -1
- package/dist/functions/helpers/get-progress.js +0 -2
- package/dist/functions/helpers/is-enosp-err.js +1 -1
- package/dist/functions/helpers/validate-composition.d.ts +3 -5
- package/dist/functions/helpers/validate-composition.js +1 -3
- package/dist/functions/index.d.ts +15 -4
- package/dist/functions/index.js +1 -1
- package/dist/functions/launch.js +2 -6
- package/dist/functions/renderer.js +9 -9
- package/dist/functions/start.js +1 -1
- package/dist/functions/still.js +1 -5
- package/dist/index.d.ts +5 -6
- package/dist/index.js +1 -2
- package/dist/shared/constants.d.ts +20 -17
- package/dist/shared/constants.js +1 -2
- package/dist/shared/function-zip-path.d.ts +0 -1
- package/dist/shared/function-zip-path.js +1 -2
- package/dist/shared/hosted-layers.d.ts +2 -91
- package/dist/shared/hosted-layers.js +64 -363
- package/dist/shared/invoke-webhook.d.ts +0 -2
- package/package.json +9 -10
- package/remotionlambda-arm64.zip +0 -0
- package/remotionlambda-x64.zip +0 -0
- package/remotionlambda.zip +0 -0
|
@@ -3,13 +3,11 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.validateComposition = void 0;
|
|
4
4
|
const renderer_1 = require("@remotion/renderer");
|
|
5
5
|
const get_chromium_executable_path_1 = require("./get-chromium-executable-path");
|
|
6
|
-
const validateComposition = async ({ serveUrl, composition, browserInstance, inputProps, envVariables, timeoutInMilliseconds,
|
|
6
|
+
const validateComposition = async ({ serveUrl, composition, browserInstance, inputProps, envVariables, timeoutInMilliseconds, chromiumOptions, port, downloadMap, forceHeight, forceWidth, }) => {
|
|
7
7
|
const compositions = await (0, renderer_1.getCompositions)(serveUrl, {
|
|
8
8
|
puppeteerInstance: browserInstance,
|
|
9
9
|
inputProps: inputProps,
|
|
10
10
|
envVariables,
|
|
11
|
-
ffmpegExecutable,
|
|
12
|
-
ffprobeExecutable,
|
|
13
11
|
timeoutInMilliseconds,
|
|
14
12
|
chromiumOptions,
|
|
15
13
|
port,
|
|
@@ -1,7 +1,18 @@
|
|
|
1
1
|
import type { LambdaPayload } from '../shared/constants';
|
|
2
|
-
|
|
3
|
-
import type { LambdaReturnValues } from '../shared/return-values';
|
|
4
|
-
export declare const handler: <T extends LambdaRoutines>(params: LambdaPayload, context: {
|
|
2
|
+
export declare const handler: (params: LambdaPayload, context: {
|
|
5
3
|
invokedFunctionArn: string;
|
|
6
4
|
getRemainingTimeInMillis: () => number;
|
|
7
|
-
}) => Promise<
|
|
5
|
+
}) => Promise<void> | Promise<{
|
|
6
|
+
compositions: import("remotion").AnyCompMetadata[];
|
|
7
|
+
}> | Promise<{
|
|
8
|
+
version: string;
|
|
9
|
+
}> | Promise<{
|
|
10
|
+
bucketName: string;
|
|
11
|
+
renderId: string;
|
|
12
|
+
}> | Promise<import("../shared/constants").RenderProgress> | Promise<Promise<{
|
|
13
|
+
output: string;
|
|
14
|
+
size: number;
|
|
15
|
+
bucketName: string;
|
|
16
|
+
estimatedPrice: import("../shared/constants").CostsInfo;
|
|
17
|
+
renderId: string;
|
|
18
|
+
}>>;
|
package/dist/functions/index.js
CHANGED
|
@@ -13,7 +13,7 @@ const progress_1 = require("./progress");
|
|
|
13
13
|
const renderer_2 = require("./renderer");
|
|
14
14
|
const start_1 = require("./start");
|
|
15
15
|
const still_1 = require("./still");
|
|
16
|
-
const handler =
|
|
16
|
+
const handler = (params, context) => {
|
|
17
17
|
process.env.__RESERVED_IS_INSIDE_REMOTION_LAMBDA = 'true';
|
|
18
18
|
const timeoutInMilliseconds = context.getRemainingTimeInMillis();
|
|
19
19
|
if (!context || !context.invokedFunctionArn) {
|
package/dist/functions/launch.js
CHANGED
|
@@ -149,8 +149,6 @@ const innerLaunchHandler = async (params, options) => {
|
|
|
149
149
|
browserInstance,
|
|
150
150
|
inputProps: await inputPropsPromise,
|
|
151
151
|
envVariables: params.envVariables,
|
|
152
|
-
ffmpegExecutable: null,
|
|
153
|
-
ffprobeExecutable: null,
|
|
154
152
|
timeoutInMilliseconds: params.timeoutInMilliseconds,
|
|
155
153
|
chromiumOptions: params.chromiumOptions,
|
|
156
154
|
port: null,
|
|
@@ -213,7 +211,7 @@ const innerLaunchHandler = async (params, options) => {
|
|
|
213
211
|
envVariables: params.envVariables,
|
|
214
212
|
pixelFormat: params.pixelFormat,
|
|
215
213
|
proResProfile: params.proResProfile,
|
|
216
|
-
|
|
214
|
+
jpegQuality: params.jpegQuality,
|
|
217
215
|
privacy: params.privacy,
|
|
218
216
|
logLevel: (_a = params.logLevel) !== null && _a !== void 0 ? _a : 'info',
|
|
219
217
|
attempt: 1,
|
|
@@ -366,7 +364,7 @@ const innerLaunchHandler = async (params, options) => {
|
|
|
366
364
|
const fps = comp.fps / params.everyNthFrame;
|
|
367
365
|
const outdir = (0, path_1.join)(renderer_1.RenderInternals.tmpDir(constants_1.CONCAT_FOLDER_TOKEN), 'bucket');
|
|
368
366
|
if ((0, fs_1.existsSync)(outdir)) {
|
|
369
|
-
(
|
|
367
|
+
(0, fs_1.rmSync)(outdir, {
|
|
370
368
|
recursive: true,
|
|
371
369
|
});
|
|
372
370
|
}
|
|
@@ -387,8 +385,6 @@ const innerLaunchHandler = async (params, options) => {
|
|
|
387
385
|
codec: params.codec,
|
|
388
386
|
fps,
|
|
389
387
|
numberOfGifLoops: params.numberOfGifLoops,
|
|
390
|
-
ffmpegExecutable: null,
|
|
391
|
-
remotionRoot: process.cwd(),
|
|
392
388
|
files,
|
|
393
389
|
outdir,
|
|
394
390
|
audioCodec: params.audioCodec,
|
|
@@ -103,7 +103,7 @@ const renderHandler = async (params, options, logs) => {
|
|
|
103
103
|
},
|
|
104
104
|
puppeteerInstance: browserInstance,
|
|
105
105
|
serveUrl: params.serveUrl,
|
|
106
|
-
|
|
106
|
+
jpegQuality: params.jpegQuality,
|
|
107
107
|
envVariables: params.envVariables,
|
|
108
108
|
dumpBrowserLogs: (_a = params.dumpBrowserLogs) !== null && _a !== void 0 ? _a : renderer_1.RenderInternals.isEqualOrBelowLogLevel(params.logLevel, 'verbose'),
|
|
109
109
|
verbose: renderer_1.RenderInternals.isEqualOrBelowLogLevel(params.logLevel, 'verbose'),
|
|
@@ -150,13 +150,6 @@ const renderHandler = async (params, options, logs) => {
|
|
|
150
150
|
enforceAudioTrack: true,
|
|
151
151
|
audioBitrate: params.audioBitrate,
|
|
152
152
|
videoBitrate: params.videoBitrate,
|
|
153
|
-
onSlowestFrames: (slowestFrames) => {
|
|
154
|
-
console.log();
|
|
155
|
-
console.log(`Slowest frames:`);
|
|
156
|
-
slowestFrames.forEach(({ frame, time }) => {
|
|
157
|
-
console.log(`Frame ${frame} (${time.toFixed(3)}ms)`);
|
|
158
|
-
});
|
|
159
|
-
},
|
|
160
153
|
// Lossless flag takes priority over audio codec
|
|
161
154
|
// https://github.com/remotion-dev/remotion/issues/1647
|
|
162
155
|
// Special flag only in Lambda renderer which improves the audio quality
|
|
@@ -164,7 +157,14 @@ const renderHandler = async (params, options, logs) => {
|
|
|
164
157
|
preferLossless: true,
|
|
165
158
|
browserExecutable: (0, get_chromium_executable_path_1.executablePath)(),
|
|
166
159
|
})
|
|
167
|
-
.then(() =>
|
|
160
|
+
.then(({ slowestFrames }) => {
|
|
161
|
+
console.log();
|
|
162
|
+
console.log(`Slowest frames:`);
|
|
163
|
+
slowestFrames.forEach(({ frame, time }) => {
|
|
164
|
+
console.log(`Frame ${frame} (${time.toFixed(3)}ms)`);
|
|
165
|
+
});
|
|
166
|
+
resolve();
|
|
167
|
+
})
|
|
168
168
|
.catch((err) => reject(err));
|
|
169
169
|
});
|
|
170
170
|
const endRendered = Date.now();
|
package/dist/functions/start.js
CHANGED
|
@@ -55,7 +55,7 @@ const startHandler = async (params, options) => {
|
|
|
55
55
|
envVariables: params.envVariables,
|
|
56
56
|
pixelFormat: params.pixelFormat,
|
|
57
57
|
proResProfile: params.proResProfile,
|
|
58
|
-
|
|
58
|
+
jpegQuality: params.jpegQuality,
|
|
59
59
|
maxRetries: params.maxRetries,
|
|
60
60
|
privacy: params.privacy,
|
|
61
61
|
logLevel: (_b = params.logLevel) !== null && _b !== void 0 ? _b : 'info',
|
package/dist/functions/still.js
CHANGED
|
@@ -25,7 +25,6 @@ const expected_out_name_1 = require("./helpers/expected-out-name");
|
|
|
25
25
|
const format_costs_info_1 = require("./helpers/format-costs-info");
|
|
26
26
|
const get_browser_instance_1 = require("./helpers/get-browser-instance");
|
|
27
27
|
const get_chromium_executable_path_1 = require("./helpers/get-chromium-executable-path");
|
|
28
|
-
const get_current_architecture_1 = require("./helpers/get-current-architecture");
|
|
29
28
|
const get_current_region_1 = require("./helpers/get-current-region");
|
|
30
29
|
const get_output_url_from_metadata_1 = require("./helpers/get-output-url-from-metadata");
|
|
31
30
|
const io_1 = require("./helpers/io");
|
|
@@ -73,8 +72,6 @@ const innerStillHandler = async (lambdaParams, renderId, options) => {
|
|
|
73
72
|
composition: lambdaParams.composition,
|
|
74
73
|
inputProps,
|
|
75
74
|
envVariables: lambdaParams.envVariables,
|
|
76
|
-
ffmpegExecutable: null,
|
|
77
|
-
ffprobeExecutable: null,
|
|
78
75
|
chromiumOptions: lambdaParams.chromiumOptions,
|
|
79
76
|
timeoutInMilliseconds: lambdaParams.timeoutInMilliseconds,
|
|
80
77
|
port: null,
|
|
@@ -129,7 +126,7 @@ const innerStillHandler = async (lambdaParams, renderId, options) => {
|
|
|
129
126
|
inputProps,
|
|
130
127
|
overwrite: false,
|
|
131
128
|
puppeteerInstance: browserInstance,
|
|
132
|
-
|
|
129
|
+
jpegQuality: lambdaParams.jpegQuality,
|
|
133
130
|
chromiumOptions: lambdaParams.chromiumOptions,
|
|
134
131
|
scale: lambdaParams.scale,
|
|
135
132
|
timeoutInMilliseconds: lambdaParams.timeoutInMilliseconds,
|
|
@@ -161,7 +158,6 @@ const innerStillHandler = async (lambdaParams, renderId, options) => {
|
|
|
161
158
|
memorySizeInMb: Number(process.env.AWS_LAMBDA_FUNCTION_MEMORY_SIZE),
|
|
162
159
|
region: (0, get_current_region_1.getCurrentRegionInFunction)(),
|
|
163
160
|
lambdasInvoked: 1,
|
|
164
|
-
architecture: (0, get_current_architecture_1.getCurrentArchitecture)(),
|
|
165
161
|
// We cannot determine the ephemeral storage size, so we
|
|
166
162
|
// overestimate the price, but will only have a miniscule effect (~0.2%)
|
|
167
163
|
diskSizeInMb: constants_1.MAX_EPHEMERAL_STORAGE_IN_MB,
|
package/dist/index.d.ts
CHANGED
|
@@ -9,7 +9,7 @@ import { deployFunction } from './api/deploy-function';
|
|
|
9
9
|
import type { DeploySiteInput, DeploySiteOutput } from './api/deploy-site';
|
|
10
10
|
import { deploySite } from './api/deploy-site';
|
|
11
11
|
import type { DownloadMediaInput, DownloadMediaOutput } from './api/download-media';
|
|
12
|
-
import { downloadMedia
|
|
12
|
+
import { downloadMedia } from './api/download-media';
|
|
13
13
|
import type { EstimatePriceInput } from './api/estimate-price';
|
|
14
14
|
import { estimatePrice } from './api/estimate-price';
|
|
15
15
|
import type { GetAwsClientInput, GetAwsClientOutput } from './api/get-aws-client';
|
|
@@ -40,15 +40,14 @@ import type { AwsRegion } from './pricing/aws-regions';
|
|
|
40
40
|
import type { CustomCredentials } from './shared/aws-clients';
|
|
41
41
|
import type { RenderProgress } from './shared/constants';
|
|
42
42
|
import type { WebhookPayload } from './shared/invoke-webhook';
|
|
43
|
-
import type { LambdaArchitecture } from './shared/validate-architecture';
|
|
44
43
|
/**
|
|
45
44
|
* @deprecated Import this from `@remotion/lambda/client` instead
|
|
46
45
|
*/
|
|
47
|
-
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, forceHeight, forceWidth, rendererFunctionName, forceBucketName: bucketName, audioCodec, dumpBrowserLogs, }: RenderMediaOnLambdaInput) => Promise<RenderMediaOnLambdaOutput>;
|
|
46
|
+
declare const renderMediaOnLambda: ({ functionName, serveUrl, inputProps, codec, imageFormat, crf, envVariables, pixelFormat, proResProfile, quality, jpegQuality, region, maxRetries, composition, framesPerLambda, privacy, logLevel, frameRange, outName, timeoutInMilliseconds, chromiumOptions, scale, numberOfGifLoops, everyNthFrame, concurrencyPerLambda, downloadBehavior, muted, overwrite, audioBitrate, videoBitrate, webhook, forceHeight, forceWidth, rendererFunctionName, forceBucketName: bucketName, audioCodec, dumpBrowserLogs, }: RenderMediaOnLambdaInput) => Promise<RenderMediaOnLambdaOutput>;
|
|
48
47
|
/**
|
|
49
48
|
* @deprecated Import this from `@remotion/lambda/client` instead
|
|
50
49
|
*/
|
|
51
|
-
declare const renderStillOnLambda: ({ functionName, serveUrl, inputProps, imageFormat, envVariables, quality, region, maxRetries, composition, privacy, frame, logLevel, outName, timeoutInMilliseconds, chromiumOptions, scale, downloadBehavior, forceHeight, forceWidth, forceBucketName, dumpBrowserLogs, }: RenderStillOnLambdaInput) => Promise<RenderStillOnLambdaOutput>;
|
|
50
|
+
declare const renderStillOnLambda: ({ functionName, serveUrl, inputProps, imageFormat, envVariables, quality, jpegQuality, region, maxRetries, composition, privacy, frame, logLevel, outName, timeoutInMilliseconds, chromiumOptions, scale, downloadBehavior, forceHeight, forceWidth, forceBucketName, dumpBrowserLogs, }: RenderStillOnLambdaInput) => Promise<RenderStillOnLambdaOutput>;
|
|
52
51
|
/**
|
|
53
52
|
* @deprecated Import this from `@remotion/lambda/client` instead
|
|
54
53
|
*/
|
|
@@ -57,5 +56,5 @@ declare const presignUrl: <CheckIfObjectExists extends boolean = false>({ region
|
|
|
57
56
|
* @deprecated Import this from `@remotion/lambda/client` instead
|
|
58
57
|
*/
|
|
59
58
|
declare const getSites: ({ region, }: GetSitesInput) => Promise<GetSitesOutput>;
|
|
60
|
-
export { deleteSite, deployFunction, deploySite, downloadMedia,
|
|
61
|
-
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,
|
|
59
|
+
export { deleteSite, deployFunction, deploySite, downloadMedia, getFunctions, getUserPolicy, getRolePolicy, getSites, getOrCreateBucket, getRenderProgress, renderVideoOnLambda, renderMediaOnLambda, simulatePermissions, deleteFunction, getFunctionInfo, estimatePrice, LambdaInternals, renderStillOnLambda, getRegions, getAwsClient, presignUrl, deleteRender, validateWebhookSignature, getCompositionsOnLambda, };
|
|
60
|
+
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, CustomCredentials, WebhookPayload, LambdaErrorInfo, EnhancedErrorInfo, DeleteRenderInput, GetCompositionsOnLambdaOutput, GetCompositionsOnLambdaInput, };
|
package/dist/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.getCompositionsOnLambda = exports.validateWebhookSignature = exports.deleteRender = exports.presignUrl = exports.getAwsClient = exports.getRegions = exports.renderStillOnLambda = exports.LambdaInternals = exports.estimatePrice = exports.getFunctionInfo = exports.deleteFunction = exports.simulatePermissions = exports.renderMediaOnLambda = exports.renderVideoOnLambda = exports.getRenderProgress = exports.getOrCreateBucket = exports.getSites = exports.getRolePolicy = exports.getUserPolicy = exports.getFunctions = exports.
|
|
3
|
+
exports.getCompositionsOnLambda = exports.validateWebhookSignature = exports.deleteRender = exports.presignUrl = exports.getAwsClient = exports.getRegions = exports.renderStillOnLambda = exports.LambdaInternals = exports.estimatePrice = exports.getFunctionInfo = exports.deleteFunction = exports.simulatePermissions = exports.renderMediaOnLambda = exports.renderVideoOnLambda = exports.getRenderProgress = exports.getOrCreateBucket = exports.getSites = exports.getRolePolicy = exports.getUserPolicy = exports.getFunctions = exports.downloadMedia = exports.deploySite = exports.deployFunction = exports.deleteSite = void 0;
|
|
4
4
|
const delete_function_1 = require("./api/delete-function");
|
|
5
5
|
Object.defineProperty(exports, "deleteFunction", { enumerable: true, get: function () { return delete_function_1.deleteFunction; } });
|
|
6
6
|
const delete_render_1 = require("./api/delete-render");
|
|
@@ -13,7 +13,6 @@ const deploy_site_1 = require("./api/deploy-site");
|
|
|
13
13
|
Object.defineProperty(exports, "deploySite", { enumerable: true, get: function () { return deploy_site_1.deploySite; } });
|
|
14
14
|
const download_media_1 = require("./api/download-media");
|
|
15
15
|
Object.defineProperty(exports, "downloadMedia", { enumerable: true, get: function () { return download_media_1.downloadMedia; } });
|
|
16
|
-
Object.defineProperty(exports, "downloadVideo", { enumerable: true, get: function () { return download_media_1.downloadVideo; } });
|
|
17
16
|
const estimate_price_1 = require("./api/estimate-price");
|
|
18
17
|
Object.defineProperty(exports, "estimatePrice", { enumerable: true, get: function () { return estimate_price_1.estimatePrice; } });
|
|
19
18
|
const get_aws_client_1 = require("./api/get-aws-client");
|
|
@@ -1,17 +1,15 @@
|
|
|
1
|
-
import type { AudioCodec, ChromiumOptions, Codec, FrameRange,
|
|
2
|
-
import type {
|
|
1
|
+
import type { AudioCodec, ChromiumOptions, Codec, FrameRange, LogLevel, PixelFormat, ProResProfile, StillImageFormat, VideoImageFormat } from '@remotion/renderer';
|
|
2
|
+
import type { AnyCompMetadata } from 'remotion';
|
|
3
3
|
import type { ChunkRetry } from '../functions/helpers/get-retry-stats';
|
|
4
4
|
import type { EnhancedErrorInfo } from '../functions/helpers/write-lambda-error';
|
|
5
5
|
import type { AwsRegion } from '../pricing/aws-regions';
|
|
6
6
|
import type { CustomCredentials, CustomCredentialsWithoutSensitiveData } from './aws-clients';
|
|
7
7
|
import type { DownloadBehavior } from './content-disposition-header';
|
|
8
8
|
import type { ExpensiveChunk } from './get-most-expensive-chunks';
|
|
9
|
-
import type { LambdaArchitecture } from './validate-architecture';
|
|
10
9
|
import type { LambdaCodec } from './validate-lambda-codec';
|
|
11
10
|
export declare const MIN_MEMORY = 512;
|
|
12
11
|
export declare const MAX_MEMORY = 10240;
|
|
13
12
|
export declare const DEFAULT_MEMORY_SIZE = 2048;
|
|
14
|
-
export declare const DEFAULT_ARCHITECTURE: LambdaArchitecture;
|
|
15
13
|
export declare const DEFAULT_TIMEOUT = 120;
|
|
16
14
|
export declare const MIN_TIMEOUT = 15;
|
|
17
15
|
export declare const MAX_TIMEOUT = 900;
|
|
@@ -78,7 +76,7 @@ export declare type OutNameOutput = {
|
|
|
78
76
|
};
|
|
79
77
|
export declare const getSitesKey: (siteId: string) => string;
|
|
80
78
|
export declare const outName: (renderId: string, extension: string) => string;
|
|
81
|
-
export declare const outStillName: (renderId: string, imageFormat:
|
|
79
|
+
export declare const outStillName: (renderId: string, imageFormat: StillImageFormat) => string;
|
|
82
80
|
export declare const customOutName: (renderId: string, bucketName: string, name: OutNameInput) => OutNameOutput;
|
|
83
81
|
export declare const postRenderDataKey: (renderId: string) => string;
|
|
84
82
|
export declare const inputPropsKey: (hash: string) => string;
|
|
@@ -119,12 +117,12 @@ export declare type LambdaPayloads = {
|
|
|
119
117
|
inputProps: SerializedInputProps;
|
|
120
118
|
codec: LambdaCodec;
|
|
121
119
|
audioCodec: AudioCodec | null;
|
|
122
|
-
imageFormat:
|
|
120
|
+
imageFormat: VideoImageFormat;
|
|
123
121
|
crf: number | undefined;
|
|
124
122
|
envVariables: Record<string, string> | undefined;
|
|
125
123
|
pixelFormat: PixelFormat | undefined;
|
|
126
124
|
proResProfile: ProResProfile | undefined;
|
|
127
|
-
|
|
125
|
+
jpegQuality: number | undefined;
|
|
128
126
|
maxRetries: number;
|
|
129
127
|
privacy: Privacy;
|
|
130
128
|
logLevel: LogLevel;
|
|
@@ -157,14 +155,14 @@ export declare type LambdaPayloads = {
|
|
|
157
155
|
bucketName: string;
|
|
158
156
|
inputProps: SerializedInputProps;
|
|
159
157
|
renderId: string;
|
|
160
|
-
imageFormat:
|
|
158
|
+
imageFormat: VideoImageFormat;
|
|
161
159
|
codec: LambdaCodec;
|
|
162
160
|
audioCodec: AudioCodec | null;
|
|
163
161
|
crf: number | undefined;
|
|
164
162
|
envVariables: Record<string, string> | undefined;
|
|
165
163
|
pixelFormat: PixelFormat | undefined;
|
|
166
164
|
proResProfile: ProResProfile | undefined;
|
|
167
|
-
|
|
165
|
+
jpegQuality: number | undefined;
|
|
168
166
|
maxRetries: number;
|
|
169
167
|
privacy: Privacy;
|
|
170
168
|
logLevel: LogLevel;
|
|
@@ -208,12 +206,12 @@ export declare type LambdaPayloads = {
|
|
|
208
206
|
retriesLeft: number;
|
|
209
207
|
inputProps: SerializedInputProps;
|
|
210
208
|
renderId: string;
|
|
211
|
-
imageFormat:
|
|
209
|
+
imageFormat: VideoImageFormat;
|
|
212
210
|
codec: LambdaCodec;
|
|
213
211
|
crf: number | undefined;
|
|
214
212
|
proResProfile: ProResProfile | undefined;
|
|
215
213
|
pixelFormat: PixelFormat | undefined;
|
|
216
|
-
|
|
214
|
+
jpegQuality: number | undefined;
|
|
217
215
|
envVariables: Record<string, string> | undefined;
|
|
218
216
|
privacy: Privacy;
|
|
219
217
|
attempt: number;
|
|
@@ -235,10 +233,10 @@ export declare type LambdaPayloads = {
|
|
|
235
233
|
serveUrl: string;
|
|
236
234
|
composition: string;
|
|
237
235
|
inputProps: SerializedInputProps;
|
|
238
|
-
imageFormat:
|
|
236
|
+
imageFormat: StillImageFormat;
|
|
239
237
|
envVariables: Record<string, string> | undefined;
|
|
240
238
|
attempt: number;
|
|
241
|
-
|
|
239
|
+
jpegQuality: number | undefined;
|
|
242
240
|
maxRetries: number;
|
|
243
241
|
frame: number;
|
|
244
242
|
privacy: Privacy;
|
|
@@ -271,9 +269,16 @@ export declare type LambdaPayload = LambdaPayloads[LambdaRoutines];
|
|
|
271
269
|
export declare type EncodingProgress = {
|
|
272
270
|
framesEncoded: number;
|
|
273
271
|
};
|
|
274
|
-
|
|
272
|
+
declare type Discriminated = {
|
|
273
|
+
type: 'still';
|
|
274
|
+
imageFormat: StillImageFormat;
|
|
275
|
+
} | {
|
|
276
|
+
type: 'video';
|
|
277
|
+
imageFormat: VideoImageFormat;
|
|
278
|
+
};
|
|
279
|
+
export declare type RenderMetadata = Discriminated & {
|
|
275
280
|
siteId: string;
|
|
276
|
-
videoConfig:
|
|
281
|
+
videoConfig: AnyCompMetadata;
|
|
277
282
|
startedDate: number;
|
|
278
283
|
totalChunks: number;
|
|
279
284
|
estimatedTotalLambdaInvokations: number;
|
|
@@ -281,8 +286,6 @@ export declare type RenderMetadata = {
|
|
|
281
286
|
compositionId: string;
|
|
282
287
|
codec: Codec | null;
|
|
283
288
|
audioCodec: AudioCodec | null;
|
|
284
|
-
type: 'still' | 'video';
|
|
285
|
-
imageFormat: ImageFormat;
|
|
286
289
|
inputProps: SerializedInputProps;
|
|
287
290
|
framesPerLambda: number;
|
|
288
291
|
memorySizeInMb: number;
|
package/dist/shared/constants.js
CHANGED
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.LAMBDA_BURST_LIMIT_QUOTA = exports.LAMBDA_CONCURRENCY_LIMIT_QUOTA = exports.LambdaRoutines = exports.REMOTION_FILELIST_TOKEN = exports.REMOTION_CONCATED_TOKEN = exports.CONCAT_FOLDER_TOKEN = exports.RENDERER_PATH_TOKEN = exports.inputPropsKey = exports.postRenderDataKey = exports.customOutName = exports.outStillName = exports.outName = exports.getSitesKey = exports.getErrorFileName = exports.getErrorKeyPrefix = exports.chunkKeyForIndex = exports.chunkKey = exports.lambdaTimingsKey = exports.lambdaLogsPrefix = exports.lambdaTimingsPrefixForChunk = exports.lambdaTimingsPrefix = exports.lambdaChunkInitializedKey = exports.lambdaChunkInitializedPrefix = exports.initalizedMetadataKey = exports.renderMetadataKey = exports.encodingProgressKey = exports.rendersPrefix = exports.LOG_GROUP_PREFIX = exports.RENDER_FN_PREFIX = exports.REMOTION_BUCKET_PREFIX = exports.ENCODING_PROGRESS_STEP_SIZE = exports.DEFAULT_CLOUDWATCH_RETENTION_PERIOD = exports.DEFAULT_OUTPUT_PRIVACY = exports.MAX_EPHEMERAL_STORAGE_IN_MB = exports.MIN_EPHEMERAL_STORAGE_IN_MB = exports.DEFAULT_EPHEMERAL_STORAGE_IN_MB = exports.MAX_FUNCTIONS_PER_RENDER = exports.DEFAULT_MAX_RETRIES = exports.DEFAULT_REGION = exports.COMMAND_NOT_FOUND = exports.BINARY_NAME = exports.DEFAULT_FRAMES_PER_LAMBDA = exports.MINIMUM_FRAMES_PER_LAMBDA = exports.MAX_TIMEOUT = exports.MIN_TIMEOUT = exports.DEFAULT_TIMEOUT = exports.
|
|
3
|
+
exports.LAMBDA_BURST_LIMIT_QUOTA = exports.LAMBDA_CONCURRENCY_LIMIT_QUOTA = exports.LambdaRoutines = exports.REMOTION_FILELIST_TOKEN = exports.REMOTION_CONCATED_TOKEN = exports.CONCAT_FOLDER_TOKEN = exports.RENDERER_PATH_TOKEN = exports.inputPropsKey = exports.postRenderDataKey = exports.customOutName = exports.outStillName = exports.outName = exports.getSitesKey = exports.getErrorFileName = exports.getErrorKeyPrefix = exports.chunkKeyForIndex = exports.chunkKey = exports.lambdaTimingsKey = exports.lambdaLogsPrefix = exports.lambdaTimingsPrefixForChunk = exports.lambdaTimingsPrefix = exports.lambdaChunkInitializedKey = exports.lambdaChunkInitializedPrefix = exports.initalizedMetadataKey = exports.renderMetadataKey = exports.encodingProgressKey = exports.rendersPrefix = exports.LOG_GROUP_PREFIX = exports.RENDER_FN_PREFIX = exports.REMOTION_BUCKET_PREFIX = exports.ENCODING_PROGRESS_STEP_SIZE = exports.DEFAULT_CLOUDWATCH_RETENTION_PERIOD = exports.DEFAULT_OUTPUT_PRIVACY = exports.MAX_EPHEMERAL_STORAGE_IN_MB = exports.MIN_EPHEMERAL_STORAGE_IN_MB = exports.DEFAULT_EPHEMERAL_STORAGE_IN_MB = exports.MAX_FUNCTIONS_PER_RENDER = exports.DEFAULT_MAX_RETRIES = exports.DEFAULT_REGION = exports.COMMAND_NOT_FOUND = exports.BINARY_NAME = exports.DEFAULT_FRAMES_PER_LAMBDA = exports.MINIMUM_FRAMES_PER_LAMBDA = exports.MAX_TIMEOUT = exports.MIN_TIMEOUT = exports.DEFAULT_TIMEOUT = exports.DEFAULT_MEMORY_SIZE = exports.MAX_MEMORY = exports.MIN_MEMORY = void 0;
|
|
4
4
|
exports.MIN_MEMORY = 512;
|
|
5
5
|
exports.MAX_MEMORY = 10240;
|
|
6
6
|
exports.DEFAULT_MEMORY_SIZE = 2048;
|
|
7
|
-
exports.DEFAULT_ARCHITECTURE = 'arm64';
|
|
8
7
|
exports.DEFAULT_TIMEOUT = 120;
|
|
9
8
|
exports.MIN_TIMEOUT = 15;
|
|
10
9
|
exports.MAX_TIMEOUT = 900;
|
|
@@ -3,7 +3,6 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.
|
|
6
|
+
exports.FUNCTION_ZIP_ARM64 = void 0;
|
|
7
7
|
const path_1 = __importDefault(require("path"));
|
|
8
8
|
exports.FUNCTION_ZIP_ARM64 = path_1.default.join(path_1.default.resolve(__dirname, '..', '..'), `remotionlambda-arm64.zip`);
|
|
9
|
-
exports.FUNCTION_ZIP_X86_64 = path_1.default.join(path_1.default.resolve(__dirname, '..', '..'), `remotionlambda-x64.zip`);
|
|
@@ -1,98 +1,9 @@
|
|
|
1
1
|
import type { AwsRegion } from '../pricing/aws-regions';
|
|
2
|
-
import type { LambdaArchitecture } from './validate-architecture';
|
|
3
2
|
export declare const REMOTION_HOSTED_LAYER_ARN = "arn:aws:lambda:*:678892195805:layer:remotion-binaries-*";
|
|
4
3
|
export declare type HostedLayers = {
|
|
5
|
-
[
|
|
6
|
-
[region in AwsRegion]: {
|
|
7
|
-
layerArn: string;
|
|
8
|
-
version: number;
|
|
9
|
-
}[];
|
|
10
|
-
};
|
|
11
|
-
};
|
|
12
|
-
export declare const hostedLayers: {
|
|
13
|
-
'ap-northeast-1': {
|
|
14
|
-
layerArn: string;
|
|
15
|
-
version: number;
|
|
16
|
-
}[];
|
|
17
|
-
'ap-south-1': {
|
|
18
|
-
layerArn: string;
|
|
19
|
-
version: number;
|
|
20
|
-
}[];
|
|
21
|
-
'ap-southeast-1': {
|
|
22
|
-
layerArn: string;
|
|
23
|
-
version: number;
|
|
24
|
-
}[];
|
|
25
|
-
'ap-southeast-2': {
|
|
26
|
-
layerArn: string;
|
|
27
|
-
version: number;
|
|
28
|
-
}[];
|
|
29
|
-
'eu-central-1': {
|
|
30
|
-
layerArn: string;
|
|
31
|
-
version: number;
|
|
32
|
-
}[];
|
|
33
|
-
'eu-west-1': {
|
|
34
|
-
layerArn: string;
|
|
35
|
-
version: number;
|
|
36
|
-
}[];
|
|
37
|
-
'eu-west-2': {
|
|
38
|
-
layerArn: string;
|
|
39
|
-
version: number;
|
|
40
|
-
}[];
|
|
41
|
-
'us-east-1': {
|
|
42
|
-
layerArn: string;
|
|
43
|
-
version: number;
|
|
44
|
-
}[];
|
|
45
|
-
'us-east-2': {
|
|
46
|
-
layerArn: string;
|
|
47
|
-
version: number;
|
|
48
|
-
}[];
|
|
49
|
-
'us-west-2': {
|
|
50
|
-
layerArn: string;
|
|
51
|
-
version: number;
|
|
52
|
-
}[];
|
|
53
|
-
'af-south-1': {
|
|
54
|
-
layerArn: string;
|
|
55
|
-
version: number;
|
|
56
|
-
}[];
|
|
57
|
-
'ap-east-1': {
|
|
58
|
-
layerArn: string;
|
|
59
|
-
version: number;
|
|
60
|
-
}[];
|
|
61
|
-
'ap-northeast-2': {
|
|
62
|
-
layerArn: string;
|
|
63
|
-
version: number;
|
|
64
|
-
}[];
|
|
65
|
-
'ap-northeast-3': {
|
|
66
|
-
layerArn: string;
|
|
67
|
-
version: number;
|
|
68
|
-
}[];
|
|
69
|
-
'ca-central-1': {
|
|
70
|
-
layerArn: string;
|
|
71
|
-
version: number;
|
|
72
|
-
}[];
|
|
73
|
-
'eu-north-1': {
|
|
74
|
-
layerArn: string;
|
|
75
|
-
version: number;
|
|
76
|
-
}[];
|
|
77
|
-
'eu-south-1': {
|
|
78
|
-
layerArn: string;
|
|
79
|
-
version: number;
|
|
80
|
-
}[];
|
|
81
|
-
'eu-west-3': {
|
|
82
|
-
layerArn: string;
|
|
83
|
-
version: number;
|
|
84
|
-
}[];
|
|
85
|
-
'me-south-1': {
|
|
86
|
-
layerArn: string;
|
|
87
|
-
version: number;
|
|
88
|
-
}[];
|
|
89
|
-
'sa-east-1': {
|
|
90
|
-
layerArn: string;
|
|
91
|
-
version: number;
|
|
92
|
-
}[];
|
|
93
|
-
'us-west-1': {
|
|
4
|
+
[region in AwsRegion]: {
|
|
94
5
|
layerArn: string;
|
|
95
6
|
version: number;
|
|
96
7
|
}[];
|
|
97
8
|
};
|
|
98
|
-
export declare const
|
|
9
|
+
export declare const hostedLayers: HostedLayers;
|