@remotion/lambda 4.0.126 → 4.0.128
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 +1 -0
- package/dist/api/render-media-on-lambda.js +31 -27
- package/dist/cli/commands/sites/create.js +6 -1
- package/dist/functions/chunk-optimization/plan-frame-ranges.d.ts +1 -4
- package/dist/functions/helpers/can-concat-seamlessly.d.ts +1 -1
- package/dist/functions/helpers/can-concat-seamlessly.js +2 -3
- package/dist/functions/helpers/concat-videos.js +4 -4
- package/dist/functions/helpers/merge-chunks.d.ts +2 -0
- package/dist/functions/helpers/merge-chunks.js +1 -0
- package/dist/functions/helpers/on-downloads-logger.d.ts +2 -2
- package/dist/functions/helpers/on-downloads-logger.js +6 -5
- package/dist/functions/index.js +1 -1
- package/dist/functions/launch.js +6 -2
- package/dist/functions/merge.js +1 -0
- package/dist/functions/renderer.js +11 -8
- package/dist/functions/still.js +1 -1
- package/dist/shared/constants.d.ts +2 -0
- package/dist/shared/invoke-webhook.d.ts +2 -0
- package/package.json +9 -8
- package/remotionlambda-arm64.zip +0 -0
|
@@ -52,6 +52,7 @@ export type RenderMediaOnLambdaOutput = {
|
|
|
52
52
|
folderInS3Console: string;
|
|
53
53
|
};
|
|
54
54
|
export declare const internalRenderMediaOnLambdaRaw: (input: InnerRenderMediaOnLambdaInput) => Promise<RenderMediaOnLambdaOutput>;
|
|
55
|
+
export declare const renderMediaOnLambdaOptionalToRequired: (options: RenderMediaOnLambdaInput) => InnerRenderMediaOnLambdaInput;
|
|
55
56
|
/**
|
|
56
57
|
* @description Triggers a render on a lambda given a composition and a lambda function.
|
|
57
58
|
* @see [Documentation](https://remotion.dev/docs/lambda/rendermediaonlambda)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.renderVideoOnLambda = exports.renderMediaOnLambda = exports.internalRenderMediaOnLambdaRaw = void 0;
|
|
3
|
+
exports.renderVideoOnLambda = exports.renderMediaOnLambda = exports.renderMediaOnLambdaOptionalToRequired = exports.internalRenderMediaOnLambdaRaw = void 0;
|
|
4
4
|
const pure_1 = require("@remotion/renderer/pure");
|
|
5
5
|
const call_lambda_1 = require("../shared/call-lambda");
|
|
6
6
|
const constants_1 = require("../shared/constants");
|
|
@@ -48,32 +48,9 @@ const internalRenderMediaOnLambdaRaw = async (input) => {
|
|
|
48
48
|
}
|
|
49
49
|
};
|
|
50
50
|
exports.internalRenderMediaOnLambdaRaw = internalRenderMediaOnLambdaRaw;
|
|
51
|
-
|
|
52
|
-
* @description Triggers a render on a lambda given a composition and a lambda function.
|
|
53
|
-
* @see [Documentation](https://remotion.dev/docs/lambda/rendermediaonlambda)
|
|
54
|
-
* @param params.functionName The name of the Lambda function that should be used
|
|
55
|
-
* @param params.serveUrl The URL of the deployed project
|
|
56
|
-
* @param params.composition The ID of the composition which should be rendered.
|
|
57
|
-
* @param params.inputProps The input props that should be passed to the composition.
|
|
58
|
-
* @param params.codec The media codec which should be used for encoding.
|
|
59
|
-
* @param params.imageFormat In which image format the frames should be rendered. Default "jpeg"
|
|
60
|
-
* @param params.crf The constant rate factor to be used during encoding.
|
|
61
|
-
* @param params.envVariables Object containing environment variables to be inserted into the video environment
|
|
62
|
-
* @param params.proResProfile The ProRes profile if rendering a ProRes video
|
|
63
|
-
* @param params.jpegQuality JPEG quality if JPEG was selected as the image format.
|
|
64
|
-
* @param params.region The AWS region in which the media should be rendered.
|
|
65
|
-
* @param params.maxRetries How often rendering a chunk may fail before the media render gets aborted. Default "1"
|
|
66
|
-
* @param params.logLevel Level of logging that Lambda function should perform. Default "info".
|
|
67
|
-
* @param params.webhook Configuration for webhook called upon completion or timeout of the render.
|
|
68
|
-
* @returns {Promise<RenderMediaOnLambdaOutput>} See documentation for detailed structure
|
|
69
|
-
*/
|
|
70
|
-
const renderMediaOnLambda = (options) => {
|
|
51
|
+
const renderMediaOnLambdaOptionalToRequired = (options) => {
|
|
71
52
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11;
|
|
72
|
-
|
|
73
|
-
if (options.quality) {
|
|
74
|
-
throw new Error('quality has been renamed to jpegQuality. Please rename the option.');
|
|
75
|
-
}
|
|
76
|
-
return wrapped({
|
|
53
|
+
return {
|
|
77
54
|
audioBitrate: (_a = options.audioBitrate) !== null && _a !== void 0 ? _a : null,
|
|
78
55
|
audioCodec: (_b = options.audioCodec) !== null && _b !== void 0 ? _b : null,
|
|
79
56
|
chromiumOptions: (_c = options.chromiumOptions) !== null && _c !== void 0 ? _c : {},
|
|
@@ -116,7 +93,34 @@ const renderMediaOnLambda = (options) => {
|
|
|
116
93
|
x264Preset: (_9 = options.x264Preset) !== null && _9 !== void 0 ? _9 : null,
|
|
117
94
|
deleteAfter: (_10 = options.deleteAfter) !== null && _10 !== void 0 ? _10 : null,
|
|
118
95
|
preferLossless: (_11 = options.preferLossless) !== null && _11 !== void 0 ? _11 : false,
|
|
119
|
-
}
|
|
96
|
+
};
|
|
97
|
+
};
|
|
98
|
+
exports.renderMediaOnLambdaOptionalToRequired = renderMediaOnLambdaOptionalToRequired;
|
|
99
|
+
/**
|
|
100
|
+
* @description Triggers a render on a lambda given a composition and a lambda function.
|
|
101
|
+
* @see [Documentation](https://remotion.dev/docs/lambda/rendermediaonlambda)
|
|
102
|
+
* @param params.functionName The name of the Lambda function that should be used
|
|
103
|
+
* @param params.serveUrl The URL of the deployed project
|
|
104
|
+
* @param params.composition The ID of the composition which should be rendered.
|
|
105
|
+
* @param params.inputProps The input props that should be passed to the composition.
|
|
106
|
+
* @param params.codec The media codec which should be used for encoding.
|
|
107
|
+
* @param params.imageFormat In which image format the frames should be rendered. Default "jpeg"
|
|
108
|
+
* @param params.crf The constant rate factor to be used during encoding.
|
|
109
|
+
* @param params.envVariables Object containing environment variables to be inserted into the video environment
|
|
110
|
+
* @param params.proResProfile The ProRes profile if rendering a ProRes video
|
|
111
|
+
* @param params.jpegQuality JPEG quality if JPEG was selected as the image format.
|
|
112
|
+
* @param params.region The AWS region in which the media should be rendered.
|
|
113
|
+
* @param params.maxRetries How often rendering a chunk may fail before the media render gets aborted. Default "1"
|
|
114
|
+
* @param params.logLevel Level of logging that Lambda function should perform. Default "info".
|
|
115
|
+
* @param params.webhook Configuration for webhook called upon completion or timeout of the render.
|
|
116
|
+
* @returns {Promise<RenderMediaOnLambdaOutput>} See documentation for detailed structure
|
|
117
|
+
*/
|
|
118
|
+
const renderMediaOnLambda = (options) => {
|
|
119
|
+
const wrapped = pure_1.NoReactAPIs.wrapWithErrorHandling(exports.internalRenderMediaOnLambdaRaw);
|
|
120
|
+
if (options.quality) {
|
|
121
|
+
throw new Error('quality has been renamed to jpegQuality. Please rename the option.');
|
|
122
|
+
}
|
|
123
|
+
return wrapped((0, exports.renderMediaOnLambdaOptionalToRequired)(options));
|
|
120
124
|
};
|
|
121
125
|
exports.renderMediaOnLambda = renderMediaOnLambda;
|
|
122
126
|
/**
|
|
@@ -17,7 +17,12 @@ const log_1 = require("../../log");
|
|
|
17
17
|
exports.SITES_CREATE_SUBCOMMAND = 'create';
|
|
18
18
|
const sitesCreateSubcommand = async (args, remotionRoot, logLevel) => {
|
|
19
19
|
var _a, _b, _c;
|
|
20
|
-
const { file, reason } = cli_1.CliInternals.findEntryPoint(
|
|
20
|
+
const { file, reason } = cli_1.CliInternals.findEntryPoint({
|
|
21
|
+
args,
|
|
22
|
+
remotionRoot,
|
|
23
|
+
logLevel,
|
|
24
|
+
allowDirectory: false,
|
|
25
|
+
});
|
|
21
26
|
if (!file) {
|
|
22
27
|
log_1.Log.error({ indent: false, logLevel }, 'No entry file passed.');
|
|
23
28
|
log_1.Log.info({ indent: false, logLevel }, 'Pass an additional argument specifying the entry file of your Remotion project:');
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import type { AudioCodec } from '@remotion/renderer';
|
|
2
|
-
export declare const canConcatAudioSeamlessly: (
|
|
2
|
+
export declare const canConcatAudioSeamlessly: (audioCodec: AudioCodec | null) => boolean;
|
|
3
3
|
export declare const canConcatVideoSeamlessly: (codec: string) => boolean;
|
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.canConcatVideoSeamlessly = exports.canConcatAudioSeamlessly = void 0;
|
|
4
|
-
// Temporarily disable seamless audio concat
|
|
5
4
|
// Cannot do WAV yet, because currently assumes AAC in+outpoint
|
|
6
5
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
7
|
-
const canConcatAudioSeamlessly = (
|
|
8
|
-
return
|
|
6
|
+
const canConcatAudioSeamlessly = (audioCodec) => {
|
|
7
|
+
return audioCodec === 'aac';
|
|
9
8
|
};
|
|
10
9
|
exports.canConcatAudioSeamlessly = canConcatAudioSeamlessly;
|
|
11
10
|
const canConcatVideoSeamlessly = (codec) => {
|
|
@@ -77,9 +77,9 @@ const getAllFilesS3 = ({ bucket, expectedFiles, outdir, renderId, region, expect
|
|
|
77
77
|
const { filesInBucket, errorContents } = await getFiles();
|
|
78
78
|
const checkFinish = () => {
|
|
79
79
|
const areAllFilesDownloaded = Object.keys(downloaded).length === expectedFiles;
|
|
80
|
-
|
|
80
|
+
renderer_1.RenderInternals.Log.info({ indent: false, logLevel }, 'Checking for finish... ', Object.keys(downloaded), expectedFiles + ' files expected');
|
|
81
81
|
if (areAllFilesDownloaded) {
|
|
82
|
-
|
|
82
|
+
renderer_1.RenderInternals.Log.info({ indent: false, logLevel }, 'All files are downloaded!');
|
|
83
83
|
resolve(
|
|
84
84
|
// Need to use downloaded variable, not filesInBucket
|
|
85
85
|
// as it may be out of date
|
|
@@ -88,7 +88,7 @@ const getAllFilesS3 = ({ bucket, expectedFiles, outdir, renderId, region, expect
|
|
|
88
88
|
.map((file) => getChunkDownloadOutputLocation({ outdir, file })));
|
|
89
89
|
}
|
|
90
90
|
};
|
|
91
|
-
|
|
91
|
+
renderer_1.RenderInternals.Log.info({ indent: false, logLevel }, 'Found ', filesInBucket);
|
|
92
92
|
const errors = (await (0, inspect_errors_1.inspectErrors)({
|
|
93
93
|
bucket,
|
|
94
94
|
contents: errorContents,
|
|
@@ -136,7 +136,7 @@ const getAllFilesS3 = ({ bucket, expectedFiles, outdir, renderId, region, expect
|
|
|
136
136
|
exports.getAllFilesS3 = getAllFilesS3;
|
|
137
137
|
const concatVideosS3 = async ({ onProgress, numberOfFrames, codec, fps, numberOfGifLoops, files, outdir, audioCodec, audioBitrate, logLevel, framesPerLambda, binariesDirectory, cancelSignal, preferLossless, }) => {
|
|
138
138
|
const outfile = (0, node_path_1.join)(renderer_1.RenderInternals.tmpDir(constants_1.REMOTION_CONCATED_TOKEN), `concat.${renderer_1.RenderInternals.getFileExtensionFromCodec(codec, audioCodec)}`);
|
|
139
|
-
const combine = (0, timer_1.timer)('Combine
|
|
139
|
+
const combine = (0, timer_1.timer)('Combine chunks', logLevel);
|
|
140
140
|
const filelistDir = renderer_1.RenderInternals.tmpDir(constants_1.REMOTION_FILELIST_TOKEN);
|
|
141
141
|
const chunkDurationInSeconds = framesPerLambda / fps;
|
|
142
142
|
const resolvedAudioCodec = renderer_1.RenderInternals.resolveAudioCodec({
|
|
@@ -7,6 +7,7 @@ export type OnAllChunksAvailable = (options: {
|
|
|
7
7
|
inputProps: SerializedInputProps;
|
|
8
8
|
serializedResolvedProps: SerializedInputProps;
|
|
9
9
|
framesPerLambda: number;
|
|
10
|
+
compositionStart: number;
|
|
10
11
|
}) => void;
|
|
11
12
|
export declare const mergeChunksAndFinishRender: (options: {
|
|
12
13
|
bucketName: string;
|
|
@@ -32,4 +33,5 @@ export declare const mergeChunksAndFinishRender: (options: {
|
|
|
32
33
|
framesPerLambda: number;
|
|
33
34
|
binariesDirectory: string | null;
|
|
34
35
|
preferLossless: boolean;
|
|
36
|
+
compositionStart: number;
|
|
35
37
|
}) => Promise<PostRenderData>;
|
|
@@ -96,6 +96,7 @@ const mergeChunksAndFinishRender = async (options) => {
|
|
|
96
96
|
inputProps: options.inputProps,
|
|
97
97
|
serializedResolvedProps: options.serializedResolvedProps,
|
|
98
98
|
framesPerLambda: options.framesPerLambda,
|
|
99
|
+
compositionStart: options.compositionStart,
|
|
99
100
|
});
|
|
100
101
|
const encodingStart = Date.now();
|
|
101
102
|
const { outfile, cleanupChunksProm } = await (0, concat_videos_1.concatVideosS3)({
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import type { RenderMediaOnDownload } from '@remotion/renderer';
|
|
2
|
-
export declare const onDownloadsHelper: () => RenderMediaOnDownload;
|
|
1
|
+
import type { LogLevel, RenderMediaOnDownload } from '@remotion/renderer';
|
|
2
|
+
export declare const onDownloadsHelper: (logLevel: LogLevel) => RenderMediaOnDownload;
|
|
@@ -1,14 +1,15 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.onDownloadsHelper = void 0;
|
|
4
|
-
const
|
|
4
|
+
const renderer_1 = require("@remotion/renderer");
|
|
5
|
+
const onDownloadsHelper = (logLevel) => {
|
|
5
6
|
const downloads = {};
|
|
6
7
|
return (src) => {
|
|
7
|
-
|
|
8
|
+
renderer_1.RenderInternals.Log.info({ indent: false, logLevel }, 'Downloading', src);
|
|
8
9
|
downloads[src] = 0;
|
|
9
10
|
return ({ percent, downloaded }) => {
|
|
10
11
|
if (percent === null) {
|
|
11
|
-
|
|
12
|
+
renderer_1.RenderInternals.Log.info({ indent: false, logLevel }, `Download progress (${src}): ${downloaded} bytes. Don't know final size of download, no Content-Length header.`);
|
|
12
13
|
return;
|
|
13
14
|
}
|
|
14
15
|
if (
|
|
@@ -18,9 +19,9 @@ const onDownloadsHelper = () => {
|
|
|
18
19
|
return;
|
|
19
20
|
}
|
|
20
21
|
downloads[src] = percent;
|
|
21
|
-
|
|
22
|
+
renderer_1.RenderInternals.Log.info({ indent: false, logLevel }, `Download progress (${src}): ${downloaded} bytes, ${(percent * 100).toFixed(1)}%`);
|
|
22
23
|
if (percent === 1) {
|
|
23
|
-
|
|
24
|
+
renderer_1.RenderInternals.Log.info({ indent: false, logLevel }, `Download complete: ${src}`);
|
|
24
25
|
}
|
|
25
26
|
};
|
|
26
27
|
};
|
package/dist/functions/index.js
CHANGED
|
@@ -22,7 +22,7 @@ const innerHandler = async (params, responseStream, context) => {
|
|
|
22
22
|
(0, leak_detection_1.setCurrentRequestId)(context.awsRequestId);
|
|
23
23
|
process.env.__RESERVED_IS_INSIDE_REMOTION_LAMBDA = 'true';
|
|
24
24
|
const timeoutInMilliseconds = context.getRemainingTimeInMillis();
|
|
25
|
-
|
|
25
|
+
renderer_1.RenderInternals.Log.verbose({ indent: false, logLevel: params.logLevel }, 'AWS Request ID:', context.awsRequestId);
|
|
26
26
|
(0, leak_detection_1.stopLeakDetection)();
|
|
27
27
|
if (!(context === null || context === void 0 ? void 0 : context.invokedFunctionArn)) {
|
|
28
28
|
throw new Error('Lambda function unexpectedly does not have context.invokedFunctionArn');
|
package/dist/functions/launch.js
CHANGED
|
@@ -142,6 +142,7 @@ const innerLaunchHandler = async ({ functionName, params, options, onAllChunksAv
|
|
|
142
142
|
userSpecifiedBucketName: params.bucketName,
|
|
143
143
|
needsToUpload,
|
|
144
144
|
});
|
|
145
|
+
const fps = comp.fps / params.everyNthFrame;
|
|
145
146
|
const lambdaPayloads = chunks.map((chunkPayload) => {
|
|
146
147
|
var _a;
|
|
147
148
|
const payload = {
|
|
@@ -187,6 +188,7 @@ const innerLaunchHandler = async ({ functionName, params, options, onAllChunksAv
|
|
|
187
188
|
deleteAfter: params.deleteAfter,
|
|
188
189
|
colorSpace: params.colorSpace,
|
|
189
190
|
preferLossless: params.preferLossless,
|
|
191
|
+
compositionStart: realFrameRange[0],
|
|
190
192
|
};
|
|
191
193
|
return payload;
|
|
192
194
|
});
|
|
@@ -261,7 +263,6 @@ const innerLaunchHandler = async ({ functionName, params, options, onAllChunksAv
|
|
|
261
263
|
await callFunctionWithRetry({ payload, retries: 0, functionName });
|
|
262
264
|
}));
|
|
263
265
|
reqSend.end();
|
|
264
|
-
const fps = comp.fps / params.everyNthFrame;
|
|
265
266
|
const postRenderData = await (0, merge_chunks_1.mergeChunksAndFinishRender)({
|
|
266
267
|
bucketName: params.bucketName,
|
|
267
268
|
renderId: params.renderId,
|
|
@@ -286,6 +287,7 @@ const innerLaunchHandler = async ({ functionName, params, options, onAllChunksAv
|
|
|
286
287
|
framesPerLambda,
|
|
287
288
|
binariesDirectory: null,
|
|
288
289
|
preferLossless: params.preferLossless,
|
|
290
|
+
compositionStart: realFrameRange[0],
|
|
289
291
|
});
|
|
290
292
|
return postRenderData;
|
|
291
293
|
};
|
|
@@ -318,6 +320,7 @@ const launchHandler = async (params, options) => {
|
|
|
318
320
|
logLevel: params.logLevel,
|
|
319
321
|
framesPerLambda: allChunksAvailable.framesPerLambda,
|
|
320
322
|
preferLossless: params.preferLossless,
|
|
323
|
+
compositionStart: allChunksAvailable.compositionStart,
|
|
321
324
|
},
|
|
322
325
|
retries: 2,
|
|
323
326
|
});
|
|
@@ -411,11 +414,12 @@ const launchHandler = async (params, options) => {
|
|
|
411
414
|
functionName,
|
|
412
415
|
params,
|
|
413
416
|
options,
|
|
414
|
-
onAllChunksAvailable: ({ inputProps, serializedResolvedProps, framesPerLambda, }) => {
|
|
417
|
+
onAllChunksAvailable: ({ inputProps, serializedResolvedProps, framesPerLambda, compositionStart, }) => {
|
|
415
418
|
allChunksAvailable = {
|
|
416
419
|
inputProps,
|
|
417
420
|
serializedResolvedProps,
|
|
418
421
|
framesPerLambda,
|
|
422
|
+
compositionStart,
|
|
419
423
|
};
|
|
420
424
|
},
|
|
421
425
|
});
|
package/dist/functions/merge.js
CHANGED
|
@@ -57,6 +57,7 @@ const mergeHandler = async (params, options) => {
|
|
|
57
57
|
framesPerLambda: params.framesPerLambda,
|
|
58
58
|
binariesDirectory: null,
|
|
59
59
|
preferLossless: params.preferLossless,
|
|
60
|
+
compositionStart: params.compositionStart,
|
|
60
61
|
});
|
|
61
62
|
return { type: 'success', postRenderData };
|
|
62
63
|
};
|
|
@@ -82,9 +82,11 @@ const renderHandler = async (params, options, logs) => {
|
|
|
82
82
|
? renderer_1.RenderInternals.getExtensionFromAudioCodec(audioCodec)
|
|
83
83
|
: null;
|
|
84
84
|
const videoOutputLocation = node_path_1.default.join(outdir, `${chunk}.${videoExtension}`);
|
|
85
|
-
const audioOutputLocation =
|
|
86
|
-
?
|
|
87
|
-
:
|
|
85
|
+
const audioOutputLocation = renderer_1.RenderInternals.isAudioCodec(params.codec)
|
|
86
|
+
? null
|
|
87
|
+
: audioExtension
|
|
88
|
+
? node_path_1.default.join(outdir, `${chunk}.${audioExtension}`)
|
|
89
|
+
: null;
|
|
88
90
|
const resolvedProps = await resolvedPropsPromise;
|
|
89
91
|
const serializedInputPropsWithCustomSchema = await inputPropsPromise;
|
|
90
92
|
await new Promise((resolve, reject) => {
|
|
@@ -122,7 +124,7 @@ const renderHandler = async (params, options, logs) => {
|
|
|
122
124
|
}
|
|
123
125
|
const allFrames = renderer_1.RenderInternals.getFramesToRender(params.frameRange, params.everyNthFrame);
|
|
124
126
|
if (renderedFrames === allFrames.length) {
|
|
125
|
-
|
|
127
|
+
renderer_1.RenderInternals.Log.verbose({ indent: false, logLevel: params.logLevel }, 'Rendered all frames!');
|
|
126
128
|
}
|
|
127
129
|
chunkTimingData.timings[renderedFrames] = Date.now() - start;
|
|
128
130
|
},
|
|
@@ -151,7 +153,7 @@ const renderHandler = async (params, options, logs) => {
|
|
|
151
153
|
pixelFormat: (_d = params.pixelFormat) !== null && _d !== void 0 ? _d : renderer_1.RenderInternals.DEFAULT_PIXEL_FORMAT,
|
|
152
154
|
proResProfile: params.proResProfile,
|
|
153
155
|
x264Preset: params.x264Preset,
|
|
154
|
-
onDownload: (0, on_downloads_logger_1.onDownloadsHelper)(),
|
|
156
|
+
onDownload: (0, on_downloads_logger_1.onDownloadsHelper)(params.logLevel),
|
|
155
157
|
overwrite: false,
|
|
156
158
|
chromiumOptions: params.chromiumOptions,
|
|
157
159
|
scale: params.scale,
|
|
@@ -181,11 +183,12 @@ const renderHandler = async (params, options, logs) => {
|
|
|
181
183
|
binariesDirectory: null,
|
|
182
184
|
separateAudioTo: audioOutputLocation,
|
|
183
185
|
forSeamlessAacConcatenation: seamlessAudio,
|
|
186
|
+
compositionStart: params.compositionStart,
|
|
184
187
|
})
|
|
185
188
|
.then(({ slowestFrames }) => {
|
|
186
|
-
|
|
189
|
+
renderer_1.RenderInternals.Log.verbose({ indent: false, logLevel: params.logLevel }, `Slowest frames:`);
|
|
187
190
|
slowestFrames.forEach(({ frame, time }) => {
|
|
188
|
-
|
|
191
|
+
renderer_1.RenderInternals.Log.verbose({ indent: false, logLevel: params.logLevel }, ` Frame ${frame} (${time.toFixed(3)}ms)`);
|
|
189
192
|
});
|
|
190
193
|
resolve();
|
|
191
194
|
})
|
|
@@ -204,7 +207,7 @@ const renderHandler = async (params, options, logs) => {
|
|
|
204
207
|
key: (0, constants_1.chunkKeyForIndex)({
|
|
205
208
|
renderId: params.renderId,
|
|
206
209
|
index: params.chunk,
|
|
207
|
-
type: 'video',
|
|
210
|
+
type: renderer_1.RenderInternals.isAudioCodec(params.codec) ? 'audio' : 'video',
|
|
208
211
|
}),
|
|
209
212
|
body: node_fs_1.default.createReadStream(videoOutputLocation),
|
|
210
213
|
region: (0, get_current_region_1.getCurrentRegionInFunction)(),
|
package/dist/functions/still.js
CHANGED
|
@@ -155,7 +155,7 @@ const innerStillHandler = async ({ params: lambdaParams, expectedBucketOwner, re
|
|
|
155
155
|
cancelSignal: null,
|
|
156
156
|
indent: false,
|
|
157
157
|
onBrowserLog: null,
|
|
158
|
-
onDownload: (0, on_downloads_logger_1.onDownloadsHelper)(),
|
|
158
|
+
onDownload: (0, on_downloads_logger_1.onDownloadsHelper)(lambdaParams.logLevel),
|
|
159
159
|
port: null,
|
|
160
160
|
server,
|
|
161
161
|
logLevel: lambdaParams.logLevel,
|
|
@@ -262,6 +262,7 @@ export type LambdaPayloads = {
|
|
|
262
262
|
offthreadVideoCacheSizeInBytes: number | null;
|
|
263
263
|
deleteAfter: DeleteAfter | null;
|
|
264
264
|
colorSpace: ColorSpace;
|
|
265
|
+
compositionStart: number;
|
|
265
266
|
};
|
|
266
267
|
still: {
|
|
267
268
|
type: LambdaRoutines.still;
|
|
@@ -310,6 +311,7 @@ export type LambdaPayloads = {
|
|
|
310
311
|
logLevel: LogLevel;
|
|
311
312
|
framesPerLambda: number;
|
|
312
313
|
preferLossless: boolean;
|
|
314
|
+
compositionStart: number;
|
|
313
315
|
};
|
|
314
316
|
};
|
|
315
317
|
export type LambdaPayload = LambdaPayloads[LambdaRoutines];
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@remotion/lambda",
|
|
3
|
-
"version": "4.0.
|
|
3
|
+
"version": "4.0.128",
|
|
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.22.3",
|
|
29
|
-
"@remotion/bundler": "4.0.
|
|
30
|
-
"@remotion/
|
|
31
|
-
"@remotion/
|
|
32
|
-
"remotion": "4.0.
|
|
29
|
+
"@remotion/bundler": "4.0.128",
|
|
30
|
+
"@remotion/renderer": "4.0.128",
|
|
31
|
+
"@remotion/cli": "4.0.128",
|
|
32
|
+
"remotion": "4.0.128"
|
|
33
33
|
},
|
|
34
34
|
"devDependencies": {
|
|
35
35
|
"@jonny/eslint-config": "3.0.276",
|
|
@@ -39,15 +39,16 @@
|
|
|
39
39
|
"@types/prompt": "^1.1.0",
|
|
40
40
|
"eslint": "8.42.0",
|
|
41
41
|
"prettier": "3.1.1",
|
|
42
|
+
"pureimage": "0.4.13",
|
|
42
43
|
"prettier-plugin-organize-imports": "3.2.4",
|
|
43
44
|
"ts-node": "^10.8.0",
|
|
44
45
|
"vitest": "0.31.1",
|
|
45
46
|
"zip-lib": "^0.7.2",
|
|
46
|
-
"@remotion/
|
|
47
|
-
"@remotion/
|
|
47
|
+
"@remotion/bundler": "4.0.128",
|
|
48
|
+
"@remotion/compositor-linux-arm64-gnu": "4.0.128"
|
|
48
49
|
},
|
|
49
50
|
"peerDependencies": {
|
|
50
|
-
"@remotion/bundler": "4.0.
|
|
51
|
+
"@remotion/bundler": "4.0.128"
|
|
51
52
|
},
|
|
52
53
|
"publishConfig": {
|
|
53
54
|
"access": "public"
|
package/remotionlambda-arm64.zip
CHANGED
|
Binary file
|