@remotion/renderer 4.0.96 → 4.0.98
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/call-ffmpeg.js +1 -2
- package/dist/{check-apple-silicon.js → check-version-requirements.js} +22 -3
- package/dist/compositor/get-executable-path.d.ts +6 -1
- package/dist/compositor/get-executable-path.js +42 -19
- package/dist/index.d.ts +1 -1
- package/dist/index.js +2 -2
- package/package.json +9 -9
- /package/dist/{check-apple-silicon.d.ts → check-version-requirements.d.ts} +0 -0
package/dist/call-ffmpeg.js
CHANGED
|
@@ -6,11 +6,10 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
6
6
|
exports.callFf = exports.dynamicLibraryPathOptions = void 0;
|
|
7
7
|
const execa_1 = __importDefault(require("execa"));
|
|
8
8
|
const node_fs_1 = require("node:fs");
|
|
9
|
-
const node_path_1 = __importDefault(require("node:path"));
|
|
10
9
|
const get_executable_path_1 = require("./compositor/get-executable-path");
|
|
11
10
|
const truthy_1 = require("./truthy");
|
|
12
11
|
const dynamicLibraryPathOptions = (indent, logLevel) => {
|
|
13
|
-
const lib =
|
|
12
|
+
const lib = (0, get_executable_path_1.getExecutablePath)('lib', indent, logLevel);
|
|
14
13
|
return {
|
|
15
14
|
env: {
|
|
16
15
|
RUST_BACKTRACE: 'full',
|
|
@@ -1,19 +1,38 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.checkNodeVersionAndWarnAboutRosetta = exports.gLibCErrorMessage = void 0;
|
|
4
|
+
const get_executable_path_1 = require("./compositor/get-executable-path");
|
|
4
5
|
const logger_1 = require("./logger");
|
|
6
|
+
const getRequiredLibCVersion = () => {
|
|
7
|
+
if (process.platform !== 'linux') {
|
|
8
|
+
return null;
|
|
9
|
+
}
|
|
10
|
+
if ((0, get_executable_path_1.isMusl)({ indent: false, logLevel: 'warn' })) {
|
|
11
|
+
return null;
|
|
12
|
+
}
|
|
13
|
+
// Uses Amazon Linux 2 to compile
|
|
14
|
+
if (process.arch === 'arm64') {
|
|
15
|
+
return [2, 26];
|
|
16
|
+
}
|
|
17
|
+
// Uses Ubuntu 20.04 to compile
|
|
18
|
+
return [2, 31];
|
|
19
|
+
};
|
|
20
|
+
const required = getRequiredLibCVersion();
|
|
5
21
|
const gLibCErrorMessage = (libCString) => {
|
|
22
|
+
if (required === null) {
|
|
23
|
+
return null;
|
|
24
|
+
}
|
|
6
25
|
const split = libCString.split('.');
|
|
7
26
|
if (split.length !== 2) {
|
|
8
27
|
return null;
|
|
9
28
|
}
|
|
10
|
-
if (split[0] ===
|
|
29
|
+
if (split[0] === String(required[0]) && Number(split[1]) >= required[1]) {
|
|
11
30
|
return null;
|
|
12
31
|
}
|
|
13
|
-
if (Number(split[0]) >
|
|
32
|
+
if (Number(split[0]) > required[0]) {
|
|
14
33
|
return null;
|
|
15
34
|
}
|
|
16
|
-
return `Rendering videos requires glibc
|
|
35
|
+
return `Rendering videos requires glibc ${required.join('.')} on your or higher on your OS. Your system has glibc ${libCString}.`;
|
|
17
36
|
};
|
|
18
37
|
exports.gLibCErrorMessage = gLibCErrorMessage;
|
|
19
38
|
const checkLibCRequirement = (logLevel, indent) => {
|
|
@@ -1,2 +1,7 @@
|
|
|
1
1
|
import type { LogLevel } from '../log-level';
|
|
2
|
-
export declare
|
|
2
|
+
export declare function isMusl({ indent, logLevel, }: {
|
|
3
|
+
indent: boolean;
|
|
4
|
+
logLevel: LogLevel;
|
|
5
|
+
}): boolean;
|
|
6
|
+
export declare const getExecutablePath: (type: 'compositor' | 'ffmpeg' | 'ffprobe' | 'lib', indent: boolean, logLevel: LogLevel) => string;
|
|
7
|
+
export declare const getExecutableDir: (indent: boolean, logLevel: LogLevel) => string;
|
|
@@ -1,10 +1,14 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
// Adapted from @swc/core package
|
|
3
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
4
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
5
|
+
};
|
|
3
6
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
-
exports.getExecutablePath = void 0;
|
|
7
|
+
exports.getExecutableDir = exports.getExecutablePath = exports.isMusl = void 0;
|
|
8
|
+
const path_1 = __importDefault(require("path"));
|
|
5
9
|
const logger_1 = require("../logger");
|
|
6
10
|
let warned = false;
|
|
7
|
-
function isMusl({ indent, logLevel }) {
|
|
11
|
+
function isMusl({ indent, logLevel, }) {
|
|
8
12
|
// @ts-expect-error bun no types
|
|
9
13
|
if (!process.report && typeof Bun !== 'undefined') {
|
|
10
14
|
if (!warned) {
|
|
@@ -17,31 +21,50 @@ function isMusl({ indent, logLevel }) {
|
|
|
17
21
|
const { glibcVersionRuntime } = process.report.getReport().header;
|
|
18
22
|
return !glibcVersionRuntime;
|
|
19
23
|
}
|
|
24
|
+
exports.isMusl = isMusl;
|
|
20
25
|
const getExecutablePath = (type, indent, logLevel) => {
|
|
21
|
-
|
|
22
|
-
|
|
26
|
+
const base = (0, exports.getExecutableDir)(indent, logLevel);
|
|
27
|
+
switch (type) {
|
|
28
|
+
case 'compositor':
|
|
29
|
+
if (process.platform === 'win32') {
|
|
30
|
+
return path_1.default.join(base, 'compositor.exe');
|
|
31
|
+
}
|
|
32
|
+
return path_1.default.join(base, 'compositor');
|
|
33
|
+
case 'ffmpeg':
|
|
34
|
+
if (process.platform === 'win32') {
|
|
35
|
+
return path_1.default.join(base, 'ffmpeg', 'remotion', 'bin', 'ffmpeg.exe');
|
|
36
|
+
}
|
|
37
|
+
return path_1.default.join(base, 'ffmpeg', 'remotion', 'bin', 'ffmpeg');
|
|
38
|
+
case 'ffprobe':
|
|
39
|
+
if (process.platform === 'win32') {
|
|
40
|
+
return path_1.default.join(base, 'ffmpeg', 'remotion', 'bin', 'ffprobe.exe');
|
|
41
|
+
}
|
|
42
|
+
return path_1.default.join(base, 'ffmpeg', 'remotion', 'bin', 'ffprobe');
|
|
43
|
+
case 'lib':
|
|
44
|
+
return path_1.default.join(base, 'ffmpeg', 'remotion', 'lib');
|
|
45
|
+
default:
|
|
46
|
+
throw new Error(`Unknown executable type: ${type}`);
|
|
47
|
+
}
|
|
48
|
+
};
|
|
49
|
+
exports.getExecutablePath = getExecutablePath;
|
|
50
|
+
const getExecutableDir = (indent, logLevel) => {
|
|
51
|
+
if (process.env.COMPOSITOR_DIR) {
|
|
52
|
+
return process.env.COMPOSITOR_DIR;
|
|
23
53
|
}
|
|
24
|
-
const key = type === 'compositor'
|
|
25
|
-
? 'binaryPath'
|
|
26
|
-
: type === 'ffmpeg'
|
|
27
|
-
? 'ffmpegPath'
|
|
28
|
-
: type === 'ffprobe'
|
|
29
|
-
? 'ffprobePath'
|
|
30
|
-
: 'ffmpegCwd';
|
|
31
54
|
switch (process.platform) {
|
|
32
55
|
case 'win32':
|
|
33
56
|
switch (process.arch) {
|
|
34
57
|
case 'x64':
|
|
35
|
-
return require('@remotion/compositor-win32-x64-msvc')
|
|
58
|
+
return require('@remotion/compositor-win32-x64-msvc').dir;
|
|
36
59
|
default:
|
|
37
60
|
throw new Error(`Unsupported architecture on Windows: ${process.arch}`);
|
|
38
61
|
}
|
|
39
62
|
case 'darwin':
|
|
40
63
|
switch (process.arch) {
|
|
41
64
|
case 'x64':
|
|
42
|
-
return require('@remotion/compositor-darwin-x64')
|
|
65
|
+
return require('@remotion/compositor-darwin-x64').dir;
|
|
43
66
|
case 'arm64':
|
|
44
|
-
return require('@remotion/compositor-darwin-arm64')
|
|
67
|
+
return require('@remotion/compositor-darwin-arm64').dir;
|
|
45
68
|
default:
|
|
46
69
|
throw new Error(`Unsupported architecture on macOS: ${process.arch}`);
|
|
47
70
|
}
|
|
@@ -50,14 +73,14 @@ const getExecutablePath = (type, indent, logLevel) => {
|
|
|
50
73
|
switch (process.arch) {
|
|
51
74
|
case 'x64':
|
|
52
75
|
if (musl) {
|
|
53
|
-
return require('@remotion/compositor-linux-x64-musl')
|
|
76
|
+
return require('@remotion/compositor-linux-x64-musl').dir;
|
|
54
77
|
}
|
|
55
|
-
return require('@remotion/compositor-linux-x64-gnu')
|
|
78
|
+
return require('@remotion/compositor-linux-x64-gnu').dir;
|
|
56
79
|
case 'arm64':
|
|
57
80
|
if (musl) {
|
|
58
|
-
return require('@remotion/compositor-linux-arm64-musl')
|
|
81
|
+
return require('@remotion/compositor-linux-arm64-musl').dir;
|
|
59
82
|
}
|
|
60
|
-
return require('@remotion/compositor-linux-arm64-gnu')
|
|
83
|
+
return require('@remotion/compositor-linux-arm64-gnu').dir;
|
|
61
84
|
default:
|
|
62
85
|
throw new Error(`Unsupported architecture on Linux: ${process.arch}`);
|
|
63
86
|
}
|
|
@@ -66,4 +89,4 @@ const getExecutablePath = (type, indent, logLevel) => {
|
|
|
66
89
|
throw new Error(`Unsupported OS: ${process.platform}, architecture: ${process.arch}`);
|
|
67
90
|
}
|
|
68
91
|
};
|
|
69
|
-
exports.
|
|
92
|
+
exports.getExecutableDir = getExecutableDir;
|
package/dist/index.d.ts
CHANGED
|
@@ -313,7 +313,7 @@ export declare const RenderInternals: {
|
|
|
313
313
|
};
|
|
314
314
|
makeFileExtensionMap: () => Record<string, ("h264" | "h265" | "vp8" | "vp9" | "mp3" | "aac" | "wav" | "prores" | "h264-mkv" | "gif")[]>;
|
|
315
315
|
defaultCodecsForFileExtension: Record<import("./file-extensions").FileExtension, "h264" | "h265" | "vp8" | "vp9" | "mp3" | "aac" | "wav" | "prores" | "h264-mkv" | "gif">;
|
|
316
|
-
getExecutablePath: (type: "compositor" | "ffmpeg" | "ffprobe" | "
|
|
316
|
+
getExecutablePath: (type: "compositor" | "ffmpeg" | "ffprobe" | "lib", indent: boolean, logLevel: "verbose" | "info" | "warn" | "error") => string;
|
|
317
317
|
callFf: (bin: "ffmpeg" | "ffprobe", args: (string | null)[], indent: boolean, logLevel: "verbose" | "info" | "warn" | "error", options?: execa.Options<string> | undefined) => execa.ExecaChildProcess<string>;
|
|
318
318
|
dynamicLibraryPathOptions: (indent: boolean, logLevel: "verbose" | "info" | "warn" | "error") => {
|
|
319
319
|
env: {
|
package/dist/index.js
CHANGED
|
@@ -37,7 +37,7 @@ const call_ffmpeg_1 = require("./call-ffmpeg");
|
|
|
37
37
|
const can_use_parallel_encoding_1 = require("./can-use-parallel-encoding");
|
|
38
38
|
const chalk_1 = require("./chalk");
|
|
39
39
|
const is_color_supported_1 = require("./chalk/is-color-supported");
|
|
40
|
-
const
|
|
40
|
+
const check_version_requirements_1 = require("./check-version-requirements");
|
|
41
41
|
const codec_1 = require("./codec");
|
|
42
42
|
const combine_videos_1 = require("./combine-videos");
|
|
43
43
|
const get_executable_path_1 = require("./compositor/get-executable-path");
|
|
@@ -200,4 +200,4 @@ exports.RenderInternals = {
|
|
|
200
200
|
makeDownloadMap: download_map_1.makeDownloadMap,
|
|
201
201
|
};
|
|
202
202
|
// Warn of potential performance issues with Apple Silicon (M1 chip under Rosetta)
|
|
203
|
-
(0,
|
|
203
|
+
(0, check_version_requirements_1.checkNodeVersionAndWarnAboutRosetta)('info', false);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@remotion/renderer",
|
|
3
|
-
"version": "4.0.
|
|
3
|
+
"version": "4.0.98",
|
|
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.98"
|
|
22
22
|
},
|
|
23
23
|
"peerDependencies": {
|
|
24
24
|
"react": ">=16.8.0",
|
|
@@ -40,13 +40,13 @@
|
|
|
40
40
|
"vitest": "0.31.1"
|
|
41
41
|
},
|
|
42
42
|
"optionalDependencies": {
|
|
43
|
-
"@remotion/compositor-darwin-
|
|
44
|
-
"@remotion/compositor-
|
|
45
|
-
"@remotion/compositor-
|
|
46
|
-
"@remotion/compositor-linux-
|
|
47
|
-
"@remotion/compositor-linux-x64-musl": "4.0.
|
|
48
|
-
"@remotion/compositor-
|
|
49
|
-
"@remotion/compositor-
|
|
43
|
+
"@remotion/compositor-darwin-arm64": "4.0.98",
|
|
44
|
+
"@remotion/compositor-darwin-x64": "4.0.98",
|
|
45
|
+
"@remotion/compositor-linux-x64-gnu": "4.0.98",
|
|
46
|
+
"@remotion/compositor-linux-arm64-musl": "4.0.98",
|
|
47
|
+
"@remotion/compositor-linux-x64-musl": "4.0.98",
|
|
48
|
+
"@remotion/compositor-win32-x64-msvc": "4.0.98",
|
|
49
|
+
"@remotion/compositor-linux-arm64-gnu": "4.0.98"
|
|
50
50
|
},
|
|
51
51
|
"keywords": [
|
|
52
52
|
"remotion",
|
|
File without changes
|