@remotion/studio 4.0.465 → 4.0.466
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/components/CompositionSelectorItem.js +16 -79
- package/dist/components/EditorContent.js +1 -3
- package/dist/components/Menu/MenuItem.d.ts +1 -1
- package/dist/components/Modals.js +1 -1
- package/dist/components/NewComposition/MenuContent.js +1 -0
- package/dist/components/RenderButton.js +1 -0
- package/dist/components/RenderModal/RenderModalAdvanced.d.ts +1 -11
- package/dist/components/RenderModal/RenderModalAdvanced.js +4 -50
- package/dist/components/RenderModal/RenderModalEncoding.d.ts +37 -0
- package/dist/components/RenderModal/RenderModalEncoding.js +165 -0
- package/dist/components/RenderModal/RenderModalPicture.d.ts +1 -22
- package/dist/components/RenderModal/RenderModalPicture.js +6 -84
- package/dist/components/RenderModal/ServerRenderModal.d.ts +1 -0
- package/dist/components/RenderModal/ServerRenderModal.js +16 -4
- package/dist/components/RenderQueue/actions.d.ts +2 -1
- package/dist/components/RenderQueue/actions.js +2 -1
- package/dist/components/SidebarRenderButton.js +1 -0
- package/dist/components/Timeline/Timeline.js +6 -4
- package/dist/components/Timeline/TimelineEffectFieldRow.js +2 -1
- package/dist/components/Timeline/TimelineEffectGroupRow.d.ts +1 -0
- package/dist/components/Timeline/TimelineEffectGroupRow.js +18 -2
- package/dist/components/Timeline/TimelineExpandedRow.d.ts +1 -1
- package/dist/components/Timeline/TimelineExpandedRow.js +1 -1
- package/dist/components/Timeline/TimelineExpandedTrackKeyframes.d.ts +7 -0
- package/dist/components/Timeline/TimelineExpandedTrackKeyframes.js +123 -0
- package/dist/components/Timeline/TimelineSchemaField.js +2 -1
- package/dist/components/Timeline/TimelineStack/index.js +7 -47
- package/dist/components/Timeline/TimelineTracks.js +2 -16
- package/dist/components/Timeline/get-timeline-keyframes.d.ts +6 -0
- package/dist/components/Timeline/get-timeline-keyframes.js +22 -0
- package/dist/components/composition-menu-items.d.ts +12 -0
- package/dist/components/composition-menu-items.js +166 -0
- package/dist/esm/{chunk-pqk2qd0d.js → chunk-sa3dm85y.js} +3694 -3257
- package/dist/esm/internals.mjs +3694 -3257
- package/dist/esm/previewEntry.mjs +3443 -3006
- package/dist/esm/renderEntry.mjs +1 -1
- package/dist/helpers/make-render-command.d.ts +2 -2
- package/dist/helpers/make-render-command.js +2 -1
- package/dist/helpers/open-in-editor.d.ts +8 -0
- package/dist/helpers/open-in-editor.js +58 -1
- package/dist/helpers/render-modal-sections.d.ts +1 -1
- package/dist/helpers/render-modal-sections.js +35 -5
- package/dist/helpers/retry-payload.js +3 -0
- package/dist/helpers/timeline-layout.d.ts +1 -0
- package/dist/helpers/timeline-layout.js +6 -1
- package/dist/helpers/use-menu-structure.js +43 -0
- package/dist/state/modals.d.ts +1 -0
- package/package.json +10 -10
|
@@ -3,18 +3,21 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.CompositionSelectorItem = void 0;
|
|
4
4
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
5
|
const react_1 = require("react");
|
|
6
|
+
const client_id_1 = require("../helpers/client-id");
|
|
6
7
|
const colors_1 = require("../helpers/colors");
|
|
7
8
|
const is_composition_still_1 = require("../helpers/is-composition-still");
|
|
9
|
+
const noop_1 = require("../helpers/noop");
|
|
8
10
|
const sidebar_scroll_into_view_1 = require("../helpers/sidebar-scroll-into-view");
|
|
9
11
|
const folder_1 = require("../icons/folder");
|
|
10
12
|
const still_1 = require("../icons/still");
|
|
11
13
|
const video_1 = require("../icons/video");
|
|
12
14
|
const modals_1 = require("../state/modals");
|
|
15
|
+
const composition_menu_items_1 = require("./composition-menu-items");
|
|
13
16
|
const CompositionContextButton_1 = require("./CompositionContextButton");
|
|
14
17
|
const ContextMenu_1 = require("./ContextMenu");
|
|
15
18
|
const layout_1 = require("./layout");
|
|
16
|
-
const NotificationCenter_1 = require("./Notifications/NotificationCenter");
|
|
17
19
|
const SidebarRenderButton_1 = require("./SidebarRenderButton");
|
|
20
|
+
const use_resolved_stack_1 = require("./Timeline/use-resolved-stack");
|
|
18
21
|
const COMPOSITION_ITEM_HEIGHT = 32;
|
|
19
22
|
const itemStyle = {
|
|
20
23
|
paddingRight: 10,
|
|
@@ -103,88 +106,22 @@ const CompositionSelectorItem = ({ item, level, currentComposition, tabIndex, se
|
|
|
103
106
|
}
|
|
104
107
|
}, [onClick]);
|
|
105
108
|
const { setSelectedModal } = (0, react_1.useContext)(modals_1.ModalsContext);
|
|
109
|
+
const connectionStatus = (0, react_1.useContext)(client_id_1.StudioServerConnectionCtx)
|
|
110
|
+
.previewServerState.type;
|
|
111
|
+
const resolvedLocation = (0, use_resolved_stack_1.useResolvedStack)(item.type === 'composition' ? item.composition.stack : null);
|
|
106
112
|
const contextMenu = (0, react_1.useMemo)(() => {
|
|
107
113
|
if (item.type === 'composition') {
|
|
108
|
-
return
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
type: 'duplicate-comp',
|
|
117
|
-
compositionId: item.composition.id,
|
|
118
|
-
compositionType: item.composition.durationInFrames === 1
|
|
119
|
-
? 'still'
|
|
120
|
-
: 'composition',
|
|
121
|
-
});
|
|
122
|
-
},
|
|
123
|
-
quickSwitcherLabel: null,
|
|
124
|
-
subMenu: null,
|
|
125
|
-
type: 'item',
|
|
126
|
-
value: 'duplicate',
|
|
127
|
-
},
|
|
128
|
-
{
|
|
129
|
-
id: 'rename',
|
|
130
|
-
keyHint: null,
|
|
131
|
-
label: `Rename...`,
|
|
132
|
-
leftItem: null,
|
|
133
|
-
onClick: () => {
|
|
134
|
-
setSelectedModal({
|
|
135
|
-
type: 'rename-comp',
|
|
136
|
-
compositionId: item.composition.id,
|
|
137
|
-
});
|
|
138
|
-
},
|
|
139
|
-
quickSwitcherLabel: null,
|
|
140
|
-
subMenu: null,
|
|
141
|
-
type: 'item',
|
|
142
|
-
value: 'rename',
|
|
143
|
-
},
|
|
144
|
-
{
|
|
145
|
-
id: 'delete',
|
|
146
|
-
keyHint: null,
|
|
147
|
-
label: `Delete...`,
|
|
148
|
-
leftItem: null,
|
|
149
|
-
onClick: () => {
|
|
150
|
-
setSelectedModal({
|
|
151
|
-
type: 'delete-comp',
|
|
152
|
-
compositionId: item.composition.id,
|
|
153
|
-
});
|
|
154
|
-
},
|
|
155
|
-
quickSwitcherLabel: null,
|
|
156
|
-
subMenu: null,
|
|
157
|
-
type: 'item',
|
|
158
|
-
value: 'delete',
|
|
159
|
-
},
|
|
160
|
-
{
|
|
161
|
-
type: 'divider',
|
|
162
|
-
id: 'copy-id-divider',
|
|
163
|
-
},
|
|
164
|
-
{
|
|
165
|
-
id: 'copy-id',
|
|
166
|
-
keyHint: null,
|
|
167
|
-
label: `Copy ID`,
|
|
168
|
-
leftItem: null,
|
|
169
|
-
onClick: () => {
|
|
170
|
-
navigator.clipboard
|
|
171
|
-
.writeText(item.composition.id)
|
|
172
|
-
.catch((err) => {
|
|
173
|
-
(0, NotificationCenter_1.showNotification)(`Could not copy to clipboard: ${err.message}`, 1000);
|
|
174
|
-
})
|
|
175
|
-
.then(() => {
|
|
176
|
-
(0, NotificationCenter_1.showNotification)('Copied to clipboard', 1000);
|
|
177
|
-
});
|
|
178
|
-
},
|
|
179
|
-
quickSwitcherLabel: null,
|
|
180
|
-
subMenu: null,
|
|
181
|
-
type: 'item',
|
|
182
|
-
value: 'remove',
|
|
183
|
-
},
|
|
184
|
-
];
|
|
114
|
+
return (0, composition_menu_items_1.getCompositionMenuItems)({
|
|
115
|
+
closeMenu: noop_1.noop,
|
|
116
|
+
composition: item.composition,
|
|
117
|
+
connectionStatus,
|
|
118
|
+
resolvedLocation,
|
|
119
|
+
setSelectedModal,
|
|
120
|
+
readOnlyStudio: window.remotion_isReadOnlyStudio,
|
|
121
|
+
});
|
|
185
122
|
}
|
|
186
123
|
return [];
|
|
187
|
-
}, [item, setSelectedModal]);
|
|
124
|
+
}, [connectionStatus, item, resolvedLocation, setSelectedModal]);
|
|
188
125
|
if (item.type === 'folder') {
|
|
189
126
|
return (jsx_runtime_1.jsxs(jsx_runtime_1.Fragment, { children: [
|
|
190
127
|
jsx_runtime_1.jsxs("button", { style: style, onPointerEnter: onPointerEnter, onPointerLeave: onPointerLeave, tabIndex: tabIndex, onClick: onClick, type: "button", title: item.folderName, children: [item.expanded ? (jsx_runtime_1.jsx(folder_1.ExpandedFolderIcon, { style: iconStyle, color: hovered || selected ? 'white' : colors_1.LIGHT_TEXT })) : (jsx_runtime_1.jsx(folder_1.CollapsedFolderIcon, { color: hovered || selected ? 'white' : colors_1.LIGHT_TEXT, style: iconStyle })), jsx_runtime_1.jsx(layout_1.Spacing, { x: 1 }), jsx_runtime_1.jsx("div", { style: label, children: item.folderName })
|
|
@@ -4,7 +4,6 @@ exports.EditorContent = void 0;
|
|
|
4
4
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
5
|
const react_1 = require("react");
|
|
6
6
|
const remotion_1 = require("remotion");
|
|
7
|
-
const is_current_selected_still_1 = require("../helpers/is-current-selected-still");
|
|
8
7
|
const InitialCompositionLoader_1 = require("./InitialCompositionLoader");
|
|
9
8
|
const MenuToolbar_1 = require("./MenuToolbar");
|
|
10
9
|
const SplitterContainer_1 = require("./Splitter/SplitterContainer");
|
|
@@ -20,9 +19,8 @@ const container = {
|
|
|
20
19
|
height: 0,
|
|
21
20
|
};
|
|
22
21
|
const EditorContent = ({ readOnlyStudio, children }) => {
|
|
23
|
-
const isStill = (0, is_current_selected_still_1.useIsStill)();
|
|
24
22
|
const { canvasContent } = (0, react_1.useContext)(remotion_1.Internals.CompositionManager);
|
|
25
|
-
const showTimeline = canvasContent !== null &&
|
|
23
|
+
const showTimeline = canvasContent !== null && canvasContent.type === 'composition';
|
|
26
24
|
return (jsx_runtime_1.jsxs("div", { style: container, children: [
|
|
27
25
|
jsx_runtime_1.jsx(InitialCompositionLoader_1.InitialCompositionLoader, {}), jsx_runtime_1.jsx(MenuToolbar_1.MenuToolbar, { readOnlyStudio: readOnlyStudio }), jsx_runtime_1.jsxs(SplitterContainer_1.SplitterContainer, { orientation: "horizontal", id: "top-to-bottom", maxFlex: 0.9, minFlex: 0.2, defaultFlex: 0.75, children: [
|
|
28
26
|
jsx_runtime_1.jsx(SplitterElement_1.SplitterElement, { sticky: null, type: "flexer", children: children }), jsx_runtime_1.jsx(SplitterHandle_1.SplitterHandle, { allowToCollapse: "none", onCollapse: noop }), jsx_runtime_1.jsx(SplitterElement_1.SplitterElement, { sticky: null, type: "anti-flexer", children: showTimeline ? jsx_runtime_1.jsx(Timeline_1.Timeline, {}) : jsx_runtime_1.jsx(TimelineEmptyState_1.TimelineEmptyState, {}) })
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { SetStateAction } from 'react';
|
|
2
2
|
import React from 'react';
|
|
3
3
|
import type { ComboboxValue } from '../NewComposition/ComboBox';
|
|
4
|
-
export type MenuId = 'remotion' | 'file' | 'view' | 'install' | 'tools' | 'help';
|
|
4
|
+
export type MenuId = 'remotion' | 'file' | 'view' | 'composition' | 'install' | 'tools' | 'help';
|
|
5
5
|
export type Menu = {
|
|
6
6
|
id: MenuId;
|
|
7
7
|
label: React.ReactNode;
|
|
@@ -26,6 +26,6 @@ const Modals = ({ readOnlyStudio }) => {
|
|
|
26
26
|
'connected';
|
|
27
27
|
return (jsx_runtime_1.jsxs(jsx_runtime_1.Fragment, { children: [modalContextType && modalContextType.type === 'duplicate-comp' && (jsx_runtime_1.jsx(DuplicateComposition_1.DuplicateComposition, { compositionType: modalContextType.compositionType, compositionId: modalContextType.compositionId })), modalContextType && modalContextType.type === 'delete-comp' && (jsx_runtime_1.jsx(DeleteComposition_1.DeleteComposition, { compositionId: modalContextType.compositionId })), modalContextType && modalContextType.type === 'rename-comp' && (jsx_runtime_1.jsx(RenameComposition_1.RenameComposition, { compositionId: modalContextType.compositionId })), modalContextType && modalContextType.type === 'input-props-override' && (jsx_runtime_1.jsx(OverrideInputProps_1.OverrideInputPropsModal, {})), modalContextType && modalContextType.type === 'web-render' && (jsx_runtime_1.jsx(WebRenderModal_1.WebRenderModalWithLoader, { ...modalContextType })), modalContextType &&
|
|
28
28
|
modalContextType.type === 'server-render' &&
|
|
29
|
-
(canRender || modalContextType.readOnlyStudio) ? (jsx_runtime_1.jsx(ServerRenderModal_1.RenderModalWithLoader, { readOnlyStudio: (_a = modalContextType.readOnlyStudio) !== null && _a !== void 0 ? _a : false, initialFrame: modalContextType.initialFrame, initialDarkMode: modalContextType.initialDarkMode, compositionId: modalContextType.compositionId, initialVideoImageFormat: modalContextType.initialVideoImageFormat, initialJpegQuality: modalContextType.initialJpegQuality, initialScale: modalContextType.initialScale, initialLogLevel: modalContextType.initialLogLevel, initialOffthreadVideoCacheSizeInBytes: modalContextType.initialOffthreadVideoCacheSizeInBytes, initialOffthreadVideoThreads: modalContextType.initialOffthreadVideoThreads, initialMediaCacheSizeInBytes: modalContextType.initialMediaCacheSizeInBytes, initialConcurrency: modalContextType.initialConcurrency, maxConcurrency: modalContextType.maxConcurrency, minConcurrency: modalContextType.minConcurrency, initialStillImageFormat: modalContextType.initialStillImageFormat, initialMuted: modalContextType.initialMuted, initialEnforceAudioTrack: modalContextType.initialEnforceAudioTrack, initialProResProfile: modalContextType.initialProResProfile, initialx264Preset: modalContextType.initialx264Preset, initialPixelFormat: modalContextType.initialPixelFormat, initialAudioBitrate: modalContextType.initialAudioBitrate, initialVideoBitrate: modalContextType.initialVideoBitrate, initialEveryNthFrame: modalContextType.initialEveryNthFrame, initialNumberOfGifLoops: modalContextType.initialNumberOfGifLoops, initialDelayRenderTimeout: modalContextType.initialDelayRenderTimeout, initialEnvVariables: modalContextType.initialEnvVariables, initialDisableWebSecurity: modalContextType.initialDisableWebSecurity, initialGl: modalContextType.initialOpenGlRenderer, initialHeadless: modalContextType.initialHeadless, initialIgnoreCertificateErrors: modalContextType.initialIgnoreCertificateErrors, initialEncodingBufferSize: modalContextType.initialEncodingBufferSize, initialEncodingMaxRate: modalContextType.initialEncodingMaxRate, initialUserAgent: modalContextType.initialUserAgent, initialColorSpace: modalContextType.initialColorSpace, initialMultiProcessOnLinux: modalContextType.initialMultiProcessOnLinux, initialRepro: modalContextType.initialRepro, initialBeep: modalContextType.initialBeep, initialForSeamlessAacConcatenation: modalContextType.initialForSeamlessAacConcatenation, defaultProps: modalContextType.defaultProps, inFrameMark: modalContextType.inFrameMark, outFrameMark: modalContextType.outFrameMark, defaultConfigurationAudioCodec: modalContextType.defaultConfigurationAudioCodec, defaultConfigurationVideoCodec: modalContextType.defaultConfigurationVideoCodec, renderTypeOfLastRender: modalContextType.renderTypeOfLastRender, defaultMetadata: modalContextType.defaulMetadata, initialHardwareAcceleration: modalContextType.initialHardwareAcceleration, initialSampleRate: modalContextType.initialSampleRate, initialChromeMode: modalContextType.initialChromeMode, renderDefaults: modalContextType.renderDefaults })) : null, modalContextType && modalContextType.type === 'render-progress' && (jsx_runtime_1.jsx(RenderStatusModal_1.RenderStatusModal, { jobId: modalContextType.jobId })), modalContextType && modalContextType.type === 'update' && (jsx_runtime_1.jsx(UpdateModal_1.UpdateModal, { info: modalContextType.info, knownBugs: modalContextType.knownBugs })), modalContextType && modalContextType.type === 'install-packages' && (jsx_runtime_1.jsx(InstallPackage_1.InstallPackageModal, { packageManager: modalContextType.packageManager })), modalContextType && modalContextType.type === 'quick-switcher' && (jsx_runtime_1.jsx(QuickSwitcher_1.default, { readOnlyStudio: readOnlyStudio, invocationTimestamp: modalContextType.invocationTimestamp, initialMode: modalContextType.mode })), process.env.ASK_AI_ENABLED && jsx_runtime_1.jsx(AskAiModal_1.AskAiModal, {})] }));
|
|
29
|
+
(canRender || modalContextType.readOnlyStudio) ? (jsx_runtime_1.jsx(ServerRenderModal_1.RenderModalWithLoader, { readOnlyStudio: (_a = modalContextType.readOnlyStudio) !== null && _a !== void 0 ? _a : false, initialFrame: modalContextType.initialFrame, initialDarkMode: modalContextType.initialDarkMode, compositionId: modalContextType.compositionId, initialVideoImageFormat: modalContextType.initialVideoImageFormat, initialJpegQuality: modalContextType.initialJpegQuality, initialScale: modalContextType.initialScale, initialLogLevel: modalContextType.initialLogLevel, initialOffthreadVideoCacheSizeInBytes: modalContextType.initialOffthreadVideoCacheSizeInBytes, initialOffthreadVideoThreads: modalContextType.initialOffthreadVideoThreads, initialMediaCacheSizeInBytes: modalContextType.initialMediaCacheSizeInBytes, initialConcurrency: modalContextType.initialConcurrency, maxConcurrency: modalContextType.maxConcurrency, minConcurrency: modalContextType.minConcurrency, initialStillImageFormat: modalContextType.initialStillImageFormat, initialMuted: modalContextType.initialMuted, initialEnforceAudioTrack: modalContextType.initialEnforceAudioTrack, initialProResProfile: modalContextType.initialProResProfile, initialx264Preset: modalContextType.initialx264Preset, initialGopSize: modalContextType.initialGopSize, initialPixelFormat: modalContextType.initialPixelFormat, initialAudioBitrate: modalContextType.initialAudioBitrate, initialVideoBitrate: modalContextType.initialVideoBitrate, initialEveryNthFrame: modalContextType.initialEveryNthFrame, initialNumberOfGifLoops: modalContextType.initialNumberOfGifLoops, initialDelayRenderTimeout: modalContextType.initialDelayRenderTimeout, initialEnvVariables: modalContextType.initialEnvVariables, initialDisableWebSecurity: modalContextType.initialDisableWebSecurity, initialGl: modalContextType.initialOpenGlRenderer, initialHeadless: modalContextType.initialHeadless, initialIgnoreCertificateErrors: modalContextType.initialIgnoreCertificateErrors, initialEncodingBufferSize: modalContextType.initialEncodingBufferSize, initialEncodingMaxRate: modalContextType.initialEncodingMaxRate, initialUserAgent: modalContextType.initialUserAgent, initialColorSpace: modalContextType.initialColorSpace, initialMultiProcessOnLinux: modalContextType.initialMultiProcessOnLinux, initialRepro: modalContextType.initialRepro, initialBeep: modalContextType.initialBeep, initialForSeamlessAacConcatenation: modalContextType.initialForSeamlessAacConcatenation, defaultProps: modalContextType.defaultProps, inFrameMark: modalContextType.inFrameMark, outFrameMark: modalContextType.outFrameMark, defaultConfigurationAudioCodec: modalContextType.defaultConfigurationAudioCodec, defaultConfigurationVideoCodec: modalContextType.defaultConfigurationVideoCodec, renderTypeOfLastRender: modalContextType.renderTypeOfLastRender, defaultMetadata: modalContextType.defaulMetadata, initialHardwareAcceleration: modalContextType.initialHardwareAcceleration, initialSampleRate: modalContextType.initialSampleRate, initialChromeMode: modalContextType.initialChromeMode, renderDefaults: modalContextType.renderDefaults })) : null, modalContextType && modalContextType.type === 'render-progress' && (jsx_runtime_1.jsx(RenderStatusModal_1.RenderStatusModal, { jobId: modalContextType.jobId })), modalContextType && modalContextType.type === 'update' && (jsx_runtime_1.jsx(UpdateModal_1.UpdateModal, { info: modalContextType.info, knownBugs: modalContextType.knownBugs })), modalContextType && modalContextType.type === 'install-packages' && (jsx_runtime_1.jsx(InstallPackage_1.InstallPackageModal, { packageManager: modalContextType.packageManager })), modalContextType && modalContextType.type === 'quick-switcher' && (jsx_runtime_1.jsx(QuickSwitcher_1.default, { readOnlyStudio: readOnlyStudio, invocationTimestamp: modalContextType.invocationTimestamp, initialMode: modalContextType.mode })), process.env.ASK_AI_ENABLED && jsx_runtime_1.jsx(AskAiModal_1.AskAiModal, {})] }));
|
|
30
30
|
};
|
|
31
31
|
exports.Modals = Modals;
|
|
@@ -195,6 +195,7 @@ const RenderButton = ({ readOnlyStudio, }) => {
|
|
|
195
195
|
initialEnforceAudioTrack: defaults.enforceAudioTrack,
|
|
196
196
|
initialProResProfile: defaults.proResProfile,
|
|
197
197
|
initialx264Preset: defaults.x264Preset,
|
|
198
|
+
initialGopSize: defaults.gopSize,
|
|
198
199
|
initialPixelFormat: null,
|
|
199
200
|
initialAudioBitrate: defaults.audioBitrate,
|
|
200
201
|
initialVideoBitrate: defaults.videoBitrate,
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import type { ChromeMode
|
|
2
|
-
import type { HardwareAccelerationOption } from '@remotion/renderer/client';
|
|
1
|
+
import type { ChromeMode } from '@remotion/renderer';
|
|
3
2
|
import type { UiOpenGlOptions } from '@remotion/studio-shared';
|
|
4
3
|
import React from 'react';
|
|
5
4
|
export type RenderType = 'still' | 'video' | 'audio' | 'sequence';
|
|
@@ -11,8 +10,6 @@ export declare const RenderModalAdvanced: React.FC<{
|
|
|
11
10
|
readonly concurrency: number;
|
|
12
11
|
readonly delayRenderTimeout: number;
|
|
13
12
|
readonly setDelayRenderTimeout: React.Dispatch<React.SetStateAction<number>>;
|
|
14
|
-
readonly disallowParallelEncoding: boolean;
|
|
15
|
-
readonly setDisallowParallelEncoding: React.Dispatch<React.SetStateAction<boolean>>;
|
|
16
13
|
readonly setDisableWebSecurity: React.Dispatch<React.SetStateAction<boolean>>;
|
|
17
14
|
readonly setIgnoreCertificateErrors: React.Dispatch<React.SetStateAction<boolean>>;
|
|
18
15
|
readonly setHeadless: React.Dispatch<React.SetStateAction<boolean>>;
|
|
@@ -23,19 +20,12 @@ export declare const RenderModalAdvanced: React.FC<{
|
|
|
23
20
|
readonly setOpenGlOption: React.Dispatch<React.SetStateAction<UiOpenGlOptions>>;
|
|
24
21
|
readonly chromeModeOption: ChromeMode;
|
|
25
22
|
readonly setChromeModeOption: React.Dispatch<React.SetStateAction<ChromeMode>>;
|
|
26
|
-
readonly envVariables: [string, string][];
|
|
27
|
-
readonly setEnvVariables: React.Dispatch<React.SetStateAction<[string, string][]>>;
|
|
28
|
-
readonly x264Preset: X264Preset | null;
|
|
29
|
-
readonly setx264Preset: React.Dispatch<React.SetStateAction<X264Preset>>;
|
|
30
|
-
readonly hardwareAcceleration: HardwareAccelerationOption;
|
|
31
|
-
readonly setHardwareAcceleration: React.Dispatch<React.SetStateAction<HardwareAccelerationOption>>;
|
|
32
23
|
readonly offthreadVideoCacheSizeInBytes: number | null;
|
|
33
24
|
readonly setOffthreadVideoCacheSizeInBytes: React.Dispatch<React.SetStateAction<number | null>>;
|
|
34
25
|
readonly mediaCacheSizeInBytes: number | null;
|
|
35
26
|
readonly setMediaCacheSizeInBytes: React.Dispatch<React.SetStateAction<number | null>>;
|
|
36
27
|
readonly offthreadVideoThreads: number | null;
|
|
37
28
|
readonly setOffthreadVideoThreads: React.Dispatch<React.SetStateAction<number | null>>;
|
|
38
|
-
readonly codec: Codec;
|
|
39
29
|
readonly enableMultiProcessOnLinux: boolean;
|
|
40
30
|
readonly darkMode: boolean;
|
|
41
31
|
readonly setDarkMode: React.Dispatch<React.SetStateAction<boolean>>;
|
|
@@ -4,7 +4,6 @@ exports.RenderModalAdvanced = void 0;
|
|
|
4
4
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
5
|
const client_1 = require("@remotion/renderer/client");
|
|
6
6
|
const react_1 = require("react");
|
|
7
|
-
const presets_labels_1 = require("../../helpers/presets-labels");
|
|
8
7
|
const Checkmark_1 = require("../../icons/Checkmark");
|
|
9
8
|
const Checkbox_1 = require("../Checkbox");
|
|
10
9
|
const layout_1 = require("../layout");
|
|
@@ -14,13 +13,12 @@ const RemInput_1 = require("../NewComposition/RemInput");
|
|
|
14
13
|
const layout_2 = require("./layout");
|
|
15
14
|
const NumberSetting_1 = require("./NumberSetting");
|
|
16
15
|
const OptionExplainerBubble_1 = require("./OptionExplainerBubble");
|
|
17
|
-
const RenderModalEnvironmentVariables_1 = require("./RenderModalEnvironmentVariables");
|
|
18
16
|
const RenderModalHr_1 = require("./RenderModalHr");
|
|
19
17
|
const container = {
|
|
20
18
|
flex: 1,
|
|
21
19
|
overflowY: 'auto',
|
|
22
20
|
};
|
|
23
|
-
const RenderModalAdvanced = ({ renderMode, maxConcurrency, minConcurrency, setConcurrency, concurrency, delayRenderTimeout, setDelayRenderTimeout,
|
|
21
|
+
const RenderModalAdvanced = ({ renderMode, maxConcurrency, minConcurrency, setConcurrency, concurrency, delayRenderTimeout, setDelayRenderTimeout, setDisableWebSecurity, setIgnoreCertificateErrors, setHeadless, headless, ignoreCertificateErrors, disableWebSecurity, openGlOption, setOpenGlOption, setMediaCacheSizeInBytes, mediaCacheSizeInBytes, offthreadVideoCacheSizeInBytes, setOffthreadVideoCacheSizeInBytes, offthreadVideoThreads, setOffthreadVideoThreads, enableMultiProcessOnLinux, setChromiumMultiProcessOnLinux, setUserAgent, userAgent, beep, setBeep, repro, setRepro, chromeModeOption, setChromeModeOption, darkMode, setDarkMode, }) => {
|
|
24
22
|
const extendedOpenGlOptions = (0, react_1.useMemo)(() => {
|
|
25
23
|
return [
|
|
26
24
|
'angle',
|
|
@@ -64,9 +62,6 @@ const RenderModalAdvanced = ({ renderMode, maxConcurrency, minConcurrency, setCo
|
|
|
64
62
|
return null;
|
|
65
63
|
});
|
|
66
64
|
}, [setUserAgent]);
|
|
67
|
-
const onDisallowParallelEncodingChanged = (0, react_1.useCallback)((e) => {
|
|
68
|
-
setDisallowParallelEncoding(e.target.checked);
|
|
69
|
-
}, [setDisallowParallelEncoding]);
|
|
70
65
|
const onDisableWebSecurityChanged = (0, react_1.useCallback)((e) => {
|
|
71
66
|
setDisableWebSecurity(e.target.checked);
|
|
72
67
|
}, [setDisableWebSecurity]);
|
|
@@ -123,37 +118,6 @@ const RenderModalAdvanced = ({ renderMode, maxConcurrency, minConcurrency, setCo
|
|
|
123
118
|
};
|
|
124
119
|
});
|
|
125
120
|
}, [chromeModeOption, setChromeModeOption]);
|
|
126
|
-
const x264PresetOptions = (0, react_1.useMemo)(() => {
|
|
127
|
-
return client_1.BrowserSafeApis.x264PresetOptions.map((option) => {
|
|
128
|
-
return {
|
|
129
|
-
label: (0, presets_labels_1.labelx264Preset)(option),
|
|
130
|
-
onClick: () => setx264Preset(option),
|
|
131
|
-
key: option,
|
|
132
|
-
type: 'item',
|
|
133
|
-
id: option,
|
|
134
|
-
keyHint: null,
|
|
135
|
-
leftItem: x264Preset === option ? jsx_runtime_1.jsx(Checkmark_1.Checkmark, {}) : null,
|
|
136
|
-
quickSwitcherLabel: null,
|
|
137
|
-
subMenu: null,
|
|
138
|
-
value: option,
|
|
139
|
-
};
|
|
140
|
-
});
|
|
141
|
-
}, [setx264Preset, x264Preset]);
|
|
142
|
-
const hardwareAccelerationValues = (0, react_1.useMemo)(() => {
|
|
143
|
-
return client_1.BrowserSafeApis.hardwareAccelerationOptions.map((option) => {
|
|
144
|
-
return {
|
|
145
|
-
label: option,
|
|
146
|
-
onClick: () => setHardwareAcceleration(option),
|
|
147
|
-
leftItem: hardwareAcceleration === option ? jsx_runtime_1.jsx(Checkmark_1.Checkmark, {}) : null,
|
|
148
|
-
subMenu: null,
|
|
149
|
-
quickSwitcherLabel: null,
|
|
150
|
-
type: 'item',
|
|
151
|
-
id: option,
|
|
152
|
-
keyHint: null,
|
|
153
|
-
value: option,
|
|
154
|
-
};
|
|
155
|
-
});
|
|
156
|
-
}, [hardwareAcceleration, setHardwareAcceleration]);
|
|
157
121
|
const changeMediaCacheSizeInBytes = (0, react_1.useCallback)((cb) => {
|
|
158
122
|
setMediaCacheSizeInBytes((prev) => {
|
|
159
123
|
if (prev === null) {
|
|
@@ -187,21 +151,11 @@ const RenderModalAdvanced = ({ renderMode, maxConcurrency, minConcurrency, setCo
|
|
|
187
151
|
return cb;
|
|
188
152
|
});
|
|
189
153
|
}, [setOffthreadVideoThreads]);
|
|
190
|
-
return (jsx_runtime_1.jsxs("div", { style: container, className: is_menu_item_1.VERTICAL_SCROLLBAR_CLASSNAME, children: [renderMode === 'still' ? null : (jsx_runtime_1.jsx(NumberSetting_1.NumberSetting, { min: minConcurrency, max: maxConcurrency, step: 1, name: "Concurrency", formatter: (w) => `${w}x`, onValueChanged: setConcurrency, value: concurrency })),
|
|
191
|
-
jsx_runtime_1.jsxs("div", { style: layout_2.label, children: ["x264 Preset",
|
|
192
|
-
jsx_runtime_1.jsx(layout_1.Spacing, { x: 0.5 }), jsx_runtime_1.jsx(OptionExplainerBubble_1.OptionExplainerBubble, { id: "x264Option" })
|
|
193
|
-
] }), jsx_runtime_1.jsx("div", { style: layout_2.rightRow, children: jsx_runtime_1.jsx(ComboBox_1.Combobox, { title: x264Preset, selectedId: x264Preset, values: x264PresetOptions }) })
|
|
194
|
-
] })) : null, renderMode === 'video' ? (jsx_runtime_1.jsxs("div", { style: layout_2.optionRow, children: [
|
|
195
|
-
jsx_runtime_1.jsxs("div", { style: layout_2.label, children: ["Hardware acceleration",
|
|
196
|
-
jsx_runtime_1.jsx(layout_1.Spacing, { x: 0.5 }), jsx_runtime_1.jsx(OptionExplainerBubble_1.OptionExplainerBubble, { id: "hardwareAccelerationOption" })
|
|
197
|
-
] }), jsx_runtime_1.jsx("div", { style: layout_2.rightRow, children: jsx_runtime_1.jsx(ComboBox_1.Combobox, { title: hardwareAcceleration, selectedId: hardwareAcceleration, values: hardwareAccelerationValues }) })
|
|
198
|
-
] })) : null, jsx_runtime_1.jsx(NumberSetting_1.NumberSetting
|
|
154
|
+
return (jsx_runtime_1.jsxs("div", { style: container, className: is_menu_item_1.VERTICAL_SCROLLBAR_CLASSNAME, children: [renderMode === 'still' ? null : (jsx_runtime_1.jsx(NumberSetting_1.NumberSetting, { min: minConcurrency, max: maxConcurrency, step: 1, name: "Concurrency", formatter: (w) => `${w}x`, onValueChanged: setConcurrency, value: concurrency })), jsx_runtime_1.jsx(NumberSetting_1.NumberSetting
|
|
199
155
|
// Also appears in packages/renderer/src/validate-puppeteer-timeout.ts
|
|
200
156
|
, {
|
|
201
157
|
// Also appears in packages/renderer/src/validate-puppeteer-timeout.ts
|
|
202
|
-
min: 7000, max: 900000, name: "delayRender() timeout", onValueChanged: setDelayRenderTimeout, formatter: (w) => `${w}ms`, step: 1000, hint: "delayRenderTimeoutInMillisecondsOption", value: delayRenderTimeout }), jsx_runtime_1.jsxs("div", { style: layout_2.optionRow, children: [
|
|
203
|
-
jsx_runtime_1.jsx("div", { style: layout_2.label, children: "No parallel encoding" }), jsx_runtime_1.jsx("div", { style: layout_2.rightRow, children: jsx_runtime_1.jsx(Checkbox_1.Checkbox, { checked: disallowParallelEncoding, onChange: onDisallowParallelEncodingChanged, name: "disallow-parallel-encoding" }) })
|
|
204
|
-
] }), renderMode === 'audio' ? null : (jsx_runtime_1.jsxs("div", { style: layout_2.optionRow, children: [
|
|
158
|
+
min: 7000, max: 900000, name: "delayRender() timeout", onValueChanged: setDelayRenderTimeout, formatter: (w) => `${w}ms`, step: 1000, hint: "delayRenderTimeoutInMillisecondsOption", value: delayRenderTimeout }), renderMode === 'audio' ? null : (jsx_runtime_1.jsxs("div", { style: layout_2.optionRow, children: [
|
|
205
159
|
jsx_runtime_1.jsxs("div", { style: layout_2.label, children: ["Custom @remotion/media cache size",
|
|
206
160
|
jsx_runtime_1.jsx(layout_1.Spacing, { x: 0.5 }), jsx_runtime_1.jsx(OptionExplainerBubble_1.OptionExplainerBubble, { id: "mediaCacheSizeInBytesOption" })
|
|
207
161
|
] }), jsx_runtime_1.jsx("div", { style: layout_2.rightRow, children: jsx_runtime_1.jsx(Checkbox_1.Checkbox, { checked: mediaCacheSizeInBytes !== null, onChange: toggleCustomMediaCacheSizeInBytes, name: "media-cache-size" }) })
|
|
@@ -250,7 +204,7 @@ const RenderModalAdvanced = ({ renderMode, maxConcurrency, minConcurrency, setCo
|
|
|
250
204
|
jsx_runtime_1.jsxs("div", { style: layout_2.label, children: ["Beep when finished ",
|
|
251
205
|
jsx_runtime_1.jsx(OptionExplainerBubble_1.OptionExplainerBubble, { id: "beepOnFinishOption" })
|
|
252
206
|
] }), jsx_runtime_1.jsx("div", { style: layout_2.rightRow, children: jsx_runtime_1.jsx(Checkbox_1.Checkbox, { checked: beep, onChange: onPlayBeepSound, name: "beep-when-finished" }) })
|
|
253
|
-
] })
|
|
207
|
+
] })
|
|
254
208
|
] }));
|
|
255
209
|
};
|
|
256
210
|
exports.RenderModalAdvanced = RenderModalAdvanced;
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import type { ColorSpace, Codec, PixelFormat, X264Preset } from '@remotion/renderer';
|
|
2
|
+
import type { HardwareAccelerationOption } from '@remotion/renderer/client';
|
|
3
|
+
import React from 'react';
|
|
4
|
+
import type { ComboboxValue } from '../NewComposition/ComboBox';
|
|
5
|
+
import type { RenderType } from './RenderModalAdvanced';
|
|
6
|
+
declare const qualityControlModes: readonly ["crf", "bitrate"];
|
|
7
|
+
export type QualityControl = (typeof qualityControlModes)[number];
|
|
8
|
+
export declare const RenderModalEncoding: React.FC<{
|
|
9
|
+
readonly renderMode: RenderType;
|
|
10
|
+
readonly codec: Codec;
|
|
11
|
+
readonly qualityControlType: QualityControl | null;
|
|
12
|
+
readonly setQualityControl: React.Dispatch<React.SetStateAction<QualityControl>>;
|
|
13
|
+
readonly shouldDisplayQualityControlPicker: boolean;
|
|
14
|
+
readonly crf: number | null;
|
|
15
|
+
readonly minCrf: number;
|
|
16
|
+
readonly maxCrf: number;
|
|
17
|
+
readonly setCrf: React.Dispatch<React.SetStateAction<number>>;
|
|
18
|
+
readonly customTargetVideoBitrate: string;
|
|
19
|
+
readonly setCustomTargetVideoBitrateValue: React.Dispatch<React.SetStateAction<string>>;
|
|
20
|
+
readonly encodingBufferSize: string | null;
|
|
21
|
+
readonly setEncodingBufferSize: React.Dispatch<React.SetStateAction<string | null>>;
|
|
22
|
+
readonly encodingMaxRate: string | null;
|
|
23
|
+
readonly setEncodingMaxRate: React.Dispatch<React.SetStateAction<string | null>>;
|
|
24
|
+
readonly pixelFormat: PixelFormat;
|
|
25
|
+
readonly pixelFormatOptions: ComboboxValue[];
|
|
26
|
+
readonly colorSpace: ColorSpace;
|
|
27
|
+
readonly setColorSpace: React.Dispatch<React.SetStateAction<ColorSpace>>;
|
|
28
|
+
readonly x264Preset: X264Preset | null;
|
|
29
|
+
readonly setx264Preset: React.Dispatch<React.SetStateAction<X264Preset>>;
|
|
30
|
+
readonly gopSize: number | null;
|
|
31
|
+
readonly setGopSize: React.Dispatch<React.SetStateAction<number | null>>;
|
|
32
|
+
readonly hardwareAcceleration: HardwareAccelerationOption;
|
|
33
|
+
readonly setHardwareAcceleration: React.Dispatch<React.SetStateAction<HardwareAccelerationOption>>;
|
|
34
|
+
readonly disallowParallelEncoding: boolean;
|
|
35
|
+
readonly setDisallowParallelEncoding: React.Dispatch<React.SetStateAction<boolean>>;
|
|
36
|
+
}>;
|
|
37
|
+
export {};
|
|
@@ -0,0 +1,165 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.RenderModalEncoding = void 0;
|
|
4
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
+
const client_1 = require("@remotion/renderer/client");
|
|
6
|
+
const react_1 = require("react");
|
|
7
|
+
const presets_labels_1 = require("../../helpers/presets-labels");
|
|
8
|
+
const Checkmark_1 = require("../../icons/Checkmark");
|
|
9
|
+
const Checkbox_1 = require("../Checkbox");
|
|
10
|
+
const layout_1 = require("../layout");
|
|
11
|
+
const is_menu_item_1 = require("../Menu/is-menu-item");
|
|
12
|
+
const ComboBox_1 = require("../NewComposition/ComboBox");
|
|
13
|
+
const RemInput_1 = require("../NewComposition/RemInput");
|
|
14
|
+
const SegmentedControl_1 = require("../SegmentedControl");
|
|
15
|
+
const CrfSetting_1 = require("./CrfSetting");
|
|
16
|
+
const layout_2 = require("./layout");
|
|
17
|
+
const NumberSetting_1 = require("./NumberSetting");
|
|
18
|
+
const OptionExplainerBubble_1 = require("./OptionExplainerBubble");
|
|
19
|
+
const RenderModalHr_1 = require("./RenderModalHr");
|
|
20
|
+
const qualityControlModes = ['crf', 'bitrate'];
|
|
21
|
+
const container = {
|
|
22
|
+
flex: 1,
|
|
23
|
+
overflowY: 'auto',
|
|
24
|
+
};
|
|
25
|
+
const RenderModalEncoding = ({ renderMode, codec, qualityControlType, setQualityControl, shouldDisplayQualityControlPicker, crf, minCrf, maxCrf, setCrf, customTargetVideoBitrate, setCustomTargetVideoBitrateValue, encodingBufferSize, setEncodingBufferSize, encodingMaxRate, setEncodingMaxRate, pixelFormat, pixelFormatOptions, colorSpace, setColorSpace, x264Preset, setx264Preset, gopSize, setGopSize, hardwareAcceleration, setHardwareAcceleration, disallowParallelEncoding, setDisallowParallelEncoding, }) => {
|
|
26
|
+
const colorSpaceOptions = (0, react_1.useMemo)(() => {
|
|
27
|
+
return client_1.BrowserSafeApis.validColorSpaces.map((option) => {
|
|
28
|
+
return {
|
|
29
|
+
label: option,
|
|
30
|
+
onClick: () => setColorSpace(option),
|
|
31
|
+
key: option,
|
|
32
|
+
id: option,
|
|
33
|
+
keyHint: null,
|
|
34
|
+
leftItem: colorSpace === option ? jsx_runtime_1.jsx(Checkmark_1.Checkmark, {}) : null,
|
|
35
|
+
quickSwitcherLabel: null,
|
|
36
|
+
subMenu: null,
|
|
37
|
+
type: 'item',
|
|
38
|
+
value: option,
|
|
39
|
+
};
|
|
40
|
+
});
|
|
41
|
+
}, [colorSpace, setColorSpace]);
|
|
42
|
+
const qualityControlOptions = (0, react_1.useMemo)(() => {
|
|
43
|
+
return qualityControlModes.map((option) => {
|
|
44
|
+
return {
|
|
45
|
+
label: option === 'crf' ? 'CRF' : 'Bitrate',
|
|
46
|
+
onClick: () => setQualityControl(option),
|
|
47
|
+
key: option,
|
|
48
|
+
selected: qualityControlType === option,
|
|
49
|
+
};
|
|
50
|
+
});
|
|
51
|
+
}, [qualityControlType, setQualityControl]);
|
|
52
|
+
const x264PresetOptions = (0, react_1.useMemo)(() => {
|
|
53
|
+
return client_1.BrowserSafeApis.x264PresetOptions.map((option) => {
|
|
54
|
+
return {
|
|
55
|
+
label: (0, presets_labels_1.labelx264Preset)(option),
|
|
56
|
+
onClick: () => setx264Preset(option),
|
|
57
|
+
key: option,
|
|
58
|
+
type: 'item',
|
|
59
|
+
id: option,
|
|
60
|
+
keyHint: null,
|
|
61
|
+
leftItem: x264Preset === option ? jsx_runtime_1.jsx(Checkmark_1.Checkmark, {}) : null,
|
|
62
|
+
quickSwitcherLabel: null,
|
|
63
|
+
subMenu: null,
|
|
64
|
+
value: option,
|
|
65
|
+
};
|
|
66
|
+
});
|
|
67
|
+
}, [setx264Preset, x264Preset]);
|
|
68
|
+
const hardwareAccelerationValues = (0, react_1.useMemo)(() => {
|
|
69
|
+
return client_1.BrowserSafeApis.hardwareAccelerationOptions.map((option) => {
|
|
70
|
+
return {
|
|
71
|
+
label: option,
|
|
72
|
+
onClick: () => setHardwareAcceleration(option),
|
|
73
|
+
leftItem: hardwareAcceleration === option ? jsx_runtime_1.jsx(Checkmark_1.Checkmark, {}) : null,
|
|
74
|
+
subMenu: null,
|
|
75
|
+
quickSwitcherLabel: null,
|
|
76
|
+
type: 'item',
|
|
77
|
+
id: option,
|
|
78
|
+
keyHint: null,
|
|
79
|
+
value: option,
|
|
80
|
+
};
|
|
81
|
+
});
|
|
82
|
+
}, [hardwareAcceleration, setHardwareAcceleration]);
|
|
83
|
+
const toggleCustomGopSize = (0, react_1.useCallback)(() => {
|
|
84
|
+
setGopSize((previous) => {
|
|
85
|
+
if (previous === null) {
|
|
86
|
+
return 120;
|
|
87
|
+
}
|
|
88
|
+
return null;
|
|
89
|
+
});
|
|
90
|
+
}, [setGopSize]);
|
|
91
|
+
const changeGopSize = (0, react_1.useCallback)((cb) => {
|
|
92
|
+
setGopSize((prev) => {
|
|
93
|
+
if (prev === null) {
|
|
94
|
+
throw new TypeError('Expected previous value');
|
|
95
|
+
}
|
|
96
|
+
if (typeof cb === 'function') {
|
|
97
|
+
return cb(prev);
|
|
98
|
+
}
|
|
99
|
+
return cb;
|
|
100
|
+
});
|
|
101
|
+
}, [setGopSize]);
|
|
102
|
+
const onTargetVideoBitrateChanged = (0, react_1.useCallback)((e) => {
|
|
103
|
+
setCustomTargetVideoBitrateValue(e.target.value);
|
|
104
|
+
}, [setCustomTargetVideoBitrateValue]);
|
|
105
|
+
const onEncodingBufferSizeToggled = (0, react_1.useCallback)((e) => {
|
|
106
|
+
setEncodingBufferSize(e.target.checked ? '10000k' : null);
|
|
107
|
+
}, [setEncodingBufferSize]);
|
|
108
|
+
const onEncodingMaxRateToggled = (0, react_1.useCallback)((e) => {
|
|
109
|
+
setEncodingMaxRate(e.target.checked ? '5000k' : null);
|
|
110
|
+
}, [setEncodingMaxRate]);
|
|
111
|
+
const onEncodingBufferSizeChanged = (0, react_1.useCallback)((e) => {
|
|
112
|
+
setEncodingBufferSize(e.target.value);
|
|
113
|
+
}, [setEncodingBufferSize]);
|
|
114
|
+
const onEncodingMaxRateChanged = (0, react_1.useCallback)((e) => {
|
|
115
|
+
setEncodingMaxRate(e.target.value);
|
|
116
|
+
}, [setEncodingMaxRate]);
|
|
117
|
+
const onDisallowParallelEncodingChanged = (0, react_1.useCallback)((e) => {
|
|
118
|
+
setDisallowParallelEncoding(e.target.checked);
|
|
119
|
+
}, [setDisallowParallelEncoding]);
|
|
120
|
+
return (jsx_runtime_1.jsxs("div", { style: container, className: is_menu_item_1.VERTICAL_SCROLLBAR_CLASSNAME, children: [shouldDisplayQualityControlPicker && renderMode === 'video' ? (jsx_runtime_1.jsxs("div", { style: layout_2.optionRow, children: [
|
|
121
|
+
jsx_runtime_1.jsx("div", { style: layout_2.label, children: "Quality control" }), jsx_runtime_1.jsx("div", { style: layout_2.rightRow, children: jsx_runtime_1.jsx(SegmentedControl_1.SegmentedControl, { items: qualityControlOptions, needsWrapping: true }) })
|
|
122
|
+
] })) : null, qualityControlType === 'crf' &&
|
|
123
|
+
renderMode === 'video' &&
|
|
124
|
+
crf !== null ? (jsx_runtime_1.jsx(CrfSetting_1.CrfSetting, { crf: crf, min: minCrf, max: maxCrf, setCrf: setCrf, option: "crfOption" })) : null, qualityControlType === 'bitrate' && renderMode === 'video' ? (jsx_runtime_1.jsxs("div", { style: layout_2.optionRow, children: [
|
|
125
|
+
jsx_runtime_1.jsxs("div", { style: layout_2.label, children: ["Target video bitrate",
|
|
126
|
+
jsx_runtime_1.jsx(layout_1.Spacing, { x: 0.5 }), jsx_runtime_1.jsx(OptionExplainerBubble_1.OptionExplainerBubble, { id: "videoBitrateOption" })
|
|
127
|
+
] }), jsx_runtime_1.jsx("div", { style: layout_2.rightRow, children: jsx_runtime_1.jsx("div", { children: jsx_runtime_1.jsx(RemInput_1.RemotionInput, { style: layout_2.input, value: customTargetVideoBitrate, onChange: onTargetVideoBitrateChanged, status: "ok", rightAlign: true }) }) })
|
|
128
|
+
] })) : null, renderMode === 'video' ? (jsx_runtime_1.jsxs(jsx_runtime_1.Fragment, { children: [
|
|
129
|
+
jsx_runtime_1.jsxs("div", { style: layout_2.optionRow, children: [
|
|
130
|
+
jsx_runtime_1.jsxs("div", { style: layout_2.label, children: ["Custom FFmpeg -bufsize",
|
|
131
|
+
jsx_runtime_1.jsx(layout_1.Spacing, { x: 0.5 }), jsx_runtime_1.jsx(OptionExplainerBubble_1.OptionExplainerBubble, { id: "encodingBufferSizeOption" })
|
|
132
|
+
] }), jsx_runtime_1.jsx("div", { style: layout_2.rightRow, children: jsx_runtime_1.jsx(Checkbox_1.Checkbox, { checked: encodingBufferSize !== null, onChange: onEncodingBufferSizeToggled, name: "encoding-buffer-size" }) })
|
|
133
|
+
] }), encodingBufferSize === null ? null : (jsx_runtime_1.jsxs("div", { style: layout_2.optionRow, children: [
|
|
134
|
+
jsx_runtime_1.jsx("div", { style: layout_2.label, children: "-bufsize value" }), jsx_runtime_1.jsx("div", { style: layout_2.rightRow, children: jsx_runtime_1.jsx("div", { children: jsx_runtime_1.jsx(RemInput_1.RemotionInput, { style: layout_2.input, value: encodingBufferSize, onChange: onEncodingBufferSizeChanged, status: "ok", rightAlign: true }) }) })
|
|
135
|
+
] })), jsx_runtime_1.jsxs("div", { style: layout_2.optionRow, children: [
|
|
136
|
+
jsx_runtime_1.jsxs("div", { style: layout_2.label, children: ["Custom FFmpeg -maxrate",
|
|
137
|
+
jsx_runtime_1.jsx(layout_1.Spacing, { x: 0.5 }), jsx_runtime_1.jsx(OptionExplainerBubble_1.OptionExplainerBubble, { id: "encodingMaxRateOption" })
|
|
138
|
+
] }), jsx_runtime_1.jsx("div", { style: layout_2.rightRow, children: jsx_runtime_1.jsx(Checkbox_1.Checkbox, { checked: encodingMaxRate !== null, onChange: onEncodingMaxRateToggled, name: "encoding-max-rate" }) })
|
|
139
|
+
] }), encodingMaxRate === null ? null : (jsx_runtime_1.jsxs("div", { style: layout_2.optionRow, children: [
|
|
140
|
+
jsx_runtime_1.jsx("div", { style: layout_2.label, children: "-maxrate value" }), jsx_runtime_1.jsx("div", { style: layout_2.rightRow, children: jsx_runtime_1.jsx("div", { children: jsx_runtime_1.jsx(RemInput_1.RemotionInput, { style: layout_2.input, value: encodingMaxRate, onChange: onEncodingMaxRateChanged, status: "ok", rightAlign: true }) }) })
|
|
141
|
+
] })), jsx_runtime_1.jsx(RenderModalHr_1.RenderModalHr, {}), jsx_runtime_1.jsxs("div", { style: layout_2.optionRow, children: [
|
|
142
|
+
jsx_runtime_1.jsx("div", { style: layout_2.label, children: "Pixel format" }), jsx_runtime_1.jsx("div", { style: layout_2.rightRow, children: jsx_runtime_1.jsx(ComboBox_1.Combobox, { values: pixelFormatOptions, selectedId: pixelFormat, title: "Pixel Format" }) })
|
|
143
|
+
] }), jsx_runtime_1.jsxs("div", { style: layout_2.optionRow, children: [
|
|
144
|
+
jsx_runtime_1.jsxs("div", { style: layout_2.label, children: ["Color space",
|
|
145
|
+
jsx_runtime_1.jsx(layout_1.Spacing, { x: 0.5 }), jsx_runtime_1.jsx(OptionExplainerBubble_1.OptionExplainerBubble, { id: "colorSpaceOption" })
|
|
146
|
+
] }), jsx_runtime_1.jsx("div", { style: layout_2.rightRow, children: jsx_runtime_1.jsx(ComboBox_1.Combobox, { values: colorSpaceOptions, selectedId: colorSpace, title: "Color Space" }) })
|
|
147
|
+
] }), jsx_runtime_1.jsx(RenderModalHr_1.RenderModalHr, {}), codec === 'h264' ? (jsx_runtime_1.jsxs("div", { style: layout_2.optionRow, children: [
|
|
148
|
+
jsx_runtime_1.jsxs("div", { style: layout_2.label, children: ["x264 Preset",
|
|
149
|
+
jsx_runtime_1.jsx(layout_1.Spacing, { x: 0.5 }), jsx_runtime_1.jsx(OptionExplainerBubble_1.OptionExplainerBubble, { id: "x264Option" })
|
|
150
|
+
] }), jsx_runtime_1.jsx("div", { style: layout_2.rightRow, children: jsx_runtime_1.jsx(ComboBox_1.Combobox, { title: x264Preset, selectedId: x264Preset, values: x264PresetOptions }) })
|
|
151
|
+
] })) : null, codec !== 'gif' ? (jsx_runtime_1.jsxs("div", { style: layout_2.optionRow, children: [
|
|
152
|
+
jsx_runtime_1.jsxs("div", { style: layout_2.label, children: ["Custom GOP size",
|
|
153
|
+
jsx_runtime_1.jsx(layout_1.Spacing, { x: 0.5 }), jsx_runtime_1.jsx(OptionExplainerBubble_1.OptionExplainerBubble, { id: "gopSizeOption" })
|
|
154
|
+
] }), jsx_runtime_1.jsx("div", { style: layout_2.rightRow, children: jsx_runtime_1.jsx(Checkbox_1.Checkbox, { checked: gopSize !== null, onChange: toggleCustomGopSize, name: "custom-gop-size" }) })
|
|
155
|
+
] })) : null, codec !== 'gif' && gopSize !== null ? (jsx_runtime_1.jsx(NumberSetting_1.NumberSetting, { min: 1, max: 10000, step: 1, name: "GOP size", formatter: (value) => `${value} frames`, onValueChanged: changeGopSize, value: gopSize })) : null, jsx_runtime_1.jsxs("div", { style: layout_2.optionRow, children: [
|
|
156
|
+
jsx_runtime_1.jsxs("div", { style: layout_2.label, children: ["Hardware acceleration",
|
|
157
|
+
jsx_runtime_1.jsx(layout_1.Spacing, { x: 0.5 }), jsx_runtime_1.jsx(OptionExplainerBubble_1.OptionExplainerBubble, { id: "hardwareAccelerationOption" })
|
|
158
|
+
] }), jsx_runtime_1.jsx("div", { style: layout_2.rightRow, children: jsx_runtime_1.jsx(ComboBox_1.Combobox, { title: hardwareAcceleration, selectedId: hardwareAcceleration, values: hardwareAccelerationValues }) })
|
|
159
|
+
] })
|
|
160
|
+
] })) : null, renderMode === 'still' ? null : (jsx_runtime_1.jsxs(jsx_runtime_1.Fragment, { children: [renderMode === 'video' ? jsx_runtime_1.jsx(RenderModalHr_1.RenderModalHr, {}) : null, jsx_runtime_1.jsxs("div", { style: layout_2.optionRow, children: [
|
|
161
|
+
jsx_runtime_1.jsx("div", { style: layout_2.label, children: "No parallel encoding" }), jsx_runtime_1.jsx("div", { style: layout_2.rightRow, children: jsx_runtime_1.jsx(Checkbox_1.Checkbox, { checked: disallowParallelEncoding, onChange: onDisallowParallelEncodingChanged, name: "disallow-parallel-encoding" }) })
|
|
162
|
+
] })
|
|
163
|
+
] }))] }));
|
|
164
|
+
};
|
|
165
|
+
exports.RenderModalEncoding = RenderModalEncoding;
|
|
@@ -1,37 +1,16 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { StillImageFormat, VideoImageFormat } from '@remotion/renderer';
|
|
2
2
|
import React from 'react';
|
|
3
|
-
import type { ComboboxValue } from '../NewComposition/ComboBox';
|
|
4
3
|
import type { SegmentedControlItem } from '../SegmentedControl';
|
|
5
4
|
import type { RenderType } from './RenderModalAdvanced';
|
|
6
|
-
declare const qualityControlModes: readonly ["crf", "bitrate"];
|
|
7
|
-
export type QualityControl = (typeof qualityControlModes)[number];
|
|
8
5
|
export declare const RenderModalPicture: React.FC<{
|
|
9
6
|
readonly renderMode: RenderType;
|
|
10
7
|
readonly scale: number;
|
|
11
8
|
readonly setScale: React.Dispatch<React.SetStateAction<number>>;
|
|
12
|
-
readonly pixelFormat: PixelFormat;
|
|
13
|
-
readonly colorSpace: ColorSpace;
|
|
14
|
-
readonly setColorSpace: React.Dispatch<React.SetStateAction<ColorSpace>>;
|
|
15
9
|
readonly imageFormatOptions: SegmentedControlItem[];
|
|
16
|
-
readonly setQualityControl: React.Dispatch<React.SetStateAction<QualityControl>>;
|
|
17
|
-
readonly qualityControlType: QualityControl | null;
|
|
18
10
|
readonly videoImageFormat: VideoImageFormat;
|
|
19
11
|
readonly stillImageFormat: StillImageFormat;
|
|
20
12
|
readonly setJpegQuality: React.Dispatch<React.SetStateAction<number>>;
|
|
21
13
|
readonly jpegQuality: number;
|
|
22
|
-
readonly maxCrf: number;
|
|
23
|
-
readonly minCrf: number;
|
|
24
|
-
readonly setCrf: React.Dispatch<React.SetStateAction<number>>;
|
|
25
|
-
readonly setCustomTargetVideoBitrateValue: React.Dispatch<React.SetStateAction<string>>;
|
|
26
|
-
readonly crf: number | null;
|
|
27
|
-
readonly customTargetVideoBitrate: string;
|
|
28
|
-
readonly shouldDisplayQualityControlPicker: boolean;
|
|
29
|
-
readonly pixelFormatOptions: ComboboxValue[];
|
|
30
|
-
readonly encodingBufferSize: string | null;
|
|
31
|
-
readonly setEncodingBufferSize: React.Dispatch<React.SetStateAction<string | null>>;
|
|
32
|
-
readonly encodingMaxRate: string | null;
|
|
33
|
-
readonly setEncodingMaxRate: React.Dispatch<React.SetStateAction<string | null>>;
|
|
34
14
|
readonly compositionWidth: number;
|
|
35
15
|
readonly compositionHeight: number;
|
|
36
16
|
}>;
|
|
37
|
-
export {};
|