@remotion/cli 4.0.41 → 4.0.43
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/config/chromium-flags.d.ts +2 -0
- package/dist/config/chromium-flags.js +8 -1
- package/dist/config/index.d.ts +9 -1
- package/dist/config/index.js +2 -0
- package/dist/config/log.d.ts +1 -1
- package/dist/config/presets-profile.d.ts +3 -0
- package/dist/config/presets-profile.js +12 -0
- package/dist/editor/components/CopyButton.js +1 -1
- package/dist/editor/components/JSONViewer.d.ts +4 -0
- package/dist/editor/components/JSONViewer.js +26 -0
- package/dist/editor/components/KnownBugs.js +5 -1
- package/dist/editor/components/Modals.js +2 -2
- package/dist/editor/components/NewComposition/RemInput.d.ts +2 -2
- package/dist/editor/components/NewComposition/RemInputTypeColor.d.ts +1 -1
- package/dist/editor/components/NewComposition/RemTextarea.d.ts +1 -1
- package/dist/editor/components/RenderButton.js +1 -0
- package/dist/editor/components/RenderModal/RenderModal.d.ts +1 -0
- package/dist/editor/components/RenderModal/RenderModal.js +43 -6
- package/dist/editor/components/RenderModal/RenderModalAdvanced.d.ts +2 -0
- package/dist/editor/components/RenderModal/RenderModalAdvanced.js +5 -2
- package/dist/editor/components/RenderQueue/actions.d.ts +6 -3
- package/dist/editor/components/RenderQueue/actions.js +6 -3
- package/dist/editor/components/RenderQueue/index.js +40 -2
- package/dist/editor/components/SidebarRenderButton.js +1 -0
- package/dist/editor/components/UpdateCheck.d.ts +7 -0
- package/dist/editor/components/UpdateCheck.js +36 -5
- package/dist/editor/components/UpdateModal/UpdateModal.d.ts +2 -1
- package/dist/editor/components/UpdateModal/UpdateModal.js +27 -11
- package/dist/editor/helpers/checkerboard-background.d.ts +1 -1
- package/dist/editor/helpers/colors.d.ts +1 -1
- package/dist/editor/helpers/render-modal-sections.d.ts +1 -0
- package/dist/editor/state/modals.d.ts +3 -1
- package/dist/get-cli-options.d.ts +2 -2
- package/dist/get-cli-options.js +1 -0
- package/dist/handle-common-errors.d.ts +2 -0
- package/dist/handle-common-errors.js +60 -0
- package/dist/index.d.ts +11 -10
- package/dist/index.js +10 -1
- package/dist/log.d.ts +4 -4
- package/dist/parse-command-line.d.ts +2 -1
- package/dist/parse-command-line.js +4 -0
- package/dist/preview-server/render-queue/job.d.ts +2 -0
- package/dist/preview-server/render-queue/make-retry-payload.js +3 -0
- package/dist/preview-server/routes/add-render.js +3 -0
- package/dist/preview-server/routes.d.ts +1 -0
- package/dist/preview-server/routes.js +2 -0
- package/dist/render-flows/render.js +1 -0
- package/package.json +8 -8
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
1
2
|
import type { PackageManager } from '../../preview-server/get-package-manager';
|
|
2
3
|
export type UpdateInfo = {
|
|
3
4
|
currentVersion: string;
|
|
@@ -6,4 +7,10 @@ export type UpdateInfo = {
|
|
|
6
7
|
timedOut: boolean;
|
|
7
8
|
packageManager: PackageManager | 'unknown';
|
|
8
9
|
};
|
|
10
|
+
export type Bug = {
|
|
11
|
+
title: string;
|
|
12
|
+
description: string;
|
|
13
|
+
link: string;
|
|
14
|
+
versions: string[];
|
|
15
|
+
};
|
|
9
16
|
export declare const UpdateCheck: () => JSX.Element | null;
|
|
@@ -3,6 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.UpdateCheck = void 0;
|
|
4
4
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
5
|
const react_1 = require("react");
|
|
6
|
+
const remotion_1 = require("remotion");
|
|
6
7
|
const colors_1 = require("../helpers/colors");
|
|
7
8
|
const modals_1 = require("../state/modals");
|
|
8
9
|
const z_index_1 = require("../state/z-index");
|
|
@@ -20,6 +21,10 @@ const UpdateCheck = () => {
|
|
|
20
21
|
const [info, setInfo] = (0, react_1.useState)(null);
|
|
21
22
|
const { setSelectedModal } = (0, react_1.useContext)(modals_1.ModalsContext);
|
|
22
23
|
const { tabIndex } = (0, z_index_1.useZIndex)();
|
|
24
|
+
const [knownBugs, setKnownBugs] = (0, react_1.useState)(null);
|
|
25
|
+
const hasKnownBugs = (0, react_1.useMemo)(() => {
|
|
26
|
+
return knownBugs && knownBugs.length > 0;
|
|
27
|
+
}, [knownBugs]);
|
|
23
28
|
const checkForUpdates = (0, react_1.useCallback)(() => {
|
|
24
29
|
const controller = new AbortController();
|
|
25
30
|
(0, actions_1.updateAvailable)(controller.signal)
|
|
@@ -34,24 +39,50 @@ const UpdateCheck = () => {
|
|
|
34
39
|
});
|
|
35
40
|
return controller;
|
|
36
41
|
}, []);
|
|
42
|
+
const checkForBugs = (0, react_1.useCallback)(() => {
|
|
43
|
+
const controller = new AbortController();
|
|
44
|
+
fetch(`https://bugs.remotion.dev/api/${remotion_1.VERSION}`, {
|
|
45
|
+
signal: controller.signal,
|
|
46
|
+
})
|
|
47
|
+
.then(async (res) => {
|
|
48
|
+
const body = await res.json();
|
|
49
|
+
setKnownBugs(body.bugs);
|
|
50
|
+
})
|
|
51
|
+
.catch((err) => {
|
|
52
|
+
if (err.message.includes('aborted')) {
|
|
53
|
+
return;
|
|
54
|
+
}
|
|
55
|
+
console.log('Could not check for bugs in this version', err);
|
|
56
|
+
});
|
|
57
|
+
return controller;
|
|
58
|
+
}, []);
|
|
37
59
|
(0, react_1.useEffect)(() => {
|
|
38
|
-
const
|
|
60
|
+
const abortUpdate = checkForUpdates();
|
|
61
|
+
const abortBugs = checkForBugs();
|
|
39
62
|
return () => {
|
|
40
|
-
|
|
63
|
+
abortUpdate.abort();
|
|
64
|
+
abortBugs.abort();
|
|
41
65
|
};
|
|
42
|
-
}, [checkForUpdates]);
|
|
66
|
+
}, [checkForBugs, checkForUpdates]);
|
|
43
67
|
const openModal = (0, react_1.useCallback)(() => {
|
|
44
68
|
setSelectedModal({
|
|
45
69
|
type: 'update',
|
|
46
70
|
info: info,
|
|
71
|
+
knownBugs: knownBugs,
|
|
47
72
|
});
|
|
48
|
-
}, [info, setSelectedModal]);
|
|
73
|
+
}, [info, knownBugs, setSelectedModal]);
|
|
74
|
+
const dynButtonStyle = (0, react_1.useMemo)(() => {
|
|
75
|
+
return {
|
|
76
|
+
...buttonStyle,
|
|
77
|
+
color: hasKnownBugs ? colors_1.WARNING_COLOR : colors_1.BLUE,
|
|
78
|
+
};
|
|
79
|
+
}, [hasKnownBugs]);
|
|
49
80
|
if (!info) {
|
|
50
81
|
return null;
|
|
51
82
|
}
|
|
52
83
|
if (!info.updateAvailable) {
|
|
53
84
|
return null;
|
|
54
85
|
}
|
|
55
|
-
return ((0, jsx_runtime_1.jsx)("button", { tabIndex: tabIndex, style:
|
|
86
|
+
return ((0, jsx_runtime_1.jsx)("button", { tabIndex: tabIndex, style: dynButtonStyle, onClick: openModal, type: "button", children: hasKnownBugs ? 'Bugfixes available' : 'Update available' }));
|
|
56
87
|
};
|
|
57
88
|
exports.UpdateCheck = UpdateCheck;
|
|
@@ -7,6 +7,7 @@ const colors_1 = require("../../helpers/colors");
|
|
|
7
7
|
const copy_text_1 = require("../../helpers/copy-text");
|
|
8
8
|
const modals_1 = require("../../state/modals");
|
|
9
9
|
const CopyButton_1 = require("../CopyButton");
|
|
10
|
+
const KnownBugs_1 = require("../KnownBugs");
|
|
10
11
|
const layout_1 = require("../layout");
|
|
11
12
|
const ModalContainer_1 = require("../ModalContainer");
|
|
12
13
|
const ModalHeader_1 = require("../ModalHeader");
|
|
@@ -15,33 +16,48 @@ const container = {
|
|
|
15
16
|
padding: 20,
|
|
16
17
|
paddingTop: 0,
|
|
17
18
|
};
|
|
19
|
+
const text = {
|
|
20
|
+
fontSize: 14,
|
|
21
|
+
};
|
|
22
|
+
const title = {
|
|
23
|
+
paddingTop: 12,
|
|
24
|
+
paddingBottom: 8,
|
|
25
|
+
...text,
|
|
26
|
+
};
|
|
18
27
|
const code = {
|
|
19
28
|
background: colors_1.SELECTED_BACKGROUND,
|
|
20
29
|
padding: '12px 10px',
|
|
21
|
-
fontSize:
|
|
30
|
+
fontSize: 14,
|
|
22
31
|
marginTop: 10,
|
|
23
32
|
marginBottom: 10,
|
|
24
33
|
};
|
|
25
34
|
const link = {
|
|
26
35
|
fontWeight: 'bold',
|
|
27
|
-
color:
|
|
36
|
+
color: colors_1.BLUE,
|
|
28
37
|
textDecoration: 'none',
|
|
38
|
+
...text,
|
|
29
39
|
};
|
|
30
40
|
const commands = {
|
|
31
|
-
npm: '
|
|
32
|
-
yarn: 'yarn upgrade',
|
|
33
|
-
pnpm: 'pnpm
|
|
34
|
-
bun: 'bun
|
|
35
|
-
unknown: '
|
|
41
|
+
npm: 'npx remotion upgrade',
|
|
42
|
+
yarn: 'yarn remotion upgrade',
|
|
43
|
+
pnpm: 'pnpm exec remotion upgrade',
|
|
44
|
+
bun: 'bun remotion upgrade',
|
|
45
|
+
unknown: 'npx remotion upgrade',
|
|
36
46
|
};
|
|
37
|
-
const UpdateModal = ({ info }) => {
|
|
47
|
+
const UpdateModal = ({ info, knownBugs }) => {
|
|
38
48
|
const { setSelectedModal } = (0, react_1.useContext)(modals_1.ModalsContext);
|
|
39
49
|
const onQuit = (0, react_1.useCallback)(() => {
|
|
40
50
|
setSelectedModal(null);
|
|
41
51
|
}, [setSelectedModal]);
|
|
52
|
+
const hasKnownBugs = (0, react_1.useMemo)(() => {
|
|
53
|
+
return knownBugs && (knownBugs === null || knownBugs === void 0 ? void 0 : knownBugs.length) > 0;
|
|
54
|
+
}, [knownBugs]);
|
|
42
55
|
const command = commands[info.packageManager];
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
56
|
+
const onClick = (0, react_1.useCallback)(() => {
|
|
57
|
+
(0, copy_text_1.copyText)(command).catch((err) => {
|
|
58
|
+
(0, NotificationCenter_1.sendErrorNotification)(`Could not copy: ${err.message}`);
|
|
59
|
+
});
|
|
60
|
+
}, [command]);
|
|
61
|
+
return ((0, jsx_runtime_1.jsxs)(ModalContainer_1.ModalContainer, { onOutsideClick: onQuit, onEscape: onQuit, children: [(0, jsx_runtime_1.jsx)(ModalHeader_1.NewCompHeader, { title: "Update available" }), (0, jsx_runtime_1.jsxs)("div", { style: container, children: [hasKnownBugs ? ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsxs)("div", { style: title, children: ["The currently installed version ", info.currentVersion, " has the following known bugs:"] }), (0, jsx_runtime_1.jsx)(KnownBugs_1.KnownBugs, { bugs: knownBugs }), (0, jsx_runtime_1.jsx)("div", { style: { height: '20px' } }), (0, jsx_runtime_1.jsx)("div", { style: text, children: "To upgrade, run the following command:" })] })) : ((0, jsx_runtime_1.jsx)("div", { style: text, children: "A new update for Remotion is available! Run the following command:" })), (0, jsx_runtime_1.jsxs)(layout_1.Row, { align: "center", children: [(0, jsx_runtime_1.jsx)(layout_1.Flex, { children: (0, jsx_runtime_1.jsx)("pre", { onClick: onClick, style: code, children: command }) }), (0, jsx_runtime_1.jsx)(layout_1.Spacing, { x: 1 }), (0, jsx_runtime_1.jsx)(CopyButton_1.CopyButton, { textToCopy: command, label: "Copy", labelWhenCopied: "Copied!" })] }), (0, jsx_runtime_1.jsxs)("div", { style: text, children: ["This will upgrade Remotion from ", info.currentVersion, " to", ' ', info.latestVersion, "."] }), (0, jsx_runtime_1.jsxs)("div", { style: text, children: ["Read the", ' ', (0, jsx_runtime_1.jsx)("a", { style: link, target: "_blank", href: "https://github.com/remotion-dev/remotion/releases", children: "Release notes" }), ' ', "to know what", "'s", " new in Remotion."] })] })] }));
|
|
46
62
|
};
|
|
47
63
|
exports.UpdateModal = UpdateModal;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
export declare const getCheckerboardBackgroundSize: (size: number) => string;
|
|
2
2
|
export declare const getCheckerboardBackgroundPos: (size: number) => string;
|
|
3
|
-
export declare const checkerboardBackgroundColor: (checkerboard: boolean) => "
|
|
3
|
+
export declare const checkerboardBackgroundColor: (checkerboard: boolean) => "white" | "black";
|
|
4
4
|
export declare const checkerboardBackgroundImage: (checkerboard: boolean) => "\n linear-gradient(\n 45deg,\n rgba(0, 0, 0, 0.1) 25%,\n transparent 25%\n ),\n linear-gradient(135deg, rgba(0, 0, 0, 0.1) 25%, transparent 25%),\n linear-gradient(45deg, transparent 75%, rgba(0, 0, 0, 0.1) 75%),\n linear-gradient(135deg, transparent 75%, rgba(0, 0, 0, 0.1) 75%)\n " | undefined;
|
|
@@ -16,4 +16,4 @@ export declare const BLUE_DISABLED = "#284f73";
|
|
|
16
16
|
export declare const getBackgroundFromHoverState: ({ selected, hovered, }: {
|
|
17
17
|
selected: boolean;
|
|
18
18
|
hovered: boolean;
|
|
19
|
-
}) => "transparent" | "
|
|
19
|
+
}) => "transparent" | "rgba(255, 255, 255, 0.06)" | "hsla(0, 0%, 100%, 0.15)" | "hsla(0, 0%, 100%, 0.25)";
|
|
@@ -2,7 +2,7 @@ import type { AudioCodec, Codec, ColorSpace, OpenGlRenderer, PixelFormat, ProRes
|
|
|
2
2
|
import type React from 'react';
|
|
3
3
|
import type { QuickSwitcherMode } from '../components/QuickSwitcher/NoResults';
|
|
4
4
|
import type { RenderType } from '../components/RenderModal/RenderModalAdvanced';
|
|
5
|
-
import type { UpdateInfo } from '../components/UpdateCheck';
|
|
5
|
+
import type { Bug, UpdateInfo } from '../components/UpdateCheck';
|
|
6
6
|
export type CompType = 'composition' | 'still';
|
|
7
7
|
export type RenderModalState = {
|
|
8
8
|
type: 'render';
|
|
@@ -36,6 +36,7 @@ export type RenderModalState = {
|
|
|
36
36
|
initialHeadless: boolean;
|
|
37
37
|
initialOffthreadVideoCacheSizeInBytes: number | null;
|
|
38
38
|
initialColorSpace: ColorSpace;
|
|
39
|
+
initialMultiProcessOnLinux: boolean;
|
|
39
40
|
minConcurrency: number;
|
|
40
41
|
maxConcurrency: number;
|
|
41
42
|
defaultProps: Record<string, unknown>;
|
|
@@ -51,6 +52,7 @@ export type ModalState = {
|
|
|
51
52
|
} | {
|
|
52
53
|
type: 'update';
|
|
53
54
|
info: UpdateInfo;
|
|
55
|
+
knownBugs: Bug[];
|
|
54
56
|
} | {
|
|
55
57
|
type: 'quick-switcher';
|
|
56
58
|
mode: QuickSwitcherMode;
|
|
@@ -15,13 +15,13 @@ export declare const getCliOptions: (options: {
|
|
|
15
15
|
browser: "chrome";
|
|
16
16
|
crf: import("@remotion/renderer").Crf | null;
|
|
17
17
|
pixelFormat: "yuv420p" | "yuva420p" | "yuv422p" | "yuv444p" | "yuv420p10le" | "yuv422p10le" | "yuv444p10le" | "yuva444p10le";
|
|
18
|
-
proResProfile: "4444-xq" | "4444" | "hq" | "standard" | "
|
|
18
|
+
proResProfile: "light" | "4444-xq" | "4444" | "hq" | "standard" | "proxy" | undefined;
|
|
19
19
|
x264Preset: "medium" | "ultrafast" | "superfast" | "veryfast" | "faster" | "fast" | "slow" | "slower" | "veryslow" | "placebo" | undefined;
|
|
20
20
|
everyNthFrame: number;
|
|
21
21
|
numberOfGifLoops: import("./config/number-of-gif-loops").Loop;
|
|
22
22
|
stillFrame: number;
|
|
23
23
|
browserExecutable: BrowserExecutable;
|
|
24
|
-
logLevel: "
|
|
24
|
+
logLevel: "error" | "verbose" | "info" | "warn";
|
|
25
25
|
scale: number;
|
|
26
26
|
chromiumOptions: ChromiumOptions;
|
|
27
27
|
overwrite: boolean;
|
package/dist/get-cli-options.js
CHANGED
|
@@ -85,6 +85,7 @@ const getCliOptions = async (options) => {
|
|
|
85
85
|
headless: config_1.ConfigInternals.getChromiumHeadlessMode(),
|
|
86
86
|
gl: (_a = config_1.ConfigInternals.getChromiumOpenGlRenderer()) !== null && _a !== void 0 ? _a : renderer_1.RenderInternals.DEFAULT_OPENGL_RENDERER,
|
|
87
87
|
userAgent: config_1.ConfigInternals.getChromiumUserAgent(),
|
|
88
|
+
enableMultiProcessOnLinux: config_1.ConfigInternals.getChromiumMultiProcessOnLinux(),
|
|
88
89
|
};
|
|
89
90
|
const everyNthFrame = config_1.ConfigInternals.getEveryNthFrame();
|
|
90
91
|
const numberOfGifLoops = config_1.ConfigInternals.getNumberOfGifLoops();
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.handleCommonError = void 0;
|
|
4
|
+
const chalk_1 = require("./chalk");
|
|
5
|
+
const log_1 = require("./log");
|
|
6
|
+
const print_error_1 = require("./print-error");
|
|
7
|
+
const truthy_1 = require("./truthy");
|
|
8
|
+
const handleCommonError = async (err, logLevel) => {
|
|
9
|
+
var _a;
|
|
10
|
+
await (0, print_error_1.printError)(err, logLevel);
|
|
11
|
+
if (err.message.includes('Could not play video with')) {
|
|
12
|
+
log_1.Log.info();
|
|
13
|
+
log_1.Log.info('💡 Get help for this issue at https://remotion.dev/docs/media-playback-error');
|
|
14
|
+
}
|
|
15
|
+
if (err.message.includes('A delayRender()') &&
|
|
16
|
+
err.message.includes('was called but not cleared after')) {
|
|
17
|
+
log_1.Log.info();
|
|
18
|
+
log_1.Log.info('💡 Get help for this issue at https://remotion.dev/docs/timeout');
|
|
19
|
+
}
|
|
20
|
+
if (err.message.includes('Target closed')) {
|
|
21
|
+
log_1.Log.info();
|
|
22
|
+
log_1.Log.info('💡 Get help for this issue at https://remotion.dev/docs/target-closed');
|
|
23
|
+
}
|
|
24
|
+
if (err.message.includes('ENAMETOOLONG')) {
|
|
25
|
+
log_1.Log.info();
|
|
26
|
+
log_1.Log.info('💡 Get help for this issue at https://remotion.dev/docs/enametoolong');
|
|
27
|
+
}
|
|
28
|
+
if (err.message.includes('Error creating WebGL context')) {
|
|
29
|
+
log_1.Log.info();
|
|
30
|
+
log_1.Log.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');
|
|
31
|
+
log_1.Log.warn("💡 Check how it's done at https://www.remotion.dev/docs/chromium-flags#--gl");
|
|
32
|
+
}
|
|
33
|
+
if (err.message.includes('The bucket does not allow ACLs')) {
|
|
34
|
+
log_1.Log.info();
|
|
35
|
+
log_1.Log.info(chalk_1.chalk.green('💡 Fix this issue https://remotion.dev/docs/lambda/troubleshooting/bucket-disallows-acl'));
|
|
36
|
+
}
|
|
37
|
+
if (err.message.includes('Minified React error #306')) {
|
|
38
|
+
const componentName = (_a = err.message.match(/<\w+>/)) === null || _a === void 0 ? void 0 : _a[0];
|
|
39
|
+
log_1.Log.info([
|
|
40
|
+
'💡 This error indicates that the component',
|
|
41
|
+
componentName ? `(${componentName})` : null,
|
|
42
|
+
'you are trying to render is not imported correctly.',
|
|
43
|
+
]
|
|
44
|
+
.filter(truthy_1.truthy)
|
|
45
|
+
.join(' '));
|
|
46
|
+
log_1.Log.info();
|
|
47
|
+
log_1.Log.info(' Check the root file and ensure that the component is not undefined.');
|
|
48
|
+
log_1.Log.info(' Oftentimes, this happens if the component is missing the `export` keyword');
|
|
49
|
+
log_1.Log.info(' or if the component was renamed and the import statement not properly adjusted.');
|
|
50
|
+
}
|
|
51
|
+
if (err.message.includes('GLIBC_')) {
|
|
52
|
+
log_1.Log.info('💡 Remotion requires at least Libc 2.35.');
|
|
53
|
+
log_1.Log.info('💡 Get help for this issue: https://github.com/remotion-dev/remotion/issues/2439');
|
|
54
|
+
}
|
|
55
|
+
if (err.message.includes('EBADF')) {
|
|
56
|
+
log_1.Log.info('💡 This error might be fixed by changing your Node version:');
|
|
57
|
+
log_1.Log.info(' https://github.com/remotion-dev/remotion/issues/2452');
|
|
58
|
+
}
|
|
59
|
+
};
|
|
60
|
+
exports.handleCommonError = handleCommonError;
|
package/dist/index.d.ts
CHANGED
|
@@ -63,24 +63,24 @@ export declare const CliInternals: {
|
|
|
63
63
|
verbose: (message?: any, ...optionalParams: any[]) => void;
|
|
64
64
|
verboseAdvanced: (options: {
|
|
65
65
|
indent: boolean;
|
|
66
|
-
logLevel: "
|
|
66
|
+
logLevel: "error" | "verbose" | "info" | "warn";
|
|
67
67
|
} & {
|
|
68
68
|
tag?: string | undefined;
|
|
69
69
|
}, message?: any, ...optionalParams: any[]) => void;
|
|
70
70
|
info: (message?: any, ...optionalParams: any[]) => void;
|
|
71
71
|
infoAdvanced: (options: {
|
|
72
72
|
indent: boolean;
|
|
73
|
-
logLevel: "
|
|
73
|
+
logLevel: "error" | "verbose" | "info" | "warn";
|
|
74
74
|
}, message?: any, ...optionalParams: any[]) => void;
|
|
75
75
|
warn: (message?: any, ...optionalParams: any[]) => void;
|
|
76
76
|
warnAdvanced: (options: {
|
|
77
77
|
indent: boolean;
|
|
78
|
-
logLevel: "
|
|
78
|
+
logLevel: "error" | "verbose" | "info" | "warn";
|
|
79
79
|
}, message?: any, ...optionalParams: any[]) => void;
|
|
80
80
|
error: (message?: any, ...optionalParams: any[]) => void;
|
|
81
81
|
errorAdvanced: (options: {
|
|
82
82
|
indent: boolean;
|
|
83
|
-
logLevel: "
|
|
83
|
+
logLevel: "error" | "verbose" | "info" | "warn";
|
|
84
84
|
} & {
|
|
85
85
|
tag?: string | undefined;
|
|
86
86
|
}, message?: any, ...optionalParams: any[]) => void;
|
|
@@ -100,13 +100,13 @@ export declare const CliInternals: {
|
|
|
100
100
|
browser: "chrome";
|
|
101
101
|
crf: import("@remotion/renderer").Crf | null;
|
|
102
102
|
pixelFormat: "yuv420p" | "yuva420p" | "yuv422p" | "yuv444p" | "yuv420p10le" | "yuv422p10le" | "yuv444p10le" | "yuva444p10le";
|
|
103
|
-
proResProfile: "4444-xq" | "4444" | "hq" | "standard" | "
|
|
103
|
+
proResProfile: "light" | "4444-xq" | "4444" | "hq" | "standard" | "proxy" | undefined;
|
|
104
104
|
x264Preset: "medium" | "ultrafast" | "superfast" | "veryfast" | "faster" | "fast" | "slow" | "slower" | "veryslow" | "placebo" | undefined;
|
|
105
105
|
everyNthFrame: number;
|
|
106
106
|
numberOfGifLoops: import("./config/number-of-gif-loops").Loop;
|
|
107
107
|
stillFrame: number;
|
|
108
108
|
browserExecutable: import("@remotion/renderer").BrowserExecutable;
|
|
109
|
-
logLevel: "
|
|
109
|
+
logLevel: "error" | "verbose" | "info" | "warn";
|
|
110
110
|
scale: number;
|
|
111
111
|
chromiumOptions: import("@remotion/renderer").ChromiumOptions;
|
|
112
112
|
overwrite: boolean;
|
|
@@ -132,7 +132,7 @@ export declare const CliInternals: {
|
|
|
132
132
|
"browser-executable": import("@remotion/renderer").BrowserExecutable;
|
|
133
133
|
"pixel-format": "yuv420p" | "yuva420p" | "yuv422p" | "yuv444p" | "yuv420p10le" | "yuv422p10le" | "yuv444p10le" | "yuva444p10le";
|
|
134
134
|
"image-format": "none" | "png" | "jpeg" | "pdf" | "webp";
|
|
135
|
-
"prores-profile": "4444-xq" | "4444" | "hq" | "standard" | "
|
|
135
|
+
"prores-profile": "light" | "4444-xq" | "4444" | "hq" | "standard" | "proxy";
|
|
136
136
|
"x264-preset": "medium" | "ultrafast" | "superfast" | "veryfast" | "faster" | "fast" | "slow" | "slower" | "veryslow" | "placebo";
|
|
137
137
|
"bundle-cache": string;
|
|
138
138
|
"env-file": string;
|
|
@@ -186,10 +186,11 @@ export declare const CliInternals: {
|
|
|
186
186
|
"color-space": "default" | "bt709";
|
|
187
187
|
"delete-after": string | undefined;
|
|
188
188
|
"enable-folder-expiry": boolean | undefined;
|
|
189
|
+
"enable-multiprocess-on-linux": boolean;
|
|
189
190
|
} & {
|
|
190
191
|
_: string[];
|
|
191
192
|
};
|
|
192
|
-
printError: (err: Error, logLevel: "
|
|
193
|
+
printError: (err: Error, logLevel: "error" | "verbose" | "info" | "warn") => Promise<void>;
|
|
193
194
|
formatBytes: (number: number, options?: Intl.NumberFormatOptions & {
|
|
194
195
|
locale: string;
|
|
195
196
|
bits?: boolean | undefined;
|
|
@@ -231,7 +232,7 @@ export declare const CliInternals: {
|
|
|
231
232
|
};
|
|
232
233
|
listOfRemotionPackages: string[];
|
|
233
234
|
shouldUseNonOverlayingLogger: ({ logLevel, }: {
|
|
234
|
-
logLevel: "
|
|
235
|
+
logLevel: "error" | "verbose" | "info" | "warn";
|
|
235
236
|
}) => boolean;
|
|
236
237
|
getCompositionWithDimensionOverride: ({ height, width, args, compositionIdFromUi, chromiumOptions, envVariables, port, puppeteerInstance, timeoutInMilliseconds, browserExecutable, serveUrlOrWebpackUrl, indent, serializedInputPropsWithCustomSchema, logLevel, server, offthreadVideoCacheSizeInBytes, }: {
|
|
237
238
|
height: number | null;
|
|
@@ -246,7 +247,7 @@ export declare const CliInternals: {
|
|
|
246
247
|
browserExecutable: import("@remotion/renderer").BrowserExecutable;
|
|
247
248
|
serveUrlOrWebpackUrl: string;
|
|
248
249
|
indent: boolean;
|
|
249
|
-
logLevel: "
|
|
250
|
+
logLevel: "error" | "verbose" | "info" | "warn";
|
|
250
251
|
serializedInputPropsWithCustomSchema: string;
|
|
251
252
|
server: import("@remotion/renderer").RemotionServer;
|
|
252
253
|
offthreadVideoCacheSizeInBytes: number | null;
|
package/dist/index.js
CHANGED
|
@@ -64,7 +64,16 @@ const cli = async () => {
|
|
|
64
64
|
}
|
|
65
65
|
const isBun = typeof Bun !== 'undefined';
|
|
66
66
|
if (isBun) {
|
|
67
|
-
|
|
67
|
+
const version = Bun.version.split('.');
|
|
68
|
+
if (version.length === 3) {
|
|
69
|
+
if (Number(version[0]) < 1) {
|
|
70
|
+
throw new Error('Please upgrade to at least Bun 1.0.3');
|
|
71
|
+
}
|
|
72
|
+
if (Number(version[1]) === 0 && Number(version[2]) < 3) {
|
|
73
|
+
throw new Error('Please upgrade to at least Bun 1.0.3');
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
log_1.Log.info('You are running Remotion with Bun, which is mostly supported. Visit https://remotion.dev/bun for more information.');
|
|
68
77
|
}
|
|
69
78
|
const isStudio = command === 'studio' || command === 'preview';
|
|
70
79
|
const errorSymbolicationLock = isStudio
|
package/dist/log.d.ts
CHANGED
|
@@ -2,24 +2,24 @@ export declare const Log: {
|
|
|
2
2
|
verbose: (message?: any, ...optionalParams: any[]) => void;
|
|
3
3
|
verboseAdvanced: (options: {
|
|
4
4
|
indent: boolean;
|
|
5
|
-
logLevel: "
|
|
5
|
+
logLevel: "error" | "verbose" | "info" | "warn";
|
|
6
6
|
} & {
|
|
7
7
|
tag?: string | undefined;
|
|
8
8
|
}, message?: any, ...optionalParams: any[]) => void;
|
|
9
9
|
info: (message?: any, ...optionalParams: any[]) => void;
|
|
10
10
|
infoAdvanced: (options: {
|
|
11
11
|
indent: boolean;
|
|
12
|
-
logLevel: "
|
|
12
|
+
logLevel: "error" | "verbose" | "info" | "warn";
|
|
13
13
|
}, message?: any, ...optionalParams: any[]) => void;
|
|
14
14
|
warn: (message?: any, ...optionalParams: any[]) => void;
|
|
15
15
|
warnAdvanced: (options: {
|
|
16
16
|
indent: boolean;
|
|
17
|
-
logLevel: "
|
|
17
|
+
logLevel: "error" | "verbose" | "info" | "warn";
|
|
18
18
|
}, message?: any, ...optionalParams: any[]) => void;
|
|
19
19
|
error: (message?: any, ...optionalParams: any[]) => void;
|
|
20
20
|
errorAdvanced: (options: {
|
|
21
21
|
indent: boolean;
|
|
22
|
-
logLevel: "
|
|
22
|
+
logLevel: "error" | "verbose" | "info" | "warn";
|
|
23
23
|
} & {
|
|
24
24
|
tag?: string | undefined;
|
|
25
25
|
}, message?: any, ...optionalParams: any[]) => void;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { AudioCodec, BrowserExecutable, Codec, OpenGlRenderer, PixelFormat, ProResProfile, StillImageFormat, VideoImageFormat, X264Preset } from '@remotion/renderer';
|
|
2
|
-
import
|
|
2
|
+
import { BrowserSafeApis } from '@remotion/renderer/client';
|
|
3
3
|
type CommandLineOptions = {
|
|
4
4
|
['browser-executable']: BrowserExecutable;
|
|
5
5
|
['pixel-format']: PixelFormat;
|
|
@@ -60,6 +60,7 @@ type CommandLineOptions = {
|
|
|
60
60
|
['user-agent']: string;
|
|
61
61
|
[BrowserSafeApis.options.deleteAfterOption.cliFlag]: string | undefined;
|
|
62
62
|
[BrowserSafeApis.options.folderExpiryOption.cliFlag]: boolean | undefined;
|
|
63
|
+
[BrowserSafeApis.options.enableMultiprocessOnLinuxOption.cliFlag]: boolean;
|
|
63
64
|
};
|
|
64
65
|
export declare const BooleanFlags: string[];
|
|
65
66
|
export declare const parsedCli: CommandLineOptions & {
|
|
@@ -5,6 +5,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.quietFlagProvided = exports.parseCommandLine = exports.parsedCli = exports.BooleanFlags = void 0;
|
|
7
7
|
const renderer_1 = require("@remotion/renderer");
|
|
8
|
+
const client_1 = require("@remotion/renderer/client");
|
|
8
9
|
const minimist_1 = __importDefault(require("minimist"));
|
|
9
10
|
const config_1 = require("./config");
|
|
10
11
|
const log_1 = require("./log");
|
|
@@ -157,6 +158,9 @@ const parseCommandLine = () => {
|
|
|
157
158
|
if (typeof exports.parsedCli['enable-folder-expiry'] !== 'undefined') {
|
|
158
159
|
config_1.Config.setEnableFolderExpiry(exports.parsedCli['enable-folder-expiry']);
|
|
159
160
|
}
|
|
161
|
+
if (typeof exports.parsedCli[client_1.BrowserSafeApis.options.enableMultiprocessOnLinuxOption.cliFlag] !== 'undefined') {
|
|
162
|
+
config_1.Config.setEnableFolderExpiry(exports.parsedCli[client_1.BrowserSafeApis.options.enableMultiprocessOnLinuxOption.cliFlag]);
|
|
163
|
+
}
|
|
160
164
|
};
|
|
161
165
|
exports.parseCommandLine = parseCommandLine;
|
|
162
166
|
const quietFlagProvided = () => exports.parsedCli.quiet || exports.parsedCli.q;
|
|
@@ -75,6 +75,7 @@ export type RenderJob = {
|
|
|
75
75
|
chromiumOptions: RequiredChromiumOptions;
|
|
76
76
|
envVariables: Record<string, string>;
|
|
77
77
|
serializedInputPropsWithCustomSchema: string;
|
|
78
|
+
multiProcessOnLinux: boolean;
|
|
78
79
|
} & RenderJobDynamicFields;
|
|
79
80
|
export type RenderJobWithCleanup = RenderJob & {
|
|
80
81
|
cleanup: (() => void)[];
|
|
@@ -132,6 +133,7 @@ export type AddRenderRequest = {
|
|
|
132
133
|
envVariables: Record<string, string>;
|
|
133
134
|
serializedInputPropsWithCustomSchema: string;
|
|
134
135
|
offthreadVideoCacheSizeInBytes: number | null;
|
|
136
|
+
multiProcessOnLinux: boolean;
|
|
135
137
|
} & AddRenderRequestDynamicFields;
|
|
136
138
|
export type RemoveRenderRequest = {
|
|
137
139
|
jobId: string;
|
|
@@ -51,6 +51,7 @@ const makeRetryPayload = (job) => {
|
|
|
51
51
|
outFrameMark: null,
|
|
52
52
|
initialOffthreadVideoCacheSizeInBytes: job.offthreadVideoCacheSizeInBytes,
|
|
53
53
|
initialColorSpace: defaults.colorSpace,
|
|
54
|
+
initialMultiProcessOnLinux: job.multiProcessOnLinux,
|
|
54
55
|
};
|
|
55
56
|
}
|
|
56
57
|
if (job.type === 'sequence') {
|
|
@@ -95,6 +96,7 @@ const makeRetryPayload = (job) => {
|
|
|
95
96
|
outFrameMark: job.endFrame,
|
|
96
97
|
initialOffthreadVideoCacheSizeInBytes: job.offthreadVideoCacheSizeInBytes,
|
|
97
98
|
initialColorSpace: defaults.colorSpace,
|
|
99
|
+
initialMultiProcessOnLinux: job.multiProcessOnLinux,
|
|
98
100
|
};
|
|
99
101
|
}
|
|
100
102
|
if (job.type === 'video') {
|
|
@@ -139,6 +141,7 @@ const makeRetryPayload = (job) => {
|
|
|
139
141
|
outFrameMark: job.endFrame,
|
|
140
142
|
initialOffthreadVideoCacheSizeInBytes: job.offthreadVideoCacheSizeInBytes,
|
|
141
143
|
initialColorSpace: job.colorSpace,
|
|
144
|
+
initialMultiProcessOnLinux: job.multiProcessOnLinux,
|
|
142
145
|
};
|
|
143
146
|
}
|
|
144
147
|
throw new Error(`Job ${JSON.stringify(job)} Not implemented`);
|
|
@@ -45,6 +45,7 @@ const handleAddRender = ({ input, entryPoint, remotionRoot, }) => {
|
|
|
45
45
|
serializedInputPropsWithCustomSchema: input.serializedInputPropsWithCustomSchema,
|
|
46
46
|
offthreadVideoCacheSizeInBytes: input.offthreadVideoCacheSizeInBytes,
|
|
47
47
|
colorSpace: input.colorSpace,
|
|
48
|
+
multiProcessOnLinux: input.multiProcessOnLinux,
|
|
48
49
|
},
|
|
49
50
|
});
|
|
50
51
|
}
|
|
@@ -74,6 +75,7 @@ const handleAddRender = ({ input, entryPoint, remotionRoot, }) => {
|
|
|
74
75
|
envVariables: input.envVariables,
|
|
75
76
|
serializedInputPropsWithCustomSchema: input.serializedInputPropsWithCustomSchema,
|
|
76
77
|
offthreadVideoCacheSizeInBytes: input.offthreadVideoCacheSizeInBytes,
|
|
78
|
+
multiProcessOnLinux: input.multiProcessOnLinux,
|
|
77
79
|
},
|
|
78
80
|
});
|
|
79
81
|
}
|
|
@@ -99,6 +101,7 @@ const handleAddRender = ({ input, entryPoint, remotionRoot, }) => {
|
|
|
99
101
|
envVariables: input.envVariables,
|
|
100
102
|
serializedInputPropsWithCustomSchema: input.serializedInputPropsWithCustomSchema,
|
|
101
103
|
offthreadVideoCacheSizeInBytes: input.offthreadVideoCacheSizeInBytes,
|
|
104
|
+
multiProcessOnLinux: input.multiProcessOnLinux,
|
|
102
105
|
},
|
|
103
106
|
entryPoint,
|
|
104
107
|
remotionRoot,
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
/// <reference types="node" />
|
|
1
2
|
import type { IncomingMessage, ServerResponse } from 'node:http';
|
|
2
3
|
import type { LiveEventsServer } from './live-events';
|
|
3
4
|
export declare const handleRoutes: ({ hash, hashPrefix, request, response, liveEventsServer, getCurrentInputProps, getEnvVariables, remotionRoot, entryPoint, publicDir, }: {
|
|
@@ -57,6 +57,7 @@ const handleFallback = async ({ remotionRoot, hash, response, getCurrentInputPro
|
|
|
57
57
|
const colorSpace = config_1.ConfigInternals.getColorSpace();
|
|
58
58
|
const maxConcurrency = renderer_1.RenderInternals.getMaxConcurrency();
|
|
59
59
|
const minConcurrency = renderer_1.RenderInternals.getMinConcurrency();
|
|
60
|
+
const multiProcessOnLinux = config_1.ConfigInternals.getChromiumMultiProcessOnLinux();
|
|
60
61
|
response.setHeader('content-type', 'text/html');
|
|
61
62
|
response.writeHead(200);
|
|
62
63
|
const packageManager = (0, get_package_manager_1.getPackageManager)(remotionRoot, undefined);
|
|
@@ -101,6 +102,7 @@ const handleFallback = async ({ remotionRoot, hash, response, getCurrentInputPro
|
|
|
101
102
|
openGlRenderer,
|
|
102
103
|
offthreadVideoCacheSizeInBytes,
|
|
103
104
|
colorSpace,
|
|
105
|
+
multiProcessOnLinux,
|
|
104
106
|
},
|
|
105
107
|
publicFolderExists: (0, node_fs_1.existsSync)(publicDir) ? publicDir : null,
|
|
106
108
|
}));
|
|
@@ -171,6 +171,7 @@ const renderVideoFlow = async ({ remotionRoot, fullEntryPoint, indent, logLevel,
|
|
|
171
171
|
height: config.height,
|
|
172
172
|
codec,
|
|
173
173
|
scale,
|
|
174
|
+
wantsImageSequence: shouldOutputImageSequence,
|
|
174
175
|
});
|
|
175
176
|
const relativeOutputLocation = (0, get_filename_1.getOutputFilename)({
|
|
176
177
|
imageSequence: shouldOutputImageSequence,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@remotion/cli",
|
|
3
|
-
"version": "4.0.
|
|
3
|
+
"version": "4.0.43",
|
|
4
4
|
"description": "CLI for Remotion",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"sideEffects": false,
|
|
@@ -35,11 +35,11 @@
|
|
|
35
35
|
"prompts": "2.4.1",
|
|
36
36
|
"semver": "7.5.3",
|
|
37
37
|
"source-map": "0.6.1",
|
|
38
|
-
"@remotion/
|
|
39
|
-
"@remotion/
|
|
40
|
-
"@remotion/
|
|
41
|
-
"remotion": "4.0.
|
|
42
|
-
"@remotion/
|
|
38
|
+
"@remotion/bundler": "4.0.43",
|
|
39
|
+
"@remotion/renderer": "4.0.43",
|
|
40
|
+
"@remotion/media-utils": "4.0.43",
|
|
41
|
+
"remotion": "4.0.43",
|
|
42
|
+
"@remotion/player": "4.0.43"
|
|
43
43
|
},
|
|
44
44
|
"peerDependencies": {
|
|
45
45
|
"react": ">=16.8.0",
|
|
@@ -65,8 +65,8 @@
|
|
|
65
65
|
"react-dom": "^18.0.0",
|
|
66
66
|
"vitest": "0.31.1",
|
|
67
67
|
"zod": "^3.21.4",
|
|
68
|
-
"@remotion/zod-types": "4.0.
|
|
69
|
-
"@remotion/tailwind": "4.0.
|
|
68
|
+
"@remotion/zod-types": "4.0.43",
|
|
69
|
+
"@remotion/tailwind": "4.0.43"
|
|
70
70
|
},
|
|
71
71
|
"keywords": [
|
|
72
72
|
"remotion",
|