@remotion/renderer 4.0.11 → 4.0.12
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/combine-videos.js
CHANGED
|
@@ -7,6 +7,7 @@ const node_path_1 = require("node:path");
|
|
|
7
7
|
const audio_codec_1 = require("./audio-codec");
|
|
8
8
|
const call_ffmpeg_1 = require("./call-ffmpeg");
|
|
9
9
|
const is_audio_codec_1 = require("./is-audio-codec");
|
|
10
|
+
const logger_1 = require("./logger");
|
|
10
11
|
const parse_ffmpeg_progress_1 = require("./parse-ffmpeg-progress");
|
|
11
12
|
const truthy_1 = require("./truthy");
|
|
12
13
|
const combineVideos = async (options) => {
|
|
@@ -49,7 +50,10 @@ const combineVideos = async (options) => {
|
|
|
49
50
|
(_a = task.stderr) === null || _a === void 0 ? void 0 : _a.on('data', (data) => {
|
|
50
51
|
if (onProgress) {
|
|
51
52
|
const parsed = (0, parse_ffmpeg_progress_1.parseFfmpegProgress)(data.toString('utf8'));
|
|
52
|
-
if (parsed
|
|
53
|
+
if (parsed === undefined) {
|
|
54
|
+
logger_1.Log.verbose(data.toString('utf8'));
|
|
55
|
+
}
|
|
56
|
+
else {
|
|
53
57
|
onProgress(parsed);
|
|
54
58
|
}
|
|
55
59
|
}
|
|
@@ -16,9 +16,10 @@ const get_executable_path_1 = require("./get-executable-path");
|
|
|
16
16
|
const make_nonce_1 = require("./make-nonce");
|
|
17
17
|
const getIdealMaximumFrameCacheItems = () => {
|
|
18
18
|
const freeMemory = node_os_1.default.freemem();
|
|
19
|
-
// Assuming 1 frame is approximately
|
|
19
|
+
// Assuming 1 frame is approximately 24MB
|
|
20
|
+
// (4K video)
|
|
20
21
|
// Assuming only half the available memory should be used
|
|
21
|
-
const max = Math.floor(freeMemory / (1024 * 1024 *
|
|
22
|
+
const max = Math.floor(freeMemory / (1024 * 1024 * 24));
|
|
22
23
|
// Never store more than 2000 frames
|
|
23
24
|
// But 60 is needed even if it's going to swap
|
|
24
25
|
return Math.max(60, Math.min(max, 2000));
|
|
@@ -145,7 +146,7 @@ const startCompositor = (type, payload, logLevel, indent) => {
|
|
|
145
146
|
});
|
|
146
147
|
let resolve = null;
|
|
147
148
|
let reject = null;
|
|
148
|
-
child.on('close', (code) => {
|
|
149
|
+
child.on('close', (code, signal) => {
|
|
149
150
|
const waitersToKill = Array.from(waiters.values());
|
|
150
151
|
if (code === 0) {
|
|
151
152
|
runningStatus = { type: 'quit-without-error' };
|
|
@@ -156,9 +157,12 @@ const startCompositor = (type, payload, logLevel, indent) => {
|
|
|
156
157
|
waiters.clear();
|
|
157
158
|
}
|
|
158
159
|
else {
|
|
159
|
-
const errorMessage = Buffer.concat(stderrChunks).toString('utf-8')
|
|
160
|
+
const errorMessage = Buffer.concat(stderrChunks).toString('utf-8') +
|
|
161
|
+
outputBuffer.toString('utf-8');
|
|
160
162
|
runningStatus = { type: 'quit-with-error', error: errorMessage };
|
|
161
|
-
const error =
|
|
163
|
+
const error = code === null
|
|
164
|
+
? new Error(`Compositor exited with signal ${signal}`)
|
|
165
|
+
: new Error(`Compositor panicked with code ${code}: ${errorMessage}`);
|
|
162
166
|
for (const waiter of waitersToKill) {
|
|
163
167
|
waiter.reject(error);
|
|
164
168
|
}
|
|
@@ -38,8 +38,17 @@ const startOffthreadVideoServer = ({ downloadMap, concurrency, logLevel, indent,
|
|
|
38
38
|
}, logLevel, indent);
|
|
39
39
|
return {
|
|
40
40
|
close: () => {
|
|
41
|
-
|
|
42
|
-
|
|
41
|
+
// Note: This is being used as a promise:
|
|
42
|
+
// .close().then()
|
|
43
|
+
// but if finishCommands() fails, it acts like a sync function,
|
|
44
|
+
// therefore we have to catch an error and put a promise rejection
|
|
45
|
+
try {
|
|
46
|
+
compositor.finishCommands();
|
|
47
|
+
return compositor.waitForDone();
|
|
48
|
+
}
|
|
49
|
+
catch (err) {
|
|
50
|
+
return Promise.reject(err);
|
|
51
|
+
}
|
|
43
52
|
},
|
|
44
53
|
listener: (req, response) => {
|
|
45
54
|
if (!req.url) {
|
|
@@ -44,7 +44,13 @@ const getSourceMap = (filePath, fileContents, type) => {
|
|
|
44
44
|
throw new Error('Sorry, non-base64 inline source-map encoding is not supported.');
|
|
45
45
|
}
|
|
46
46
|
const converted = window.atob(sm.substring(match2[0].length));
|
|
47
|
-
|
|
47
|
+
try {
|
|
48
|
+
const sourceMapConsumer = new source_map_1.SourceMapConsumer(JSON.parse(converted));
|
|
49
|
+
return Promise.resolve(sourceMapConsumer);
|
|
50
|
+
}
|
|
51
|
+
catch (_a) {
|
|
52
|
+
return Promise.resolve(null);
|
|
53
|
+
}
|
|
48
54
|
}
|
|
49
55
|
if (type === 'local') {
|
|
50
56
|
// Find adjacent file: bundle.js -> bundle.js.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@remotion/renderer",
|
|
3
|
-
"version": "4.0.
|
|
3
|
+
"version": "4.0.12",
|
|
4
4
|
"description": "Renderer for Remotion",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
"extract-zip": "2.0.1",
|
|
19
19
|
"source-map": "^0.8.0-beta.0",
|
|
20
20
|
"ws": "8.7.0",
|
|
21
|
-
"remotion": "4.0.
|
|
21
|
+
"remotion": "4.0.12"
|
|
22
22
|
},
|
|
23
23
|
"peerDependencies": {
|
|
24
24
|
"react": ">=16.8.0",
|
|
@@ -42,13 +42,13 @@
|
|
|
42
42
|
"zod": "^3.21.4"
|
|
43
43
|
},
|
|
44
44
|
"optionalDependencies": {
|
|
45
|
-
"@remotion/compositor-linux-arm64-
|
|
46
|
-
"@remotion/compositor-darwin-
|
|
47
|
-
"@remotion/compositor-
|
|
48
|
-
"@remotion/compositor-linux-arm64-
|
|
49
|
-
"@remotion/compositor-
|
|
50
|
-
"@remotion/compositor-
|
|
51
|
-
"@remotion/compositor-
|
|
45
|
+
"@remotion/compositor-linux-arm64-gnu": "4.0.12",
|
|
46
|
+
"@remotion/compositor-darwin-x64": "4.0.12",
|
|
47
|
+
"@remotion/compositor-darwin-arm64": "4.0.12",
|
|
48
|
+
"@remotion/compositor-linux-arm64-musl": "4.0.12",
|
|
49
|
+
"@remotion/compositor-linux-x64-musl": "4.0.12",
|
|
50
|
+
"@remotion/compositor-win32-x64-msvc": "4.0.12",
|
|
51
|
+
"@remotion/compositor-linux-x64-gnu": "4.0.12"
|
|
52
52
|
},
|
|
53
53
|
"keywords": [
|
|
54
54
|
"remotion",
|