@remotion/renderer 4.0.53 → 4.0.55
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/assets/get-audio-channels.d.ts +3 -2
- package/dist/assets/get-audio-channels.js +6 -6
- package/dist/call-ffmpeg.d.ts +3 -2
- package/dist/call-ffmpeg.js +5 -5
- package/dist/client.d.ts +1 -1
- package/dist/combine-videos.d.ts +3 -0
- package/dist/combine-videos.js +1 -1
- package/dist/compositor/compose.d.ts +2 -1
- package/dist/compositor/compose.js +3 -3
- package/dist/compositor/compositor.js +2 -2
- package/dist/compositor/get-executable-path.d.ts +2 -1
- package/dist/compositor/get-executable-path.js +17 -5
- package/dist/create-silent-audio.d.ts +4 -1
- package/dist/create-silent-audio.js +2 -2
- package/dist/guess-extension-for-media.d.ts +4 -1
- package/dist/guess-extension-for-media.js +2 -2
- package/dist/index.d.ts +12 -8
- package/dist/merge-audio-track.d.ts +3 -0
- package/dist/merge-audio-track.js +8 -2
- package/dist/open-browser.js +3 -3
- package/dist/options/gl.d.ts +1 -1
- package/dist/options/index.d.ts +1 -1
- package/dist/options/render-expiry-days.d.ts +8 -0
- package/dist/options/render-expiry-days.js +14 -0
- package/dist/preprocess-audio-track.d.ts +3 -0
- package/dist/preprocess-audio-track.js +3 -3
- package/dist/presets-profile.d.ts +7 -0
- package/dist/presets-profile.js +27 -0
- package/dist/prespawn-ffmpeg.js +1 -1
- package/dist/print-useful-error-message.js +1 -1
- package/dist/stitch-frames-to-video.d.ts +1 -0
- package/dist/stitch-frames-to-video.js +6 -2
- package/package.json +9 -9
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { LogLevel } from '../log-level';
|
|
1
2
|
import type { AudioChannelsAndDurationResultCache, DownloadMap } from './download-map';
|
|
2
|
-
export declare const getAudioChannelsAndDurationWithoutCache: (src: string) => Promise<AudioChannelsAndDurationResultCache>;
|
|
3
|
-
export declare const getAudioChannelsAndDuration: (downloadMap: DownloadMap, src: string) => Promise<AudioChannelsAndDurationResultCache>;
|
|
3
|
+
export declare const getAudioChannelsAndDurationWithoutCache: (src: string, indent: boolean, logLevel: LogLevel) => Promise<AudioChannelsAndDurationResultCache>;
|
|
4
|
+
export declare const getAudioChannelsAndDuration: (downloadMap: DownloadMap, src: string, indent: boolean, logLevel: LogLevel) => Promise<AudioChannelsAndDurationResultCache>;
|
|
@@ -4,7 +4,7 @@ exports.getAudioChannelsAndDuration = exports.getAudioChannelsAndDurationWithout
|
|
|
4
4
|
const call_ffmpeg_1 = require("../call-ffmpeg");
|
|
5
5
|
const p_limit_1 = require("../p-limit");
|
|
6
6
|
const limit = (0, p_limit_1.pLimit)(1);
|
|
7
|
-
const getAudioChannelsAndDurationWithoutCache = async (src) => {
|
|
7
|
+
const getAudioChannelsAndDurationWithoutCache = async (src, indent, logLevel) => {
|
|
8
8
|
const args = [
|
|
9
9
|
['-v', 'error'],
|
|
10
10
|
['-show_entries', 'stream=channels:format=duration'],
|
|
@@ -13,7 +13,7 @@ const getAudioChannelsAndDurationWithoutCache = async (src) => {
|
|
|
13
13
|
]
|
|
14
14
|
.reduce((acc, val) => acc.concat(val), [])
|
|
15
15
|
.filter(Boolean);
|
|
16
|
-
const task = await (0, call_ffmpeg_1.callFf)('ffprobe', args);
|
|
16
|
+
const task = await (0, call_ffmpeg_1.callFf)('ffprobe', args, indent, logLevel);
|
|
17
17
|
const channels = task.stdout.match(/channels=([0-9]+)/);
|
|
18
18
|
const duration = task.stdout.match(/duration=([0-9.]+)/);
|
|
19
19
|
const result = {
|
|
@@ -23,15 +23,15 @@ const getAudioChannelsAndDurationWithoutCache = async (src) => {
|
|
|
23
23
|
return result;
|
|
24
24
|
};
|
|
25
25
|
exports.getAudioChannelsAndDurationWithoutCache = getAudioChannelsAndDurationWithoutCache;
|
|
26
|
-
async function getAudioChannelsAndDurationUnlimited(downloadMap, src) {
|
|
26
|
+
async function getAudioChannelsAndDurationUnlimited(downloadMap, src, indent, logLevel) {
|
|
27
27
|
if (downloadMap.durationOfAssetCache[src]) {
|
|
28
28
|
return downloadMap.durationOfAssetCache[src];
|
|
29
29
|
}
|
|
30
|
-
const result = await (0, exports.getAudioChannelsAndDurationWithoutCache)(src);
|
|
30
|
+
const result = await (0, exports.getAudioChannelsAndDurationWithoutCache)(src, indent, logLevel);
|
|
31
31
|
downloadMap.durationOfAssetCache[src] = result;
|
|
32
32
|
return result;
|
|
33
33
|
}
|
|
34
|
-
const getAudioChannelsAndDuration = (downloadMap, src) => {
|
|
35
|
-
return limit(() => getAudioChannelsAndDurationUnlimited(downloadMap, src));
|
|
34
|
+
const getAudioChannelsAndDuration = (downloadMap, src, indent, logLevel) => {
|
|
35
|
+
return limit(() => getAudioChannelsAndDurationUnlimited(downloadMap, src, indent, logLevel));
|
|
36
36
|
};
|
|
37
37
|
exports.getAudioChannelsAndDuration = getAudioChannelsAndDuration;
|
package/dist/call-ffmpeg.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import execa from 'execa';
|
|
2
|
-
|
|
2
|
+
import type { LogLevel } from './log-level';
|
|
3
|
+
export declare const dynamicLibraryPathOptions: (indent: boolean, logLevel: LogLevel) => {
|
|
3
4
|
env: {
|
|
4
5
|
DYLD_LIBRARY_PATH: string;
|
|
5
6
|
RUST_BACKTRACE: string;
|
|
@@ -11,4 +12,4 @@ export declare const dynamicLibraryPathOptions: () => {
|
|
|
11
12
|
RUST_BACKTRACE: string;
|
|
12
13
|
};
|
|
13
14
|
};
|
|
14
|
-
export declare const callFf: (bin: 'ffmpeg' | 'ffprobe', args: (string | null)[], options?: execa.Options<string>) => execa.ExecaChildProcess<string>;
|
|
15
|
+
export declare const callFf: (bin: 'ffmpeg' | 'ffprobe', args: (string | null)[], indent: boolean, logLevel: LogLevel, options?: execa.Options<string>) => execa.ExecaChildProcess<string>;
|
package/dist/call-ffmpeg.js
CHANGED
|
@@ -9,8 +9,8 @@ const node_fs_1 = require("node:fs");
|
|
|
9
9
|
const node_path_1 = __importDefault(require("node:path"));
|
|
10
10
|
const get_executable_path_1 = require("./compositor/get-executable-path");
|
|
11
11
|
const truthy_1 = require("./truthy");
|
|
12
|
-
const dynamicLibraryPathOptions = () => {
|
|
13
|
-
const lib = node_path_1.default.join((0, get_executable_path_1.getExecutablePath)('ffmpeg-cwd'), 'remotion', 'lib');
|
|
12
|
+
const dynamicLibraryPathOptions = (indent, logLevel) => {
|
|
13
|
+
const lib = node_path_1.default.join((0, get_executable_path_1.getExecutablePath)('ffmpeg-cwd', indent, logLevel), 'remotion', 'lib');
|
|
14
14
|
return {
|
|
15
15
|
env: {
|
|
16
16
|
RUST_BACKTRACE: 'full',
|
|
@@ -29,13 +29,13 @@ const dynamicLibraryPathOptions = () => {
|
|
|
29
29
|
};
|
|
30
30
|
};
|
|
31
31
|
exports.dynamicLibraryPathOptions = dynamicLibraryPathOptions;
|
|
32
|
-
const callFf = (bin, args, options) => {
|
|
33
|
-
const executablePath = (0, get_executable_path_1.getExecutablePath)(bin);
|
|
32
|
+
const callFf = (bin, args, indent, logLevel, options) => {
|
|
33
|
+
const executablePath = (0, get_executable_path_1.getExecutablePath)(bin, indent, logLevel);
|
|
34
34
|
if (!process.env.READ_ONLY_FS) {
|
|
35
35
|
(0, node_fs_1.chmodSync)(executablePath, 0o755);
|
|
36
36
|
}
|
|
37
37
|
return (0, execa_1.default)(executablePath, args.filter(truthy_1.truthy), {
|
|
38
|
-
...(0, exports.dynamicLibraryPathOptions)(),
|
|
38
|
+
...(0, exports.dynamicLibraryPathOptions)(indent, logLevel),
|
|
39
39
|
...options,
|
|
40
40
|
});
|
|
41
41
|
};
|
package/dist/client.d.ts
CHANGED
|
@@ -311,7 +311,7 @@ export declare const BrowserSafeApis: {
|
|
|
311
311
|
cliFlag: string;
|
|
312
312
|
docLink: string;
|
|
313
313
|
name: string;
|
|
314
|
-
type: "
|
|
314
|
+
type: "angle" | "swangle" | "egl" | "swiftshader" | "vulkan" | "angle-egl";
|
|
315
315
|
ssrName: string;
|
|
316
316
|
description: () => JSX.Element;
|
|
317
317
|
};
|
package/dist/combine-videos.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { AudioCodec } from './audio-codec';
|
|
2
2
|
import type { Codec } from './codec';
|
|
3
|
+
import type { LogLevel } from './log-level';
|
|
3
4
|
type Options = {
|
|
4
5
|
files: string[];
|
|
5
6
|
filelistDir: string;
|
|
@@ -11,6 +12,8 @@ type Options = {
|
|
|
11
12
|
numberOfGifLoops: number | null;
|
|
12
13
|
audioCodec: AudioCodec | null;
|
|
13
14
|
audioBitrate: string | null;
|
|
15
|
+
indent: boolean;
|
|
16
|
+
logLevel: LogLevel;
|
|
14
17
|
};
|
|
15
18
|
export declare const combineVideos: (options: Options) => Promise<void>;
|
|
16
19
|
export {};
|
package/dist/combine-videos.js
CHANGED
|
@@ -49,7 +49,7 @@ const combineVideos = async (options) => {
|
|
|
49
49
|
].filter(truthy_1.truthy);
|
|
50
50
|
logger_1.Log.verbose('Combining command: ', command);
|
|
51
51
|
try {
|
|
52
|
-
const task = (0, call_ffmpeg_1.callFf)('ffmpeg', command);
|
|
52
|
+
const task = (0, call_ffmpeg_1.callFf)('ffmpeg', command, options.indent, options.logLevel);
|
|
53
53
|
(_a = task.stderr) === null || _a === void 0 ? void 0 : _a.on('data', (data) => {
|
|
54
54
|
if (onProgress) {
|
|
55
55
|
const parsed = (0, parse_ffmpeg_progress_1.parseFfmpegProgress)(data.toString('utf8'));
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { DownloadMap } from '../assets/download-map';
|
|
2
|
+
import type { LogLevel } from '../log-level';
|
|
2
3
|
import type { Compositor } from './compositor';
|
|
3
4
|
import type { CompositorCommand, CompositorCommandSerialized, CompositorImageFormat, Layer } from './payloads';
|
|
4
5
|
type CompositorInput = {
|
|
@@ -22,5 +23,5 @@ export declare const compose: ({ height, width, layers, output, downloadMap, ima
|
|
|
22
23
|
} & {
|
|
23
24
|
downloadMap: DownloadMap;
|
|
24
25
|
}) => Promise<void>;
|
|
25
|
-
export declare const callCompositor: (payload: string) => Promise<void>;
|
|
26
|
+
export declare const callCompositor: (payload: string, indent: boolean, logLevel: LogLevel) => Promise<void>;
|
|
26
27
|
export {};
|
|
@@ -48,13 +48,13 @@ const compose = async ({ height, width, layers, output, downloadMap, imageFormat
|
|
|
48
48
|
downloadMap.compositorCache[hash] = output;
|
|
49
49
|
};
|
|
50
50
|
exports.compose = compose;
|
|
51
|
-
const callCompositor = (payload) => {
|
|
51
|
+
const callCompositor = (payload, indent, logLevel) => {
|
|
52
52
|
return new Promise((resolve, reject) => {
|
|
53
|
-
const execPath = (0, get_executable_path_1.getExecutablePath)('compositor');
|
|
53
|
+
const execPath = (0, get_executable_path_1.getExecutablePath)('compositor', indent, logLevel);
|
|
54
54
|
if (!process.env.READ_ONLY_FS) {
|
|
55
55
|
(0, node_fs_1.chmodSync)(execPath, 0o755);
|
|
56
56
|
}
|
|
57
|
-
const child = (0, node_child_process_1.spawn)(execPath, [payload], (0, call_ffmpeg_1.dynamicLibraryPathOptions)());
|
|
57
|
+
const child = (0, node_child_process_1.spawn)(execPath, [payload], (0, call_ffmpeg_1.dynamicLibraryPathOptions)(indent, logLevel));
|
|
58
58
|
const stderrChunks = [];
|
|
59
59
|
child.stderr.on('data', (d) => stderrChunks.push(d));
|
|
60
60
|
child.on('close', (code) => {
|
|
@@ -20,12 +20,12 @@ const startLongRunningCompositor = ({ maximumFrameCacheItemsInBytes, logLevel, i
|
|
|
20
20
|
exports.startLongRunningCompositor = startLongRunningCompositor;
|
|
21
21
|
const startCompositor = (type, payload, logLevel, indent) => {
|
|
22
22
|
var _a;
|
|
23
|
-
const bin = (0, get_executable_path_1.getExecutablePath)('compositor');
|
|
23
|
+
const bin = (0, get_executable_path_1.getExecutablePath)('compositor', indent, logLevel);
|
|
24
24
|
if (!process.env.READ_ONLY_FS) {
|
|
25
25
|
(0, node_fs_1.chmodSync)(bin, 0o755);
|
|
26
26
|
}
|
|
27
27
|
const fullCommand = (0, compose_1.serializeCommand)(type, payload);
|
|
28
|
-
const child = (0, node_child_process_1.spawn)(bin, [JSON.stringify(fullCommand)], (0, call_ffmpeg_1.dynamicLibraryPathOptions)());
|
|
28
|
+
const child = (0, node_child_process_1.spawn)(bin, [JSON.stringify(fullCommand)], (0, call_ffmpeg_1.dynamicLibraryPathOptions)(indent, logLevel));
|
|
29
29
|
const stderrChunks = [];
|
|
30
30
|
let outputBuffer = Buffer.from('');
|
|
31
31
|
const separator = Buffer.from('remotion_buffer:');
|
|
@@ -1 +1,2 @@
|
|
|
1
|
-
|
|
1
|
+
import type { LogLevel } from '../log-level';
|
|
2
|
+
export declare const getExecutablePath: (type: 'compositor' | 'ffmpeg' | 'ffprobe' | 'ffmpeg-cwd', indent: boolean, logLevel: LogLevel) => string;
|
|
@@ -2,12 +2,22 @@
|
|
|
2
2
|
// Adapted from @swc/core package
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
4
|
exports.getExecutablePath = void 0;
|
|
5
|
-
|
|
5
|
+
const logger_1 = require("../logger");
|
|
6
|
+
let warned = false;
|
|
7
|
+
function isMusl({ indent, logLevel }) {
|
|
8
|
+
// @ts-expect-error bun no types
|
|
9
|
+
if (process.report && typeof Bun !== 'undefined') {
|
|
10
|
+
if (!warned) {
|
|
11
|
+
logger_1.Log.warnAdvanced({ indent, logLevel }, 'Bun limitation: Could not determine if your Linux is using musl or glibc. Assuming glibc.');
|
|
12
|
+
}
|
|
13
|
+
warned = true;
|
|
14
|
+
return false;
|
|
15
|
+
}
|
|
6
16
|
// @ts-expect-error no types
|
|
7
17
|
const { glibcVersionRuntime } = process.report.getReport().header;
|
|
8
18
|
return !glibcVersionRuntime;
|
|
9
19
|
}
|
|
10
|
-
const getExecutablePath = (type) => {
|
|
20
|
+
const getExecutablePath = (type, indent, logLevel) => {
|
|
11
21
|
if (type === 'compositor' && process.env.COMPOSITOR_PATH) {
|
|
12
22
|
return process.env.COMPOSITOR_PATH;
|
|
13
23
|
}
|
|
@@ -35,21 +45,23 @@ const getExecutablePath = (type) => {
|
|
|
35
45
|
default:
|
|
36
46
|
throw new Error(`Unsupported architecture on macOS: ${process.arch}`);
|
|
37
47
|
}
|
|
38
|
-
case 'linux':
|
|
48
|
+
case 'linux': {
|
|
49
|
+
const musl = isMusl({ indent, logLevel });
|
|
39
50
|
switch (process.arch) {
|
|
40
51
|
case 'x64':
|
|
41
|
-
if (
|
|
52
|
+
if (musl) {
|
|
42
53
|
return require('@remotion/compositor-linux-x64-musl')[key];
|
|
43
54
|
}
|
|
44
55
|
return require('@remotion/compositor-linux-x64-gnu')[key];
|
|
45
56
|
case 'arm64':
|
|
46
|
-
if (
|
|
57
|
+
if (musl) {
|
|
47
58
|
return require('@remotion/compositor-linux-arm64-musl')[key];
|
|
48
59
|
}
|
|
49
60
|
return require('@remotion/compositor-linux-arm64-gnu')[key];
|
|
50
61
|
default:
|
|
51
62
|
throw new Error(`Unsupported architecture on Linux: ${process.arch}`);
|
|
52
63
|
}
|
|
64
|
+
}
|
|
53
65
|
default:
|
|
54
66
|
throw new Error(`Unsupported OS: ${process.platform}, architecture: ${process.arch}`);
|
|
55
67
|
}
|
|
@@ -1,4 +1,7 @@
|
|
|
1
|
-
|
|
1
|
+
import type { LogLevel } from './log-level';
|
|
2
|
+
export declare const createSilentAudio: ({ numberOfSeconds, outName, indent, logLevel, }: {
|
|
2
3
|
numberOfSeconds: number;
|
|
3
4
|
outName: string;
|
|
5
|
+
indent: boolean;
|
|
6
|
+
logLevel: LogLevel;
|
|
4
7
|
}) => Promise<void>;
|
|
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.createSilentAudio = void 0;
|
|
4
4
|
const call_ffmpeg_1 = require("./call-ffmpeg");
|
|
5
5
|
const sample_rate_1 = require("./sample-rate");
|
|
6
|
-
const createSilentAudio = async ({ numberOfSeconds, outName, }) => {
|
|
6
|
+
const createSilentAudio = async ({ numberOfSeconds, outName, indent, logLevel, }) => {
|
|
7
7
|
await (0, call_ffmpeg_1.callFf)('ffmpeg', [
|
|
8
8
|
'-f',
|
|
9
9
|
'lavfi',
|
|
@@ -16,6 +16,6 @@ const createSilentAudio = async ({ numberOfSeconds, outName, }) => {
|
|
|
16
16
|
'-ar',
|
|
17
17
|
String(sample_rate_1.DEFAULT_SAMPLE_RATE),
|
|
18
18
|
outName,
|
|
19
|
-
]);
|
|
19
|
+
], indent, logLevel);
|
|
20
20
|
};
|
|
21
21
|
exports.createSilentAudio = createSilentAudio;
|
|
@@ -1,3 +1,6 @@
|
|
|
1
|
-
|
|
1
|
+
import type { LogLevel } from './log-level';
|
|
2
|
+
export declare const guessExtensionForVideo: ({ src, indent, logLevel, }: {
|
|
2
3
|
src: string;
|
|
4
|
+
indent: boolean;
|
|
5
|
+
logLevel: LogLevel;
|
|
3
6
|
}) => Promise<"mp3" | "wav" | "mp4" | "webm">;
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.guessExtensionForVideo = void 0;
|
|
4
4
|
const call_ffmpeg_1 = require("./call-ffmpeg");
|
|
5
|
-
const guessExtensionForVideo = async ({ src }) => {
|
|
6
|
-
const { stderr } = await (0, call_ffmpeg_1.callFf)('ffprobe', [src]);
|
|
5
|
+
const guessExtensionForVideo = async ({ src, indent, logLevel, }) => {
|
|
6
|
+
const { stderr } = await (0, call_ffmpeg_1.callFf)('ffprobe', [src], indent, logLevel);
|
|
7
7
|
if (stderr.includes('Audio: mp3,')) {
|
|
8
8
|
return 'mp3';
|
|
9
9
|
}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
/// <reference types="node" />
|
|
2
|
+
/// <reference types="react" />
|
|
1
3
|
import execa from 'execa';
|
|
2
4
|
import { HeadlessBrowser } from './browser/Browser';
|
|
3
5
|
import { SymbolicateableError } from './error-handling/symbolicateable-error';
|
|
@@ -134,8 +136,8 @@ export declare const RenderInternals: {
|
|
|
134
136
|
validPixelFormats: readonly ["yuv420p", "yuva420p", "yuv422p", "yuv444p", "yuv420p10le", "yuv422p10le", "yuv444p10le", "yuva444p10le"];
|
|
135
137
|
DEFAULT_BROWSER: "chrome";
|
|
136
138
|
validateFrameRange: (frameRange: import("./frame-range").FrameRange | null) => void;
|
|
137
|
-
DEFAULT_OPENGL_RENDERER: "
|
|
138
|
-
validateOpenGlRenderer: (option: "
|
|
139
|
+
DEFAULT_OPENGL_RENDERER: "angle" | "swangle" | "egl" | "swiftshader" | "vulkan" | "angle-egl" | null;
|
|
140
|
+
validateOpenGlRenderer: (option: "angle" | "swangle" | "egl" | "swiftshader" | "vulkan" | "angle-egl" | null) => "angle" | "swangle" | "egl" | "swiftshader" | "vulkan" | "angle-egl" | null;
|
|
139
141
|
validCodecs: readonly ["h264", "h265", "vp8", "vp9", "mp3", "aac", "wav", "prores", "h264-mkv", "gif"];
|
|
140
142
|
DEFAULT_PIXEL_FORMAT: "yuv420p" | "yuva420p" | "yuv422p" | "yuv444p" | "yuv420p10le" | "yuv422p10le" | "yuv444p10le" | "yuva444p10le";
|
|
141
143
|
validateJpegQuality: (q: number | undefined) => void;
|
|
@@ -163,6 +165,8 @@ export declare const RenderInternals: {
|
|
|
163
165
|
numberOfGifLoops: number | null;
|
|
164
166
|
audioCodec: "mp3" | "aac" | "pcm-16" | "opus" | null;
|
|
165
167
|
audioBitrate: string | null;
|
|
168
|
+
indent: boolean;
|
|
169
|
+
logLevel: "verbose" | "info" | "warn" | "error";
|
|
166
170
|
}) => Promise<void>;
|
|
167
171
|
getMinConcurrency: () => number;
|
|
168
172
|
getMaxConcurrency: () => number;
|
|
@@ -308,9 +312,9 @@ export declare const RenderInternals: {
|
|
|
308
312
|
};
|
|
309
313
|
makeFileExtensionMap: () => Record<string, ("h264" | "h265" | "vp8" | "vp9" | "mp3" | "aac" | "wav" | "prores" | "h264-mkv" | "gif")[]>;
|
|
310
314
|
defaultCodecsForFileExtension: Record<import("./file-extensions").FileExtension, "h264" | "h265" | "vp8" | "vp9" | "mp3" | "aac" | "wav" | "prores" | "h264-mkv" | "gif">;
|
|
311
|
-
getExecutablePath: (type: "compositor" | "ffmpeg" | "ffprobe" | "ffmpeg-cwd") => string;
|
|
312
|
-
callFf: (bin: "ffmpeg" | "ffprobe", args: (string | null)[], options?: execa.Options<string> | undefined) => execa.ExecaChildProcess<string>;
|
|
313
|
-
dynamicLibraryPathOptions: () => {
|
|
315
|
+
getExecutablePath: (type: "compositor" | "ffmpeg" | "ffprobe" | "ffmpeg-cwd", indent: boolean, logLevel: "verbose" | "info" | "warn" | "error") => string;
|
|
316
|
+
callFf: (bin: "ffmpeg" | "ffprobe", args: (string | null)[], indent: boolean, logLevel: "verbose" | "info" | "warn" | "error", options?: execa.Options<string> | undefined) => execa.ExecaChildProcess<string>;
|
|
317
|
+
dynamicLibraryPathOptions: (indent: boolean, logLevel: "verbose" | "info" | "warn" | "error") => {
|
|
314
318
|
env: {
|
|
315
319
|
DYLD_LIBRARY_PATH: string;
|
|
316
320
|
RUST_BACKTRACE: string;
|
|
@@ -324,8 +328,8 @@ export declare const RenderInternals: {
|
|
|
324
328
|
};
|
|
325
329
|
validStillImageFormats: readonly ["png", "jpeg", "pdf", "webp"];
|
|
326
330
|
validVideoImageFormats: readonly ["png", "jpeg", "none"];
|
|
327
|
-
DEFAULT_STILL_IMAGE_FORMAT: "
|
|
328
|
-
DEFAULT_VIDEO_IMAGE_FORMAT: "
|
|
331
|
+
DEFAULT_STILL_IMAGE_FORMAT: "jpeg" | "png" | "webp" | "pdf";
|
|
332
|
+
DEFAULT_VIDEO_IMAGE_FORMAT: "jpeg" | "png" | "none";
|
|
329
333
|
DEFAULT_JPEG_QUALITY: number;
|
|
330
334
|
chalk: {
|
|
331
335
|
enabled: () => boolean;
|
|
@@ -438,7 +442,7 @@ export declare const RenderInternals: {
|
|
|
438
442
|
frame: number;
|
|
439
443
|
serializedInputPropsWithCustomSchema: string;
|
|
440
444
|
serializedResolvedPropsWithCustomSchema: string;
|
|
441
|
-
imageFormat: "
|
|
445
|
+
imageFormat: "jpeg" | "png" | "webp" | "pdf";
|
|
442
446
|
jpegQuality: number;
|
|
443
447
|
puppeteerInstance: HeadlessBrowser | null;
|
|
444
448
|
envVariables: Record<string, string>;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { DownloadMap } from './assets/download-map';
|
|
2
|
+
import type { LogLevel } from './log-level';
|
|
2
3
|
import type { PreprocessedAudioTrack } from './preprocess-audio-track';
|
|
3
4
|
type Options = {
|
|
4
5
|
files: PreprocessedAudioTrack[];
|
|
@@ -6,6 +7,8 @@ type Options = {
|
|
|
6
7
|
numberOfSeconds: number;
|
|
7
8
|
downloadMap: DownloadMap;
|
|
8
9
|
remotionRoot: string;
|
|
10
|
+
indent: boolean;
|
|
11
|
+
logLevel: LogLevel;
|
|
9
12
|
};
|
|
10
13
|
export declare const mergeAudioTrack: (options: Options) => Promise<void>;
|
|
11
14
|
export {};
|
|
@@ -14,11 +14,13 @@ const delete_directory_1 = require("./delete-directory");
|
|
|
14
14
|
const p_limit_1 = require("./p-limit");
|
|
15
15
|
const tmp_dir_1 = require("./tmp-dir");
|
|
16
16
|
const truthy_1 = require("./truthy");
|
|
17
|
-
const mergeAudioTrackUnlimited = async ({ outName, files, numberOfSeconds, downloadMap, remotionRoot, }) => {
|
|
17
|
+
const mergeAudioTrackUnlimited = async ({ outName, files, numberOfSeconds, downloadMap, remotionRoot, indent, logLevel, }) => {
|
|
18
18
|
if (files.length === 0) {
|
|
19
19
|
await (0, create_silent_audio_1.createSilentAudio)({
|
|
20
20
|
outName,
|
|
21
21
|
numberOfSeconds,
|
|
22
|
+
indent,
|
|
23
|
+
logLevel,
|
|
22
24
|
});
|
|
23
25
|
return;
|
|
24
26
|
}
|
|
@@ -36,6 +38,8 @@ const mergeAudioTrackUnlimited = async ({ outName, files, numberOfSeconds, downl
|
|
|
36
38
|
outName: chunkOutname,
|
|
37
39
|
downloadMap,
|
|
38
40
|
remotionRoot,
|
|
41
|
+
indent,
|
|
42
|
+
logLevel,
|
|
39
43
|
});
|
|
40
44
|
return chunkOutname;
|
|
41
45
|
}));
|
|
@@ -51,6 +55,8 @@ const mergeAudioTrackUnlimited = async ({ outName, files, numberOfSeconds, downl
|
|
|
51
55
|
outName,
|
|
52
56
|
downloadMap,
|
|
53
57
|
remotionRoot,
|
|
58
|
+
indent,
|
|
59
|
+
logLevel,
|
|
54
60
|
});
|
|
55
61
|
return;
|
|
56
62
|
}
|
|
@@ -71,7 +77,7 @@ const mergeAudioTrackUnlimited = async ({ outName, files, numberOfSeconds, downl
|
|
|
71
77
|
]
|
|
72
78
|
.filter(truthy_1.truthy)
|
|
73
79
|
.flat(2);
|
|
74
|
-
const task = (0, call_ffmpeg_1.callFf)('ffmpeg', args);
|
|
80
|
+
const task = (0, call_ffmpeg_1.callFf)('ffmpeg', args, indent, logLevel);
|
|
75
81
|
await task;
|
|
76
82
|
cleanup();
|
|
77
83
|
};
|
package/dist/open-browser.js
CHANGED
|
@@ -10,15 +10,15 @@ const getOpenGlRenderer = (option) => {
|
|
|
10
10
|
const renderer = option !== null && option !== void 0 ? option : gl_1.DEFAULT_OPENGL_RENDERER;
|
|
11
11
|
(0, gl_1.validateOpenGlRenderer)(renderer);
|
|
12
12
|
if (renderer === 'swangle') {
|
|
13
|
-
return [
|
|
13
|
+
return ['--use-gl=angle', '--use-angle=swiftshader'];
|
|
14
14
|
}
|
|
15
15
|
if (renderer === 'angle-egl') {
|
|
16
|
-
return [
|
|
16
|
+
return ['--use-gl=angle', '--use-angle=gl-egl'];
|
|
17
17
|
}
|
|
18
18
|
if (renderer === 'vulkan') {
|
|
19
19
|
return [
|
|
20
20
|
'--use-angle=vulkan',
|
|
21
|
-
|
|
21
|
+
'--use-vulkan=swiftshader',
|
|
22
22
|
'--disable-vulkan-fallback-to-gl-for-testing',
|
|
23
23
|
'--dignore-gpu-blocklist',
|
|
24
24
|
'--enable-features=Vulkan,UseSkiaRenderer',
|
package/dist/options/gl.d.ts
CHANGED
|
@@ -4,7 +4,7 @@ export declare const glOption: {
|
|
|
4
4
|
cliFlag: string;
|
|
5
5
|
docLink: string;
|
|
6
6
|
name: string;
|
|
7
|
-
type: "
|
|
7
|
+
type: "angle" | "swangle" | "egl" | "swiftshader" | "vulkan" | "angle-egl";
|
|
8
8
|
ssrName: string;
|
|
9
9
|
description: () => JSX.Element;
|
|
10
10
|
};
|
package/dist/options/index.d.ts
CHANGED
|
@@ -116,7 +116,7 @@ export declare const allOptions: {
|
|
|
116
116
|
cliFlag: string;
|
|
117
117
|
docLink: string;
|
|
118
118
|
name: string;
|
|
119
|
-
type: "
|
|
119
|
+
type: "angle" | "swangle" | "egl" | "swiftshader" | "vulkan" | "angle-egl";
|
|
120
120
|
ssrName: string;
|
|
121
121
|
description: () => JSX.Element;
|
|
122
122
|
};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.deleteAfterOption = void 0;
|
|
4
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
+
exports.deleteAfterOption = {
|
|
6
|
+
name: 'Render expiry days',
|
|
7
|
+
cliFlag: 'delete-after',
|
|
8
|
+
description: () => {
|
|
9
|
+
return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: ["Automatically delete the render after a certain period. Accepted values are ", (0, jsx_runtime_1.jsx)("code", { children: "1-day" }), ", ", (0, jsx_runtime_1.jsx)("code", { children: "3-days" }), ", ", (0, jsx_runtime_1.jsx)("code", { children: "7-days" }), " and", ' ', (0, jsx_runtime_1.jsx)("code", { children: "30-days" }), ".", (0, jsx_runtime_1.jsx)("br", {}), " For this to work, your bucket needs to have", ' ', (0, jsx_runtime_1.jsx)("a", { href: "/docs/lambda/autodelete", children: "lifecycles enabled" }), "."] }));
|
|
10
|
+
},
|
|
11
|
+
ssrName: 'deleteAfter',
|
|
12
|
+
docLink: 'https://www.remotion.dev/docs/autodelete',
|
|
13
|
+
type: 0,
|
|
14
|
+
};
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { DownloadMap } from './assets/download-map';
|
|
2
2
|
import type { MediaAsset } from './assets/types';
|
|
3
|
+
import type { LogLevel } from './log-level';
|
|
3
4
|
import type { ProcessedTrack } from './stringify-ffmpeg-filter';
|
|
4
5
|
type Options = {
|
|
5
6
|
outName: string;
|
|
@@ -7,6 +8,8 @@ type Options = {
|
|
|
7
8
|
expectedFrames: number;
|
|
8
9
|
fps: number;
|
|
9
10
|
downloadMap: DownloadMap;
|
|
11
|
+
indent: boolean;
|
|
12
|
+
logLevel: LogLevel;
|
|
10
13
|
};
|
|
11
14
|
export type PreprocessedAudioTrack = {
|
|
12
15
|
outName: string;
|
|
@@ -8,8 +8,8 @@ const ffmpeg_filter_file_1 = require("./ffmpeg-filter-file");
|
|
|
8
8
|
const p_limit_1 = require("./p-limit");
|
|
9
9
|
const resolve_asset_src_1 = require("./resolve-asset-src");
|
|
10
10
|
const sample_rate_1 = require("./sample-rate");
|
|
11
|
-
const preprocessAudioTrackUnlimited = async ({ outName, asset, expectedFrames, fps, downloadMap, }) => {
|
|
12
|
-
const { channels, duration } = await (0, get_audio_channels_1.getAudioChannelsAndDuration)(downloadMap, (0, resolve_asset_src_1.resolveAssetSrc)(asset.src));
|
|
11
|
+
const preprocessAudioTrackUnlimited = async ({ outName, asset, expectedFrames, fps, downloadMap, indent, logLevel, }) => {
|
|
12
|
+
const { channels, duration } = await (0, get_audio_channels_1.getAudioChannelsAndDuration)(downloadMap, (0, resolve_asset_src_1.resolveAssetSrc)(asset.src), indent, logLevel);
|
|
13
13
|
const filter = (0, calculate_ffmpeg_filters_1.calculateFfmpegFilter)({
|
|
14
14
|
asset,
|
|
15
15
|
durationInFrames: expectedFrames,
|
|
@@ -29,7 +29,7 @@ const preprocessAudioTrackUnlimited = async ({ outName, asset, expectedFrames, f
|
|
|
29
29
|
['-ar', String(sample_rate_1.DEFAULT_SAMPLE_RATE)],
|
|
30
30
|
['-y', outName],
|
|
31
31
|
].flat(2);
|
|
32
|
-
await (0, call_ffmpeg_1.callFf)('ffmpeg', args);
|
|
32
|
+
await (0, call_ffmpeg_1.callFf)('ffmpeg', args, indent, logLevel);
|
|
33
33
|
cleanup();
|
|
34
34
|
return { outName, filter };
|
|
35
35
|
};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { Codec } from './codec';
|
|
2
|
+
export declare const x264PresetOptions: readonly ["ultrafast", "superfast", "veryfast", "faster", "fast", "medium", "slow", "slower", "veryslow", "placebo"];
|
|
3
|
+
export type x264Preset = typeof x264PresetOptions[number];
|
|
4
|
+
export declare const validateSelectedCodecAndPresetCombination: ({ codec, x264Preset, }: {
|
|
5
|
+
codec: Codec;
|
|
6
|
+
x264Preset: "ultrafast" | "superfast" | "veryfast" | "faster" | "fast" | "medium" | "slow" | "slower" | "veryslow" | "placebo" | undefined;
|
|
7
|
+
}) => void;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.validateSelectedCodecAndPresetCombination = exports.x264PresetOptions = void 0;
|
|
4
|
+
exports.x264PresetOptions = [
|
|
5
|
+
'ultrafast',
|
|
6
|
+
'superfast',
|
|
7
|
+
'veryfast',
|
|
8
|
+
'faster',
|
|
9
|
+
'fast',
|
|
10
|
+
'medium',
|
|
11
|
+
'slow',
|
|
12
|
+
'slower',
|
|
13
|
+
'veryslow',
|
|
14
|
+
'placebo',
|
|
15
|
+
];
|
|
16
|
+
const validateSelectedCodecAndPresetCombination = ({ codec, x264Preset, }) => {
|
|
17
|
+
if (typeof x264Preset !== 'undefined' && codec !== 'h264') {
|
|
18
|
+
throw new TypeError(`You have set a Preset profile but the codec is "${codec}". Set the codec to "h264" or remove the Preset profile.`);
|
|
19
|
+
}
|
|
20
|
+
if (x264Preset !== undefined &&
|
|
21
|
+
!exports.x264PresetOptions.includes(x264Preset)) {
|
|
22
|
+
throw new TypeError(`The Preset profile "${x264Preset}" is not valid. Valid options are ${exports.x264PresetOptions
|
|
23
|
+
.map((p) => `"${p}"`)
|
|
24
|
+
.join(', ')}`);
|
|
25
|
+
}
|
|
26
|
+
};
|
|
27
|
+
exports.validateSelectedCodecAndPresetCombination = validateSelectedCodecAndPresetCombination;
|
package/dist/prespawn-ffmpeg.js
CHANGED
|
@@ -63,7 +63,7 @@ const prespawnFfmpeg = (options) => {
|
|
|
63
63
|
const finalFfmpegString = options.ffmpegOverride
|
|
64
64
|
? options.ffmpegOverride({ type: 'pre-stitcher', args: ffmpegString })
|
|
65
65
|
: ffmpegString;
|
|
66
|
-
const task = (0, call_ffmpeg_1.callFf)('ffmpeg', finalFfmpegString);
|
|
66
|
+
const task = (0, call_ffmpeg_1.callFf)('ffmpeg', finalFfmpegString, options.indent, options.logLevel);
|
|
67
67
|
options.signal(() => {
|
|
68
68
|
task.kill();
|
|
69
69
|
});
|
|
@@ -37,7 +37,7 @@ const printUsefulErrorMessage = (err) => {
|
|
|
37
37
|
}
|
|
38
38
|
if (err.message.includes('Error creating WebGL context')) {
|
|
39
39
|
console.log();
|
|
40
|
-
console.warn('💡 You might need to set the OpenGL renderer to "angle" (or "swangle" if rendering on lambda). Learn why at https://www.remotion.dev/docs/three');
|
|
40
|
+
console.warn('💡 You might need to set the OpenGL renderer to "angle-egl", "angle" (or "swangle" if rendering on lambda). Learn why at https://www.remotion.dev/docs/three');
|
|
41
41
|
console.warn("💡 Check how it's done at https://www.remotion.dev/docs/chromium-flags#--gl");
|
|
42
42
|
}
|
|
43
43
|
if (err.message.includes('The bucket does not allow ACLs')) {
|
|
@@ -83,6 +83,8 @@ const getAssetsData = async ({ assets, onDownload, fps, expectedFrames, logLevel
|
|
|
83
83
|
expectedFrames,
|
|
84
84
|
fps,
|
|
85
85
|
downloadMap,
|
|
86
|
+
indent,
|
|
87
|
+
logLevel,
|
|
86
88
|
});
|
|
87
89
|
preprocessProgress[index] = 1;
|
|
88
90
|
updateProgress();
|
|
@@ -95,6 +97,8 @@ const getAssetsData = async ({ assets, onDownload, fps, expectedFrames, logLevel
|
|
|
95
97
|
numberOfSeconds: Number((expectedFrames / fps).toFixed(3)),
|
|
96
98
|
downloadMap,
|
|
97
99
|
remotionRoot,
|
|
100
|
+
indent,
|
|
101
|
+
logLevel,
|
|
98
102
|
});
|
|
99
103
|
onProgress(1);
|
|
100
104
|
(0, delete_directory_1.deleteDirectory)(downloadMap.audioMixing);
|
|
@@ -198,7 +202,7 @@ const innerStitchFramesToVideo = async ({ assetsInfo, audioBitrate, audioCodec,
|
|
|
198
202
|
audioBitrate ? audioBitrate : '320k',
|
|
199
203
|
force ? '-y' : null,
|
|
200
204
|
outputLocation !== null && outputLocation !== void 0 ? outputLocation : tempFile,
|
|
201
|
-
].filter(remotion_1.Internals.truthy));
|
|
205
|
+
].filter(remotion_1.Internals.truthy), indent, logLevel);
|
|
202
206
|
cancelSignal === null || cancelSignal === void 0 ? void 0 : cancelSignal(() => {
|
|
203
207
|
ffmpegTask.kill();
|
|
204
208
|
});
|
|
@@ -281,7 +285,7 @@ const innerStitchFramesToVideo = async ({ assetsInfo, audioBitrate, audioCodec,
|
|
|
281
285
|
logLevel,
|
|
282
286
|
tag: 'stitchFramesToVideo()',
|
|
283
287
|
}, finalFfmpegString.join(' '));
|
|
284
|
-
const task = (0, call_ffmpeg_1.callFf)('ffmpeg', finalFfmpegString, {
|
|
288
|
+
const task = (0, call_ffmpeg_1.callFf)('ffmpeg', finalFfmpegString, indent, logLevel, {
|
|
285
289
|
cwd: dir,
|
|
286
290
|
});
|
|
287
291
|
cancelSignal === null || cancelSignal === void 0 ? void 0 : cancelSignal(() => {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@remotion/renderer",
|
|
3
|
-
"version": "4.0.
|
|
3
|
+
"version": "4.0.55",
|
|
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.55"
|
|
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-arm64": "4.0.
|
|
44
|
-
"@remotion/compositor-
|
|
45
|
-
"@remotion/compositor-
|
|
46
|
-
"@remotion/compositor-
|
|
47
|
-
"@remotion/compositor-linux-
|
|
48
|
-
"@remotion/compositor-linux-arm64-musl": "4.0.
|
|
49
|
-
"@remotion/compositor-
|
|
43
|
+
"@remotion/compositor-darwin-arm64": "4.0.55",
|
|
44
|
+
"@remotion/compositor-linux-arm64-gnu": "4.0.55",
|
|
45
|
+
"@remotion/compositor-darwin-x64": "4.0.55",
|
|
46
|
+
"@remotion/compositor-linux-x64-gnu": "4.0.55",
|
|
47
|
+
"@remotion/compositor-linux-x64-musl": "4.0.55",
|
|
48
|
+
"@remotion/compositor-linux-arm64-musl": "4.0.55",
|
|
49
|
+
"@remotion/compositor-win32-x64-msvc": "4.0.55"
|
|
50
50
|
},
|
|
51
51
|
"keywords": [
|
|
52
52
|
"remotion",
|