@remotion/lambda 3.0.31 → 3.1.0
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/functions/chunk-optimization/is-valid-profile.js +2 -2
- package/dist/functions/chunk-optimization/plan-frame-ranges.d.ts +2 -2
- package/dist/functions/chunk-optimization/plan-frame-ranges.js +7 -6
- package/dist/functions/chunk-optimization/types.d.ts +1 -0
- package/dist/functions/helpers/concat-videos.d.ts +2 -1
- package/dist/functions/helpers/concat-videos.js +2 -1
- package/dist/functions/launch.js +15 -11
- package/dist/functions/renderer.js +6 -3
- package/dist/functions/start.js +2 -0
- package/dist/shared/constants.d.ts +6 -1
- package/dist/shared/constants.js +1 -1
- package/dist/shared/validate-lambda-codec.d.ts +1 -1
- package/dist/shared/validate-lambda-codec.js +9 -1
- package/package.json +6 -6
- package/remotionlambda.zip +0 -0
|
@@ -25,6 +25,8 @@ export declare type RenderMediaOnLambdaInput = {
|
|
|
25
25
|
timeoutInMilliseconds?: number;
|
|
26
26
|
chromiumOptions?: ChromiumOptions;
|
|
27
27
|
scale?: number;
|
|
28
|
+
everyNthFrame?: number;
|
|
29
|
+
numberOfGifLoops?: number | null;
|
|
28
30
|
concurrencyPerLambda?: number;
|
|
29
31
|
};
|
|
30
32
|
export declare type RenderMediaOnLambdaOutput = {
|
|
@@ -49,8 +51,8 @@ export declare type RenderMediaOnLambdaOutput = {
|
|
|
49
51
|
* @param params.logLevel Level of logging that Lambda function should perform. Default "info".
|
|
50
52
|
* @returns {Promise<RenderMediaOnLambdaOutput>} See documentation for detailed structure
|
|
51
53
|
*/
|
|
52
|
-
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, concurrencyPerLambda, }: RenderMediaOnLambdaInput) => Promise<RenderMediaOnLambdaOutput>;
|
|
54
|
+
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, }: RenderMediaOnLambdaInput) => Promise<RenderMediaOnLambdaOutput>;
|
|
53
55
|
/**
|
|
54
56
|
* @deprecated Renamed to renderMediaOnLambda()
|
|
55
57
|
*/
|
|
56
|
-
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, concurrencyPerLambda, }: RenderMediaOnLambdaInput) => Promise<RenderMediaOnLambdaOutput>;
|
|
58
|
+
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, }: RenderMediaOnLambdaInput) => Promise<RenderMediaOnLambdaOutput>;
|
|
@@ -26,7 +26,7 @@ const validate_serveurl_1 = require("../shared/validate-serveurl");
|
|
|
26
26
|
* @param params.logLevel Level of logging that Lambda function should perform. Default "info".
|
|
27
27
|
* @returns {Promise<RenderMediaOnLambdaOutput>} See documentation for detailed structure
|
|
28
28
|
*/
|
|
29
|
-
const renderMediaOnLambda = async ({ functionName, serveUrl, inputProps, codec, imageFormat, crf, envVariables, pixelFormat, proResProfile, quality, region, maxRetries, composition, framesPerLambda, privacy, logLevel, frameRange, outName, timeoutInMilliseconds, chromiumOptions, scale, concurrencyPerLambda, }) => {
|
|
29
|
+
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, }) => {
|
|
30
30
|
const actualCodec = (0, validate_lambda_codec_1.validateLambdaCodec)(codec);
|
|
31
31
|
(0, validate_serveurl_1.validateServeUrl)(serveUrl);
|
|
32
32
|
(0, validate_frames_per_lambda_1.validateFramesPerLambda)(framesPerLambda !== null && framesPerLambda !== void 0 ? framesPerLambda : null);
|
|
@@ -54,6 +54,8 @@ const renderMediaOnLambda = async ({ functionName, serveUrl, inputProps, codec,
|
|
|
54
54
|
timeoutInMilliseconds: timeoutInMilliseconds !== null && timeoutInMilliseconds !== void 0 ? timeoutInMilliseconds : remotion_1.Internals.DEFAULT_PUPPETEER_TIMEOUT,
|
|
55
55
|
chromiumOptions: chromiumOptions !== null && chromiumOptions !== void 0 ? chromiumOptions : {},
|
|
56
56
|
scale: scale !== null && scale !== void 0 ? scale : 1,
|
|
57
|
+
everyNthFrame: everyNthFrame !== null && everyNthFrame !== void 0 ? everyNthFrame : 1,
|
|
58
|
+
numberOfGifLoops: numberOfGifLoops !== null && numberOfGifLoops !== void 0 ? numberOfGifLoops : 0,
|
|
57
59
|
concurrencyPerLambda: concurrencyPerLambda !== null && concurrencyPerLambda !== void 0 ? concurrencyPerLambda : 1,
|
|
58
60
|
},
|
|
59
61
|
region,
|
|
@@ -38,7 +38,7 @@ const renderCommand = async (args) => {
|
|
|
38
38
|
(0, quit_1.quit)(1);
|
|
39
39
|
}
|
|
40
40
|
const outName = (_a = args[2]) !== null && _a !== void 0 ? _a : null;
|
|
41
|
-
const { chromiumOptions, codec, crf, envVariables, frameRange, imageFormat, inputProps, logLevel, pixelFormat, proResProfile, puppeteerTimeout, quality, scale, } = await cli_1.CliInternals.getCliOptions({
|
|
41
|
+
const { chromiumOptions, codec, crf, envVariables, frameRange, imageFormat, inputProps, logLevel, pixelFormat, proResProfile, puppeteerTimeout, quality, scale, everyNthFrame, numberOfGifLoops, } = await cli_1.CliInternals.getCliOptions({
|
|
42
42
|
type: 'series',
|
|
43
43
|
isLambda: true,
|
|
44
44
|
});
|
|
@@ -72,6 +72,8 @@ const renderCommand = async (args) => {
|
|
|
72
72
|
timeoutInMilliseconds: puppeteerTimeout,
|
|
73
73
|
chromiumOptions,
|
|
74
74
|
scale,
|
|
75
|
+
numberOfGifLoops,
|
|
76
|
+
everyNthFrame,
|
|
75
77
|
concurrencyPerLambda: args_1.parsedLambdaCli['concurrency-per-lambda'],
|
|
76
78
|
});
|
|
77
79
|
const totalSteps = outName ? 5 : 4;
|
|
@@ -4,9 +4,9 @@ exports.isValidOptimizationProfile = void 0;
|
|
|
4
4
|
const renderer_1 = require("@remotion/renderer");
|
|
5
5
|
const isValidOptimizationProfile = (profile) => {
|
|
6
6
|
return profile.every((timing) => {
|
|
7
|
-
const frames = renderer_1.RenderInternals.
|
|
7
|
+
const frames = renderer_1.RenderInternals.getFramesToRender(timing.frameRange, 1);
|
|
8
8
|
const values = Object.values(timing.timings);
|
|
9
|
-
return frames === values.length && values.every((v) => v > 0);
|
|
9
|
+
return frames.length === values.length && values.every((v) => v > 0);
|
|
10
10
|
});
|
|
11
11
|
};
|
|
12
12
|
exports.isValidOptimizationProfile = isValidOptimizationProfile;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import type { OptimizationProfile } from './types';
|
|
2
|
-
export declare const planFrameRanges: ({
|
|
3
|
-
chunkCount: number;
|
|
2
|
+
export declare const planFrameRanges: ({ framesPerLambda, optimization, shouldUseOptimization, frameRange, everyNthFrame, }: {
|
|
4
3
|
framesPerLambda: number;
|
|
5
4
|
optimization: OptimizationProfile | null;
|
|
6
5
|
shouldUseOptimization: boolean;
|
|
7
6
|
frameRange: [number, number];
|
|
7
|
+
everyNthFrame: number;
|
|
8
8
|
}) => {
|
|
9
9
|
chunks: [number, number][];
|
|
10
10
|
didUseOptimization: boolean;
|
|
@@ -3,7 +3,9 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.planFrameRanges = void 0;
|
|
4
4
|
const renderer_1 = require("@remotion/renderer");
|
|
5
5
|
const can_use_optimization_1 = require("./can-use-optimization");
|
|
6
|
-
const planFrameRanges = ({
|
|
6
|
+
const planFrameRanges = ({ framesPerLambda, optimization, shouldUseOptimization, frameRange, everyNthFrame, }) => {
|
|
7
|
+
const framesToRender = renderer_1.RenderInternals.getFramesToRender(frameRange, everyNthFrame);
|
|
8
|
+
const chunkCount = Math.ceil(framesToRender.length / framesPerLambda);
|
|
7
9
|
if ((0, can_use_optimization_1.canUseOptimization)({
|
|
8
10
|
optimization,
|
|
9
11
|
framesPerLambda,
|
|
@@ -15,13 +17,12 @@ const planFrameRanges = ({ chunkCount, framesPerLambda, optimization, shouldUseO
|
|
|
15
17
|
didUseOptimization: true,
|
|
16
18
|
};
|
|
17
19
|
}
|
|
18
|
-
const
|
|
20
|
+
const firstFrame = frameRange[0];
|
|
19
21
|
return {
|
|
20
22
|
chunks: new Array(chunkCount).fill(1).map((_, i) => {
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
];
|
|
23
|
+
const start = i * framesPerLambda * everyNthFrame + firstFrame;
|
|
24
|
+
const end = Math.min(framesToRender[framesToRender.length - 1], (i + 1) * framesPerLambda * everyNthFrame - 1) + firstFrame;
|
|
25
|
+
return [start, end];
|
|
25
26
|
}),
|
|
26
27
|
didUseOptimization: false,
|
|
27
28
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { AwsRegion } from '../../pricing/aws-regions';
|
|
2
2
|
import type { LambdaCodec } from '../../shared/validate-lambda-codec';
|
|
3
|
-
export declare const concatVideosS3: ({ bucket, expectedFiles, onProgress, numberOfFrames, renderId, region, codec, expectedBucketOwner, fps, }: {
|
|
3
|
+
export declare const concatVideosS3: ({ bucket, expectedFiles, onProgress, numberOfFrames, renderId, region, codec, expectedBucketOwner, fps, numberOfGifLoops, }: {
|
|
4
4
|
bucket: string;
|
|
5
5
|
expectedFiles: number;
|
|
6
6
|
onProgress: (frames: number, encodingStart: number) => void;
|
|
@@ -10,6 +10,7 @@ export declare const concatVideosS3: ({ bucket, expectedFiles, onProgress, numbe
|
|
|
10
10
|
codec: LambdaCodec;
|
|
11
11
|
expectedBucketOwner: string;
|
|
12
12
|
fps: number;
|
|
13
|
+
numberOfGifLoops: number | null;
|
|
13
14
|
}) => Promise<{
|
|
14
15
|
outfile: string;
|
|
15
16
|
cleanupChunksProm: Promise<void>;
|
|
@@ -112,7 +112,7 @@ const getAllFilesS3 = ({ bucket, expectedFiles, outdir, renderId, region, expect
|
|
|
112
112
|
loop();
|
|
113
113
|
});
|
|
114
114
|
};
|
|
115
|
-
const concatVideosS3 = async ({ bucket, expectedFiles, onProgress, numberOfFrames, renderId, region, codec, expectedBucketOwner, fps, }) => {
|
|
115
|
+
const concatVideosS3 = async ({ bucket, expectedFiles, onProgress, numberOfFrames, renderId, region, codec, expectedBucketOwner, fps, numberOfGifLoops, }) => {
|
|
116
116
|
var _a;
|
|
117
117
|
const outdir = (0, path_1.join)(renderer_1.RenderInternals.tmpDir(constants_1.CONCAT_FOLDER_TOKEN), 'bucket');
|
|
118
118
|
if ((0, fs_1.existsSync)(outdir)) {
|
|
@@ -142,6 +142,7 @@ const concatVideosS3 = async ({ bucket, expectedFiles, onProgress, numberOfFrame
|
|
|
142
142
|
numberOfFrames,
|
|
143
143
|
codec: codecForCombining,
|
|
144
144
|
fps,
|
|
145
|
+
numberOfGifLoops,
|
|
145
146
|
});
|
|
146
147
|
combine.end();
|
|
147
148
|
const cleanupChunksProm = ((_a = fs_1.default.promises.rm) !== null && _a !== void 0 ? _a : fs_1.default.promises.rmdir)(outdir, {
|
package/dist/functions/launch.js
CHANGED
|
@@ -68,15 +68,15 @@ const innerLaunchHandler = async (params, options) => {
|
|
|
68
68
|
port: null,
|
|
69
69
|
});
|
|
70
70
|
remotion_1.Internals.validateDurationInFrames(comp.durationInFrames, 'passed to <Component />');
|
|
71
|
-
remotion_1.Internals.validateFps(comp.fps, 'passed to <Component />');
|
|
71
|
+
remotion_1.Internals.validateFps(comp.fps, 'passed to <Component />', null);
|
|
72
72
|
remotion_1.Internals.validateDimension(comp.height, 'height', 'passed to <Component />');
|
|
73
73
|
remotion_1.Internals.validateDimension(comp.width, 'width', 'passed to <Component />');
|
|
74
74
|
renderer_1.RenderInternals.validateConcurrency(params.concurrencyPerLambda, 'concurrencyPerLambda');
|
|
75
75
|
const realFrameRange = renderer_1.RenderInternals.getRealFrameRange(comp.durationInFrames, params.frameRange);
|
|
76
|
-
const frameCount = renderer_1.RenderInternals.
|
|
77
|
-
const framesPerLambda = (_a = params.framesPerLambda) !== null && _a !== void 0 ? _a : (0, best_frames_per_lambda_param_1.bestFramesPerLambdaParam)(frameCount);
|
|
76
|
+
const frameCount = renderer_1.RenderInternals.getFramesToRender(realFrameRange, params.everyNthFrame);
|
|
77
|
+
const framesPerLambda = (_a = params.framesPerLambda) !== null && _a !== void 0 ? _a : (0, best_frames_per_lambda_param_1.bestFramesPerLambdaParam)(frameCount.length);
|
|
78
78
|
(0, validate_frames_per_lambda_1.validateFramesPerLambda)(framesPerLambda);
|
|
79
|
-
const chunkCount = Math.ceil(frameCount / framesPerLambda);
|
|
79
|
+
const chunkCount = Math.ceil(frameCount.length / framesPerLambda);
|
|
80
80
|
if (chunkCount > constants_1.MAX_FUNCTIONS_PER_RENDER) {
|
|
81
81
|
throw new Error(`Too many functions: This render would cause ${chunkCount} functions to spawn. We limit this amount to ${constants_1.MAX_FUNCTIONS_PER_RENDER} functions as more would result in diminishing returns. Values set: frameCount = ${frameCount}, framesPerLambda=${framesPerLambda}. See ${docs_url_1.DOCS_URL}/docs/lambda/concurrency for how this parameter is calculated.`);
|
|
82
82
|
}
|
|
@@ -84,12 +84,12 @@ const innerLaunchHandler = async (params, options) => {
|
|
|
84
84
|
(0, validate_privacy_1.validatePrivacy)(params.privacy);
|
|
85
85
|
renderer_1.RenderInternals.validatePuppeteerTimeout(params.timeoutInMilliseconds);
|
|
86
86
|
const { chunks, didUseOptimization } = (0, plan_frame_ranges_1.planFrameRanges)({
|
|
87
|
-
chunkCount,
|
|
88
87
|
framesPerLambda,
|
|
89
88
|
optimization,
|
|
90
89
|
// TODO: Re-enable chunk optimization later
|
|
91
90
|
shouldUseOptimization: false,
|
|
92
91
|
frameRange: realFrameRange,
|
|
92
|
+
everyNthFrame: params.everyNthFrame,
|
|
93
93
|
});
|
|
94
94
|
const sortedChunks = chunks.slice().sort((a, b) => a[0] - b[0]);
|
|
95
95
|
const invokers = Math.round(Math.sqrt(chunks.length));
|
|
@@ -123,6 +123,7 @@ const innerLaunchHandler = async (params, options) => {
|
|
|
123
123
|
timeoutInMilliseconds: params.timeoutInMilliseconds,
|
|
124
124
|
chromiumOptions: params.chromiumOptions,
|
|
125
125
|
scale: params.scale,
|
|
126
|
+
everyNthFrame: params.everyNthFrame,
|
|
126
127
|
concurrencyPerLambda: params.concurrencyPerLambda,
|
|
127
128
|
};
|
|
128
129
|
return payload;
|
|
@@ -175,7 +176,7 @@ const innerLaunchHandler = async (params, options) => {
|
|
|
175
176
|
let lastProgressUploaded = 0;
|
|
176
177
|
let encodingStop = null;
|
|
177
178
|
const onProgress = (framesEncoded, start) => {
|
|
178
|
-
const relativeProgress = framesEncoded / frameCount;
|
|
179
|
+
const relativeProgress = framesEncoded / frameCount.length;
|
|
179
180
|
const deltaSinceLastProgressUploaded = relativeProgress - lastProgressUploaded;
|
|
180
181
|
if (relativeProgress === 1) {
|
|
181
182
|
encodingStop = Date.now();
|
|
@@ -186,7 +187,7 @@ const innerLaunchHandler = async (params, options) => {
|
|
|
186
187
|
lastProgressUploaded = relativeProgress;
|
|
187
188
|
const encodingProgress = {
|
|
188
189
|
framesEncoded,
|
|
189
|
-
totalFrames: frameCount,
|
|
190
|
+
totalFrames: frameCount.length,
|
|
190
191
|
doneIn: encodingStop ? encodingStop - start : null,
|
|
191
192
|
timeToInvoke: null,
|
|
192
193
|
};
|
|
@@ -218,16 +219,18 @@ const innerLaunchHandler = async (params, options) => {
|
|
|
218
219
|
});
|
|
219
220
|
});
|
|
220
221
|
};
|
|
222
|
+
const fps = comp.fps / params.everyNthFrame;
|
|
221
223
|
const { outfile, cleanupChunksProm, encodingStart } = await (0, concat_videos_1.concatVideosS3)({
|
|
222
224
|
bucket: params.bucketName,
|
|
223
225
|
expectedFiles: chunkCount,
|
|
224
226
|
onProgress,
|
|
225
|
-
numberOfFrames: frameCount,
|
|
227
|
+
numberOfFrames: frameCount.length,
|
|
226
228
|
renderId: params.renderId,
|
|
227
229
|
region: (0, get_current_region_1.getCurrentRegionInFunction)(),
|
|
228
230
|
codec: params.codec,
|
|
229
231
|
expectedBucketOwner: options.expectedBucketOwner,
|
|
230
|
-
fps
|
|
232
|
+
fps,
|
|
233
|
+
numberOfGifLoops: params.numberOfGifLoops,
|
|
231
234
|
});
|
|
232
235
|
if (!encodingStop) {
|
|
233
236
|
encodingStop = Date.now();
|
|
@@ -265,6 +268,7 @@ const innerLaunchHandler = async (params, options) => {
|
|
|
265
268
|
framesPerLambda,
|
|
266
269
|
lambdaVersion: constants_1.CURRENT_VERSION,
|
|
267
270
|
frameRange: realFrameRange,
|
|
271
|
+
everyNthFrame: params.everyNthFrame,
|
|
268
272
|
},
|
|
269
273
|
expectedBucketOwner: options.expectedBucketOwner,
|
|
270
274
|
compositionId: params.composition,
|
|
@@ -283,8 +287,8 @@ const innerLaunchHandler = async (params, options) => {
|
|
|
283
287
|
}),
|
|
284
288
|
]);
|
|
285
289
|
const finalEncodingProgress = {
|
|
286
|
-
framesEncoded: frameCount,
|
|
287
|
-
totalFrames: frameCount,
|
|
290
|
+
framesEncoded: frameCount.length,
|
|
291
|
+
totalFrames: frameCount.length,
|
|
288
292
|
doneIn: encodingStop ? encodingStop - encodingStart : null,
|
|
289
293
|
timeToInvoke: (0, get_lambdas_invoked_stats_1.getLambdasInvokedStats)(contents, params.renderId, renderMetadata.estimatedRenderLambdaInvokations, renderMetadata.startedDate).timeToInvokeLambdas,
|
|
290
294
|
};
|
|
@@ -41,6 +41,7 @@ const renderHandler = async (params, options, logs) => {
|
|
|
41
41
|
};
|
|
42
42
|
const outdir = renderer_1.RenderInternals.tmpDir(constants_1.RENDERER_PATH_TOKEN);
|
|
43
43
|
const outputLocation = path_1.default.join(outdir, `localchunk-${String(params.chunk).padStart(8, '0')}.${renderer_1.RenderInternals.getFileExtensionFromCodec(params.codec, 'chunk')}`);
|
|
44
|
+
const chunkCodec = params.codec === 'gif' ? 'h264-mkv' : params.codec;
|
|
44
45
|
await (0, renderer_1.renderMedia)({
|
|
45
46
|
composition: {
|
|
46
47
|
id: params.composition,
|
|
@@ -57,8 +58,8 @@ const renderHandler = async (params, options, logs) => {
|
|
|
57
58
|
remotion_1.Internals.Logging.isEqualOrBelowLogLevel(params.logLevel, 'verbose')) {
|
|
58
59
|
console.log(`Rendered ${renderedFrames} frames, encoded ${encodedFrames} frames, stage = ${stitchStage}`);
|
|
59
60
|
}
|
|
60
|
-
const
|
|
61
|
-
if (renderedFrames ===
|
|
61
|
+
const allFrames = renderer_1.RenderInternals.getFramesToRender(params.frameRange, params.everyNthFrame);
|
|
62
|
+
if (renderedFrames === allFrames.length) {
|
|
62
63
|
console.log('Rendered all frames!');
|
|
63
64
|
}
|
|
64
65
|
chunkTimingData.timings[renderedFrames] = Date.now() - start;
|
|
@@ -94,7 +95,7 @@ const renderHandler = async (params, options, logs) => {
|
|
|
94
95
|
logs.push(log);
|
|
95
96
|
},
|
|
96
97
|
outputLocation,
|
|
97
|
-
codec:
|
|
98
|
+
codec: chunkCodec,
|
|
98
99
|
crf: (_b = params.crf) !== null && _b !== void 0 ? _b : undefined,
|
|
99
100
|
ffmpegExecutable: process.env.NODE_ENV === 'test' ? null : '/opt/bin/ffmpeg',
|
|
100
101
|
pixelFormat: params.pixelFormat,
|
|
@@ -108,6 +109,8 @@ const renderHandler = async (params, options, logs) => {
|
|
|
108
109
|
scale: params.scale,
|
|
109
110
|
timeoutInMilliseconds: params.timeoutInMilliseconds,
|
|
110
111
|
port: null,
|
|
112
|
+
everyNthFrame: params.everyNthFrame,
|
|
113
|
+
numberOfGifLoops: null,
|
|
111
114
|
});
|
|
112
115
|
const endRendered = Date.now();
|
|
113
116
|
console.log('Adding silent audio, chunk', params.chunk);
|
package/dist/functions/start.js
CHANGED
|
@@ -40,6 +40,8 @@ const startHandler = async (params) => {
|
|
|
40
40
|
timeoutInMilliseconds: params.timeoutInMilliseconds,
|
|
41
41
|
chromiumOptions: params.chromiumOptions,
|
|
42
42
|
scale: params.scale,
|
|
43
|
+
numberOfGifLoops: params.numberOfGifLoops,
|
|
44
|
+
everyNthFrame: params.everyNthFrame,
|
|
43
45
|
concurrencyPerLambda: params.concurrencyPerLambda,
|
|
44
46
|
};
|
|
45
47
|
await (0, aws_clients_1.getLambdaClient)((0, get_current_region_1.getCurrentRegionInFunction)()).send(new client_lambda_1.InvokeCommand({
|
|
@@ -108,6 +108,8 @@ export declare type LambdaPayloads = {
|
|
|
108
108
|
timeoutInMilliseconds: number;
|
|
109
109
|
chromiumOptions: ChromiumOptions;
|
|
110
110
|
scale: number;
|
|
111
|
+
everyNthFrame: number;
|
|
112
|
+
numberOfGifLoops: number | null;
|
|
111
113
|
concurrencyPerLambda: number;
|
|
112
114
|
};
|
|
113
115
|
launch: {
|
|
@@ -133,6 +135,8 @@ export declare type LambdaPayloads = {
|
|
|
133
135
|
timeoutInMilliseconds: number;
|
|
134
136
|
chromiumOptions: ChromiumOptions;
|
|
135
137
|
scale: number;
|
|
138
|
+
everyNthFrame: number;
|
|
139
|
+
numberOfGifLoops: number | null;
|
|
136
140
|
concurrencyPerLambda: number;
|
|
137
141
|
};
|
|
138
142
|
status: {
|
|
@@ -168,6 +172,7 @@ export declare type LambdaPayloads = {
|
|
|
168
172
|
timeoutInMilliseconds: number;
|
|
169
173
|
chromiumOptions: ChromiumOptions;
|
|
170
174
|
scale: number;
|
|
175
|
+
everyNthFrame: number;
|
|
171
176
|
};
|
|
172
177
|
still: {
|
|
173
178
|
type: LambdaRoutines.still;
|
|
@@ -215,7 +220,7 @@ export declare type RenderMetadata = {
|
|
|
215
220
|
renderId: string;
|
|
216
221
|
outName: OutNameInput | undefined;
|
|
217
222
|
};
|
|
218
|
-
export declare type LambdaVersions = '2022-07-12' | '2022-07-10' | '2022-07-09' | '2022-07-08' | '2022-07-04' | '2022-06-30' | '2022-06-29' | '2022-06-25' | '2022-06-22' | '2022-06-21' | '2022-06-14' | '2022-06-08' | '2022-06-07' | '2022-06-02' | '2022-05-31' | '2022-05-28' | '2022-05-27' | '2022-05-19' | '2022-05-16' | '2022-05-11' | '2022-05-07' | '2022-05-06' | '2022-05-03' | '2022-04-20' | '2022-04-19' | '2022-04-18' | '2022-04-09' | '2022-04-08' | '2022-04-05' | '2022-04-02' | '2022-03-29' | '2022-03-17' | '2022-03-02' | '2022-03-01' | '2022-02-27' | '2022-02-14' | '2022-02-12' | '2022-02-09' | '2022-02-08' | '2022-02-07' | '2022-02-06' | '2022-02-05' | '2022-02-04' | '2022-02-03' | '2022-01-23' | '2022-01-19' | '2022-01-11' | '2022-01-10' | '2022-01-09' | '2022-01-06' | '2022-01-05' | '2021-12-22' | '2021-12-17' | '2021-12-16' | '2021-12-15' | '2021-12-14' | '2021-12-13' | '2021-12-11' | '2021-12-10' | '2021-12-04' | '2021-11-29' | '2021-11-27' | '2021-11-24' | '2021-11-22' | '2021-11-19' | '2021-11-18' | '2021-11-15' | '2021-11-12' | '2021-11-10' | '2021-11-01' | '2021-10-29' | '2021-10-27' | '2021-10-21' | '2021-10-19' | '2021-10-07' | '2021-10-03' | '2021-10-01' | '2021-09-15' | '2021-09-06' | '2021-08-06' | '2021-07-14' | '2021-07-05' | '2021-07-02' | '2021-06-23' | 'n/a';
|
|
223
|
+
export declare type LambdaVersions = '2022-07-14' | '2022-07-12' | '2022-07-10' | '2022-07-09' | '2022-07-08' | '2022-07-04' | '2022-06-30' | '2022-06-29' | '2022-06-25' | '2022-06-22' | '2022-06-21' | '2022-06-14' | '2022-06-08' | '2022-06-07' | '2022-06-02' | '2022-05-31' | '2022-05-28' | '2022-05-27' | '2022-05-19' | '2022-05-16' | '2022-05-11' | '2022-05-07' | '2022-05-06' | '2022-05-03' | '2022-04-20' | '2022-04-19' | '2022-04-18' | '2022-04-09' | '2022-04-08' | '2022-04-05' | '2022-04-02' | '2022-03-29' | '2022-03-17' | '2022-03-02' | '2022-03-01' | '2022-02-27' | '2022-02-14' | '2022-02-12' | '2022-02-09' | '2022-02-08' | '2022-02-07' | '2022-02-06' | '2022-02-05' | '2022-02-04' | '2022-02-03' | '2022-01-23' | '2022-01-19' | '2022-01-11' | '2022-01-10' | '2022-01-09' | '2022-01-06' | '2022-01-05' | '2021-12-22' | '2021-12-17' | '2021-12-16' | '2021-12-15' | '2021-12-14' | '2021-12-13' | '2021-12-11' | '2021-12-10' | '2021-12-04' | '2021-11-29' | '2021-11-27' | '2021-11-24' | '2021-11-22' | '2021-11-19' | '2021-11-18' | '2021-11-15' | '2021-11-12' | '2021-11-10' | '2021-11-01' | '2021-10-29' | '2021-10-27' | '2021-10-21' | '2021-10-19' | '2021-10-07' | '2021-10-03' | '2021-10-01' | '2021-09-15' | '2021-09-06' | '2021-08-06' | '2021-07-14' | '2021-07-05' | '2021-07-02' | '2021-06-23' | 'n/a';
|
|
219
224
|
export declare const CURRENT_VERSION: LambdaVersions;
|
|
220
225
|
export declare type PostRenderData = {
|
|
221
226
|
cost: {
|
package/dist/shared/constants.js
CHANGED
|
@@ -84,6 +84,6 @@ var LambdaRoutines;
|
|
|
84
84
|
LambdaRoutines["renderer"] = "renderer";
|
|
85
85
|
LambdaRoutines["still"] = "still";
|
|
86
86
|
})(LambdaRoutines = exports.LambdaRoutines || (exports.LambdaRoutines = {}));
|
|
87
|
-
exports.CURRENT_VERSION = '2022-07-
|
|
87
|
+
exports.CURRENT_VERSION = '2022-07-14';
|
|
88
88
|
exports.LAMBDA_CONCURRENCY_LIMIT_QUOTA = 'L-B99A9384';
|
|
89
89
|
exports.LAMBDA_BURST_LIMIT_QUOTA = 'L-548AE339';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
declare const lambdaCodecs: readonly ["h264-mkv", "h264", "vp8", "mp3", "aac", "wav"];
|
|
1
|
+
declare const lambdaCodecs: readonly ["h264-mkv", "h264", "vp8", "mp3", "aac", "wav", "gif"];
|
|
2
2
|
export declare type LambdaCodec = typeof lambdaCodecs[number];
|
|
3
3
|
export declare const validateLambdaCodec: (codec: unknown) => LambdaCodec;
|
|
4
4
|
export {};
|
|
@@ -1,7 +1,15 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.validateLambdaCodec = void 0;
|
|
4
|
-
const lambdaCodecs = [
|
|
4
|
+
const lambdaCodecs = [
|
|
5
|
+
'h264-mkv',
|
|
6
|
+
'h264',
|
|
7
|
+
'vp8',
|
|
8
|
+
'mp3',
|
|
9
|
+
'aac',
|
|
10
|
+
'wav',
|
|
11
|
+
'gif',
|
|
12
|
+
];
|
|
5
13
|
const validateLambdaCodec = (codec) => {
|
|
6
14
|
if (typeof codec !== 'string') {
|
|
7
15
|
throw new TypeError('"codec" must be a string ');
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@remotion/lambda",
|
|
3
|
-
"version": "3.0
|
|
3
|
+
"version": "3.1.0",
|
|
4
4
|
"description": "Distributed renderer for Remotion based on AWS Lambda",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"sideEffects": false,
|
|
@@ -31,12 +31,12 @@
|
|
|
31
31
|
"@aws-sdk/client-service-quotas": "3.58.0",
|
|
32
32
|
"@aws-sdk/lib-storage": "3.58.0",
|
|
33
33
|
"@aws-sdk/s3-request-presigner": "3.58.0",
|
|
34
|
-
"@remotion/bundler": "3.0
|
|
35
|
-
"@remotion/cli": "3.0
|
|
36
|
-
"@remotion/renderer": "3.0
|
|
34
|
+
"@remotion/bundler": "3.1.0",
|
|
35
|
+
"@remotion/cli": "3.1.0",
|
|
36
|
+
"@remotion/renderer": "3.1.0",
|
|
37
37
|
"aws-policies": "^1.0.1",
|
|
38
38
|
"mime-types": "2.1.34",
|
|
39
|
-
"remotion": "3.0
|
|
39
|
+
"remotion": "3.1.0"
|
|
40
40
|
},
|
|
41
41
|
"peerDependencies": {
|
|
42
42
|
"react": ">=16.8.0",
|
|
@@ -61,5 +61,5 @@
|
|
|
61
61
|
"publishConfig": {
|
|
62
62
|
"access": "public"
|
|
63
63
|
},
|
|
64
|
-
"gitHead": "
|
|
64
|
+
"gitHead": "482c66127662171577aa427f10fe265fa1bc933b"
|
|
65
65
|
}
|
package/remotionlambda.zip
CHANGED
|
Binary file
|