@remotion/cli 3.3.77 → 3.3.78
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/editor/components/Checkbox.d.ts +1 -0
- package/dist/editor/components/Checkbox.js +16 -13
- package/dist/editor/components/Modals.js +1 -1
- package/dist/editor/components/RenderButton.js +3 -2
- package/dist/editor/components/RenderModal/EnforceAudioTrackSetting.d.ts +1 -0
- package/dist/editor/components/RenderModal/EnforceAudioTrackSetting.js +2 -2
- package/dist/editor/components/RenderModal/InfoBubble.d.ts +5 -0
- package/dist/editor/components/RenderModal/InfoBubble.js +111 -0
- package/dist/editor/components/RenderModal/InfoTooltip.d.ts +4 -0
- package/dist/editor/components/RenderModal/InfoTooltip.js +30 -0
- package/dist/editor/components/RenderModal/MutedSetting.d.ts +1 -0
- package/dist/editor/components/RenderModal/MutedSetting.js +2 -2
- package/dist/editor/components/RenderModal/NumberSetting.d.ts +3 -0
- package/dist/editor/components/RenderModal/NumberSetting.js +7 -4
- package/dist/editor/components/RenderModal/OptionExplainer.d.ts +5 -0
- package/dist/editor/components/RenderModal/OptionExplainer.js +21 -0
- package/dist/editor/components/RenderModal/RenderModal.d.ts +4 -3
- package/dist/editor/components/RenderModal/RenderModal.js +39 -35
- package/dist/editor/components/RenderModal/RenderModalAdvanced.d.ts +4 -0
- package/dist/editor/components/RenderModal/RenderModalAdvanced.js +9 -2
- package/dist/editor/components/RenderModal/RenderModalAudio.d.ts +5 -1
- package/dist/editor/components/RenderModal/RenderModalAudio.js +22 -3
- package/dist/editor/components/RenderModal/RenderModalBasic.d.ts +2 -4
- package/dist/editor/components/RenderModal/RenderModalBasic.js +11 -20
- package/dist/editor/components/RenderModal/RenderModalPicture.js +2 -2
- package/dist/editor/components/RenderModal/ScaleSetting.js +4 -1
- package/dist/editor/components/RenderModal/human-readable-codec.d.ts +1 -1
- package/dist/editor/components/RenderModal/human-readable-codec.js +1 -1
- package/dist/editor/components/RenderQueue/RenderQueueItem.js +2 -1
- package/dist/editor/components/RenderQueue/RenderQueueOpenInFolder.d.ts +5 -0
- package/dist/editor/components/RenderQueue/RenderQueueOpenInFolder.js +22 -0
- package/dist/editor/components/RenderQueue/actions.d.ts +2 -1
- package/dist/editor/components/RenderQueue/actions.js +2 -1
- package/dist/editor/components/RenderToolbarIcon.js +3 -2
- package/dist/editor/helpers/prores-labels.d.ts +2 -0
- package/dist/editor/helpers/prores-labels.js +25 -0
- package/dist/editor/helpers/render-modal-sections.d.ts +10 -0
- package/dist/editor/helpers/render-modal-sections.js +32 -0
- package/dist/preview-server/render-queue/job.d.ts +2 -0
- package/dist/preview-server/render-queue/make-retry-payload.js +8 -8
- package/dist/preview-server/render-queue/process-still.js +7 -2
- package/dist/preview-server/render-queue/process-video.js +9 -4
- package/dist/preview-server/routes/add-render.js +1 -0
- package/dist/render-flows/render.d.ts +3 -2
- package/dist/render-flows/render.js +6 -5
- package/package.json +6 -6
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.Checkbox = void 0;
|
|
4
4
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
+
const react_1 = require("react");
|
|
5
6
|
const colors_1 = require("../helpers/colors");
|
|
6
7
|
const Checkmark_1 = require("../icons/Checkmark");
|
|
7
8
|
const size = 20;
|
|
@@ -10,17 +11,6 @@ const background = {
|
|
|
10
11
|
width: size,
|
|
11
12
|
position: 'relative',
|
|
12
13
|
};
|
|
13
|
-
const input = {
|
|
14
|
-
appearance: 'none',
|
|
15
|
-
background: colors_1.INPUT_BACKGROUND,
|
|
16
|
-
border: '1px solid ' + colors_1.INPUT_BORDER_COLOR_UNHOVERED,
|
|
17
|
-
height: size,
|
|
18
|
-
width: size,
|
|
19
|
-
top: 0,
|
|
20
|
-
left: 0,
|
|
21
|
-
position: 'absolute',
|
|
22
|
-
margin: 0,
|
|
23
|
-
};
|
|
24
14
|
const box = {
|
|
25
15
|
display: 'flex',
|
|
26
16
|
justifyContent: 'center',
|
|
@@ -32,7 +22,20 @@ const box = {
|
|
|
32
22
|
left: 0,
|
|
33
23
|
pointerEvents: 'none',
|
|
34
24
|
};
|
|
35
|
-
const Checkbox = ({ checked, onChange }) => {
|
|
36
|
-
|
|
25
|
+
const Checkbox = ({ checked, onChange, disabled }) => {
|
|
26
|
+
const input = (0, react_1.useMemo)(() => {
|
|
27
|
+
return {
|
|
28
|
+
appearance: 'none',
|
|
29
|
+
background: disabled ? 'transparent' : colors_1.INPUT_BACKGROUND,
|
|
30
|
+
border: '1px solid ' + colors_1.INPUT_BORDER_COLOR_UNHOVERED,
|
|
31
|
+
height: size,
|
|
32
|
+
width: size,
|
|
33
|
+
top: 0,
|
|
34
|
+
left: 0,
|
|
35
|
+
position: 'absolute',
|
|
36
|
+
margin: 0,
|
|
37
|
+
};
|
|
38
|
+
}, [disabled]);
|
|
39
|
+
return ((0, jsx_runtime_1.jsxs)("div", { style: background, children: [(0, jsx_runtime_1.jsx)("input", { style: input, type: 'checkbox', checked: checked, onChange: onChange, disabled: disabled }), (0, jsx_runtime_1.jsx)("div", { style: box, children: checked ? (0, jsx_runtime_1.jsx)(Checkmark_1.Checkmark, {}) : null })] }));
|
|
37
40
|
};
|
|
38
41
|
exports.Checkbox = Checkbox;
|
|
@@ -16,7 +16,7 @@ const UpdateModal_1 = require("./UpdateModal/UpdateModal");
|
|
|
16
16
|
const Modals = () => {
|
|
17
17
|
const { selectedModal: modalContextType } = (0, react_1.useContext)(modals_1.ModalsContext);
|
|
18
18
|
const canRender = (0, react_1.useContext)(client_id_1.PreviewServerConnectionCtx).type === 'connected';
|
|
19
|
-
return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [modalContextType && modalContextType.type === 'new-comp' && ((0, jsx_runtime_1.jsx)(NewComposition_1.default, { initialCompType: modalContextType.compType })), modalContextType && canRender && modalContextType.type === 'render' && ((0, jsx_runtime_1.jsx)(RenderModal_1.RenderModal, { initialFrame: modalContextType.initialFrame, compositionId: modalContextType.compositionId, initialVideoImageFormat: modalContextType.initialVideoImageFormat, initialQuality: modalContextType.initialQuality, initialOutName: modalContextType.initialOutName, initialScale: modalContextType.initialScale, initialVerbose: modalContextType.initialVerbose, initialRenderType: modalContextType.initialRenderType,
|
|
19
|
+
return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [modalContextType && modalContextType.type === 'new-comp' && ((0, jsx_runtime_1.jsx)(NewComposition_1.default, { initialCompType: modalContextType.compType })), modalContextType && canRender && modalContextType.type === 'render' && ((0, jsx_runtime_1.jsx)(RenderModal_1.RenderModal, { initialFrame: modalContextType.initialFrame, compositionId: modalContextType.compositionId, initialVideoImageFormat: modalContextType.initialVideoImageFormat, initialQuality: modalContextType.initialQuality, initialOutName: modalContextType.initialOutName, initialScale: modalContextType.initialScale, initialVerbose: modalContextType.initialVerbose, initialRenderType: modalContextType.initialRenderType, initialVideoCodecForAudioTab: modalContextType.initialVideoCodecForAudioTab, initialVideoCodecForVideoTab: modalContextType.initialVideoCodecForVideoTab, initialConcurrency: modalContextType.initialConcurrency, maxConcurrency: modalContextType.maxConcurrency, minConcurrency: modalContextType.minConcurrency, initialStillImageFormat: modalContextType.initialStillImageFormat, initialMuted: modalContextType.initialMuted, initialEnforceAudioTrack: modalContextType.initialEnforceAudioTrack, initialProResProfile: modalContextType.initialProResProfile, initialPixelFormat: modalContextType.initialPixelFormat, initialAudioBitrate: modalContextType.initialAudioBitrate, initialVideoBitrate: modalContextType.initialVideoBitrate, initialEveryNthFrame: modalContextType.initialEveryNthFrame, initialNumberOfGifLoops: modalContextType.initialNumberOfGifLoops, initialDelayRenderTimeout: modalContextType.initialDelayRenderTimeout, initialAudioCodec: modalContextType.initialAudioCodec })), modalContextType &&
|
|
20
20
|
canRender &&
|
|
21
21
|
modalContextType.type === 'render-error' && ((0, jsx_runtime_1.jsx)(RenderErrorModal_1.RenderErrorModal, { job: modalContextType.job })), modalContextType && modalContextType.type === 'update' && ((0, jsx_runtime_1.jsx)(UpdateModal_1.UpdateModal, { info: modalContextType.info })), modalContextType && modalContextType.type === 'quick-switcher' && ((0, jsx_runtime_1.jsx)(QuickSwitcher_1.default, { invocationTimestamp: modalContextType.invocationTimestamp, initialMode: modalContextType.mode }))] }));
|
|
22
22
|
};
|
|
@@ -42,9 +42,9 @@ const RenderButton = ({ composition, visible }) => {
|
|
|
42
42
|
defaultExtension: isVideo ? 'mp4' : 'png',
|
|
43
43
|
type: 'asset',
|
|
44
44
|
}),
|
|
45
|
-
initialAudioCodec,
|
|
45
|
+
initialVideoCodecForAudioTab: initialAudioCodec,
|
|
46
46
|
initialRenderType,
|
|
47
|
-
initialVideoCodec,
|
|
47
|
+
initialVideoCodecForVideoTab: initialVideoCodec,
|
|
48
48
|
initialConcurrency: defaults.concurrency,
|
|
49
49
|
maxConcurrency: defaults.maxConcurrency,
|
|
50
50
|
minConcurrency: defaults.minConcurrency,
|
|
@@ -57,6 +57,7 @@ const RenderButton = ({ composition, visible }) => {
|
|
|
57
57
|
initialEveryNthFrame: defaults.everyNthFrame,
|
|
58
58
|
initialNumberOfGifLoops: defaults.numberOfGifLoops,
|
|
59
59
|
initialDelayRenderTimeout: defaults.delayRenderTimeout,
|
|
60
|
+
initialAudioCodec: defaults.audioCodec,
|
|
60
61
|
});
|
|
61
62
|
}, [composition.id, isVideo, setSelectedModal]);
|
|
62
63
|
if (!visible) {
|
|
@@ -5,10 +5,10 @@ const jsx_runtime_1 = require("react/jsx-runtime");
|
|
|
5
5
|
const react_1 = require("react");
|
|
6
6
|
const Checkbox_1 = require("../Checkbox");
|
|
7
7
|
const layout_1 = require("./layout");
|
|
8
|
-
const EnforceAudioTrackSetting = ({ enforceAudioTrack, setEnforceAudioTrack }) => {
|
|
8
|
+
const EnforceAudioTrackSetting = ({ enforceAudioTrack, muted, setEnforceAudioTrack }) => {
|
|
9
9
|
const onEnforceAudioTrackChanged = (0, react_1.useCallback)((e) => {
|
|
10
10
|
setEnforceAudioTrack(e.target.checked);
|
|
11
11
|
}, [setEnforceAudioTrack]);
|
|
12
|
-
return ((0, jsx_runtime_1.jsxs)("div", { style: layout_1.optionRow, children: [(0, jsx_runtime_1.jsx)("div", { style: layout_1.label, children: "Enforce Audio Track" }), (0, jsx_runtime_1.jsx)("div", { style: layout_1.rightRow, children: (0, jsx_runtime_1.jsx)(Checkbox_1.Checkbox, { checked: enforceAudioTrack, onChange: onEnforceAudioTrackChanged }) })] }));
|
|
12
|
+
return ((0, jsx_runtime_1.jsxs)("div", { style: layout_1.optionRow, children: [(0, jsx_runtime_1.jsx)("div", { style: layout_1.label, children: "Enforce Audio Track" }), (0, jsx_runtime_1.jsx)("div", { style: layout_1.rightRow, children: (0, jsx_runtime_1.jsx)(Checkbox_1.Checkbox, { disabled: muted && !enforceAudioTrack, checked: enforceAudioTrack, onChange: onEnforceAudioTrackChanged }) })] }));
|
|
13
13
|
};
|
|
14
14
|
exports.EnforceAudioTrackSetting = EnforceAudioTrackSetting;
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.InfoBubble = void 0;
|
|
7
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
8
|
+
const player_1 = require("@remotion/player");
|
|
9
|
+
const react_1 = require("react");
|
|
10
|
+
const react_dom_1 = __importDefault(require("react-dom"));
|
|
11
|
+
const colors_1 = require("../../helpers/colors");
|
|
12
|
+
const z_index_1 = require("../../state/z-index");
|
|
13
|
+
const portals_1 = require("../Menu/portals");
|
|
14
|
+
const styles_1 = require("../Menu/styles");
|
|
15
|
+
const InfoTooltip_1 = require("./InfoTooltip");
|
|
16
|
+
const icon = {
|
|
17
|
+
color: colors_1.LIGHT_TEXT,
|
|
18
|
+
height: 15,
|
|
19
|
+
};
|
|
20
|
+
const container = {
|
|
21
|
+
display: 'inline-block',
|
|
22
|
+
border: 'none',
|
|
23
|
+
fontSize: 14,
|
|
24
|
+
verticalAlign: 'text-bottom',
|
|
25
|
+
};
|
|
26
|
+
const InfoBubble = ({ title, children }) => {
|
|
27
|
+
const [hovered, setIsHovered] = (0, react_1.useState)(false);
|
|
28
|
+
const [opened, setOpened] = (0, react_1.useState)(false);
|
|
29
|
+
const ref = (0, react_1.useRef)(null);
|
|
30
|
+
const { tabIndex, currentZIndex } = (0, z_index_1.useZIndex)();
|
|
31
|
+
const size = player_1.PlayerInternals.useElementSize(ref, {
|
|
32
|
+
triggerOnWindowResize: true,
|
|
33
|
+
shouldApplyCssTransforms: true,
|
|
34
|
+
});
|
|
35
|
+
const refresh = size === null || size === void 0 ? void 0 : size.refresh;
|
|
36
|
+
const onHide = (0, react_1.useCallback)(() => {
|
|
37
|
+
setOpened(false);
|
|
38
|
+
}, []);
|
|
39
|
+
(0, react_1.useEffect)(() => {
|
|
40
|
+
const { current } = ref;
|
|
41
|
+
if (!current) {
|
|
42
|
+
return;
|
|
43
|
+
}
|
|
44
|
+
const onMouseEnter = () => setIsHovered(true);
|
|
45
|
+
const onMouseLeave = () => setIsHovered(false);
|
|
46
|
+
const onPointerDown = (e) => {
|
|
47
|
+
e.stopPropagation();
|
|
48
|
+
return setOpened((o) => {
|
|
49
|
+
if (!o) {
|
|
50
|
+
refresh === null || refresh === void 0 ? void 0 : refresh();
|
|
51
|
+
}
|
|
52
|
+
return !o;
|
|
53
|
+
});
|
|
54
|
+
};
|
|
55
|
+
const onClick = (e) => {
|
|
56
|
+
e.stopPropagation();
|
|
57
|
+
const isKeyboardInitiated = e.detail === 0;
|
|
58
|
+
if (!isKeyboardInitiated) {
|
|
59
|
+
return;
|
|
60
|
+
}
|
|
61
|
+
return setOpened((o) => {
|
|
62
|
+
return !o;
|
|
63
|
+
});
|
|
64
|
+
};
|
|
65
|
+
current.addEventListener('mouseenter', onMouseEnter);
|
|
66
|
+
current.addEventListener('mouseleave', onMouseLeave);
|
|
67
|
+
current.addEventListener('pointerdown', onPointerDown);
|
|
68
|
+
current.addEventListener('click', onClick);
|
|
69
|
+
return () => {
|
|
70
|
+
current.removeEventListener('mouseenter', onMouseEnter);
|
|
71
|
+
current.removeEventListener('mouseleave', onMouseLeave);
|
|
72
|
+
current.removeEventListener('pointerdown', onPointerDown);
|
|
73
|
+
current.removeEventListener('click', onClick);
|
|
74
|
+
};
|
|
75
|
+
}, [refresh]);
|
|
76
|
+
const portalStyle = (0, react_1.useMemo)(() => {
|
|
77
|
+
if (!opened || !size) {
|
|
78
|
+
return null;
|
|
79
|
+
}
|
|
80
|
+
const spaceToBottom = size.windowSize.height - (size.top + size.height);
|
|
81
|
+
const spaceToTop = size.top;
|
|
82
|
+
const layout = spaceToTop > spaceToBottom ? 'bottom' : 'top';
|
|
83
|
+
return {
|
|
84
|
+
...(layout === 'top'
|
|
85
|
+
? {
|
|
86
|
+
position: 'fixed',
|
|
87
|
+
top: size.top + size.height,
|
|
88
|
+
}
|
|
89
|
+
: {
|
|
90
|
+
position: 'fixed',
|
|
91
|
+
bottom: size.windowSize.height - size.top,
|
|
92
|
+
}),
|
|
93
|
+
left: size.left,
|
|
94
|
+
};
|
|
95
|
+
}, [opened, size]);
|
|
96
|
+
const style = (0, react_1.useMemo)(() => {
|
|
97
|
+
return {
|
|
98
|
+
...container,
|
|
99
|
+
userSelect: 'none',
|
|
100
|
+
color: 'white',
|
|
101
|
+
display: 'inline-flex',
|
|
102
|
+
flexDirection: 'row',
|
|
103
|
+
alignItems: 'center',
|
|
104
|
+
};
|
|
105
|
+
}, []);
|
|
106
|
+
// TODO: Can click two info bubbles at the same time
|
|
107
|
+
return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)("button", { ref: ref, tabIndex: tabIndex, style: style, title: title, type: "button", children: (0, jsx_runtime_1.jsx)("svg", { style: icon, viewBox: "0 0 512 512", children: (0, jsx_runtime_1.jsx)("path", { fill: hovered ? 'white' : colors_1.LIGHT_TEXT, d: "M256 48a208 208 0 1 1 0 416 208 208 0 1 1 0-416zm0 464A256 256 0 1 0 256 0a256 256 0 1 0 0 512zM216 336c-13.3 0-24 10.7-24 24s10.7 24 24 24h80c13.3 0 24-10.7 24-24s-10.7-24-24-24h-8V248c0-13.3-10.7-24-24-24H216c-13.3 0-24 10.7-24 24s10.7 24 24 24h24v64H216zm40-144a32 32 0 1 0 0-64 32 32 0 1 0 0 64z" }) }) }), portalStyle
|
|
108
|
+
? react_dom_1.default.createPortal((0, jsx_runtime_1.jsx)("div", { style: styles_1.outerPortal, className: "css-reset", children: (0, jsx_runtime_1.jsx)(z_index_1.HigherZIndex, { onOutsideClick: onHide, onEscape: onHide, children: (0, jsx_runtime_1.jsx)("div", { style: portalStyle, children: (0, jsx_runtime_1.jsx)(InfoTooltip_1.InfoTooltip, { children: children }) }) }) }), (0, portals_1.getPortal)(currentZIndex))
|
|
109
|
+
: null] }));
|
|
110
|
+
};
|
|
111
|
+
exports.InfoBubble = InfoBubble;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.InfoTooltip = void 0;
|
|
4
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
+
const colors_1 = require("../../helpers/colors");
|
|
6
|
+
const styles_1 = require("../Menu/styles");
|
|
7
|
+
const container = {
|
|
8
|
+
padding: '10px 12px',
|
|
9
|
+
// TODO: Depending on direction
|
|
10
|
+
boxShadow: styles_1.SHADOW_TOWARDS_TOP,
|
|
11
|
+
background: colors_1.BACKGROUND,
|
|
12
|
+
color: 'white',
|
|
13
|
+
border: '0.5px solid ' + colors_1.BORDER_COLOR,
|
|
14
|
+
maxHeight: 200,
|
|
15
|
+
overflow: 'auto',
|
|
16
|
+
};
|
|
17
|
+
const arrow = {
|
|
18
|
+
height: 7,
|
|
19
|
+
display: 'block',
|
|
20
|
+
overflow: 'visible',
|
|
21
|
+
marginTop: -0.5,
|
|
22
|
+
marginLeft: 7,
|
|
23
|
+
};
|
|
24
|
+
const InfoTooltip = ({ children }) => {
|
|
25
|
+
return (
|
|
26
|
+
// TODO: Down arrow
|
|
27
|
+
// TODO: not scrolling with portal
|
|
28
|
+
(0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)("div", { style: container, children: children }), (0, jsx_runtime_1.jsx)("svg", { viewBox: "0 0 14 7", style: arrow, children: (0, jsx_runtime_1.jsx)("path", { d: `M 14 0 L 7 7 L 0 0`, fill: colors_1.BACKGROUND, strokeLinecap: "butt", stroke: colors_1.BORDER_COLOR, strokeWidth: 0.5 }) })] }));
|
|
29
|
+
};
|
|
30
|
+
exports.InfoTooltip = InfoTooltip;
|
|
@@ -5,10 +5,10 @@ const jsx_runtime_1 = require("react/jsx-runtime");
|
|
|
5
5
|
const react_1 = require("react");
|
|
6
6
|
const Checkbox_1 = require("../Checkbox");
|
|
7
7
|
const layout_1 = require("./layout");
|
|
8
|
-
const MutedSetting = ({ muted, setMuted }) => {
|
|
8
|
+
const MutedSetting = ({ muted, setMuted, enforceAudioTrack }) => {
|
|
9
9
|
const onMutedChanged = (0, react_1.useCallback)((e) => {
|
|
10
10
|
setMuted(e.target.checked);
|
|
11
11
|
}, [setMuted]);
|
|
12
|
-
return ((0, jsx_runtime_1.jsxs)("div", { style: layout_1.optionRow, children: [(0, jsx_runtime_1.jsx)("div", { style: layout_1.label, children: "Muted" }), (0, jsx_runtime_1.jsx)("div", { style: layout_1.rightRow, children: (0, jsx_runtime_1.jsx)(Checkbox_1.Checkbox, { checked: muted, onChange: onMutedChanged }) })] }));
|
|
12
|
+
return ((0, jsx_runtime_1.jsxs)("div", { style: layout_1.optionRow, children: [(0, jsx_runtime_1.jsx)("div", { style: layout_1.label, children: "Muted" }), (0, jsx_runtime_1.jsx)("div", { style: layout_1.rightRow, children: (0, jsx_runtime_1.jsx)(Checkbox_1.Checkbox, { checked: muted, disabled: enforceAudioTrack && !muted, onChange: onMutedChanged }) })] }));
|
|
13
13
|
};
|
|
14
14
|
exports.MutedSetting = MutedSetting;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { RemotionOption } from '@remotion/renderer';
|
|
1
2
|
import React from 'react';
|
|
2
3
|
export declare const NumberSetting: React.FC<{
|
|
3
4
|
name: string;
|
|
@@ -6,4 +7,6 @@ export declare const NumberSetting: React.FC<{
|
|
|
6
7
|
max?: number;
|
|
7
8
|
min: number;
|
|
8
9
|
step: number;
|
|
10
|
+
formatter?: (value: string | number) => string;
|
|
11
|
+
hint?: RemotionOption;
|
|
9
12
|
}>;
|
|
@@ -3,10 +3,13 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.NumberSetting = void 0;
|
|
4
4
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
5
|
const react_1 = require("react");
|
|
6
|
+
const layout_1 = require("../layout");
|
|
6
7
|
const InputDragger_1 = require("../NewComposition/InputDragger");
|
|
7
8
|
const RemInput_1 = require("../NewComposition/RemInput");
|
|
8
|
-
const
|
|
9
|
-
const
|
|
9
|
+
const InfoBubble_1 = require("./InfoBubble");
|
|
10
|
+
const layout_2 = require("./layout");
|
|
11
|
+
const OptionExplainer_1 = require("./OptionExplainer");
|
|
12
|
+
const NumberSetting = ({ name, value, step, hint, onValueChanged, max, min, formatter }) => {
|
|
10
13
|
const onTextChanged = (0, react_1.useCallback)((e) => {
|
|
11
14
|
onValueChanged((q) => {
|
|
12
15
|
const newSetting = parseInt(e, 10);
|
|
@@ -19,8 +22,8 @@ const NumberSetting = ({ name, value, step, onValueChanged, max, min }) => {
|
|
|
19
22
|
const onValueChange = (0, react_1.useCallback)((newConcurrency) => {
|
|
20
23
|
onValueChanged(newConcurrency);
|
|
21
24
|
}, [onValueChanged]);
|
|
22
|
-
return ((0, jsx_runtime_1.jsxs)("div", { style:
|
|
25
|
+
return ((0, jsx_runtime_1.jsxs)("div", { style: layout_2.optionRow, children: [(0, jsx_runtime_1.jsxs)("div", { style: layout_2.label, children: [name, hint ? ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(layout_1.Spacing, { x: 0.25 }), ' ', (0, jsx_runtime_1.jsx)(InfoBubble_1.InfoBubble, { title: "Learn more about this option", children: (0, jsx_runtime_1.jsx)(OptionExplainer_1.OptionExplainer, { option: hint }) })] })) : null] }), (0, jsx_runtime_1.jsx)("div", { style: layout_2.rightRow, children: (0, jsx_runtime_1.jsx)(RemInput_1.RightAlignInput, { children: (0, jsx_runtime_1.jsx)(InputDragger_1.InputDragger, { value: value, name: name.toLowerCase(), onTextChange: onTextChanged, onValueChange: onValueChange, step: step, placeholder: [min, max]
|
|
23
26
|
.map((f) => (f !== null && f !== undefined ? f : ''))
|
|
24
|
-
.join('-'), min: min, max: max }) }) })] }));
|
|
27
|
+
.join('-'), min: min, max: max, formatter: formatter }) }) })] }));
|
|
25
28
|
};
|
|
26
29
|
exports.NumberSetting = NumberSetting;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.OptionExplainer = void 0;
|
|
4
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
+
const layout_1 = require("../layout");
|
|
6
|
+
const MenuDivider_1 = require("../Menu/MenuDivider");
|
|
7
|
+
const container = {
|
|
8
|
+
fontSize: 14,
|
|
9
|
+
};
|
|
10
|
+
const title = {
|
|
11
|
+
fontSize: 14,
|
|
12
|
+
};
|
|
13
|
+
const description = {
|
|
14
|
+
fontSize: 14,
|
|
15
|
+
maxWidth: 200,
|
|
16
|
+
};
|
|
17
|
+
// TODO: No style of <code>
|
|
18
|
+
const OptionExplainer = ({ option }) => {
|
|
19
|
+
return ((0, jsx_runtime_1.jsxs)("div", { style: container, children: [(0, jsx_runtime_1.jsx)("div", { children: (0, jsx_runtime_1.jsx)("strong", { style: title, children: option.name }) }), (0, jsx_runtime_1.jsx)("div", { style: description, children: option.description }), (0, jsx_runtime_1.jsx)(layout_1.Spacing, { block: true, y: 0.5 }), (0, jsx_runtime_1.jsx)(MenuDivider_1.MenuDivider, {}), (0, jsx_runtime_1.jsxs)("div", { style: description, children: ["CLI flag: ", option.cliFlag] }), (0, jsx_runtime_1.jsxs)("div", { style: description, children: ["Node.JS option: ", option.ssrName] })] }));
|
|
20
|
+
};
|
|
21
|
+
exports.OptionExplainer = OptionExplainer;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { Codec, PixelFormat, ProResProfile, StillImageFormat, VideoImageFormat } from '@remotion/renderer';
|
|
1
|
+
import type { AudioCodec, Codec, PixelFormat, ProResProfile, StillImageFormat, VideoImageFormat } from '@remotion/renderer';
|
|
2
2
|
import React from 'react';
|
|
3
3
|
import type { RenderType } from './RenderModalAdvanced';
|
|
4
4
|
export declare const RenderModal: React.FC<{
|
|
@@ -11,8 +11,9 @@ export declare const RenderModal: React.FC<{
|
|
|
11
11
|
initialVerbose: boolean;
|
|
12
12
|
initialOutName: string;
|
|
13
13
|
initialRenderType: RenderType;
|
|
14
|
-
|
|
15
|
-
|
|
14
|
+
initialVideoCodecForAudioTab: Codec;
|
|
15
|
+
initialVideoCodecForVideoTab: Codec;
|
|
16
|
+
initialAudioCodec: AudioCodec | null;
|
|
16
17
|
initialConcurrency: number;
|
|
17
18
|
minConcurrency: number;
|
|
18
19
|
maxConcurrency: number;
|
|
@@ -6,6 +6,7 @@ const client_1 = require("@remotion/renderer/client");
|
|
|
6
6
|
const react_1 = require("react");
|
|
7
7
|
const remotion_1 = require("remotion");
|
|
8
8
|
const Button_1 = require("../../../preview-server/error-overlay/remotion-overlay/Button");
|
|
9
|
+
const render_modal_sections_1 = require("../../helpers/render-modal-sections");
|
|
9
10
|
const audio_1 = require("../../icons/audio");
|
|
10
11
|
const file_1 = require("../../icons/file");
|
|
11
12
|
const frame_1 = require("../../icons/frame");
|
|
@@ -96,7 +97,7 @@ const buttonStyle = {
|
|
|
96
97
|
const flexer = {
|
|
97
98
|
flex: 1,
|
|
98
99
|
};
|
|
99
|
-
const RenderModal = ({ compositionId, initialFrame, initialVideoImageFormat, initialStillImageFormat, initialQuality, initialScale, initialVerbose, initialOutName, initialRenderType,
|
|
100
|
+
const RenderModal = ({ compositionId, initialFrame, initialVideoImageFormat, initialStillImageFormat, initialQuality, initialScale, initialVerbose, initialOutName, initialRenderType, initialVideoCodecForAudioTab, initialVideoCodecForVideoTab, initialConcurrency, maxConcurrency, minConcurrency, initialMuted, initialEnforceAudioTrack, initialProResProfile, initialPixelFormat, initialVideoBitrate, initialAudioBitrate, initialEveryNthFrame, initialNumberOfGifLoops, initialDelayRenderTimeout, initialAudioCodec, }) => {
|
|
100
101
|
const { setSelectedModal } = (0, react_1.useContext)(modals_1.ModalsContext);
|
|
101
102
|
const onQuit = (0, react_1.useCallback)(() => {
|
|
102
103
|
setSelectedModal(null);
|
|
@@ -107,16 +108,16 @@ const RenderModal = ({ compositionId, initialFrame, initialVideoImageFormat, ini
|
|
|
107
108
|
const [stillImageFormat, setStillImageFormat] = (0, react_1.useState)(() => initialStillImageFormat);
|
|
108
109
|
const [videoImageFormat, setVideoImageFormat] = (0, react_1.useState)(() => initialVideoImageFormat);
|
|
109
110
|
const [concurrency, setConcurrency] = (0, react_1.useState)(() => initialConcurrency);
|
|
110
|
-
const [
|
|
111
|
-
|
|
112
|
-
const [
|
|
113
|
-
const [audioCodec, setAudioSpecificalCodec] = (0, react_1.useState)(() => initialAudioCodec);
|
|
111
|
+
const [videoCodecForVideoTab, setVideoCodecForVideoTab] = (0, react_1.useState)(() => initialVideoCodecForVideoTab);
|
|
112
|
+
const [userSelectedAudioCodec, setUserSelectedAudioCodec] = (0, react_1.useState)(() => initialAudioCodec);
|
|
113
|
+
const [videoCodecForAudioTab, setVideoCodecForAudioTab] = (0, react_1.useState)(() => initialVideoCodecForAudioTab);
|
|
114
114
|
const [mutedState, setMuted] = (0, react_1.useState)(() => initialMuted);
|
|
115
115
|
const [enforceAudioTrackState, setEnforceAudioTrackState] = (0, react_1.useState)(() => initialEnforceAudioTrack);
|
|
116
116
|
const [renderMode, setRenderModeState] = (0, react_1.useState)(initialRenderType);
|
|
117
117
|
const [quality, setQuality] = (0, react_1.useState)(() => initialQuality);
|
|
118
118
|
const [scale, setScale] = (0, react_1.useState)(() => initialScale);
|
|
119
119
|
const [verbose, setVerboseLogging] = (0, react_1.useState)(() => initialVerbose);
|
|
120
|
+
const [disallowParallelEncoding, setDisallowParallelEncoding] = (0, react_1.useState)(false);
|
|
120
121
|
const [outName, setOutName] = (0, react_1.useState)(() => initialOutName);
|
|
121
122
|
const [endFrameOrNull, setEndFrame] = (0, react_1.useState)(() => null);
|
|
122
123
|
const [startFrameOrNull, setStartFrame] = (0, react_1.useState)(() => null);
|
|
@@ -128,14 +129,13 @@ const RenderModal = ({ compositionId, initialFrame, initialVideoImageFormat, ini
|
|
|
128
129
|
const [customTargetVideoBitrate, setCustomTargetVideoBitrateValue] = (0, react_1.useState)(() => initialVideoBitrate !== null && initialVideoBitrate !== void 0 ? initialVideoBitrate : '1M');
|
|
129
130
|
const [limitNumberOfGifLoops, setLimitNumberOfGifLoops] = (0, react_1.useState)(() => initialNumberOfGifLoops !== null);
|
|
130
131
|
const [numberOfGifLoopsSetting, setNumberOfGifLoopsSetting] = (0, react_1.useState)(() => initialNumberOfGifLoops !== null && initialNumberOfGifLoops !== void 0 ? initialNumberOfGifLoops : 1);
|
|
131
|
-
|
|
132
|
-
const [delayRenderTimeout] = (0, react_1.useState)(() => initialDelayRenderTimeout);
|
|
132
|
+
const [delayRenderTimeout, setDelayRenderTimeout] = (0, react_1.useState)(() => initialDelayRenderTimeout);
|
|
133
133
|
const codec = (0, react_1.useMemo)(() => {
|
|
134
134
|
if (renderMode === 'audio') {
|
|
135
|
-
return
|
|
135
|
+
return videoCodecForAudioTab;
|
|
136
136
|
}
|
|
137
|
-
return
|
|
138
|
-
}, [
|
|
137
|
+
return videoCodecForVideoTab;
|
|
138
|
+
}, [videoCodecForAudioTab, renderMode, videoCodecForVideoTab]);
|
|
139
139
|
const numberOfGifLoops = (0, react_1.useMemo)(() => {
|
|
140
140
|
if (codec === 'gif' && limitNumberOfGifLoops) {
|
|
141
141
|
return numberOfGifLoopsSetting;
|
|
@@ -216,7 +216,8 @@ const RenderModal = ({ compositionId, initialFrame, initialVideoImageFormat, ini
|
|
|
216
216
|
client_1.BrowserSafeApis.supportedAudioCodecs[passedVideoCodec].includes(passedAudioCodec)) {
|
|
217
217
|
return passedAudioCodec;
|
|
218
218
|
}
|
|
219
|
-
return client_1.BrowserSafeApis.defaultAudioCodecs[passedVideoCodec]
|
|
219
|
+
return client_1.BrowserSafeApis.defaultAudioCodecs[passedVideoCodec]
|
|
220
|
+
.compressed;
|
|
220
221
|
}, []);
|
|
221
222
|
const setDefaultOutName = (0, react_1.useCallback)((options) => {
|
|
222
223
|
if (options.type === 'still') {
|
|
@@ -227,35 +228,38 @@ const RenderModal = ({ compositionId, initialFrame, initialVideoImageFormat, ini
|
|
|
227
228
|
}
|
|
228
229
|
else {
|
|
229
230
|
setOutName((prev) => {
|
|
230
|
-
const codecSuffix = client_1.BrowserSafeApis.getFileExtensionFromCodec(options.codec, deriveFinalAudioCodec(options.codec, options.audioCodec)
|
|
231
|
-
);
|
|
231
|
+
const codecSuffix = client_1.BrowserSafeApis.getFileExtensionFromCodec(options.codec, deriveFinalAudioCodec(options.codec, options.audioCodec));
|
|
232
232
|
const newFileName = getStringBeforeSuffix(prev) + '.' + codecSuffix;
|
|
233
233
|
return newFileName;
|
|
234
234
|
});
|
|
235
235
|
}
|
|
236
236
|
}, [deriveFinalAudioCodec, getStringBeforeSuffix]);
|
|
237
237
|
const setAudioCodec = (0, react_1.useCallback)((newAudioCodec) => {
|
|
238
|
-
|
|
238
|
+
setUserSelectedAudioCodec(newAudioCodec);
|
|
239
239
|
setDefaultOutName({
|
|
240
240
|
type: 'render',
|
|
241
|
-
codec:
|
|
241
|
+
codec: videoCodecForVideoTab,
|
|
242
242
|
audioCodec: newAudioCodec,
|
|
243
243
|
});
|
|
244
|
-
}, [setDefaultOutName,
|
|
244
|
+
}, [setDefaultOutName, videoCodecForVideoTab]);
|
|
245
245
|
const setCodec = (0, react_1.useCallback)((newCodec) => {
|
|
246
246
|
if (renderMode === 'audio') {
|
|
247
|
-
|
|
247
|
+
setVideoCodecForAudioTab(newCodec);
|
|
248
248
|
}
|
|
249
249
|
else {
|
|
250
|
-
|
|
250
|
+
setVideoCodecForVideoTab(newCodec);
|
|
251
251
|
}
|
|
252
|
-
// TODO: Audio codec is not implemented and hardcoded
|
|
253
252
|
setDefaultOutName({
|
|
254
253
|
type: 'render',
|
|
255
254
|
codec: newCodec,
|
|
256
|
-
audioCodec: deriveFinalAudioCodec(newCodec,
|
|
255
|
+
audioCodec: deriveFinalAudioCodec(newCodec, userSelectedAudioCodec),
|
|
257
256
|
});
|
|
258
|
-
}, [
|
|
257
|
+
}, [
|
|
258
|
+
userSelectedAudioCodec,
|
|
259
|
+
deriveFinalAudioCodec,
|
|
260
|
+
renderMode,
|
|
261
|
+
setDefaultOutName,
|
|
262
|
+
]);
|
|
259
263
|
const setStillFormat = (0, react_1.useCallback)((format) => {
|
|
260
264
|
setStillImageFormat(format);
|
|
261
265
|
setDefaultOutName({ type: 'still', imageFormat: format });
|
|
@@ -298,6 +302,7 @@ const RenderModal = ({ compositionId, initialFrame, initialVideoImageFormat, ini
|
|
|
298
302
|
}
|
|
299
303
|
return 1;
|
|
300
304
|
}, [codec, everyNthFrameSetting]);
|
|
305
|
+
const audioCodec = deriveFinalAudioCodec(codec, userSelectedAudioCodec);
|
|
301
306
|
const onClickVideo = (0, react_1.useCallback)(() => {
|
|
302
307
|
var _a;
|
|
303
308
|
(_a = SidebarContent_1.leftSidebarTabs.current) === null || _a === void 0 ? void 0 : _a.selectRendersPanel();
|
|
@@ -323,7 +328,8 @@ const RenderModal = ({ compositionId, initialFrame, initialVideoImageFormat, ini
|
|
|
323
328
|
everyNthFrame,
|
|
324
329
|
numberOfGifLoops,
|
|
325
330
|
delayRenderTimeout,
|
|
326
|
-
audioCodec
|
|
331
|
+
audioCodec,
|
|
332
|
+
disallowParallelEncoding,
|
|
327
333
|
})
|
|
328
334
|
.then(() => {
|
|
329
335
|
dispatchIfMounted({ type: 'succeed' });
|
|
@@ -356,8 +362,8 @@ const RenderModal = ({ compositionId, initialFrame, initialVideoImageFormat, ini
|
|
|
356
362
|
everyNthFrame,
|
|
357
363
|
numberOfGifLoops,
|
|
358
364
|
delayRenderTimeout,
|
|
359
|
-
|
|
360
|
-
|
|
365
|
+
audioCodec,
|
|
366
|
+
disallowParallelEncoding,
|
|
361
367
|
setSelectedModal,
|
|
362
368
|
]);
|
|
363
369
|
(0, react_1.useEffect)(() => {
|
|
@@ -412,31 +418,29 @@ const RenderModal = ({ compositionId, initialFrame, initialVideoImageFormat, ini
|
|
|
412
418
|
const setRenderMode = (0, react_1.useCallback)((newRenderMode) => {
|
|
413
419
|
setRenderModeState(newRenderMode);
|
|
414
420
|
if (newRenderMode === 'audio') {
|
|
415
|
-
// TODO: Audio codec is not implemented but hardcoded
|
|
416
421
|
setDefaultOutName({
|
|
417
422
|
type: 'render',
|
|
418
|
-
codec:
|
|
419
|
-
audioCodec:
|
|
423
|
+
codec: videoCodecForAudioTab,
|
|
424
|
+
audioCodec: deriveFinalAudioCodec(videoCodecForAudioTab, userSelectedAudioCodec),
|
|
420
425
|
});
|
|
421
426
|
}
|
|
422
427
|
if (newRenderMode === 'video') {
|
|
423
|
-
// TODO: Audio codec is not implemented but hardcoded
|
|
424
428
|
setDefaultOutName({
|
|
425
429
|
type: 'render',
|
|
426
|
-
codec:
|
|
427
|
-
audioCodec: deriveFinalAudioCodec(
|
|
430
|
+
codec: videoCodecForVideoTab,
|
|
431
|
+
audioCodec: deriveFinalAudioCodec(videoCodecForVideoTab, userSelectedAudioCodec),
|
|
428
432
|
});
|
|
429
433
|
}
|
|
430
434
|
if (newRenderMode === 'still') {
|
|
431
435
|
setDefaultOutName({ type: 'still', imageFormat: stillImageFormat });
|
|
432
436
|
}
|
|
433
437
|
}, [
|
|
434
|
-
|
|
435
|
-
|
|
438
|
+
videoCodecForAudioTab,
|
|
439
|
+
userSelectedAudioCodec,
|
|
436
440
|
deriveFinalAudioCodec,
|
|
437
441
|
setDefaultOutName,
|
|
438
442
|
stillImageFormat,
|
|
439
|
-
|
|
443
|
+
videoCodecForVideoTab,
|
|
440
444
|
]);
|
|
441
445
|
const renderTabOptions = (0, react_1.useMemo)(() => {
|
|
442
446
|
if ((currentComposition === null || currentComposition === void 0 ? void 0 : currentComposition.durationInFrames) < 2) {
|
|
@@ -478,7 +482,7 @@ const RenderModal = ({ compositionId, initialFrame, initialVideoImageFormat, ini
|
|
|
478
482
|
},
|
|
479
483
|
];
|
|
480
484
|
}, [currentComposition === null || currentComposition === void 0 ? void 0 : currentComposition.durationInFrames, renderMode, setRenderMode]);
|
|
481
|
-
const
|
|
482
|
-
return ((0, jsx_runtime_1.jsxs)(ModalContainer_1.ModalContainer, { onOutsideClick: onQuit, onEscape: onQuit, children: [(0, jsx_runtime_1.jsx)(ModalHeader_1.NewCompHeader, { title: `Render ${compositionId}` }), (0, jsx_runtime_1.jsxs)("div", { style: container, children: [(0, jsx_runtime_1.jsx)(SegmentedControl_1.SegmentedControl, { items: renderTabOptions, needsWrapping: false }), (0, jsx_runtime_1.jsx)("div", { style: flexer }), (0, jsx_runtime_1.jsx)(Button_1.Button, { autoFocus: true, onClick: renderMode === 'still' ? onClickStill : onClickVideo, disabled: state.type === 'load', style: buttonStyle, children: state.type === 'idle' ? `Render ${renderMode}` : 'Rendering...' })] }), (0, jsx_runtime_1.jsxs)("div", { style: horizontalLayout, children: [(0, jsx_runtime_1.jsxs)("div", { style: leftSidebar, children: [(0, jsx_runtime_1.jsxs)(Tabs_1.Tab, { style: horizontalTab, selected: tab === 'general', onClick: () => setTab('general'), children: [(0, jsx_runtime_1.jsx)("div", { style: iconContainer, children: (0, jsx_runtime_1.jsx)(file_1.FileIcon, { style: icon }) }), "General"] }), (0, jsx_runtime_1.jsxs)(Tabs_1.Tab, { style: horizontalTab, selected: tab === 'picture', onClick: () => setTab('picture'), children: [(0, jsx_runtime_1.jsx)("div", { style: iconContainer, children: (0, jsx_runtime_1.jsx)(frame_1.PicIcon, { style: icon }) }), "Picture"] })
|
|
485
|
+
const { tab, setTab, shownTabs } = (0, render_modal_sections_1.useRenderModalSections)(renderMode, codec);
|
|
486
|
+
return ((0, jsx_runtime_1.jsxs)(ModalContainer_1.ModalContainer, { onOutsideClick: onQuit, onEscape: onQuit, children: [(0, jsx_runtime_1.jsx)(ModalHeader_1.NewCompHeader, { title: `Render ${compositionId}` }), (0, jsx_runtime_1.jsxs)("div", { style: container, children: [(0, jsx_runtime_1.jsx)(SegmentedControl_1.SegmentedControl, { items: renderTabOptions, needsWrapping: false }), (0, jsx_runtime_1.jsx)("div", { style: flexer }), (0, jsx_runtime_1.jsx)(Button_1.Button, { autoFocus: true, onClick: renderMode === 'still' ? onClickStill : onClickVideo, disabled: state.type === 'load', style: buttonStyle, children: state.type === 'idle' ? `Render ${renderMode}` : 'Rendering...' })] }), (0, jsx_runtime_1.jsxs)("div", { style: horizontalLayout, children: [(0, jsx_runtime_1.jsxs)("div", { style: leftSidebar, children: [shownTabs.includes('general') ? ((0, jsx_runtime_1.jsxs)(Tabs_1.Tab, { style: horizontalTab, selected: tab === 'general', onClick: () => setTab('general'), children: [(0, jsx_runtime_1.jsx)("div", { style: iconContainer, children: (0, jsx_runtime_1.jsx)(file_1.FileIcon, { style: icon }) }), "General"] })) : null, shownTabs.includes('picture') ? ((0, jsx_runtime_1.jsxs)(Tabs_1.Tab, { style: horizontalTab, selected: tab === 'picture', onClick: () => setTab('picture'), children: [(0, jsx_runtime_1.jsx)("div", { style: iconContainer, children: (0, jsx_runtime_1.jsx)(frame_1.PicIcon, { style: icon }) }), "Picture"] })) : null, shownTabs.includes('audio') ? ((0, jsx_runtime_1.jsxs)(Tabs_1.Tab, { style: horizontalTab, selected: tab === 'audio', onClick: () => setTab('audio'), children: [(0, jsx_runtime_1.jsx)("div", { style: iconContainer, children: (0, jsx_runtime_1.jsx)(audio_1.AudioIcon, { style: icon }) }), "Audio"] })) : null, shownTabs.includes('gif') ? ((0, jsx_runtime_1.jsxs)(Tabs_1.Tab, { style: horizontalTab, selected: tab === 'gif', onClick: () => setTab('gif'), children: [(0, jsx_runtime_1.jsx)("div", { style: iconContainer, children: (0, jsx_runtime_1.jsx)(gif_1.GifIcon, { style: icon }) }), "GIF"] })) : null, shownTabs.includes('advanced') ? ((0, jsx_runtime_1.jsxs)(Tabs_1.Tab, { style: horizontalTab, selected: tab === 'advanced', onClick: () => setTab('advanced'), children: [(0, jsx_runtime_1.jsx)("div", { style: iconContainer, children: (0, jsx_runtime_1.jsx)(gear_1.GearIcon, { style: icon }) }), "Other"] })) : null] }), (0, jsx_runtime_1.jsxs)("div", { style: scrollPanel, children: [(0, jsx_runtime_1.jsx)(layout_1.Spacing, { block: true, y: 0.5 }), tab === 'general' ? ((0, jsx_runtime_1.jsx)(RenderModalBasic_1.RenderModalBasic, { codec: codec, currentComposition: currentComposition, frame: frame, imageFormatOptions: imageFormatOptions, outName: outName, proResProfile: proResProfile, renderMode: renderMode, setVideoCodec: setCodec, setFrame: setFrame, setOutName: setOutName, setProResProfile: setProResProfile, endFrame: endFrame, setEndFrame: setEndFrame, setStartFrame: setStartFrame, startFrame: startFrame })) : tab === 'picture' ? ((0, jsx_runtime_1.jsx)(RenderModalPicture_1.RenderModalPicture, { renderMode: renderMode, scale: scale, setScale: setScale, pixelFormat: pixelFormat, setPixelFormat: setPixelFormat, imageFormatOptions: imageFormatOptions, crf: crf, setCrf: setCrf, customTargetVideoBitrate: customTargetVideoBitrate, maxCrf: maxCrf, minCrf: minCrf, quality: quality, qualityControlType: qualityControlType, setQuality: setQuality, setCustomTargetVideoBitrateValue: setCustomTargetVideoBitrateValue, setQualityControl: setQualityControl, shouldDisplayCrfOption: shouldDisplayCrfOption, videoImageFormat: videoImageFormat, stillImageFormat: stillImageFormat })) : tab === 'audio' ? ((0, jsx_runtime_1.jsx)(RenderModalAudio_1.RenderModalAudio, { muted: muted, renderMode: renderMode, setMuted: setMuted, codec: codec, audioCodec: audioCodec, setAudioCodec: setAudioCodec, enforceAudioTrack: enforceAudioTrack, setEnforceAudioTrackState: setEnforceAudioTrackState, customTargetAudioBitrate: customTargetAudioBitrate, setCustomTargetAudioBitrateValue: setCustomTargetAudioBitrateValue, setShouldHaveCustomTargetAudioBitrate: setShouldHaveCustomTargetAudioBitrate, shouldHaveCustomTargetAudioBitrate: shouldHaveCustomTargetAudioBitrate })) : tab === 'gif' ? ((0, jsx_runtime_1.jsx)(RenderModalGif_1.RenderModalGif, { everyNthFrame: everyNthFrame, limitNumberOfGifLoops: limitNumberOfGifLoops, numberOfGifLoopsSetting: numberOfGifLoopsSetting, setEveryNthFrameSetting: setEveryNthFrameSetting, setLimitNumberOfGifLoops: setLimitNumberOfGifLoops, setNumberOfGifLoopsSetting: setNumberOfGifLoopsSetting })) : ((0, jsx_runtime_1.jsx)(RenderModalAdvanced_1.RenderModalAdvanced, { concurrency: concurrency, maxConcurrency: maxConcurrency, minConcurrency: minConcurrency, renderMode: renderMode, setConcurrency: setConcurrency, setVerboseLogging: setVerboseLogging, verbose: verbose, delayRenderTimeout: delayRenderTimeout, setDelayRenderTimeout: setDelayRenderTimeout, disallowParallelEncoding: disallowParallelEncoding, setDisallowParallelEncoding: setDisallowParallelEncoding })), (0, jsx_runtime_1.jsx)(layout_1.Spacing, { block: true, y: 0.5 })] })] })] }));
|
|
483
487
|
};
|
|
484
488
|
exports.RenderModal = RenderModal;
|
|
@@ -8,4 +8,8 @@ export declare const RenderModalAdvanced: React.FC<{
|
|
|
8
8
|
concurrency: number;
|
|
9
9
|
setVerboseLogging: React.Dispatch<React.SetStateAction<boolean>>;
|
|
10
10
|
verbose: boolean;
|
|
11
|
+
delayRenderTimeout: number;
|
|
12
|
+
setDelayRenderTimeout: React.Dispatch<React.SetStateAction<number>>;
|
|
13
|
+
disallowParallelEncoding: boolean;
|
|
14
|
+
setDisallowParallelEncoding: React.Dispatch<React.SetStateAction<boolean>>;
|
|
11
15
|
}>;
|
|
@@ -6,10 +6,17 @@ const react_1 = require("react");
|
|
|
6
6
|
const Checkbox_1 = require("../Checkbox");
|
|
7
7
|
const layout_1 = require("./layout");
|
|
8
8
|
const NumberSetting_1 = require("./NumberSetting");
|
|
9
|
-
const RenderModalAdvanced = ({ renderMode, maxConcurrency, minConcurrency, setConcurrency, concurrency, setVerboseLogging, verbose, }) => {
|
|
9
|
+
const RenderModalAdvanced = ({ renderMode, maxConcurrency, minConcurrency, setConcurrency, concurrency, setVerboseLogging, verbose, delayRenderTimeout, setDelayRenderTimeout, disallowParallelEncoding, setDisallowParallelEncoding, }) => {
|
|
10
10
|
const onVerboseLoggingChanged = (0, react_1.useCallback)((e) => {
|
|
11
11
|
setVerboseLogging(e.target.checked);
|
|
12
12
|
}, [setVerboseLogging]);
|
|
13
|
-
|
|
13
|
+
const onDisallowParallelEncodingChanged = (0, react_1.useCallback)((e) => {
|
|
14
|
+
setDisallowParallelEncoding(e.target.checked);
|
|
15
|
+
}, [setDisallowParallelEncoding]);
|
|
16
|
+
return ((0, jsx_runtime_1.jsxs)("div", { children: [renderMode === 'still' ? null : ((0, jsx_runtime_1.jsx)(NumberSetting_1.NumberSetting, { min: minConcurrency, max: maxConcurrency, step: 1, name: "Concurrency", formatter: (w) => `${w}x`, onValueChanged: setConcurrency, value: concurrency })), (0, jsx_runtime_1.jsx)(NumberSetting_1.NumberSetting
|
|
17
|
+
// Also appears in packages/renderer/src/validate-puppeteer-timeout.ts
|
|
18
|
+
, {
|
|
19
|
+
// Also appears in packages/renderer/src/validate-puppeteer-timeout.ts
|
|
20
|
+
min: 7000, max: 900000, name: "delayRender() timeout", onValueChanged: setDelayRenderTimeout, formatter: (w) => `${w}ms`, step: 1000, value: delayRenderTimeout }), (0, jsx_runtime_1.jsxs)("div", { style: layout_1.optionRow, children: [(0, jsx_runtime_1.jsx)("div", { style: layout_1.label, children: "No parallel encoding" }), (0, jsx_runtime_1.jsx)("div", { style: layout_1.rightRow, children: (0, jsx_runtime_1.jsx)(Checkbox_1.Checkbox, { checked: disallowParallelEncoding, onChange: onDisallowParallelEncodingChanged }) })] }), (0, jsx_runtime_1.jsxs)("div", { style: layout_1.optionRow, children: [(0, jsx_runtime_1.jsx)("div", { style: layout_1.label, children: "Verbose logging" }), (0, jsx_runtime_1.jsx)("div", { style: layout_1.rightRow, children: (0, jsx_runtime_1.jsx)(Checkbox_1.Checkbox, { checked: verbose, onChange: onVerboseLoggingChanged }) })] })] }));
|
|
14
21
|
};
|
|
15
22
|
exports.RenderModalAdvanced = RenderModalAdvanced;
|