@remotion/lambda 4.0.26 → 4.0.28
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/make-lambda-payload.d.ts +1 -1
- package/dist/api/make-lambda-payload.js +2 -1
- package/dist/api/render-media-on-lambda.d.ts +2 -1
- package/dist/cli/log.d.ts +4 -4
- package/dist/functions/helpers/get-current-region.d.ts +1 -1
- package/dist/functions/helpers/streaming-payloads.d.ts +3 -3
- package/dist/functions/launch.js +6 -1
- package/dist/functions/renderer.js +1 -0
- package/dist/functions/start.js +1 -0
- package/dist/internals.d.ts +1 -1
- package/dist/shared/constants.d.ts +4 -1
- package/dist/shared/is-flaky-error.js +4 -0
- package/package.json +8 -8
- package/remotionlambda-arm64.zip +0 -0
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { LambdaStartPayload, LambdaStatusPayload } from '../defaults';
|
|
2
2
|
import type { GetRenderProgressInput } from './get-render-progress';
|
|
3
3
|
import type { RenderMediaOnLambdaInput } from './render-media-on-lambda';
|
|
4
|
-
export declare const makeLambdaRenderMediaPayload: ({ rendererFunctionName, frameRange, framesPerLambda, forceBucketName: bucketName, codec, composition, serveUrl, imageFormat, inputProps, region, crf, envVariables, pixelFormat, proResProfile, x264Preset, maxRetries, privacy, logLevel, outName, timeoutInMilliseconds, chromiumOptions, scale, everyNthFrame, numberOfGifLoops, audioBitrate, concurrencyPerLambda, audioCodec, forceHeight, forceWidth, webhook, videoBitrate, downloadBehavior, muted, overwrite, dumpBrowserLogs, jpegQuality, quality, offthreadVideoCacheSizeInBytes, }: RenderMediaOnLambdaInput) => Promise<LambdaStartPayload>;
|
|
4
|
+
export declare const makeLambdaRenderMediaPayload: ({ rendererFunctionName, frameRange, framesPerLambda, forceBucketName: bucketName, codec, composition, serveUrl, imageFormat, inputProps, region, crf, envVariables, pixelFormat, proResProfile, x264Preset, maxRetries, privacy, logLevel, outName, timeoutInMilliseconds, chromiumOptions, scale, everyNthFrame, numberOfGifLoops, audioBitrate, concurrencyPerLambda, audioCodec, forceHeight, forceWidth, webhook, videoBitrate, downloadBehavior, muted, overwrite, dumpBrowserLogs, jpegQuality, quality, offthreadVideoCacheSizeInBytes, colorSpace, }: RenderMediaOnLambdaInput) => Promise<LambdaStartPayload>;
|
|
5
5
|
export declare const getRenderProgressPayload: ({ bucketName, renderId, s3OutputProvider, }: GetRenderProgressInput) => LambdaStatusPayload;
|
|
@@ -9,7 +9,7 @@ const validate_frames_per_lambda_1 = require("../shared/validate-frames-per-lamb
|
|
|
9
9
|
const validate_lambda_codec_1 = require("../shared/validate-lambda-codec");
|
|
10
10
|
const validate_serveurl_1 = require("../shared/validate-serveurl");
|
|
11
11
|
const validate_webhook_1 = require("../shared/validate-webhook");
|
|
12
|
-
const makeLambdaRenderMediaPayload = async ({ rendererFunctionName, frameRange, framesPerLambda, forceBucketName: bucketName, codec, composition, serveUrl, imageFormat, inputProps, region, crf, envVariables, pixelFormat, proResProfile, x264Preset, maxRetries, privacy, logLevel, outName, timeoutInMilliseconds, chromiumOptions, scale, everyNthFrame, numberOfGifLoops, audioBitrate, concurrencyPerLambda, audioCodec, forceHeight, forceWidth, webhook, videoBitrate, downloadBehavior, muted, overwrite, dumpBrowserLogs, jpegQuality, quality, offthreadVideoCacheSizeInBytes, }) => {
|
|
12
|
+
const makeLambdaRenderMediaPayload = async ({ rendererFunctionName, frameRange, framesPerLambda, forceBucketName: bucketName, codec, composition, serveUrl, imageFormat, inputProps, region, crf, envVariables, pixelFormat, proResProfile, x264Preset, maxRetries, privacy, logLevel, outName, timeoutInMilliseconds, chromiumOptions, scale, everyNthFrame, numberOfGifLoops, audioBitrate, concurrencyPerLambda, audioCodec, forceHeight, forceWidth, webhook, videoBitrate, downloadBehavior, muted, overwrite, dumpBrowserLogs, jpegQuality, quality, offthreadVideoCacheSizeInBytes, colorSpace, }) => {
|
|
13
13
|
if (quality) {
|
|
14
14
|
throw new Error('quality has been renamed to jpegQuality. Please rename the option.');
|
|
15
15
|
}
|
|
@@ -69,6 +69,7 @@ const makeLambdaRenderMediaPayload = async ({ rendererFunctionName, frameRange,
|
|
|
69
69
|
audioCodec: audioCodec !== null && audioCodec !== void 0 ? audioCodec : null,
|
|
70
70
|
type: defaults_1.LambdaRoutines.start,
|
|
71
71
|
offthreadVideoCacheSizeInBytes: offthreadVideoCacheSizeInBytes !== null && offthreadVideoCacheSizeInBytes !== void 0 ? offthreadVideoCacheSizeInBytes : null,
|
|
72
|
+
colorSpace: colorSpace !== null && colorSpace !== void 0 ? colorSpace : 'default',
|
|
72
73
|
};
|
|
73
74
|
};
|
|
74
75
|
exports.makeLambdaRenderMediaPayload = makeLambdaRenderMediaPayload;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { AudioCodec, ChromiumOptions, FrameRange, LogLevel, PixelFormat, ProResProfile, ToOptions, VideoImageFormat, X264Preset } from '@remotion/renderer';
|
|
1
|
+
import type { AudioCodec, ChromiumOptions, ColorSpace, FrameRange, LogLevel, PixelFormat, ProResProfile, ToOptions, VideoImageFormat, X264Preset } from '@remotion/renderer';
|
|
2
2
|
import type { BrowserSafeApis } from '@remotion/renderer/client';
|
|
3
3
|
import type { AwsRegion } from '../pricing/aws-regions';
|
|
4
4
|
import type { OutNameInput, Privacy, WebhookOption } from '../shared/constants';
|
|
@@ -49,6 +49,7 @@ export type RenderMediaOnLambdaInput = {
|
|
|
49
49
|
* @deprecated in favor of `logLevel`: true
|
|
50
50
|
*/
|
|
51
51
|
dumpBrowserLogs?: boolean;
|
|
52
|
+
colorSpace?: ColorSpace;
|
|
52
53
|
} & Partial<ToOptions<typeof BrowserSafeApis.optionsMap.renderMediaOnLambda>>;
|
|
53
54
|
export type RenderMediaOnLambdaOutput = {
|
|
54
55
|
renderId: string;
|
package/dist/cli/log.d.ts
CHANGED
|
@@ -2,24 +2,24 @@ export declare const Log: {
|
|
|
2
2
|
verbose: (message?: any, ...optionalParams: any[]) => void;
|
|
3
3
|
verboseAdvanced: (options: {
|
|
4
4
|
indent: boolean;
|
|
5
|
-
logLevel: "
|
|
5
|
+
logLevel: "verbose" | "info" | "warn" | "error";
|
|
6
6
|
} & {
|
|
7
7
|
tag?: string | undefined;
|
|
8
8
|
}, message?: any, ...optionalParams: any[]) => void;
|
|
9
9
|
info: (message?: any, ...optionalParams: any[]) => void;
|
|
10
10
|
infoAdvanced: (options: {
|
|
11
11
|
indent: boolean;
|
|
12
|
-
logLevel: "
|
|
12
|
+
logLevel: "verbose" | "info" | "warn" | "error";
|
|
13
13
|
}, message?: any, ...optionalParams: any[]) => void;
|
|
14
14
|
warn: (message?: any, ...optionalParams: any[]) => void;
|
|
15
15
|
warnAdvanced: (options: {
|
|
16
16
|
indent: boolean;
|
|
17
|
-
logLevel: "
|
|
17
|
+
logLevel: "verbose" | "info" | "warn" | "error";
|
|
18
18
|
}, message?: any, ...optionalParams: any[]) => void;
|
|
19
19
|
error: (message?: any, ...optionalParams: any[]) => void;
|
|
20
20
|
errorAdvanced: (options: {
|
|
21
21
|
indent: boolean;
|
|
22
|
-
logLevel: "
|
|
22
|
+
logLevel: "verbose" | "info" | "warn" | "error";
|
|
23
23
|
} & {
|
|
24
24
|
tag?: string | undefined;
|
|
25
25
|
}, message?: any, ...optionalParams: any[]) => void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const getCurrentRegionInFunction: () => "eu-central-1" | "eu-west-1" | "eu-west-2" | "eu-west-3" | "eu-north-1" | "us-east-1" | "us-east-2" | "us-west-1" | "us-west-2" | "
|
|
1
|
+
export declare const getCurrentRegionInFunction: () => "eu-central-1" | "eu-west-1" | "eu-west-2" | "eu-west-3" | "eu-south-1" | "eu-north-1" | "us-east-1" | "us-east-2" | "us-west-1" | "us-west-2" | "af-south-1" | "ap-south-1" | "ap-east-1" | "ap-southeast-1" | "ap-southeast-2" | "ap-northeast-1" | "ap-northeast-2" | "ap-northeast-3" | "ca-central-1" | "me-south-1" | "sa-east-1";
|
|
@@ -4,16 +4,16 @@ declare const streamingPayloadSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObje
|
|
|
4
4
|
type: z.ZodLiteral<"render-id-determined">;
|
|
5
5
|
renderId: z.ZodString;
|
|
6
6
|
}, "strip", z.ZodTypeAny, {
|
|
7
|
-
renderId: string;
|
|
8
7
|
type: "render-id-determined";
|
|
9
|
-
}, {
|
|
10
8
|
renderId: string;
|
|
9
|
+
}, {
|
|
11
10
|
type: "render-id-determined";
|
|
11
|
+
renderId: string;
|
|
12
12
|
}>]>;
|
|
13
13
|
export type StreamingPayloads = z.infer<typeof streamingPayloadSchema>;
|
|
14
14
|
export declare const isStreamingPayload: (str: string) => false | {
|
|
15
|
-
renderId: string;
|
|
16
15
|
type: "render-id-determined";
|
|
16
|
+
renderId: string;
|
|
17
17
|
};
|
|
18
18
|
export declare const sendProgressEvent: (responseStream: ResponseStream, payload: StreamingPayloads) => void;
|
|
19
19
|
export {};
|
package/dist/functions/launch.js
CHANGED
|
@@ -124,7 +124,11 @@ const innerLaunchHandler = async (params, options) => {
|
|
|
124
124
|
(0, validate_1.validateDimension)(comp.width, 'width', 'passed to a Lambda render');
|
|
125
125
|
renderer_1.RenderInternals.validateBitrate(params.audioBitrate, 'audioBitrate');
|
|
126
126
|
renderer_1.RenderInternals.validateBitrate(params.videoBitrate, 'videoBitrate');
|
|
127
|
-
renderer_1.RenderInternals.validateConcurrency(
|
|
127
|
+
renderer_1.RenderInternals.validateConcurrency({
|
|
128
|
+
value: params.concurrencyPerLambda,
|
|
129
|
+
setting: 'concurrencyPerLambda',
|
|
130
|
+
checkIfValidForCurrentMachine: true,
|
|
131
|
+
});
|
|
128
132
|
const realFrameRange = renderer_1.RenderInternals.getRealFrameRange(comp.durationInFrames, params.frameRange);
|
|
129
133
|
const frameCount = renderer_1.RenderInternals.getFramesToRender(realFrameRange, params.everyNthFrame);
|
|
130
134
|
const framesPerLambda = (_c = params.framesPerLambda) !== null && _c !== void 0 ? _c : (0, best_frames_per_lambda_param_1.bestFramesPerLambdaParam)(frameCount.length);
|
|
@@ -200,6 +204,7 @@ const innerLaunchHandler = async (params, options) => {
|
|
|
200
204
|
},
|
|
201
205
|
resolvedProps: serializedResolvedProps,
|
|
202
206
|
offthreadVideoCacheSizeInBytes: params.offthreadVideoCacheSizeInBytes,
|
|
207
|
+
colorSpace: params.colorSpace,
|
|
203
208
|
};
|
|
204
209
|
return payload;
|
|
205
210
|
});
|
|
@@ -155,6 +155,7 @@ const renderHandler = async (params, options, logs) => {
|
|
|
155
155
|
server: undefined,
|
|
156
156
|
serializedResolvedPropsWithCustomSchema: resolvedProps,
|
|
157
157
|
offthreadVideoCacheSizeInBytes: params.offthreadVideoCacheSizeInBytes,
|
|
158
|
+
colorSpace: params.colorSpace,
|
|
158
159
|
})
|
|
159
160
|
.then(({ slowestFrames }) => {
|
|
160
161
|
console.log(`Slowest frames:`);
|
package/dist/functions/start.js
CHANGED
|
@@ -79,6 +79,7 @@ const startHandler = async (params, options) => {
|
|
|
79
79
|
rendererFunctionName: params.rendererFunctionName,
|
|
80
80
|
audioCodec: params.audioCodec,
|
|
81
81
|
offthreadVideoCacheSizeInBytes: params.offthreadVideoCacheSizeInBytes,
|
|
82
|
+
colorSpace: params.colorSpace,
|
|
82
83
|
};
|
|
83
84
|
// Don't replace with callLambda(), we want to return before the render is snone
|
|
84
85
|
await (0, aws_clients_1.getLambdaClient)((0, get_current_region_1.getCurrentRegionInFunction)()).send(new client_lambda_1.InvokeCommand({
|
package/dist/internals.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export declare const LambdaInternals: {
|
|
2
2
|
executeCommand: (args: string[], remotionRoot: string) => Promise<void>;
|
|
3
|
-
makeLambdaRenderMediaPayload: ({ rendererFunctionName, frameRange, framesPerLambda, forceBucketName: bucketName, codec, composition, serveUrl, imageFormat, inputProps, region, crf, envVariables, pixelFormat, proResProfile, x264Preset, maxRetries, privacy, logLevel, outName, timeoutInMilliseconds, chromiumOptions, scale, everyNthFrame, numberOfGifLoops, audioBitrate, concurrencyPerLambda, audioCodec, forceHeight, forceWidth, webhook, videoBitrate, downloadBehavior, muted, overwrite, dumpBrowserLogs, jpegQuality, quality, offthreadVideoCacheSizeInBytes, }: import(".").RenderMediaOnLambdaInput) => Promise<import("./defaults").LambdaStartPayload>;
|
|
3
|
+
makeLambdaRenderMediaPayload: ({ rendererFunctionName, frameRange, framesPerLambda, forceBucketName: bucketName, codec, composition, serveUrl, imageFormat, inputProps, region, crf, envVariables, pixelFormat, proResProfile, x264Preset, maxRetries, privacy, logLevel, outName, timeoutInMilliseconds, chromiumOptions, scale, everyNthFrame, numberOfGifLoops, audioBitrate, concurrencyPerLambda, audioCodec, forceHeight, forceWidth, webhook, videoBitrate, downloadBehavior, muted, overwrite, dumpBrowserLogs, jpegQuality, quality, offthreadVideoCacheSizeInBytes, colorSpace, }: import(".").RenderMediaOnLambdaInput) => Promise<import("./defaults").LambdaStartPayload>;
|
|
4
4
|
getRenderProgressPayload: ({ bucketName, renderId, s3OutputProvider, }: import(".").GetRenderProgressInput) => import("./defaults").LambdaStatusPayload;
|
|
5
5
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { AudioCodec, ChromiumOptions, Codec, FrameRange, LogLevel, PixelFormat, ProResProfile, StillImageFormat, ToOptions, VideoImageFormat, X264Preset } from '@remotion/renderer';
|
|
1
|
+
import type { AudioCodec, ChromiumOptions, Codec, ColorSpace, FrameRange, LogLevel, PixelFormat, ProResProfile, StillImageFormat, ToOptions, VideoImageFormat, X264Preset } from '@remotion/renderer';
|
|
2
2
|
import type { BrowserSafeApis } from '@remotion/renderer/client';
|
|
3
3
|
import type { VideoConfig } from 'remotion';
|
|
4
4
|
import type { ChunkRetry } from '../functions/helpers/get-retry-stats';
|
|
@@ -148,6 +148,7 @@ export type LambdaStartPayload = {
|
|
|
148
148
|
forceWidth: number | null;
|
|
149
149
|
bucketName: string | null;
|
|
150
150
|
offthreadVideoCacheSizeInBytes: number | null;
|
|
151
|
+
colorSpace: ColorSpace;
|
|
151
152
|
};
|
|
152
153
|
export type LambdaStatusPayload = {
|
|
153
154
|
type: LambdaRoutines.status;
|
|
@@ -199,6 +200,7 @@ export type LambdaPayloads = {
|
|
|
199
200
|
forceHeight: number | null;
|
|
200
201
|
forceWidth: number | null;
|
|
201
202
|
offthreadVideoCacheSizeInBytes: number | null;
|
|
203
|
+
colorSpace: ColorSpace;
|
|
202
204
|
};
|
|
203
205
|
status: LambdaStatusPayload;
|
|
204
206
|
renderer: {
|
|
@@ -239,6 +241,7 @@ export type LambdaPayloads = {
|
|
|
239
241
|
version: string;
|
|
240
242
|
};
|
|
241
243
|
offthreadVideoCacheSizeInBytes: number | null;
|
|
244
|
+
colorSpace: ColorSpace;
|
|
242
245
|
};
|
|
243
246
|
still: {
|
|
244
247
|
type: LambdaRoutines.still;
|
|
@@ -21,6 +21,10 @@ const isFlakyError = (err) => {
|
|
|
21
21
|
if (message.includes('Compositor panicked')) {
|
|
22
22
|
return true;
|
|
23
23
|
}
|
|
24
|
+
// S3 in rare occasions
|
|
25
|
+
if (message.includes('We encountered an internal error.')) {
|
|
26
|
+
return true;
|
|
27
|
+
}
|
|
24
28
|
if (message.includes('Compositor exited') && !message.includes('SIGSEGV')) {
|
|
25
29
|
return true;
|
|
26
30
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@remotion/lambda",
|
|
3
|
-
"version": "4.0.
|
|
3
|
+
"version": "4.0.28",
|
|
4
4
|
"description": "Distributed renderer for Remotion based on AWS Lambda",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"sideEffects": false,
|
|
@@ -26,10 +26,10 @@
|
|
|
26
26
|
"aws-policies": "^1.0.1",
|
|
27
27
|
"mime-types": "2.1.34",
|
|
28
28
|
"zod": "3.21.4",
|
|
29
|
-
"@remotion/bundler": "4.0.
|
|
30
|
-
"@remotion/cli": "4.0.
|
|
31
|
-
"remotion": "4.0.
|
|
32
|
-
"
|
|
29
|
+
"@remotion/bundler": "4.0.28",
|
|
30
|
+
"@remotion/cli": "4.0.28",
|
|
31
|
+
"@remotion/renderer": "4.0.28",
|
|
32
|
+
"remotion": "4.0.28"
|
|
33
33
|
},
|
|
34
34
|
"devDependencies": {
|
|
35
35
|
"@jonny/eslint-config": "3.0.266",
|
|
@@ -43,11 +43,11 @@
|
|
|
43
43
|
"ts-node": "^10.8.0",
|
|
44
44
|
"vitest": "0.31.1",
|
|
45
45
|
"zip-lib": "^0.7.2",
|
|
46
|
-
"@remotion/bundler": "4.0.
|
|
47
|
-
"@remotion/compositor-linux-arm64-gnu": "4.0.
|
|
46
|
+
"@remotion/bundler": "4.0.28",
|
|
47
|
+
"@remotion/compositor-linux-arm64-gnu": "4.0.28"
|
|
48
48
|
},
|
|
49
49
|
"peerDependencies": {
|
|
50
|
-
"@remotion/bundler": "4.0.
|
|
50
|
+
"@remotion/bundler": "4.0.28"
|
|
51
51
|
},
|
|
52
52
|
"publishConfig": {
|
|
53
53
|
"access": "public"
|
package/remotionlambda-arm64.zip
CHANGED
|
Binary file
|