@remotion/cli 3.3.77 → 3.3.79
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/better-opn/index.d.ts +6 -0
- package/dist/better-opn/index.js +202 -0
- package/dist/editor/helpers/get-timeline-sequence-layout.js +1 -1
- package/dist/handle-common-errors.js +16 -0
- package/dist/parse-command-line.d.ts +2 -0
- package/dist/preview.js +8 -3
- package/package.json +7 -7
- package/dist/convert-entry-point-to-serve-url.d.ts +0 -1
- package/dist/convert-entry-point-to-serve-url.js +0 -15
- package/dist/editor/components/Checkbox.d.ts +0 -5
- package/dist/editor/components/Checkbox.js +0 -38
- package/dist/editor/components/CollapsableOptions.d.ts +0 -6
- package/dist/editor/components/CollapsableOptions.js +0 -35
- package/dist/editor/components/CurrentCompositionSideEffects.d.ts +0 -3
- package/dist/editor/components/CurrentCompositionSideEffects.js +0 -43
- package/dist/editor/components/InlineAction.d.ts +0 -5
- package/dist/editor/components/InlineAction.js +0 -34
- package/dist/editor/components/Modals.d.ts +0 -2
- package/dist/editor/components/Modals.js +0 -23
- package/dist/editor/components/RenderButton.d.ts +0 -6
- package/dist/editor/components/RenderButton.js +0 -67
- package/dist/editor/components/RenderModal/CrfSetting.d.ts +0 -15
- package/dist/editor/components/RenderModal/CrfSetting.js +0 -43
- package/dist/editor/components/RenderModal/EnforceAudioTrackSetting.d.ts +0 -5
- package/dist/editor/components/RenderModal/EnforceAudioTrackSetting.js +0 -14
- package/dist/editor/components/RenderModal/FrameRangeSetting.d.ts +0 -8
- package/dist/editor/components/RenderModal/FrameRangeSetting.js +0 -42
- package/dist/editor/components/RenderModal/MutedSetting.d.ts +0 -5
- package/dist/editor/components/RenderModal/MutedSetting.js +0 -14
- package/dist/editor/components/RenderModal/NumberOfLoopsSetting.d.ts +0 -5
- package/dist/editor/components/RenderModal/NumberOfLoopsSetting.js +0 -26
- package/dist/editor/components/RenderModal/NumberSetting.d.ts +0 -9
- package/dist/editor/components/RenderModal/NumberSetting.js +0 -26
- package/dist/editor/components/RenderModal/QualitySetting.d.ts +0 -5
- package/dist/editor/components/RenderModal/QualitySetting.js +0 -27
- package/dist/editor/components/RenderModal/RenderErrorModal.d.ts +0 -5
- package/dist/editor/components/RenderModal/RenderErrorModal.js +0 -64
- package/dist/editor/components/RenderModal/RenderModal.d.ts +0 -28
- package/dist/editor/components/RenderModal/RenderModal.js +0 -484
- package/dist/editor/components/RenderModal/RenderModalAdvanced.d.ts +0 -11
- package/dist/editor/components/RenderModal/RenderModalAdvanced.js +0 -15
- package/dist/editor/components/RenderModal/RenderModalAudio.d.ts +0 -13
- package/dist/editor/components/RenderModal/RenderModalAudio.js +0 -22
- package/dist/editor/components/RenderModal/RenderModalBasic.d.ts +0 -24
- package/dist/editor/components/RenderModal/RenderModalBasic.js +0 -87
- package/dist/editor/components/RenderModal/RenderModalGif.d.ts +0 -9
- package/dist/editor/components/RenderModal/RenderModalGif.js +0 -16
- package/dist/editor/components/RenderModal/RenderModalHr.d.ts +0 -2
- package/dist/editor/components/RenderModal/RenderModalHr.js +0 -18
- package/dist/editor/components/RenderModal/RenderModalPicture.d.ts +0 -28
- package/dist/editor/components/RenderModal/RenderModalPicture.js +0 -51
- package/dist/editor/components/RenderModal/ScaleSetting.d.ts +0 -5
- package/dist/editor/components/RenderModal/ScaleSetting.js +0 -11
- package/dist/editor/components/RenderModal/human-readable-audio-codecs.d.ts +0 -2
- package/dist/editor/components/RenderModal/human-readable-audio-codecs.js +0 -18
- package/dist/editor/components/RenderModal/human-readable-codec.d.ts +0 -2
- package/dist/editor/components/RenderModal/human-readable-codec.js +0 -36
- package/dist/editor/components/RenderModal/layout.d.ts +0 -5
- package/dist/editor/components/RenderModal/layout.js +0 -31
- package/dist/editor/components/RenderQueue/CircularProgress.d.ts +0 -5
- package/dist/editor/components/RenderQueue/CircularProgress.js +0 -18
- package/dist/editor/components/RenderQueue/RenderQueueError.d.ts +0 -5
- package/dist/editor/components/RenderQueue/RenderQueueError.js +0 -26
- package/dist/editor/components/RenderQueue/RenderQueueItem.d.ts +0 -5
- package/dist/editor/components/RenderQueue/RenderQueueItem.js +0 -39
- package/dist/editor/components/RenderQueue/RenderQueueItemCancelButton.d.ts +0 -5
- package/dist/editor/components/RenderQueue/RenderQueueItemCancelButton.js +0 -22
- package/dist/editor/components/RenderQueue/RenderQueueItemStatus.d.ts +0 -5
- package/dist/editor/components/RenderQueue/RenderQueueItemStatus.js +0 -27
- package/dist/editor/components/RenderQueue/RenderQueueOutputName.d.ts +0 -5
- package/dist/editor/components/RenderQueue/RenderQueueOutputName.js +0 -24
- package/dist/editor/components/RenderQueue/RenderQueueProgressMessage.d.ts +0 -5
- package/dist/editor/components/RenderQueue/RenderQueueProgressMessage.js +0 -27
- package/dist/editor/components/RenderQueue/RenderQueueRemoveItem.d.ts +0 -5
- package/dist/editor/components/RenderQueue/RenderQueueRemoveItem.js +0 -23
- package/dist/editor/components/RenderQueue/RenderQueueRepeat.d.ts +0 -5
- package/dist/editor/components/RenderQueue/RenderQueueRepeat.js +0 -22
- package/dist/editor/components/RenderQueue/actions.d.ts +0 -49
- package/dist/editor/components/RenderQueue/actions.js +0 -98
- package/dist/editor/components/RenderQueue/context.d.ts +0 -19
- package/dist/editor/components/RenderQueue/context.js +0 -56
- package/dist/editor/components/RenderQueue/index.d.ts +0 -2
- package/dist/editor/components/RenderQueue/index.js +0 -18
- package/dist/editor/components/RenderQueue/item-style.d.ts +0 -2
- package/dist/editor/components/RenderQueue/item-style.js +0 -21
- package/dist/editor/components/RenderToolbarIcon.d.ts +0 -2
- package/dist/editor/components/RenderToolbarIcon.js +0 -78
- package/dist/editor/components/RendersTab.d.ts +0 -6
- package/dist/editor/components/RendersTab.js +0 -43
- package/dist/editor/components/SegmentedControl.d.ts +0 -16
- package/dist/editor/components/SegmentedControl.js +0 -63
- package/dist/editor/components/SidebarContent.d.ts +0 -5
- package/dist/editor/components/SidebarContent.js +0 -52
- package/dist/editor/components/Tabs/index.d.ts +0 -11
- package/dist/editor/components/Tabs/index.js +0 -51
- package/dist/editor/helpers/client-id.d.ts +0 -17
- package/dist/editor/helpers/client-id.js +0 -46
- package/dist/editor/helpers/use-file-existence.d.ts +0 -1
- package/dist/editor/helpers/use-file-existence.js +0 -66
- package/dist/editor/icons/RenderStillIcon.d.ts +0 -3
- package/dist/editor/icons/RenderStillIcon.js +0 -8
- package/dist/editor/icons/audio.d.ts +0 -2
- package/dist/editor/icons/audio.js +0 -6
- package/dist/editor/icons/file.d.ts +0 -2
- package/dist/editor/icons/file.js +0 -6
- package/dist/editor/icons/frame.d.ts +0 -2
- package/dist/editor/icons/frame.js +0 -6
- package/dist/editor/icons/gear.d.ts +0 -2
- package/dist/editor/icons/gear.js +0 -6
- package/dist/editor/icons/gif.d.ts +0 -2
- package/dist/editor/icons/gif.js +0 -6
- package/dist/editor/icons/render.d.ts +0 -5
- package/dist/editor/icons/render.js +0 -8
- package/dist/editor/icons/video.d.ts +0 -5
- package/dist/editor/icons/video.js +0 -8
- package/dist/ffmpeg.d.ts +0 -2
- package/dist/ffmpeg.js +0 -21
- package/dist/file-watcher.d.ts +0 -9
- package/dist/file-watcher.js +0 -35
- package/dist/gcp-command.d.ts +0 -1
- package/dist/gcp-command.js +0 -27
- package/dist/get-default-out-name.d.ts +0 -5
- package/dist/get-default-out-name.js +0 -10
- package/dist/preview-server/api-routes.d.ts +0 -4
- package/dist/preview-server/api-routes.js +0 -17
- package/dist/preview-server/api-types.d.ts +0 -27
- package/dist/preview-server/api-types.js +0 -2
- package/dist/preview-server/file-existence-watchers.d.ts +0 -13
- package/dist/preview-server/file-existence-watchers.js +0 -62
- package/dist/preview-server/handler.d.ts +0 -9
- package/dist/preview-server/handler.js +0 -34
- package/dist/preview-server/parse-body.d.ts +0 -2
- package/dist/preview-server/parse-body.js +0 -16
- package/dist/preview-server/render-queue/get-default-video-contexts.d.ts +0 -10
- package/dist/preview-server/render-queue/get-default-video-contexts.js +0 -13
- package/dist/preview-server/render-queue/job.d.ts +0 -114
- package/dist/preview-server/render-queue/job.js +0 -2
- package/dist/preview-server/render-queue/make-retry-payload.d.ts +0 -3
- package/dist/preview-server/render-queue/make-retry-payload.js +0 -79
- package/dist/preview-server/render-queue/open-directory-in-finder.d.ts +0 -1
- package/dist/preview-server/render-queue/open-directory-in-finder.js +0 -34
- package/dist/preview-server/render-queue/process-still.d.ts +0 -8
- package/dist/preview-server/render-queue/process-still.js +0 -47
- package/dist/preview-server/render-queue/process-video.d.ts +0 -8
- package/dist/preview-server/render-queue/process-video.js +0 -64
- package/dist/preview-server/render-queue/queue.d.ts +0 -21
- package/dist/preview-server/render-queue/queue.js +0 -185
- package/dist/preview-server/routes/add-render.d.ts +0 -3
- package/dist/preview-server/routes/add-render.js +0 -68
- package/dist/preview-server/routes/cancel-render.d.ts +0 -3
- package/dist/preview-server/routes/cancel-render.js +0 -9
- package/dist/preview-server/routes/open-in-file-explorer.d.ts +0 -3
- package/dist/preview-server/routes/open-in-file-explorer.js +0 -14
- package/dist/preview-server/routes/remove-render.d.ts +0 -3
- package/dist/preview-server/routes/remove-render.js +0 -9
- package/dist/preview-server/routes/subscribe-to-file-existence.d.ts +0 -3
- package/dist/preview-server/routes/subscribe-to-file-existence.js +0 -13
- package/dist/preview-server/routes/unsubscribe-from-file-existence.d.ts +0 -3
- package/dist/preview-server/routes/unsubscribe-from-file-existence.js +0 -13
- package/dist/render-flows/render.d.ts +0 -46
- package/dist/render-flows/render.js +0 -279
- package/dist/render-flows/still.d.ts +0 -29
- package/dist/render-flows/still.js +0 -171
|
@@ -1,484 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.RenderModal = 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 remotion_1 = require("remotion");
|
|
8
|
-
const Button_1 = require("../../../preview-server/error-overlay/remotion-overlay/Button");
|
|
9
|
-
const audio_1 = require("../../icons/audio");
|
|
10
|
-
const file_1 = require("../../icons/file");
|
|
11
|
-
const frame_1 = require("../../icons/frame");
|
|
12
|
-
const gear_1 = require("../../icons/gear");
|
|
13
|
-
const gif_1 = require("../../icons/gif");
|
|
14
|
-
const modals_1 = require("../../state/modals");
|
|
15
|
-
const layout_1 = require("../layout");
|
|
16
|
-
const ModalContainer_1 = require("../ModalContainer");
|
|
17
|
-
const ModalHeader_1 = require("../ModalHeader");
|
|
18
|
-
const actions_1 = require("../RenderQueue/actions");
|
|
19
|
-
const SegmentedControl_1 = require("../SegmentedControl");
|
|
20
|
-
const SidebarContent_1 = require("../SidebarContent");
|
|
21
|
-
const Tabs_1 = require("../Tabs");
|
|
22
|
-
const CrfSetting_1 = require("./CrfSetting");
|
|
23
|
-
const RenderModalAdvanced_1 = require("./RenderModalAdvanced");
|
|
24
|
-
const RenderModalAudio_1 = require("./RenderModalAudio");
|
|
25
|
-
const RenderModalBasic_1 = require("./RenderModalBasic");
|
|
26
|
-
const RenderModalGif_1 = require("./RenderModalGif");
|
|
27
|
-
const RenderModalPicture_1 = require("./RenderModalPicture");
|
|
28
|
-
const initialState = { type: 'idle' };
|
|
29
|
-
const reducer = (state, action) => {
|
|
30
|
-
if (action.type === 'start') {
|
|
31
|
-
return {
|
|
32
|
-
type: 'load',
|
|
33
|
-
};
|
|
34
|
-
}
|
|
35
|
-
if (action.type === 'fail') {
|
|
36
|
-
return {
|
|
37
|
-
type: 'error',
|
|
38
|
-
};
|
|
39
|
-
}
|
|
40
|
-
if (action.type === 'succeed') {
|
|
41
|
-
return {
|
|
42
|
-
type: 'success',
|
|
43
|
-
};
|
|
44
|
-
}
|
|
45
|
-
return state;
|
|
46
|
-
};
|
|
47
|
-
const container = {
|
|
48
|
-
display: 'flex',
|
|
49
|
-
flexDirection: 'row',
|
|
50
|
-
alignItems: 'center',
|
|
51
|
-
padding: '12px 16px',
|
|
52
|
-
width: '100%',
|
|
53
|
-
borderBottom: '1px solid black',
|
|
54
|
-
};
|
|
55
|
-
const scrollPanel = {
|
|
56
|
-
minHeight: '35vh',
|
|
57
|
-
maxHeight: '50vh',
|
|
58
|
-
overflow: 'auto',
|
|
59
|
-
minWidth: 650,
|
|
60
|
-
};
|
|
61
|
-
const horizontalLayout = {
|
|
62
|
-
display: 'flex',
|
|
63
|
-
flexDirection: 'row',
|
|
64
|
-
};
|
|
65
|
-
const leftSidebar = {
|
|
66
|
-
padding: 12,
|
|
67
|
-
};
|
|
68
|
-
const horizontalTab = {
|
|
69
|
-
width: 250,
|
|
70
|
-
display: 'flex',
|
|
71
|
-
flexDirection: 'row',
|
|
72
|
-
alignItems: 'center',
|
|
73
|
-
textAlign: 'left',
|
|
74
|
-
fontSize: 16,
|
|
75
|
-
fontWeight: 'bold',
|
|
76
|
-
paddingLeft: 15,
|
|
77
|
-
paddingTop: 12,
|
|
78
|
-
paddingBottom: 12,
|
|
79
|
-
};
|
|
80
|
-
const iconContainer = {
|
|
81
|
-
width: 20,
|
|
82
|
-
height: 20,
|
|
83
|
-
marginRight: 15,
|
|
84
|
-
display: 'inline-flex',
|
|
85
|
-
justifyContent: 'center',
|
|
86
|
-
alignItems: 'center',
|
|
87
|
-
};
|
|
88
|
-
const icon = {
|
|
89
|
-
color: 'currentcolor',
|
|
90
|
-
height: 20,
|
|
91
|
-
};
|
|
92
|
-
const buttonStyle = {
|
|
93
|
-
backgroundColor: 'var(--blue)',
|
|
94
|
-
color: 'white',
|
|
95
|
-
};
|
|
96
|
-
const flexer = {
|
|
97
|
-
flex: 1,
|
|
98
|
-
};
|
|
99
|
-
const RenderModal = ({ compositionId, initialFrame, initialVideoImageFormat, initialStillImageFormat, initialQuality, initialScale, initialVerbose, initialOutName, initialRenderType, initialAudioCodec, initialVideoCodec, initialConcurrency, maxConcurrency, minConcurrency, initialMuted, initialEnforceAudioTrack, initialProResProfile, initialPixelFormat, initialVideoBitrate, initialAudioBitrate, initialEveryNthFrame, initialNumberOfGifLoops, initialDelayRenderTimeout, }) => {
|
|
100
|
-
const { setSelectedModal } = (0, react_1.useContext)(modals_1.ModalsContext);
|
|
101
|
-
const onQuit = (0, react_1.useCallback)(() => {
|
|
102
|
-
setSelectedModal(null);
|
|
103
|
-
}, [setSelectedModal]);
|
|
104
|
-
const isMounted = (0, react_1.useRef)(true);
|
|
105
|
-
const [state, dispatch] = (0, react_1.useReducer)(reducer, initialState);
|
|
106
|
-
const [unclampedFrame, setFrame] = (0, react_1.useState)(() => initialFrame);
|
|
107
|
-
const [stillImageFormat, setStillImageFormat] = (0, react_1.useState)(() => initialStillImageFormat);
|
|
108
|
-
const [videoImageFormat, setVideoImageFormat] = (0, react_1.useState)(() => initialVideoImageFormat);
|
|
109
|
-
const [concurrency, setConcurrency] = (0, react_1.useState)(() => initialConcurrency);
|
|
110
|
-
const [videoCodec, setVideoSpecificalCodec] = (0, react_1.useState)(() => initialVideoCodec);
|
|
111
|
-
// TODO replace hardcoded initial codec with derived one
|
|
112
|
-
const [customAudioCodec, setCustomAudioCodec] = (0, react_1.useState)(null);
|
|
113
|
-
const [audioCodec, setAudioSpecificalCodec] = (0, react_1.useState)(() => initialAudioCodec);
|
|
114
|
-
const [mutedState, setMuted] = (0, react_1.useState)(() => initialMuted);
|
|
115
|
-
const [enforceAudioTrackState, setEnforceAudioTrackState] = (0, react_1.useState)(() => initialEnforceAudioTrack);
|
|
116
|
-
const [renderMode, setRenderModeState] = (0, react_1.useState)(initialRenderType);
|
|
117
|
-
const [quality, setQuality] = (0, react_1.useState)(() => initialQuality);
|
|
118
|
-
const [scale, setScale] = (0, react_1.useState)(() => initialScale);
|
|
119
|
-
const [verbose, setVerboseLogging] = (0, react_1.useState)(() => initialVerbose);
|
|
120
|
-
const [outName, setOutName] = (0, react_1.useState)(() => initialOutName);
|
|
121
|
-
const [endFrameOrNull, setEndFrame] = (0, react_1.useState)(() => null);
|
|
122
|
-
const [startFrameOrNull, setStartFrame] = (0, react_1.useState)(() => null);
|
|
123
|
-
const [proResProfileSetting, setProResProfile] = (0, react_1.useState)(() => initialProResProfile);
|
|
124
|
-
const [pixelFormat, setPixelFormat] = (0, react_1.useState)(() => initialPixelFormat);
|
|
125
|
-
const [qualityControlType, setQualityControl] = (0, react_1.useState)(() => initialVideoBitrate === null ? 'crf' : 'bitrate');
|
|
126
|
-
const [shouldHaveCustomTargetAudioBitrate, setShouldHaveCustomTargetAudioBitrate,] = (0, react_1.useState)(() => initialAudioBitrate !== null);
|
|
127
|
-
const [customTargetAudioBitrate, setCustomTargetAudioBitrateValue] = (0, react_1.useState)(() => initialAudioBitrate !== null && initialAudioBitrate !== void 0 ? initialAudioBitrate : '256K');
|
|
128
|
-
const [customTargetVideoBitrate, setCustomTargetVideoBitrateValue] = (0, react_1.useState)(() => initialVideoBitrate !== null && initialVideoBitrate !== void 0 ? initialVideoBitrate : '1M');
|
|
129
|
-
const [limitNumberOfGifLoops, setLimitNumberOfGifLoops] = (0, react_1.useState)(() => initialNumberOfGifLoops !== null);
|
|
130
|
-
const [numberOfGifLoopsSetting, setNumberOfGifLoopsSetting] = (0, react_1.useState)(() => initialNumberOfGifLoops !== null && initialNumberOfGifLoops !== void 0 ? initialNumberOfGifLoops : 1);
|
|
131
|
-
// TODO: Allow to modify
|
|
132
|
-
const [delayRenderTimeout] = (0, react_1.useState)(() => initialDelayRenderTimeout);
|
|
133
|
-
const codec = (0, react_1.useMemo)(() => {
|
|
134
|
-
if (renderMode === 'audio') {
|
|
135
|
-
return audioCodec;
|
|
136
|
-
}
|
|
137
|
-
return videoCodec;
|
|
138
|
-
}, [audioCodec, renderMode, videoCodec]);
|
|
139
|
-
const numberOfGifLoops = (0, react_1.useMemo)(() => {
|
|
140
|
-
if (codec === 'gif' && limitNumberOfGifLoops) {
|
|
141
|
-
return numberOfGifLoopsSetting;
|
|
142
|
-
}
|
|
143
|
-
return null;
|
|
144
|
-
}, [codec, limitNumberOfGifLoops, numberOfGifLoopsSetting]);
|
|
145
|
-
const audioBitrate = (0, react_1.useMemo)(() => {
|
|
146
|
-
if (shouldHaveCustomTargetAudioBitrate) {
|
|
147
|
-
return customTargetAudioBitrate;
|
|
148
|
-
}
|
|
149
|
-
return null;
|
|
150
|
-
}, [customTargetAudioBitrate, shouldHaveCustomTargetAudioBitrate]);
|
|
151
|
-
const videoBitrate = (0, react_1.useMemo)(() => {
|
|
152
|
-
if (qualityControlType === 'bitrate') {
|
|
153
|
-
return customTargetVideoBitrate;
|
|
154
|
-
}
|
|
155
|
-
return null;
|
|
156
|
-
}, [customTargetVideoBitrate, qualityControlType]);
|
|
157
|
-
const { crf, maxCrf, minCrf, setCrf, shouldDisplayOption: shouldDisplayCrfOption, } = (0, CrfSetting_1.useCrfState)(codec);
|
|
158
|
-
const dispatchIfMounted = (0, react_1.useCallback)((payload) => {
|
|
159
|
-
if (isMounted.current === false)
|
|
160
|
-
return;
|
|
161
|
-
dispatch(payload);
|
|
162
|
-
}, []);
|
|
163
|
-
const muted = (0, react_1.useMemo)(() => {
|
|
164
|
-
if (renderMode === 'video') {
|
|
165
|
-
return mutedState;
|
|
166
|
-
}
|
|
167
|
-
return false;
|
|
168
|
-
}, [mutedState, renderMode]);
|
|
169
|
-
const enforceAudioTrack = (0, react_1.useMemo)(() => {
|
|
170
|
-
if (renderMode === 'video') {
|
|
171
|
-
return enforceAudioTrackState;
|
|
172
|
-
}
|
|
173
|
-
return false;
|
|
174
|
-
}, [enforceAudioTrackState, renderMode]);
|
|
175
|
-
const proResProfile = (0, react_1.useMemo)(() => {
|
|
176
|
-
if (renderMode === 'video' && codec === 'prores') {
|
|
177
|
-
return proResProfileSetting;
|
|
178
|
-
}
|
|
179
|
-
return null;
|
|
180
|
-
}, [codec, proResProfileSetting, renderMode]);
|
|
181
|
-
const { compositions } = (0, react_1.useContext)(remotion_1.Internals.CompositionManager);
|
|
182
|
-
const currentComposition = (0, react_1.useMemo)(() => {
|
|
183
|
-
for (const composition of compositions) {
|
|
184
|
-
if (composition.id === compositionId) {
|
|
185
|
-
return composition;
|
|
186
|
-
}
|
|
187
|
-
}
|
|
188
|
-
return null;
|
|
189
|
-
}, [compositionId, compositions]);
|
|
190
|
-
if (currentComposition === null) {
|
|
191
|
-
throw new Error('This composition does not exist');
|
|
192
|
-
}
|
|
193
|
-
const endFrame = (0, react_1.useMemo)(() => {
|
|
194
|
-
if (endFrameOrNull === null) {
|
|
195
|
-
return currentComposition.durationInFrames - 1;
|
|
196
|
-
}
|
|
197
|
-
return Math.max(0, Math.min(currentComposition.durationInFrames - 1, endFrameOrNull));
|
|
198
|
-
}, [currentComposition.durationInFrames, endFrameOrNull]);
|
|
199
|
-
const startFrame = (0, react_1.useMemo)(() => {
|
|
200
|
-
if (startFrameOrNull === null) {
|
|
201
|
-
return 0;
|
|
202
|
-
}
|
|
203
|
-
return Math.max(0, Math.min(endFrame - 1, startFrameOrNull));
|
|
204
|
-
}, [endFrame, startFrameOrNull]);
|
|
205
|
-
const frame = (0, react_1.useMemo)(() => {
|
|
206
|
-
const parsed = Math.floor(unclampedFrame);
|
|
207
|
-
return Math.max(0, Math.min(currentComposition.durationInFrames - 1, parsed));
|
|
208
|
-
}, [currentComposition.durationInFrames, unclampedFrame]);
|
|
209
|
-
const getStringBeforeSuffix = (0, react_1.useCallback)((fileName) => {
|
|
210
|
-
const dotPos = fileName.lastIndexOf('.');
|
|
211
|
-
const bitBeforeDot = fileName.substring(0, dotPos);
|
|
212
|
-
return bitBeforeDot;
|
|
213
|
-
}, []);
|
|
214
|
-
const deriveFinalAudioCodec = (0, react_1.useCallback)((passedVideoCodec, passedAudioCodec) => {
|
|
215
|
-
if (passedAudioCodec !== null &&
|
|
216
|
-
client_1.BrowserSafeApis.supportedAudioCodecs[passedVideoCodec].includes(passedAudioCodec)) {
|
|
217
|
-
return passedAudioCodec;
|
|
218
|
-
}
|
|
219
|
-
return client_1.BrowserSafeApis.defaultAudioCodecs[passedVideoCodec].compressed;
|
|
220
|
-
}, []);
|
|
221
|
-
const setDefaultOutName = (0, react_1.useCallback)((options) => {
|
|
222
|
-
if (options.type === 'still') {
|
|
223
|
-
setOutName((prev) => {
|
|
224
|
-
const newFileName = getStringBeforeSuffix(prev) + '.' + options.imageFormat;
|
|
225
|
-
return newFileName;
|
|
226
|
-
});
|
|
227
|
-
}
|
|
228
|
-
else {
|
|
229
|
-
setOutName((prev) => {
|
|
230
|
-
const codecSuffix = client_1.BrowserSafeApis.getFileExtensionFromCodec(options.codec, deriveFinalAudioCodec(options.codec, options.audioCodec) // What happens for null?
|
|
231
|
-
);
|
|
232
|
-
const newFileName = getStringBeforeSuffix(prev) + '.' + codecSuffix;
|
|
233
|
-
return newFileName;
|
|
234
|
-
});
|
|
235
|
-
}
|
|
236
|
-
}, [deriveFinalAudioCodec, getStringBeforeSuffix]);
|
|
237
|
-
const setAudioCodec = (0, react_1.useCallback)((newAudioCodec) => {
|
|
238
|
-
setCustomAudioCodec(newAudioCodec);
|
|
239
|
-
setDefaultOutName({
|
|
240
|
-
type: 'render',
|
|
241
|
-
codec: videoCodec,
|
|
242
|
-
audioCodec: newAudioCodec,
|
|
243
|
-
});
|
|
244
|
-
}, [setDefaultOutName, videoCodec]);
|
|
245
|
-
const setCodec = (0, react_1.useCallback)((newCodec) => {
|
|
246
|
-
if (renderMode === 'audio') {
|
|
247
|
-
setAudioSpecificalCodec(newCodec);
|
|
248
|
-
}
|
|
249
|
-
else {
|
|
250
|
-
setVideoSpecificalCodec(newCodec);
|
|
251
|
-
}
|
|
252
|
-
// TODO: Audio codec is not implemented and hardcoded
|
|
253
|
-
setDefaultOutName({
|
|
254
|
-
type: 'render',
|
|
255
|
-
codec: newCodec,
|
|
256
|
-
audioCodec: deriveFinalAudioCodec(newCodec, customAudioCodec),
|
|
257
|
-
});
|
|
258
|
-
}, [customAudioCodec, deriveFinalAudioCodec, renderMode, setDefaultOutName]);
|
|
259
|
-
const setStillFormat = (0, react_1.useCallback)((format) => {
|
|
260
|
-
setStillImageFormat(format);
|
|
261
|
-
setDefaultOutName({ type: 'still', imageFormat: format });
|
|
262
|
-
}, [setDefaultOutName]);
|
|
263
|
-
const onClickStill = (0, react_1.useCallback)(() => {
|
|
264
|
-
var _a;
|
|
265
|
-
(_a = SidebarContent_1.leftSidebarTabs.current) === null || _a === void 0 ? void 0 : _a.selectRendersPanel();
|
|
266
|
-
dispatchIfMounted({ type: 'start' });
|
|
267
|
-
(0, actions_1.addStillRenderJob)({
|
|
268
|
-
compositionId,
|
|
269
|
-
outName,
|
|
270
|
-
imageFormat: stillImageFormat,
|
|
271
|
-
quality: stillImageFormat === 'jpeg' ? quality : null,
|
|
272
|
-
frame,
|
|
273
|
-
scale,
|
|
274
|
-
verbose,
|
|
275
|
-
})
|
|
276
|
-
.then(() => {
|
|
277
|
-
dispatchIfMounted({ type: 'succeed' });
|
|
278
|
-
setSelectedModal(null);
|
|
279
|
-
})
|
|
280
|
-
.catch(() => {
|
|
281
|
-
dispatchIfMounted({ type: 'fail' });
|
|
282
|
-
});
|
|
283
|
-
}, [
|
|
284
|
-
compositionId,
|
|
285
|
-
dispatchIfMounted,
|
|
286
|
-
frame,
|
|
287
|
-
stillImageFormat,
|
|
288
|
-
outName,
|
|
289
|
-
quality,
|
|
290
|
-
scale,
|
|
291
|
-
setSelectedModal,
|
|
292
|
-
verbose,
|
|
293
|
-
]);
|
|
294
|
-
const [everyNthFrameSetting, setEveryNthFrameSetting] = (0, react_1.useState)(() => initialEveryNthFrame);
|
|
295
|
-
const everyNthFrame = (0, react_1.useMemo)(() => {
|
|
296
|
-
if (codec === 'gif') {
|
|
297
|
-
return everyNthFrameSetting;
|
|
298
|
-
}
|
|
299
|
-
return 1;
|
|
300
|
-
}, [codec, everyNthFrameSetting]);
|
|
301
|
-
const onClickVideo = (0, react_1.useCallback)(() => {
|
|
302
|
-
var _a;
|
|
303
|
-
(_a = SidebarContent_1.leftSidebarTabs.current) === null || _a === void 0 ? void 0 : _a.selectRendersPanel();
|
|
304
|
-
dispatchIfMounted({ type: 'start' });
|
|
305
|
-
(0, actions_1.addVideoRenderJob)({
|
|
306
|
-
compositionId,
|
|
307
|
-
outName,
|
|
308
|
-
imageFormat: videoImageFormat,
|
|
309
|
-
quality: stillImageFormat === 'jpeg' ? quality : null,
|
|
310
|
-
scale,
|
|
311
|
-
verbose,
|
|
312
|
-
codec,
|
|
313
|
-
concurrency,
|
|
314
|
-
crf: qualityControlType === 'crf' ? crf : null,
|
|
315
|
-
endFrame,
|
|
316
|
-
startFrame,
|
|
317
|
-
muted,
|
|
318
|
-
enforceAudioTrack,
|
|
319
|
-
proResProfile,
|
|
320
|
-
pixelFormat,
|
|
321
|
-
audioBitrate,
|
|
322
|
-
videoBitrate,
|
|
323
|
-
everyNthFrame,
|
|
324
|
-
numberOfGifLoops,
|
|
325
|
-
delayRenderTimeout,
|
|
326
|
-
audioCodec: deriveFinalAudioCodec(codec, customAudioCodec),
|
|
327
|
-
})
|
|
328
|
-
.then(() => {
|
|
329
|
-
dispatchIfMounted({ type: 'succeed' });
|
|
330
|
-
setSelectedModal(null);
|
|
331
|
-
})
|
|
332
|
-
.catch(() => {
|
|
333
|
-
dispatchIfMounted({ type: 'fail' });
|
|
334
|
-
});
|
|
335
|
-
}, [
|
|
336
|
-
dispatchIfMounted,
|
|
337
|
-
compositionId,
|
|
338
|
-
outName,
|
|
339
|
-
videoImageFormat,
|
|
340
|
-
stillImageFormat,
|
|
341
|
-
quality,
|
|
342
|
-
scale,
|
|
343
|
-
verbose,
|
|
344
|
-
codec,
|
|
345
|
-
concurrency,
|
|
346
|
-
qualityControlType,
|
|
347
|
-
crf,
|
|
348
|
-
endFrame,
|
|
349
|
-
startFrame,
|
|
350
|
-
muted,
|
|
351
|
-
enforceAudioTrack,
|
|
352
|
-
proResProfile,
|
|
353
|
-
pixelFormat,
|
|
354
|
-
audioBitrate,
|
|
355
|
-
videoBitrate,
|
|
356
|
-
everyNthFrame,
|
|
357
|
-
numberOfGifLoops,
|
|
358
|
-
delayRenderTimeout,
|
|
359
|
-
deriveFinalAudioCodec,
|
|
360
|
-
customAudioCodec,
|
|
361
|
-
setSelectedModal,
|
|
362
|
-
]);
|
|
363
|
-
(0, react_1.useEffect)(() => {
|
|
364
|
-
return () => {
|
|
365
|
-
isMounted.current = false;
|
|
366
|
-
};
|
|
367
|
-
}, []);
|
|
368
|
-
const imageFormatOptions = (0, react_1.useMemo)(() => {
|
|
369
|
-
if (renderMode === 'still') {
|
|
370
|
-
return [
|
|
371
|
-
{
|
|
372
|
-
label: 'PNG',
|
|
373
|
-
onClick: () => setStillFormat('png'),
|
|
374
|
-
key: 'png',
|
|
375
|
-
selected: stillImageFormat === 'png',
|
|
376
|
-
},
|
|
377
|
-
{
|
|
378
|
-
label: 'JPEG',
|
|
379
|
-
onClick: () => setStillFormat('jpeg'),
|
|
380
|
-
key: 'jpeg',
|
|
381
|
-
selected: stillImageFormat === 'jpeg',
|
|
382
|
-
},
|
|
383
|
-
{
|
|
384
|
-
label: 'PDF',
|
|
385
|
-
onClick: () => setStillFormat('pdf'),
|
|
386
|
-
key: 'pdf',
|
|
387
|
-
selected: stillImageFormat === 'pdf',
|
|
388
|
-
},
|
|
389
|
-
{
|
|
390
|
-
label: 'WebP',
|
|
391
|
-
onClick: () => setStillFormat('webp'),
|
|
392
|
-
key: 'webp',
|
|
393
|
-
selected: stillImageFormat === 'webp',
|
|
394
|
-
},
|
|
395
|
-
];
|
|
396
|
-
}
|
|
397
|
-
return [
|
|
398
|
-
{
|
|
399
|
-
label: 'PNG',
|
|
400
|
-
onClick: () => setVideoImageFormat('png'),
|
|
401
|
-
key: 'png',
|
|
402
|
-
selected: videoImageFormat === 'png',
|
|
403
|
-
},
|
|
404
|
-
{
|
|
405
|
-
label: 'JPEG',
|
|
406
|
-
onClick: () => setVideoImageFormat('jpeg'),
|
|
407
|
-
key: 'jpeg',
|
|
408
|
-
selected: videoImageFormat === 'jpeg',
|
|
409
|
-
},
|
|
410
|
-
];
|
|
411
|
-
}, [stillImageFormat, renderMode, setStillFormat, videoImageFormat]);
|
|
412
|
-
const setRenderMode = (0, react_1.useCallback)((newRenderMode) => {
|
|
413
|
-
setRenderModeState(newRenderMode);
|
|
414
|
-
if (newRenderMode === 'audio') {
|
|
415
|
-
// TODO: Audio codec is not implemented but hardcoded
|
|
416
|
-
setDefaultOutName({
|
|
417
|
-
type: 'render',
|
|
418
|
-
codec: audioCodec,
|
|
419
|
-
audioCodec: 'pcm-16',
|
|
420
|
-
});
|
|
421
|
-
}
|
|
422
|
-
if (newRenderMode === 'video') {
|
|
423
|
-
// TODO: Audio codec is not implemented but hardcoded
|
|
424
|
-
setDefaultOutName({
|
|
425
|
-
type: 'render',
|
|
426
|
-
codec: videoCodec,
|
|
427
|
-
audioCodec: deriveFinalAudioCodec(videoCodec, customAudioCodec),
|
|
428
|
-
});
|
|
429
|
-
}
|
|
430
|
-
if (newRenderMode === 'still') {
|
|
431
|
-
setDefaultOutName({ type: 'still', imageFormat: stillImageFormat });
|
|
432
|
-
}
|
|
433
|
-
}, [
|
|
434
|
-
audioCodec,
|
|
435
|
-
customAudioCodec,
|
|
436
|
-
deriveFinalAudioCodec,
|
|
437
|
-
setDefaultOutName,
|
|
438
|
-
stillImageFormat,
|
|
439
|
-
videoCodec,
|
|
440
|
-
]);
|
|
441
|
-
const renderTabOptions = (0, react_1.useMemo)(() => {
|
|
442
|
-
if ((currentComposition === null || currentComposition === void 0 ? void 0 : currentComposition.durationInFrames) < 2) {
|
|
443
|
-
return [
|
|
444
|
-
{
|
|
445
|
-
label: 'Still',
|
|
446
|
-
onClick: () => {
|
|
447
|
-
setRenderMode('still');
|
|
448
|
-
},
|
|
449
|
-
key: 'still',
|
|
450
|
-
selected: renderMode === 'still',
|
|
451
|
-
},
|
|
452
|
-
];
|
|
453
|
-
}
|
|
454
|
-
return [
|
|
455
|
-
{
|
|
456
|
-
label: 'Still',
|
|
457
|
-
onClick: () => {
|
|
458
|
-
setRenderMode('still');
|
|
459
|
-
},
|
|
460
|
-
key: 'still',
|
|
461
|
-
selected: renderMode === 'still',
|
|
462
|
-
},
|
|
463
|
-
{
|
|
464
|
-
label: 'Video',
|
|
465
|
-
onClick: () => {
|
|
466
|
-
setRenderMode('video');
|
|
467
|
-
},
|
|
468
|
-
key: 'video',
|
|
469
|
-
selected: renderMode === 'video',
|
|
470
|
-
},
|
|
471
|
-
{
|
|
472
|
-
label: 'Audio',
|
|
473
|
-
onClick: () => {
|
|
474
|
-
setRenderMode('audio');
|
|
475
|
-
},
|
|
476
|
-
key: 'audio',
|
|
477
|
-
selected: renderMode === 'audio',
|
|
478
|
-
},
|
|
479
|
-
];
|
|
480
|
-
}, [currentComposition === null || currentComposition === void 0 ? void 0 : currentComposition.durationInFrames, renderMode, setRenderMode]);
|
|
481
|
-
const [tab, setTab] = (0, react_1.useState)('general');
|
|
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"] }), renderMode === 'still' ? null : ((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"] })), codec === '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, (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"] })] }), (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, customAudioCodec: deriveFinalAudioCodec(codec, customAudioCodec), currentComposition: currentComposition, frame: frame, imageFormatOptions: imageFormatOptions, outName: outName, proResProfile: proResProfile, renderMode: renderMode, setCodec: setCodec, setAudioCodec: setAudioCodec, 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, 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 })), (0, jsx_runtime_1.jsx)(layout_1.Spacing, { block: true, y: 0.5 })] })] })] }));
|
|
483
|
-
};
|
|
484
|
-
exports.RenderModal = RenderModal;
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
export declare type RenderType = 'still' | 'video' | 'audio';
|
|
3
|
-
export declare const RenderModalAdvanced: React.FC<{
|
|
4
|
-
renderMode: RenderType;
|
|
5
|
-
minConcurrency: number;
|
|
6
|
-
maxConcurrency: number;
|
|
7
|
-
setConcurrency: React.Dispatch<React.SetStateAction<number>>;
|
|
8
|
-
concurrency: number;
|
|
9
|
-
setVerboseLogging: React.Dispatch<React.SetStateAction<boolean>>;
|
|
10
|
-
verbose: boolean;
|
|
11
|
-
}>;
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.RenderModalAdvanced = void 0;
|
|
4
|
-
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
-
const react_1 = require("react");
|
|
6
|
-
const Checkbox_1 = require("../Checkbox");
|
|
7
|
-
const layout_1 = require("./layout");
|
|
8
|
-
const NumberSetting_1 = require("./NumberSetting");
|
|
9
|
-
const RenderModalAdvanced = ({ renderMode, maxConcurrency, minConcurrency, setConcurrency, concurrency, setVerboseLogging, verbose, }) => {
|
|
10
|
-
const onVerboseLoggingChanged = (0, react_1.useCallback)((e) => {
|
|
11
|
-
setVerboseLogging(e.target.checked);
|
|
12
|
-
}, [setVerboseLogging]);
|
|
13
|
-
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", onValueChanged: setConcurrency, value: concurrency })), (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
|
-
};
|
|
15
|
-
exports.RenderModalAdvanced = RenderModalAdvanced;
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
import type { RenderType } from './RenderModalAdvanced';
|
|
3
|
-
export declare const RenderModalAudio: React.FC<{
|
|
4
|
-
muted: boolean;
|
|
5
|
-
setMuted: React.Dispatch<React.SetStateAction<boolean>>;
|
|
6
|
-
renderMode: RenderType;
|
|
7
|
-
enforceAudioTrack: boolean;
|
|
8
|
-
setEnforceAudioTrackState: React.Dispatch<React.SetStateAction<boolean>>;
|
|
9
|
-
shouldHaveCustomTargetAudioBitrate: boolean;
|
|
10
|
-
setShouldHaveCustomTargetAudioBitrate: React.Dispatch<React.SetStateAction<boolean>>;
|
|
11
|
-
setCustomTargetAudioBitrateValue: React.Dispatch<React.SetStateAction<string>>;
|
|
12
|
-
customTargetAudioBitrate: string;
|
|
13
|
-
}>;
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.RenderModalAudio = void 0;
|
|
4
|
-
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
-
const react_1 = require("react");
|
|
6
|
-
const Checkbox_1 = require("../Checkbox");
|
|
7
|
-
const RemInput_1 = require("../NewComposition/RemInput");
|
|
8
|
-
const EnforceAudioTrackSetting_1 = require("./EnforceAudioTrackSetting");
|
|
9
|
-
const layout_1 = require("./layout");
|
|
10
|
-
const MutedSetting_1 = require("./MutedSetting");
|
|
11
|
-
const RenderModalHr_1 = require("./RenderModalHr");
|
|
12
|
-
const RenderModalAudio = ({ muted, setMuted, renderMode, enforceAudioTrack, setEnforceAudioTrackState, setShouldHaveCustomTargetAudioBitrate, shouldHaveCustomTargetAudioBitrate, setCustomTargetAudioBitrateValue, customTargetAudioBitrate, }) => {
|
|
13
|
-
const onShouldHaveTargetAudioBitrateChanged = (0, react_1.useCallback)((e) => {
|
|
14
|
-
setShouldHaveCustomTargetAudioBitrate(e.target.checked);
|
|
15
|
-
}, [setShouldHaveCustomTargetAudioBitrate]);
|
|
16
|
-
// TODO: When rendering, mp3 does not support the "crf" option. Ignoring.
|
|
17
|
-
const onTargetAudioBitrateChanged = (0, react_1.useCallback)((e) => {
|
|
18
|
-
setCustomTargetAudioBitrateValue(e.target.value);
|
|
19
|
-
}, [setCustomTargetAudioBitrateValue]);
|
|
20
|
-
return ((0, jsx_runtime_1.jsxs)("div", { children: [renderMode === 'video' && ((0, jsx_runtime_1.jsx)(MutedSetting_1.MutedSetting, { muted: muted, setMuted: setMuted })), renderMode === 'video' && ((0, jsx_runtime_1.jsx)(EnforceAudioTrackSetting_1.EnforceAudioTrackSetting, { enforceAudioTrack: enforceAudioTrack, setEnforceAudioTrack: setEnforceAudioTrackState })), (0, jsx_runtime_1.jsx)(RenderModalHr_1.RenderModalHr, {}), renderMode === 'still' ? null : ((0, jsx_runtime_1.jsxs)("div", { style: layout_1.optionRow, children: [(0, jsx_runtime_1.jsx)("div", { style: layout_1.label, children: "Custom audio bitrate" }), (0, jsx_runtime_1.jsx)("div", { style: layout_1.rightRow, children: (0, jsx_runtime_1.jsx)(Checkbox_1.Checkbox, { checked: shouldHaveCustomTargetAudioBitrate, onChange: onShouldHaveTargetAudioBitrateChanged }) })] })), shouldHaveCustomTargetAudioBitrate && renderMode !== 'still' ? ((0, jsx_runtime_1.jsxs)("div", { style: layout_1.optionRow, children: [(0, jsx_runtime_1.jsx)("div", { style: layout_1.label, children: "Target audio bitrate" }), (0, jsx_runtime_1.jsx)("div", { style: layout_1.rightRow, children: (0, jsx_runtime_1.jsx)("div", { children: (0, jsx_runtime_1.jsx)(RemInput_1.RemotionInput, { style: layout_1.input, value: customTargetAudioBitrate, onChange: onTargetAudioBitrateChanged }) }) })] })) : null] }));
|
|
21
|
-
};
|
|
22
|
-
exports.RenderModalAudio = RenderModalAudio;
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import type { AudioCodec, Codec, ProResProfile } from '@remotion/renderer';
|
|
2
|
-
import React from 'react';
|
|
3
|
-
import type { TComposition } from 'remotion';
|
|
4
|
-
import type { SegmentedControlItem } from '../SegmentedControl';
|
|
5
|
-
import type { RenderType } from './RenderModalAdvanced';
|
|
6
|
-
export declare const RenderModalBasic: React.FC<{
|
|
7
|
-
renderMode: RenderType;
|
|
8
|
-
imageFormatOptions: SegmentedControlItem[];
|
|
9
|
-
codec: Codec;
|
|
10
|
-
customAudioCodec: AudioCodec;
|
|
11
|
-
setCodec: (newCodec: Codec) => void;
|
|
12
|
-
setAudioCodec: (newAudioCodec: AudioCodec) => void;
|
|
13
|
-
outName: string;
|
|
14
|
-
proResProfile: ProResProfile | null;
|
|
15
|
-
setProResProfile: React.Dispatch<React.SetStateAction<ProResProfile>>;
|
|
16
|
-
frame: number;
|
|
17
|
-
setFrame: React.Dispatch<React.SetStateAction<number>>;
|
|
18
|
-
currentComposition: TComposition<unknown>;
|
|
19
|
-
setOutName: (value: React.SetStateAction<string>) => void;
|
|
20
|
-
setEndFrame: React.Dispatch<React.SetStateAction<number | null>>;
|
|
21
|
-
startFrame: number;
|
|
22
|
-
endFrame: number;
|
|
23
|
-
setStartFrame: React.Dispatch<React.SetStateAction<number | null>>;
|
|
24
|
-
}>;
|