@remotion/lambda 4.0.119 → 4.0.121
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/cli/commands/render/render.js +6 -1
- package/dist/cli/commands/still.js +6 -1
- package/dist/functions/chunk-optimization/plan-frame-ranges.d.ts +1 -4
- package/dist/functions/compositions.js +1 -0
- package/dist/functions/helpers/can-concat-seamlessly.d.ts +2 -0
- package/dist/functions/helpers/can-concat-seamlessly.js +7 -0
- package/dist/functions/helpers/concat-videos.d.ts +2 -1
- package/dist/functions/helpers/concat-videos.js +2 -1
- package/dist/functions/helpers/merge-chunks.d.ts +1 -0
- package/dist/functions/helpers/merge-chunks.js +1 -0
- package/dist/functions/helpers/render-has-audio-video.d.ts +5 -0
- package/dist/functions/helpers/render-has-audio-video.js +18 -0
- package/dist/functions/helpers/validate-composition.js +1 -0
- package/dist/functions/launch.js +1 -0
- package/dist/functions/merge.js +1 -0
- package/dist/functions/renderer.js +1 -0
- package/dist/functions/still.js +2 -0
- package/dist/shared/invoke-webhook.d.ts +2 -0
- package/package.json +8 -8
- package/remotionlambda-arm64.zip +0 -0
|
@@ -28,7 +28,7 @@ function getTotalFrames(status) {
|
|
|
28
28
|
? renderer_1.RenderInternals.getFramesToRender(status.renderMetadata.frameRange, status.renderMetadata.everyNthFrame).length
|
|
29
29
|
: null;
|
|
30
30
|
}
|
|
31
|
-
const { x264Option, audioBitrateOption, offthreadVideoCacheSizeInBytesOption, scaleOption, crfOption, jpegQualityOption, videoBitrateOption, mutedOption, colorSpaceOption, deleteAfterOption, enableMultiprocessOnLinuxOption, glOption, headlessOption, numberOfGifLoopsOption, encodingMaxRateOption, encodingBufferSizeOption, delayRenderTimeoutInMillisecondsOption, overwriteOption, } = client_1.BrowserSafeApis.options;
|
|
31
|
+
const { x264Option, audioBitrateOption, offthreadVideoCacheSizeInBytesOption, scaleOption, crfOption, jpegQualityOption, videoBitrateOption, mutedOption, colorSpaceOption, deleteAfterOption, enableMultiprocessOnLinuxOption, glOption, headlessOption, numberOfGifLoopsOption, encodingMaxRateOption, encodingBufferSizeOption, delayRenderTimeoutInMillisecondsOption, overwriteOption, binariesDirectoryOption, } = client_1.BrowserSafeApis.options;
|
|
32
32
|
const renderCommand = async (args, remotionRoot, logLevel) => {
|
|
33
33
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
34
34
|
const serveUrl = args[0];
|
|
@@ -98,6 +98,9 @@ const renderCommand = async (args, remotionRoot, logLevel) => {
|
|
|
98
98
|
const overwrite = overwriteOption.getValue({
|
|
99
99
|
commandLine: cli_1.CliInternals.parsedCli,
|
|
100
100
|
}, false).value;
|
|
101
|
+
const binariesDirectory = binariesDirectoryOption.getValue({
|
|
102
|
+
commandLine: cli_1.CliInternals.parsedCli,
|
|
103
|
+
}).value;
|
|
101
104
|
const chromiumOptions = {
|
|
102
105
|
disableWebSecurity,
|
|
103
106
|
enableMultiProcessOnLinux,
|
|
@@ -121,6 +124,7 @@ const renderCommand = async (args, remotionRoot, logLevel) => {
|
|
|
121
124
|
logLevel,
|
|
122
125
|
webpackConfigOrServeUrl: serveUrl,
|
|
123
126
|
offthreadVideoCacheSizeInBytes,
|
|
127
|
+
binariesDirectory,
|
|
124
128
|
});
|
|
125
129
|
const { compositionId } = await cli_1.CliInternals.getCompositionWithDimensionOverride({
|
|
126
130
|
args: args.slice(1),
|
|
@@ -143,6 +147,7 @@ const renderCommand = async (args, remotionRoot, logLevel) => {
|
|
|
143
147
|
width,
|
|
144
148
|
server,
|
|
145
149
|
offthreadVideoCacheSizeInBytes,
|
|
150
|
+
binariesDirectory,
|
|
146
151
|
});
|
|
147
152
|
composition = compositionId;
|
|
148
153
|
}
|
|
@@ -17,7 +17,7 @@ const get_aws_region_1 = require("../get-aws-region");
|
|
|
17
17
|
const find_function_name_1 = require("../helpers/find-function-name");
|
|
18
18
|
const quit_1 = require("../helpers/quit");
|
|
19
19
|
const log_1 = require("../log");
|
|
20
|
-
const { offthreadVideoCacheSizeInBytesOption, scaleOption, deleteAfterOption, jpegQualityOption, enableMultiprocessOnLinuxOption, glOption, headlessOption, delayRenderTimeoutInMillisecondsOption, } = client_1.BrowserSafeApis.options;
|
|
20
|
+
const { offthreadVideoCacheSizeInBytesOption, scaleOption, deleteAfterOption, jpegQualityOption, enableMultiprocessOnLinuxOption, glOption, headlessOption, delayRenderTimeoutInMillisecondsOption, binariesDirectoryOption, } = client_1.BrowserSafeApis.options;
|
|
21
21
|
const { parsedCli, determineFinalStillImageFormat, chalk, getCliOptions, formatBytes, getCompositionWithDimensionOverride, } = cli_1.CliInternals;
|
|
22
22
|
exports.STILL_COMMAND = 'still';
|
|
23
23
|
const stillCommand = async (args, remotionRoot, logLevel) => {
|
|
@@ -57,6 +57,9 @@ const stillCommand = async (args, remotionRoot, logLevel) => {
|
|
|
57
57
|
const offthreadVideoCacheSizeInBytes = offthreadVideoCacheSizeInBytesOption.getValue({
|
|
58
58
|
commandLine: parsedCli,
|
|
59
59
|
}).value;
|
|
60
|
+
const binariesDirectory = binariesDirectoryOption.getValue({
|
|
61
|
+
commandLine: parsedCli,
|
|
62
|
+
}).value;
|
|
60
63
|
if (!composition) {
|
|
61
64
|
log_1.Log.info({ indent: false, logLevel }, 'No compositions passed. Fetching compositions...');
|
|
62
65
|
(0, validate_serveurl_1.validateServeUrl)(serveUrl);
|
|
@@ -71,6 +74,7 @@ const stillCommand = async (args, remotionRoot, logLevel) => {
|
|
|
71
74
|
logLevel,
|
|
72
75
|
webpackConfigOrServeUrl: serveUrl,
|
|
73
76
|
offthreadVideoCacheSizeInBytes,
|
|
77
|
+
binariesDirectory,
|
|
74
78
|
});
|
|
75
79
|
const { compositionId } = await getCompositionWithDimensionOverride({
|
|
76
80
|
args: args.slice(1),
|
|
@@ -93,6 +97,7 @@ const stillCommand = async (args, remotionRoot, logLevel) => {
|
|
|
93
97
|
width,
|
|
94
98
|
server,
|
|
95
99
|
offthreadVideoCacheSizeInBytes,
|
|
100
|
+
binariesDirectory,
|
|
96
101
|
});
|
|
97
102
|
composition = compositionId;
|
|
98
103
|
}
|
|
@@ -57,6 +57,7 @@ const compositionsHandler = async (lambdaParams, options) => {
|
|
|
57
57
|
browserExecutable: null,
|
|
58
58
|
onBrowserLog: null,
|
|
59
59
|
offthreadVideoCacheSizeInBytes: lambdaParams.offthreadVideoCacheSizeInBytes,
|
|
60
|
+
binariesDirectory: null,
|
|
60
61
|
});
|
|
61
62
|
return Promise.resolve({
|
|
62
63
|
compositions,
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.canConcatSeamlessly = void 0;
|
|
4
|
+
const canConcatSeamlessly = (audioCodec, codec) => {
|
|
5
|
+
return audioCodec === 'aac' && codec === 'h264';
|
|
6
|
+
};
|
|
7
|
+
exports.canConcatSeamlessly = canConcatSeamlessly;
|
|
@@ -12,7 +12,7 @@ export declare const getAllFilesS3: ({ bucket, expectedFiles, outdir, renderId,
|
|
|
12
12
|
onErrors: (errors: EnhancedErrorInfo[]) => void;
|
|
13
13
|
logLevel: LogLevel;
|
|
14
14
|
}) => Promise<string[]>;
|
|
15
|
-
export declare const concatVideosS3: ({ onProgress, numberOfFrames, codec, fps, numberOfGifLoops, files, outdir, audioCodec, audioBitrate, logLevel, }: {
|
|
15
|
+
export declare const concatVideosS3: ({ onProgress, numberOfFrames, codec, fps, numberOfGifLoops, files, outdir, audioCodec, audioBitrate, logLevel, binariesDirectory, }: {
|
|
16
16
|
onProgress: (frames: number) => void;
|
|
17
17
|
numberOfFrames: number;
|
|
18
18
|
codec: LambdaCodec;
|
|
@@ -23,6 +23,7 @@ export declare const concatVideosS3: ({ onProgress, numberOfFrames, codec, fps,
|
|
|
23
23
|
audioCodec: AudioCodec | null;
|
|
24
24
|
audioBitrate: string | null;
|
|
25
25
|
logLevel: LogLevel;
|
|
26
|
+
binariesDirectory: string | null;
|
|
26
27
|
}) => Promise<{
|
|
27
28
|
outfile: string;
|
|
28
29
|
cleanupChunksProm: Promise<void>;
|
|
@@ -133,7 +133,7 @@ const getAllFilesS3 = ({ bucket, expectedFiles, outdir, renderId, region, expect
|
|
|
133
133
|
});
|
|
134
134
|
};
|
|
135
135
|
exports.getAllFilesS3 = getAllFilesS3;
|
|
136
|
-
const concatVideosS3 = async ({ onProgress, numberOfFrames, codec, fps, numberOfGifLoops, files, outdir, audioCodec, audioBitrate, logLevel, }) => {
|
|
136
|
+
const concatVideosS3 = async ({ onProgress, numberOfFrames, codec, fps, numberOfGifLoops, files, outdir, audioCodec, audioBitrate, logLevel, binariesDirectory, }) => {
|
|
137
137
|
const outfile = (0, node_path_1.join)(renderer_1.RenderInternals.tmpDir(constants_1.REMOTION_CONCATED_TOKEN), 'concat.' + renderer_1.RenderInternals.getFileExtensionFromCodec(codec, audioCodec));
|
|
138
138
|
const combine = (0, timer_1.timer)('Combine videos');
|
|
139
139
|
const filelistDir = renderer_1.RenderInternals.tmpDir(constants_1.REMOTION_FILELIST_TOKEN);
|
|
@@ -150,6 +150,7 @@ const concatVideosS3 = async ({ onProgress, numberOfFrames, codec, fps, numberOf
|
|
|
150
150
|
audioBitrate,
|
|
151
151
|
indent: false,
|
|
152
152
|
logLevel,
|
|
153
|
+
binariesDirectory,
|
|
153
154
|
});
|
|
154
155
|
combine.end();
|
|
155
156
|
const cleanupChunksProm = node_fs_1.default.promises.rm(outdir, {
|
|
@@ -102,6 +102,7 @@ const mergeChunksAndFinishRender = async (options) => {
|
|
|
102
102
|
audioCodec: options.audioCodec,
|
|
103
103
|
audioBitrate: options.audioBitrate,
|
|
104
104
|
logLevel: options.logLevel,
|
|
105
|
+
binariesDirectory: options.binariesDirectory,
|
|
105
106
|
});
|
|
106
107
|
const encodingStop = Date.now();
|
|
107
108
|
const outputSize = fs_1.default.statSync(outfile);
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.lambdaRenderHasAudioVideo = void 0;
|
|
4
|
+
const renderer_1 = require("@remotion/renderer");
|
|
5
|
+
const lambdaRenderHasAudioVideo = (renderMetadata) => {
|
|
6
|
+
if (renderMetadata.type === 'still') {
|
|
7
|
+
throw new Error('Cannot merge stills');
|
|
8
|
+
}
|
|
9
|
+
const hasVideo = renderMetadata
|
|
10
|
+
? !renderer_1.RenderInternals.isAudioCodec(renderMetadata.codec)
|
|
11
|
+
: false;
|
|
12
|
+
const hasAudio = renderMetadata ? !renderMetadata.muted : false;
|
|
13
|
+
return {
|
|
14
|
+
hasAudio,
|
|
15
|
+
hasVideo,
|
|
16
|
+
};
|
|
17
|
+
};
|
|
18
|
+
exports.lambdaRenderHasAudioVideo = lambdaRenderHasAudioVideo;
|
package/dist/functions/launch.js
CHANGED
|
@@ -276,6 +276,7 @@ const innerLaunchHandler = async ({ functionName, params, options, onAllChunksAv
|
|
|
276
276
|
onAllChunks: onAllChunksAvailable,
|
|
277
277
|
audioBitrate: params.audioBitrate,
|
|
278
278
|
logLevel: params.logLevel,
|
|
279
|
+
binariesDirectory: null,
|
|
279
280
|
});
|
|
280
281
|
return postRenderData;
|
|
281
282
|
};
|
package/dist/functions/merge.js
CHANGED
|
@@ -162,6 +162,7 @@ const renderHandler = async (params, options, logs) => {
|
|
|
162
162
|
offthreadVideoCacheSizeInBytes: params.offthreadVideoCacheSizeInBytes,
|
|
163
163
|
colorSpace: params.colorSpace,
|
|
164
164
|
finishRenderProgress: () => undefined,
|
|
165
|
+
binariesDirectory: null,
|
|
165
166
|
})
|
|
166
167
|
.then(({ slowestFrames }) => {
|
|
167
168
|
console.log(`Slowest frames:`);
|
package/dist/functions/still.js
CHANGED
|
@@ -75,6 +75,7 @@ const innerStillHandler = async ({ params: lambdaParams, expectedBucketOwner, re
|
|
|
75
75
|
logLevel: lambdaParams.logLevel,
|
|
76
76
|
webpackConfigOrServeUrl: serveUrl,
|
|
77
77
|
offthreadVideoCacheSizeInBytes: lambdaParams.offthreadVideoCacheSizeInBytes,
|
|
78
|
+
binariesDirectory: null,
|
|
78
79
|
});
|
|
79
80
|
const browserInstance = await browserInstancePromise;
|
|
80
81
|
const composition = await (0, validate_composition_1.validateComposition)({
|
|
@@ -160,6 +161,7 @@ const innerStillHandler = async ({ params: lambdaParams, expectedBucketOwner, re
|
|
|
160
161
|
data: composition.props,
|
|
161
162
|
}).serializedString,
|
|
162
163
|
offthreadVideoCacheSizeInBytes: lambdaParams.offthreadVideoCacheSizeInBytes,
|
|
164
|
+
binariesDirectory: null,
|
|
163
165
|
});
|
|
164
166
|
const { key, renderBucketName, customCredentials } = (0, expected_out_name_1.getExpectedOutName)(renderMetadata, bucketName, (0, expected_out_name_1.getCredentialsFromOutName)(lambdaParams.outName));
|
|
165
167
|
const { size } = await node_fs_1.default.promises.stat(outputPath);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@remotion/lambda",
|
|
3
|
-
"version": "4.0.
|
|
3
|
+
"version": "4.0.121",
|
|
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/cli": "4.0.
|
|
31
|
-
"remotion": "4.0.
|
|
32
|
-
"
|
|
29
|
+
"@remotion/bundler": "4.0.121",
|
|
30
|
+
"@remotion/cli": "4.0.121",
|
|
31
|
+
"@remotion/renderer": "4.0.121",
|
|
32
|
+
"remotion": "4.0.121"
|
|
33
33
|
},
|
|
34
34
|
"devDependencies": {
|
|
35
35
|
"@jonny/eslint-config": "3.0.276",
|
|
@@ -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/
|
|
47
|
-
"@remotion/
|
|
46
|
+
"@remotion/bundler": "4.0.121",
|
|
47
|
+
"@remotion/compositor-linux-arm64-gnu": "4.0.121"
|
|
48
48
|
},
|
|
49
49
|
"peerDependencies": {
|
|
50
|
-
"@remotion/bundler": "4.0.
|
|
50
|
+
"@remotion/bundler": "4.0.121"
|
|
51
51
|
},
|
|
52
52
|
"publishConfig": {
|
|
53
53
|
"access": "public"
|
package/remotionlambda-arm64.zip
CHANGED
|
Binary file
|