@remotion/lambda 4.0.0-alpha.217 → 4.0.0-alpha4
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 +20 -15
- package/dist/admin/make-layer-public.js +87 -60
- package/dist/api/clean-items.js +1 -1
- package/dist/api/create-bucket.js +34 -1
- package/dist/api/create-function.d.ts +3 -1
- package/dist/api/create-function.js +4 -4
- package/dist/api/deploy-function.d.ts +3 -0
- package/dist/api/deploy-function.js +7 -1
- package/dist/api/deploy-site.js +8 -3
- package/dist/api/download-media.d.ts +4 -0
- package/dist/api/download-media.js +5 -1
- package/dist/api/estimate-price.d.ts +3 -1
- package/dist/api/estimate-price.js +9 -3
- package/dist/api/get-compositions-on-lambda.d.ts +2 -2
- package/dist/api/get-or-create-bucket.d.ts +1 -0
- package/dist/api/get-or-create-bucket.js +3 -0
- package/dist/api/iam-validation/simulate.js +2 -4
- package/dist/api/iam-validation/user-permissions.js +2 -0
- package/dist/api/render-media-on-lambda.d.ts +6 -10
- package/dist/api/render-media-on-lambda.js +3 -6
- package/dist/api/render-still-on-lambda.d.ts +3 -7
- package/dist/api/render-still-on-lambda.js +3 -6
- package/dist/cli/args.d.ts +2 -0
- package/dist/cli/commands/functions/deploy.js +9 -7
- package/dist/cli/commands/functions/ls.js +1 -4
- package/dist/cli/commands/functions/rm.js +2 -8
- package/dist/cli/commands/functions/rmall.js +2 -8
- package/dist/cli/commands/render/render.js +12 -22
- package/dist/cli/commands/sites/create.js +8 -7
- package/dist/cli/commands/sites/index.js +3 -0
- package/dist/cli/commands/still.js +5 -7
- package/dist/cli/helpers/progress-bar.d.ts +2 -1
- package/dist/cli/helpers/progress-bar.js +7 -3
- package/dist/cli/log.d.ts +0 -12
- package/dist/functions/chunk-optimization/plan-frame-ranges.d.ts +1 -4
- package/dist/functions/compositions.d.ts +1 -1
- package/dist/functions/compositions.js +2 -0
- package/dist/functions/helpers/calculate-price-from-bucket.d.ts +3 -1
- package/dist/functions/helpers/calculate-price-from-bucket.js +2 -1
- package/dist/functions/helpers/concat-videos.d.ts +4 -2
- package/dist/functions/helpers/concat-videos.js +5 -2
- package/dist/functions/helpers/create-post-render-data.js +2 -0
- package/dist/functions/helpers/get-progress.js +2 -0
- package/dist/functions/helpers/is-enosp-err.js +1 -1
- package/dist/functions/helpers/validate-composition.d.ts +5 -3
- package/dist/functions/helpers/validate-composition.js +3 -1
- package/dist/functions/index.d.ts +4 -15
- package/dist/functions/index.js +1 -1
- package/dist/functions/launch.js +6 -2
- package/dist/functions/renderer.js +9 -9
- package/dist/functions/start.js +1 -1
- package/dist/functions/still.js +5 -1
- package/dist/index.d.ts +6 -5
- package/dist/index.js +2 -1
- package/dist/shared/constants.d.ts +17 -20
- package/dist/shared/constants.js +2 -1
- package/dist/shared/function-zip-path.d.ts +1 -0
- package/dist/shared/function-zip-path.js +2 -1
- package/dist/shared/hosted-layers.d.ts +91 -2
- package/dist/shared/hosted-layers.js +300 -1
- package/dist/shared/invoke-webhook.d.ts +2 -0
- package/package.json +89 -90
- package/remotionlambda-arm64.zip +0 -0
- package/remotionlambda-x64.zip +0 -0
- package/remotionlambda.zip +0 -0
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { ChromiumOptions, DownloadMap, openBrowser } from '@remotion/renderer';
|
|
2
|
-
import type {
|
|
1
|
+
import type { ChromiumOptions, DownloadMap, FfmpegExecutable, openBrowser } from '@remotion/renderer';
|
|
2
|
+
import type { TCompMetadata } from 'remotion';
|
|
3
3
|
import type { Await } from '../../shared/await';
|
|
4
4
|
declare type ValidateCompositionOptions = {
|
|
5
5
|
serveUrl: string;
|
|
@@ -7,6 +7,8 @@ declare type ValidateCompositionOptions = {
|
|
|
7
7
|
browserInstance: Await<ReturnType<typeof openBrowser>>;
|
|
8
8
|
inputProps: unknown;
|
|
9
9
|
envVariables: Record<string, string> | undefined;
|
|
10
|
+
ffmpegExecutable: FfmpegExecutable;
|
|
11
|
+
ffprobeExecutable: FfmpegExecutable;
|
|
10
12
|
timeoutInMilliseconds: number;
|
|
11
13
|
chromiumOptions: ChromiumOptions;
|
|
12
14
|
port: number | null;
|
|
@@ -14,5 +16,5 @@ declare type ValidateCompositionOptions = {
|
|
|
14
16
|
forceHeight: number | null;
|
|
15
17
|
forceWidth: number | null;
|
|
16
18
|
};
|
|
17
|
-
export declare const validateComposition: ({ serveUrl, composition, browserInstance, inputProps, envVariables, timeoutInMilliseconds, chromiumOptions, port, downloadMap, forceHeight, forceWidth, }: ValidateCompositionOptions) => Promise<
|
|
19
|
+
export declare const validateComposition: ({ serveUrl, composition, browserInstance, inputProps, envVariables, timeoutInMilliseconds, ffmpegExecutable, ffprobeExecutable, chromiumOptions, port, downloadMap, forceHeight, forceWidth, }: ValidateCompositionOptions) => Promise<TCompMetadata>;
|
|
18
20
|
export {};
|
|
@@ -3,11 +3,13 @@ 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, chromiumOptions, port, downloadMap, forceHeight, forceWidth, }) => {
|
|
6
|
+
const validateComposition = async ({ serveUrl, composition, browserInstance, inputProps, envVariables, timeoutInMilliseconds, ffmpegExecutable, ffprobeExecutable, 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,
|
|
11
13
|
timeoutInMilliseconds,
|
|
12
14
|
chromiumOptions,
|
|
13
15
|
port,
|
|
@@ -1,18 +1,7 @@
|
|
|
1
1
|
import type { LambdaPayload } from '../shared/constants';
|
|
2
|
-
|
|
2
|
+
import { LambdaRoutines } from '../shared/constants';
|
|
3
|
+
import type { LambdaReturnValues } from '../shared/return-values';
|
|
4
|
+
export declare const handler: <T extends LambdaRoutines>(params: LambdaPayload, context: {
|
|
3
5
|
invokedFunctionArn: string;
|
|
4
6
|
getRemainingTimeInMillis: () => number;
|
|
5
|
-
}) => 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
|
-
}>>;
|
|
7
|
+
}) => Promise<LambdaReturnValues[T]>;
|
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 = (params, context) => {
|
|
16
|
+
const handler = async (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,6 +149,8 @@ const innerLaunchHandler = async (params, options) => {
|
|
|
149
149
|
browserInstance,
|
|
150
150
|
inputProps: await inputPropsPromise,
|
|
151
151
|
envVariables: params.envVariables,
|
|
152
|
+
ffmpegExecutable: null,
|
|
153
|
+
ffprobeExecutable: null,
|
|
152
154
|
timeoutInMilliseconds: params.timeoutInMilliseconds,
|
|
153
155
|
chromiumOptions: params.chromiumOptions,
|
|
154
156
|
port: null,
|
|
@@ -211,7 +213,7 @@ const innerLaunchHandler = async (params, options) => {
|
|
|
211
213
|
envVariables: params.envVariables,
|
|
212
214
|
pixelFormat: params.pixelFormat,
|
|
213
215
|
proResProfile: params.proResProfile,
|
|
214
|
-
|
|
216
|
+
quality: params.quality,
|
|
215
217
|
privacy: params.privacy,
|
|
216
218
|
logLevel: (_a = params.logLevel) !== null && _a !== void 0 ? _a : 'info',
|
|
217
219
|
attempt: 1,
|
|
@@ -364,7 +366,7 @@ const innerLaunchHandler = async (params, options) => {
|
|
|
364
366
|
const fps = comp.fps / params.everyNthFrame;
|
|
365
367
|
const outdir = (0, path_1.join)(renderer_1.RenderInternals.tmpDir(constants_1.CONCAT_FOLDER_TOKEN), 'bucket');
|
|
366
368
|
if ((0, fs_1.existsSync)(outdir)) {
|
|
367
|
-
(0
|
|
369
|
+
(fs_1.rmSync !== null && fs_1.rmSync !== void 0 ? fs_1.rmSync : fs_1.rmdirSync)(outdir, {
|
|
368
370
|
recursive: true,
|
|
369
371
|
});
|
|
370
372
|
}
|
|
@@ -385,6 +387,8 @@ const innerLaunchHandler = async (params, options) => {
|
|
|
385
387
|
codec: params.codec,
|
|
386
388
|
fps,
|
|
387
389
|
numberOfGifLoops: params.numberOfGifLoops,
|
|
390
|
+
ffmpegExecutable: null,
|
|
391
|
+
remotionRoot: process.cwd(),
|
|
388
392
|
files,
|
|
389
393
|
outdir,
|
|
390
394
|
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
|
+
quality: params.quality,
|
|
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,6 +150,13 @@ 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
|
+
},
|
|
153
160
|
// Lossless flag takes priority over audio codec
|
|
154
161
|
// https://github.com/remotion-dev/remotion/issues/1647
|
|
155
162
|
// Special flag only in Lambda renderer which improves the audio quality
|
|
@@ -157,14 +164,7 @@ const renderHandler = async (params, options, logs) => {
|
|
|
157
164
|
preferLossless: true,
|
|
158
165
|
browserExecutable: (0, get_chromium_executable_path_1.executablePath)(),
|
|
159
166
|
})
|
|
160
|
-
.then((
|
|
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
|
-
})
|
|
167
|
+
.then(() => resolve())
|
|
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
|
+
quality: params.quality,
|
|
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,6 +25,7 @@ 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");
|
|
28
29
|
const get_current_region_1 = require("./helpers/get-current-region");
|
|
29
30
|
const get_output_url_from_metadata_1 = require("./helpers/get-output-url-from-metadata");
|
|
30
31
|
const io_1 = require("./helpers/io");
|
|
@@ -72,6 +73,8 @@ const innerStillHandler = async (lambdaParams, renderId, options) => {
|
|
|
72
73
|
composition: lambdaParams.composition,
|
|
73
74
|
inputProps,
|
|
74
75
|
envVariables: lambdaParams.envVariables,
|
|
76
|
+
ffmpegExecutable: null,
|
|
77
|
+
ffprobeExecutable: null,
|
|
75
78
|
chromiumOptions: lambdaParams.chromiumOptions,
|
|
76
79
|
timeoutInMilliseconds: lambdaParams.timeoutInMilliseconds,
|
|
77
80
|
port: null,
|
|
@@ -126,7 +129,7 @@ const innerStillHandler = async (lambdaParams, renderId, options) => {
|
|
|
126
129
|
inputProps,
|
|
127
130
|
overwrite: false,
|
|
128
131
|
puppeteerInstance: browserInstance,
|
|
129
|
-
|
|
132
|
+
quality: lambdaParams.quality,
|
|
130
133
|
chromiumOptions: lambdaParams.chromiumOptions,
|
|
131
134
|
scale: lambdaParams.scale,
|
|
132
135
|
timeoutInMilliseconds: lambdaParams.timeoutInMilliseconds,
|
|
@@ -158,6 +161,7 @@ const innerStillHandler = async (lambdaParams, renderId, options) => {
|
|
|
158
161
|
memorySizeInMb: Number(process.env.AWS_LAMBDA_FUNCTION_MEMORY_SIZE),
|
|
159
162
|
region: (0, get_current_region_1.getCurrentRegionInFunction)(),
|
|
160
163
|
lambdasInvoked: 1,
|
|
164
|
+
architecture: (0, get_current_architecture_1.getCurrentArchitecture)(),
|
|
161
165
|
// We cannot determine the ephemeral storage size, so we
|
|
162
166
|
// overestimate the price, but will only have a miniscule effect (~0.2%)
|
|
163
167
|
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 } from './api/download-media';
|
|
12
|
+
import { downloadMedia, downloadVideo } 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,14 +40,15 @@ 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';
|
|
43
44
|
/**
|
|
44
45
|
* @deprecated Import this from `@remotion/lambda/client` instead
|
|
45
46
|
*/
|
|
46
|
-
declare const renderMediaOnLambda: ({ functionName, serveUrl, inputProps, codec, imageFormat, crf, envVariables, pixelFormat, proResProfile, quality,
|
|
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>;
|
|
47
48
|
/**
|
|
48
49
|
* @deprecated Import this from `@remotion/lambda/client` instead
|
|
49
50
|
*/
|
|
50
|
-
declare const renderStillOnLambda: ({ functionName, serveUrl, inputProps, imageFormat, envVariables, quality,
|
|
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>;
|
|
51
52
|
/**
|
|
52
53
|
* @deprecated Import this from `@remotion/lambda/client` instead
|
|
53
54
|
*/
|
|
@@ -56,5 +57,5 @@ declare const presignUrl: <CheckIfObjectExists extends boolean = false>({ region
|
|
|
56
57
|
* @deprecated Import this from `@remotion/lambda/client` instead
|
|
57
58
|
*/
|
|
58
59
|
declare const getSites: ({ region, }: GetSitesInput) => Promise<GetSitesOutput>;
|
|
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, };
|
|
60
|
+
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, getCompositionsOnLambda, };
|
|
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, LambdaArchitecture, 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.downloadMedia = exports.deploySite = exports.deployFunction = exports.deleteSite = void 0;
|
|
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.downloadVideo = 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,6 +13,7 @@ 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; } });
|
|
16
17
|
const estimate_price_1 = require("./api/estimate-price");
|
|
17
18
|
Object.defineProperty(exports, "estimatePrice", { enumerable: true, get: function () { return estimate_price_1.estimatePrice; } });
|
|
18
19
|
const get_aws_client_1 = require("./api/get-aws-client");
|
|
@@ -1,15 +1,17 @@
|
|
|
1
|
-
import type { AudioCodec, ChromiumOptions, Codec, FrameRange, LogLevel, PixelFormat, ProResProfile
|
|
2
|
-
import type {
|
|
1
|
+
import type { AudioCodec, ChromiumOptions, Codec, FrameRange, ImageFormat, LogLevel, PixelFormat, ProResProfile } from '@remotion/renderer';
|
|
2
|
+
import type { VideoConfig } 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';
|
|
9
10
|
import type { LambdaCodec } from './validate-lambda-codec';
|
|
10
11
|
export declare const MIN_MEMORY = 512;
|
|
11
12
|
export declare const MAX_MEMORY = 10240;
|
|
12
13
|
export declare const DEFAULT_MEMORY_SIZE = 2048;
|
|
14
|
+
export declare const DEFAULT_ARCHITECTURE: LambdaArchitecture;
|
|
13
15
|
export declare const DEFAULT_TIMEOUT = 120;
|
|
14
16
|
export declare const MIN_TIMEOUT = 15;
|
|
15
17
|
export declare const MAX_TIMEOUT = 900;
|
|
@@ -76,7 +78,7 @@ export declare type OutNameOutput = {
|
|
|
76
78
|
};
|
|
77
79
|
export declare const getSitesKey: (siteId: string) => string;
|
|
78
80
|
export declare const outName: (renderId: string, extension: string) => string;
|
|
79
|
-
export declare const outStillName: (renderId: string, imageFormat:
|
|
81
|
+
export declare const outStillName: (renderId: string, imageFormat: ImageFormat) => string;
|
|
80
82
|
export declare const customOutName: (renderId: string, bucketName: string, name: OutNameInput) => OutNameOutput;
|
|
81
83
|
export declare const postRenderDataKey: (renderId: string) => string;
|
|
82
84
|
export declare const inputPropsKey: (hash: string) => string;
|
|
@@ -117,12 +119,12 @@ export declare type LambdaPayloads = {
|
|
|
117
119
|
inputProps: SerializedInputProps;
|
|
118
120
|
codec: LambdaCodec;
|
|
119
121
|
audioCodec: AudioCodec | null;
|
|
120
|
-
imageFormat:
|
|
122
|
+
imageFormat: ImageFormat;
|
|
121
123
|
crf: number | undefined;
|
|
122
124
|
envVariables: Record<string, string> | undefined;
|
|
123
125
|
pixelFormat: PixelFormat | undefined;
|
|
124
126
|
proResProfile: ProResProfile | undefined;
|
|
125
|
-
|
|
127
|
+
quality: number | undefined;
|
|
126
128
|
maxRetries: number;
|
|
127
129
|
privacy: Privacy;
|
|
128
130
|
logLevel: LogLevel;
|
|
@@ -155,14 +157,14 @@ export declare type LambdaPayloads = {
|
|
|
155
157
|
bucketName: string;
|
|
156
158
|
inputProps: SerializedInputProps;
|
|
157
159
|
renderId: string;
|
|
158
|
-
imageFormat:
|
|
160
|
+
imageFormat: ImageFormat;
|
|
159
161
|
codec: LambdaCodec;
|
|
160
162
|
audioCodec: AudioCodec | null;
|
|
161
163
|
crf: number | undefined;
|
|
162
164
|
envVariables: Record<string, string> | undefined;
|
|
163
165
|
pixelFormat: PixelFormat | undefined;
|
|
164
166
|
proResProfile: ProResProfile | undefined;
|
|
165
|
-
|
|
167
|
+
quality: number | undefined;
|
|
166
168
|
maxRetries: number;
|
|
167
169
|
privacy: Privacy;
|
|
168
170
|
logLevel: LogLevel;
|
|
@@ -206,12 +208,12 @@ export declare type LambdaPayloads = {
|
|
|
206
208
|
retriesLeft: number;
|
|
207
209
|
inputProps: SerializedInputProps;
|
|
208
210
|
renderId: string;
|
|
209
|
-
imageFormat:
|
|
211
|
+
imageFormat: ImageFormat;
|
|
210
212
|
codec: LambdaCodec;
|
|
211
213
|
crf: number | undefined;
|
|
212
214
|
proResProfile: ProResProfile | undefined;
|
|
213
215
|
pixelFormat: PixelFormat | undefined;
|
|
214
|
-
|
|
216
|
+
quality: number | undefined;
|
|
215
217
|
envVariables: Record<string, string> | undefined;
|
|
216
218
|
privacy: Privacy;
|
|
217
219
|
attempt: number;
|
|
@@ -233,10 +235,10 @@ export declare type LambdaPayloads = {
|
|
|
233
235
|
serveUrl: string;
|
|
234
236
|
composition: string;
|
|
235
237
|
inputProps: SerializedInputProps;
|
|
236
|
-
imageFormat:
|
|
238
|
+
imageFormat: ImageFormat;
|
|
237
239
|
envVariables: Record<string, string> | undefined;
|
|
238
240
|
attempt: number;
|
|
239
|
-
|
|
241
|
+
quality: number | undefined;
|
|
240
242
|
maxRetries: number;
|
|
241
243
|
frame: number;
|
|
242
244
|
privacy: Privacy;
|
|
@@ -269,16 +271,9 @@ export declare type LambdaPayload = LambdaPayloads[LambdaRoutines];
|
|
|
269
271
|
export declare type EncodingProgress = {
|
|
270
272
|
framesEncoded: number;
|
|
271
273
|
};
|
|
272
|
-
declare type
|
|
273
|
-
type: 'still';
|
|
274
|
-
imageFormat: StillImageFormat;
|
|
275
|
-
} | {
|
|
276
|
-
type: 'video';
|
|
277
|
-
imageFormat: VideoImageFormat;
|
|
278
|
-
};
|
|
279
|
-
export declare type RenderMetadata = Discriminated & {
|
|
274
|
+
export declare type RenderMetadata = {
|
|
280
275
|
siteId: string;
|
|
281
|
-
videoConfig:
|
|
276
|
+
videoConfig: VideoConfig;
|
|
282
277
|
startedDate: number;
|
|
283
278
|
totalChunks: number;
|
|
284
279
|
estimatedTotalLambdaInvokations: number;
|
|
@@ -286,6 +281,8 @@ export declare type RenderMetadata = Discriminated & {
|
|
|
286
281
|
compositionId: string;
|
|
287
282
|
codec: Codec | null;
|
|
288
283
|
audioCodec: AudioCodec | null;
|
|
284
|
+
type: 'still' | 'video';
|
|
285
|
+
imageFormat: ImageFormat;
|
|
289
286
|
inputProps: SerializedInputProps;
|
|
290
287
|
framesPerLambda: number;
|
|
291
288
|
memorySizeInMb: number;
|
package/dist/shared/constants.js
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
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.DEFAULT_MEMORY_SIZE = exports.MAX_MEMORY = exports.MIN_MEMORY = void 0;
|
|
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_ARCHITECTURE = 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';
|
|
7
8
|
exports.DEFAULT_TIMEOUT = 120;
|
|
8
9
|
exports.MIN_TIMEOUT = 15;
|
|
9
10
|
exports.MAX_TIMEOUT = 900;
|
|
@@ -3,6 +3,7 @@ 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.FUNCTION_ZIP_ARM64 = void 0;
|
|
6
|
+
exports.FUNCTION_ZIP_X86_64 = 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,9 +1,98 @@
|
|
|
1
1
|
import type { AwsRegion } from '../pricing/aws-regions';
|
|
2
|
+
import type { LambdaArchitecture } from './validate-architecture';
|
|
2
3
|
export declare const REMOTION_HOSTED_LAYER_ARN = "arn:aws:lambda:*:678892195805:layer:remotion-binaries-*";
|
|
3
4
|
export declare type HostedLayers = {
|
|
4
|
-
[
|
|
5
|
+
[architecture in LambdaArchitecture]: {
|
|
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': {
|
|
5
94
|
layerArn: string;
|
|
6
95
|
version: number;
|
|
7
96
|
}[];
|
|
8
97
|
};
|
|
9
|
-
export declare const
|
|
98
|
+
export declare const __internal_doNotUsehostedLayers: HostedLayers;
|