@remotion/studio 4.0.465 → 4.0.467
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/CurrentAsset.js +8 -54
- 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/NewComposition/ValidationMessage.d.ts +1 -0
- package/dist/components/NewComposition/ValidationMessage.js +3 -3
- package/dist/components/RenderButton.js +1 -0
- package/dist/components/RenderModal/DataEditor.js +8 -2
- 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/RenderModal/get-render-modal-warnings.d.ts +7 -1
- package/dist/components/RenderModal/get-render-modal-warnings.js +21 -7
- 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/TimelineExpandedSection.js +9 -2
- package/dist/components/Timeline/TimelineExpandedTrackKeyframes.d.ts +7 -0
- package/dist/components/Timeline/TimelineExpandedTrackKeyframes.js +124 -0
- package/dist/components/Timeline/TimelineListItem.js +21 -3
- package/dist/components/Timeline/TimelineMediaInfo.d.ts +5 -0
- package/dist/components/Timeline/TimelineMediaInfo.js +173 -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/TimelineVideoInfo.js +2 -2
- 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-5gtx3pza.js +9 -0
- package/dist/esm/{chunk-pqk2qd0d.js → chunk-vwnse6c9.js} +4297 -3547
- package/dist/esm/index.mjs +0 -16
- package/dist/esm/internals.mjs +4295 -3560
- package/dist/esm/previewEntry.mjs +4049 -3314
- package/dist/esm/renderEntry.mjs +3 -4
- package/dist/helpers/format-media-duration.d.ts +1 -0
- package/dist/helpers/format-media-duration.js +14 -0
- package/dist/helpers/get-timeline-sequence-layout.js +4 -3
- 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 +11 -6
- package/dist/helpers/timeline-layout.js +28 -8
- package/dist/helpers/use-max-media-duration.js +25 -28
- package/dist/helpers/use-media-metadata.d.ts +10 -0
- package/dist/helpers/use-media-metadata.js +135 -0
- package/dist/helpers/use-menu-structure.js +43 -0
- package/dist/state/modals.d.ts +1 -0
- package/package.json +10 -10
- package/dist/esm/chunk-6jf1natv.js +0 -25
|
@@ -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 {};
|
|
@@ -2,98 +2,20 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.RenderModalPicture = void 0;
|
|
4
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 Checkmark_1 = require("../../icons/Checkmark");
|
|
8
|
-
const Checkbox_1 = require("../Checkbox");
|
|
9
|
-
const layout_1 = require("../layout");
|
|
10
5
|
const is_menu_item_1 = require("../Menu/is-menu-item");
|
|
11
|
-
const ComboBox_1 = require("../NewComposition/ComboBox");
|
|
12
|
-
const RemInput_1 = require("../NewComposition/RemInput");
|
|
13
6
|
const SegmentedControl_1 = require("../SegmentedControl");
|
|
14
|
-
const CrfSetting_1 = require("./CrfSetting");
|
|
15
7
|
const JpegQualitySetting_1 = require("./JpegQualitySetting");
|
|
16
|
-
const
|
|
17
|
-
const OptionExplainerBubble_1 = require("./OptionExplainerBubble");
|
|
8
|
+
const layout_1 = require("./layout");
|
|
18
9
|
const RenderModalHr_1 = require("./RenderModalHr");
|
|
19
10
|
const ScaleSetting_1 = require("./ScaleSetting");
|
|
20
|
-
const qualityControlModes = ['crf', 'bitrate'];
|
|
21
11
|
const container = {
|
|
22
12
|
flex: 1,
|
|
23
13
|
overflowY: 'auto',
|
|
24
14
|
};
|
|
25
|
-
const RenderModalPicture = ({ renderMode, scale, setScale,
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
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 onTargetVideoBitrateChanged = (0, react_1.useCallback)((e) => {
|
|
53
|
-
setCustomTargetVideoBitrateValue(e.target.value);
|
|
54
|
-
}, [setCustomTargetVideoBitrateValue]);
|
|
55
|
-
const onEncodingBufferSizeToggled = (0, react_1.useCallback)((e) => {
|
|
56
|
-
setEncodingBufferSize(e.target.checked ? '10000k' : null);
|
|
57
|
-
}, [setEncodingBufferSize]);
|
|
58
|
-
const onEncodingMaxRateToggled = (0, react_1.useCallback)((e) => {
|
|
59
|
-
setEncodingMaxRate(e.target.checked ? '5000k' : null);
|
|
60
|
-
}, [setEncodingMaxRate]);
|
|
61
|
-
const onEncodingBufferSizeChanged = (0, react_1.useCallback)((e) => {
|
|
62
|
-
setEncodingBufferSize(e.target.value);
|
|
63
|
-
}, [setEncodingBufferSize]);
|
|
64
|
-
const onEncodingMaxRateChanged = (0, react_1.useCallback)((e) => {
|
|
65
|
-
setEncodingMaxRate(e.target.value);
|
|
66
|
-
}, [setEncodingMaxRate]);
|
|
67
|
-
return (jsx_runtime_1.jsxs("div", { style: container, className: is_menu_item_1.VERTICAL_SCROLLBAR_CLASSNAME, children: [renderMode === 'video' ? (jsx_runtime_1.jsxs("div", { style: layout_2.optionRow, children: [
|
|
68
|
-
jsx_runtime_1.jsx("div", { style: layout_2.label, children: "Image Format" }), jsx_runtime_1.jsx("div", { style: layout_2.rightRow, children: jsx_runtime_1.jsx(SegmentedControl_1.SegmentedControl, { items: imageFormatOptions, needsWrapping: false }) })
|
|
69
|
-
] })) : null, renderMode === 'video' && videoImageFormat === 'jpeg' && (jsx_runtime_1.jsx(JpegQualitySetting_1.JpegQualitySetting, { jpegQuality: jpegQuality, setJpegQuality: setJpegQuality })), renderMode === 'still' && stillImageFormat === 'jpeg' && (jsx_runtime_1.jsx(JpegQualitySetting_1.JpegQualitySetting, { jpegQuality: jpegQuality, setJpegQuality: setJpegQuality })), renderMode === 'video' && qualityControlType !== null ? (jsx_runtime_1.jsx(RenderModalHr_1.RenderModalHr, {})) : null, shouldDisplayQualityControlPicker && renderMode === 'video' ? (jsx_runtime_1.jsxs("div", { style: layout_2.optionRow, children: [
|
|
70
|
-
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 }) })
|
|
71
|
-
] })) : null, qualityControlType === 'crf' &&
|
|
72
|
-
renderMode !== 'still' &&
|
|
73
|
-
renderMode !== 'sequence' &&
|
|
74
|
-
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: [
|
|
75
|
-
jsx_runtime_1.jsxs("div", { style: layout_2.label, children: ["Target video bitrate",
|
|
76
|
-
jsx_runtime_1.jsx(layout_1.Spacing, { x: 0.5 }), jsx_runtime_1.jsx(OptionExplainerBubble_1.OptionExplainerBubble, { id: "videoBitrateOption" })
|
|
77
|
-
] }), 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 }) }) })
|
|
78
|
-
] })) : null, renderMode === 'video' ? (jsx_runtime_1.jsxs(jsx_runtime_1.Fragment, { children: [
|
|
79
|
-
jsx_runtime_1.jsxs("div", { style: layout_2.optionRow, children: [
|
|
80
|
-
jsx_runtime_1.jsxs("div", { style: layout_2.label, children: ["Custom FFmpeg -bufsize",
|
|
81
|
-
jsx_runtime_1.jsx(layout_1.Spacing, { x: 0.5 }), jsx_runtime_1.jsx(OptionExplainerBubble_1.OptionExplainerBubble, { id: "encodingBufferSizeOption" })
|
|
82
|
-
] }), 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" }) })
|
|
83
|
-
] }), encodingBufferSize === null ? null : (jsx_runtime_1.jsxs("div", { style: layout_2.optionRow, children: [
|
|
84
|
-
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 }) }) })
|
|
85
|
-
] })), jsx_runtime_1.jsxs("div", { style: layout_2.optionRow, children: [
|
|
86
|
-
jsx_runtime_1.jsxs("div", { style: layout_2.label, children: ["Custom FFmpeg -maxrate",
|
|
87
|
-
jsx_runtime_1.jsx(layout_1.Spacing, { x: 0.5 }), jsx_runtime_1.jsx(OptionExplainerBubble_1.OptionExplainerBubble, { id: "encodingMaxRateOption" })
|
|
88
|
-
] }), 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" }) })
|
|
89
|
-
] }), encodingMaxRate === null ? null : (jsx_runtime_1.jsxs("div", { style: layout_2.optionRow, children: [
|
|
90
|
-
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 }) }) })
|
|
91
|
-
] }))] })) : null, renderMode === 'video' ? jsx_runtime_1.jsx(RenderModalHr_1.RenderModalHr, {}) : null, jsx_runtime_1.jsx(ScaleSetting_1.ScaleSetting, { scale: scale, setScale: setScale, compositionWidth: compositionWidth, compositionHeight: compositionHeight }), renderMode === 'video' ? jsx_runtime_1.jsx(RenderModalHr_1.RenderModalHr, {}) : null, renderMode === 'video' ? (jsx_runtime_1.jsxs("div", { style: layout_2.optionRow, children: [
|
|
92
|
-
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" }) })
|
|
93
|
-
] })) : null, renderMode === 'video' ? (jsx_runtime_1.jsxs("div", { style: layout_2.optionRow, children: [
|
|
94
|
-
jsx_runtime_1.jsxs("div", { style: layout_2.label, children: ["Color space",
|
|
95
|
-
jsx_runtime_1.jsx(layout_1.Spacing, { x: 0.5 }), jsx_runtime_1.jsx(OptionExplainerBubble_1.OptionExplainerBubble, { id: "colorSpaceOption" })
|
|
96
|
-
] }), jsx_runtime_1.jsx("div", { style: layout_2.rightRow, children: jsx_runtime_1.jsx(ComboBox_1.Combobox, { values: colorSpaceOptions, selectedId: colorSpace, title: "Color Space" }) })
|
|
97
|
-
] })) : null] }));
|
|
15
|
+
const RenderModalPicture = ({ renderMode, scale, setScale, imageFormatOptions, videoImageFormat, setJpegQuality, jpegQuality, stillImageFormat, compositionWidth, compositionHeight, }) => {
|
|
16
|
+
return (jsx_runtime_1.jsxs("div", { style: container, className: is_menu_item_1.VERTICAL_SCROLLBAR_CLASSNAME, children: [renderMode === 'video' ? (jsx_runtime_1.jsxs("div", { style: layout_1.optionRow, children: [
|
|
17
|
+
jsx_runtime_1.jsx("div", { style: layout_1.label, children: "Image Format" }), jsx_runtime_1.jsx("div", { style: layout_1.rightRow, children: jsx_runtime_1.jsx(SegmentedControl_1.SegmentedControl, { items: imageFormatOptions, needsWrapping: false }) })
|
|
18
|
+
] })) : null, renderMode === 'video' && videoImageFormat === 'jpeg' ? (jsx_runtime_1.jsx(JpegQualitySetting_1.JpegQualitySetting, { jpegQuality: jpegQuality, setJpegQuality: setJpegQuality })) : null, renderMode === 'still' && stillImageFormat === 'jpeg' ? (jsx_runtime_1.jsx(JpegQualitySetting_1.JpegQualitySetting, { jpegQuality: jpegQuality, setJpegQuality: setJpegQuality })) : null, renderMode === 'video' ? jsx_runtime_1.jsx(RenderModalHr_1.RenderModalHr, {}) : null, jsx_runtime_1.jsx(ScaleSetting_1.ScaleSetting, { scale: scale, setScale: setScale, compositionWidth: compositionWidth, compositionHeight: compositionHeight })
|
|
19
|
+
] }));
|
|
98
20
|
};
|
|
99
21
|
exports.RenderModalPicture = RenderModalPicture;
|
|
@@ -20,6 +20,7 @@ type RenderModalProps = {
|
|
|
20
20
|
readonly initialEnforceAudioTrack: boolean;
|
|
21
21
|
readonly initialProResProfile: _InternalTypes['ProResProfile'] | null;
|
|
22
22
|
readonly initialx264Preset: X264Preset;
|
|
23
|
+
readonly initialGopSize: number | null;
|
|
23
24
|
readonly initialPixelFormat: PixelFormat | null;
|
|
24
25
|
readonly initialVideoBitrate: string | null;
|
|
25
26
|
readonly initialAudioBitrate: string | null;
|
|
@@ -19,6 +19,7 @@ const file_1 = require("../../icons/file");
|
|
|
19
19
|
const frame_1 = require("../../icons/frame");
|
|
20
20
|
const gear_1 = require("../../icons/gear");
|
|
21
21
|
const gif_1 = require("../../icons/gif");
|
|
22
|
+
const video_1 = require("../../icons/video");
|
|
22
23
|
const modals_1 = require("../../state/modals");
|
|
23
24
|
const sidebar_1 = require("../../state/sidebar");
|
|
24
25
|
const Button_1 = require("../Button");
|
|
@@ -39,6 +40,8 @@ const render_modals_1 = require("./render-modals");
|
|
|
39
40
|
const RenderModalAdvanced_1 = require("./RenderModalAdvanced");
|
|
40
41
|
const RenderModalAudio_1 = require("./RenderModalAudio");
|
|
41
42
|
const RenderModalBasic_1 = require("./RenderModalBasic");
|
|
43
|
+
const RenderModalEncoding_1 = require("./RenderModalEncoding");
|
|
44
|
+
const RenderModalEnvironmentVariables_1 = require("./RenderModalEnvironmentVariables");
|
|
42
45
|
const RenderModalGif_1 = require("./RenderModalGif");
|
|
43
46
|
const RenderModalPicture_1 = require("./RenderModalPicture");
|
|
44
47
|
const ResolveCompositionBeforeModal_1 = require("./ResolveCompositionBeforeModal");
|
|
@@ -61,7 +64,7 @@ const reducer = (state, action) => {
|
|
|
61
64
|
}
|
|
62
65
|
return state;
|
|
63
66
|
};
|
|
64
|
-
const RenderModal = ({ readOnlyStudio, initialFrame, initialVideoImageFormat, initialStillImageFormat, initialJpegQuality, initialScale, initialLogLevel, initialConcurrency, maxConcurrency, minConcurrency, initialMuted, initialEnforceAudioTrack, initialProResProfile, initialx264Preset, initialPixelFormat, initialVideoBitrate, initialAudioBitrate, initialEveryNthFrame, initialNumberOfGifLoops, initialDelayRenderTimeout, initialOffthreadVideoCacheSizeInBytes, initialEnvVariables, initialDisableWebSecurity, initialGl, initialHeadless, initialIgnoreCertificateErrors, initialEncodingBufferSize, initialEncodingMaxRate, initialOffthreadVideoThreads, initialMediaCacheSizeInBytes, initialDarkMode, initialUserAgent, defaultProps, inFrameMark, outFrameMark, initialColorSpace, initialMultiProcessOnLinux, defaultConfigurationAudioCodec, defaultConfigurationVideoCodec, initialBeep, initialRepro, initialForSeamlessAacConcatenation, renderTypeOfLastRender, initialHardwareAcceleration, initialSampleRate, defaultMetadata, initialChromeMode, renderDefaults, }) => {
|
|
67
|
+
const RenderModal = ({ readOnlyStudio, initialFrame, initialVideoImageFormat, initialStillImageFormat, initialJpegQuality, initialScale, initialLogLevel, initialConcurrency, maxConcurrency, minConcurrency, initialMuted, initialEnforceAudioTrack, initialProResProfile, initialx264Preset, initialGopSize, initialPixelFormat, initialVideoBitrate, initialAudioBitrate, initialEveryNthFrame, initialNumberOfGifLoops, initialDelayRenderTimeout, initialOffthreadVideoCacheSizeInBytes, initialEnvVariables, initialDisableWebSecurity, initialGl, initialHeadless, initialIgnoreCertificateErrors, initialEncodingBufferSize, initialEncodingMaxRate, initialOffthreadVideoThreads, initialMediaCacheSizeInBytes, initialDarkMode, initialUserAgent, defaultProps, inFrameMark, outFrameMark, initialColorSpace, initialMultiProcessOnLinux, defaultConfigurationAudioCodec, defaultConfigurationVideoCodec, initialBeep, initialRepro, initialForSeamlessAacConcatenation, renderTypeOfLastRender, initialHardwareAcceleration, initialSampleRate, defaultMetadata, initialChromeMode, renderDefaults, }) => {
|
|
65
68
|
const { setSelectedModal } = (0, react_1.useContext)(modals_1.ModalsContext);
|
|
66
69
|
const context = (0, react_1.useContext)(ResolveCompositionBeforeModal_1.ResolvedCompositionContext);
|
|
67
70
|
if (!context) {
|
|
@@ -159,6 +162,7 @@ const RenderModal = ({ readOnlyStudio, initialFrame, initialVideoImageFormat, in
|
|
|
159
162
|
return (_a = initialProResProfile !== null && initialProResProfile !== void 0 ? initialProResProfile : resolvedComposition.defaultProResProfile) !== null && _a !== void 0 ? _a : 'hq';
|
|
160
163
|
});
|
|
161
164
|
const [x264PresetSetting, setx264Preset] = (0, react_1.useState)(() => initialx264Preset);
|
|
165
|
+
const [gopSize, setGopSize] = (0, react_1.useState)(() => initialGopSize);
|
|
162
166
|
const [hardwareAcceleration, setHardwareAcceleration] = (0, react_1.useState)(() => initialHardwareAcceleration);
|
|
163
167
|
const [userPreferredPixelFormat, setPixelFormat] = (0, react_1.useState)(() => {
|
|
164
168
|
var _a;
|
|
@@ -450,6 +454,7 @@ const RenderModal = ({ readOnlyStudio, initialFrame, initialVideoImageFormat, in
|
|
|
450
454
|
hardwareAcceleration !== 'required'
|
|
451
455
|
? crf
|
|
452
456
|
: null,
|
|
457
|
+
gopSize,
|
|
453
458
|
endFrame,
|
|
454
459
|
startFrame,
|
|
455
460
|
muted,
|
|
@@ -529,6 +534,7 @@ const RenderModal = ({ readOnlyStudio, initialFrame, initialVideoImageFormat, in
|
|
|
529
534
|
beepOnFinish,
|
|
530
535
|
repro,
|
|
531
536
|
forSeamlessAacConcatenation,
|
|
537
|
+
gopSize,
|
|
532
538
|
separateAudioTo,
|
|
533
539
|
setSelectedModal,
|
|
534
540
|
metadata,
|
|
@@ -798,6 +804,7 @@ const RenderModal = ({ readOnlyStudio, initialFrame, initialVideoImageFormat, in
|
|
|
798
804
|
hardwareAcceleration !== 'required'
|
|
799
805
|
? crf
|
|
800
806
|
: null,
|
|
807
|
+
gopSize,
|
|
801
808
|
videoBitrate,
|
|
802
809
|
audioBitrate,
|
|
803
810
|
audioCodec,
|
|
@@ -852,6 +859,7 @@ const RenderModal = ({ readOnlyStudio, initialFrame, initialVideoImageFormat, in
|
|
|
852
859
|
everyNthFrame,
|
|
853
860
|
frame,
|
|
854
861
|
forSeamlessAacConcatenation,
|
|
862
|
+
gopSize,
|
|
855
863
|
hardwareAcceleration,
|
|
856
864
|
headless,
|
|
857
865
|
ignoreCertificateErrors,
|
|
@@ -990,13 +998,17 @@ const RenderModal = ({ readOnlyStudio, initialFrame, initialVideoImageFormat, in
|
|
|
990
998
|
jsx_runtime_1.jsx("div", { style: render_modals_1.iconContainer, children: jsx_runtime_1.jsx(audio_1.AudioIcon, { style: render_modals_1.icon }) }),
|
|
991
999
|
"Audio"] })) : null, shownTabs.includes('gif') ? (jsx_runtime_1.jsxs(vertical_1.VerticalTab, { style: render_modals_1.horizontalTab, selected: tab === 'gif', onClick: () => setTab('gif'), children: [
|
|
992
1000
|
jsx_runtime_1.jsx("div", { style: render_modals_1.iconContainer, children: jsx_runtime_1.jsx(gif_1.GifIcon, { style: render_modals_1.icon }) }),
|
|
993
|
-
"GIF"] })) : null, shownTabs.includes('
|
|
1001
|
+
"GIF"] })) : null, shownTabs.includes('encoding') ? (jsx_runtime_1.jsxs(vertical_1.VerticalTab, { style: render_modals_1.horizontalTab, selected: tab === 'encoding', onClick: () => setTab('encoding'), children: [
|
|
1002
|
+
jsx_runtime_1.jsx("div", { style: render_modals_1.iconContainer, children: jsx_runtime_1.jsx(video_1.FilmIcon, { style: render_modals_1.icon, color: "currentcolor" }) }),
|
|
1003
|
+
"Encoding"] })) : null, shownTabs.includes('environment') ? (jsx_runtime_1.jsxs(vertical_1.VerticalTab, { style: render_modals_1.horizontalTab, selected: tab === 'environment', onClick: () => setTab('environment'), children: [
|
|
1004
|
+
jsx_runtime_1.jsx("div", { style: render_modals_1.iconContainer, children: jsx_runtime_1.jsx(data_1.DataIcon, { style: render_modals_1.icon }) }),
|
|
1005
|
+
"Environment"] })) : null, shownTabs.includes('advanced') ? (jsx_runtime_1.jsxs(vertical_1.VerticalTab, { style: render_modals_1.horizontalTab, selected: tab === 'advanced', onClick: () => setTab('advanced'), children: [
|
|
994
1006
|
jsx_runtime_1.jsx("div", { style: render_modals_1.iconContainer, children: jsx_runtime_1.jsx(gear_1.GearIcon, { style: render_modals_1.icon }) }),
|
|
995
|
-
"Other"] })) : null] }), jsx_runtime_1.jsx("div", { style: render_modals_1.optionsPanel, className: is_menu_item_1.VERTICAL_SCROLLBAR_CLASSNAME, children: tab === 'general' ? (jsx_runtime_1.jsx(RenderModalBasic_1.RenderModalBasic, { codec: codec, resolvedComposition: resolvedComposition, frame: frame, imageFormatOptions: imageFormatOptions, outName: outName, proResProfile: proResProfile, renderMode: renderMode, setVideoCodec: setCodec, setFrame: setFrame, setOutName: setOutName, setProResProfile: setProResProfile, endFrame: endFrame, setEndFrame: setEndFrame, setStartFrame: setStartFrame, setVerboseLogging: setLogLevel, logLevel: logLevel, showOutputName: !readOnlyStudio, startFrame: startFrame, validationMessage: outnameValidation.valid ? null : outnameValidation.error.message })) : tab === 'picture' ? (jsx_runtime_1.jsx(RenderModalPicture_1.RenderModalPicture, { renderMode: renderMode, scale: scale, setScale: setScale,
|
|
1007
|
+
"Other"] })) : null] }), jsx_runtime_1.jsx("div", { style: render_modals_1.optionsPanel, className: is_menu_item_1.VERTICAL_SCROLLBAR_CLASSNAME, children: tab === 'general' ? (jsx_runtime_1.jsx(RenderModalBasic_1.RenderModalBasic, { codec: codec, resolvedComposition: resolvedComposition, frame: frame, imageFormatOptions: imageFormatOptions, outName: outName, proResProfile: proResProfile, renderMode: renderMode, setVideoCodec: setCodec, setFrame: setFrame, setOutName: setOutName, setProResProfile: setProResProfile, endFrame: endFrame, setEndFrame: setEndFrame, setStartFrame: setStartFrame, setVerboseLogging: setLogLevel, logLevel: logLevel, showOutputName: !readOnlyStudio, startFrame: startFrame, validationMessage: outnameValidation.valid ? null : outnameValidation.error.message })) : tab === 'picture' ? (jsx_runtime_1.jsx(RenderModalPicture_1.RenderModalPicture, { renderMode: renderMode, scale: scale, setScale: setScale, imageFormatOptions: imageFormatOptions, jpegQuality: jpegQuality, setJpegQuality: setJpegQuality, videoImageFormat: videoImageFormat, stillImageFormat: stillImageFormat, compositionWidth: resolvedComposition.width, compositionHeight: resolvedComposition.height })) : tab === 'audio' ? (jsx_runtime_1.jsx(RenderModalAudio_1.RenderModalAudio, { muted: muted, renderMode: renderMode, setMuted: setMuted, codec: codec, audioCodec: audioCodec, setAudioCodec: setAudioCodec, enforceAudioTrack: enforceAudioTrack, setEnforceAudioTrackState: setEnforceAudioTrackState, customTargetAudioBitrate: customTargetAudioBitrate, setCustomTargetAudioBitrateValue: setCustomTargetAudioBitrateValue, setShouldHaveCustomTargetAudioBitrate: setShouldHaveCustomTargetAudioBitrate, shouldHaveCustomTargetAudioBitrate: shouldHaveCustomTargetAudioBitrate, forSeamlessAacConcatenation: forSeamlessAacConcatenation, setForSeamlessAacConcatenation: setForSeamlessAacConcatenation, separateAudioTo: separateAudioTo, setSeparateAudioTo: setSeparateAudioTo, outName: outName, sampleRate: sampleRate, setSampleRate: setSampleRate })) : tab === 'gif' ? (jsx_runtime_1.jsx(RenderModalGif_1.RenderModalGif, { everyNthFrame: everyNthFrame, limitNumberOfGifLoops: limitNumberOfGifLoops, numberOfGifLoopsSetting: numberOfGifLoopsSetting, setEveryNthFrameSetting: setEveryNthFrameSetting, setLimitNumberOfGifLoops: setLimitNumberOfGifLoops, setNumberOfGifLoopsSetting: setNumberOfGifLoopsSetting })) : tab === 'encoding' ? (jsx_runtime_1.jsx(RenderModalEncoding_1.RenderModalEncoding, { renderMode: renderMode, codec: codec, qualityControlType: qualityControlType, setQualityControl: setQualityControl, shouldDisplayQualityControlPicker: supportsBothQualityControls, crf: crf, setCrf: setCrf, maxCrf: maxCrf, minCrf: minCrf, customTargetVideoBitrate: customTargetVideoBitrate, setCustomTargetVideoBitrateValue: setCustomTargetVideoBitrateValue, encodingBufferSize: encodingBufferSize, setEncodingBufferSize: setEncodingBufferSize, encodingMaxRate: encodingMaxRate, setEncodingMaxRate: setEncodingMaxRate, pixelFormat: pixelFormat, pixelFormatOptions: pixelFormatOptions, colorSpace: colorSpace, setColorSpace: setColorSpace, x264Preset: x264Preset, setx264Preset: setx264Preset, gopSize: gopSize, setGopSize: setGopSize, hardwareAcceleration: hardwareAcceleration, setHardwareAcceleration: setHardwareAcceleration, disallowParallelEncoding: disallowParallelEncoding, setDisallowParallelEncoding: setDisallowParallelEncoding })) : tab === 'environment' ? (jsx_runtime_1.jsx(RenderModalEnvironmentVariables_1.RenderModalEnvironmentVariables, { envVariables: envVariables, setEnvVariables: setEnvVariables })) : tab === 'data' ? (jsx_runtime_1.jsx(DataEditor_1.DataEditor, { defaultProps: inputProps, setDefaultProps: setInputProps, unresolvedComposition: unresolvedComposition, propsEditType: "input-props", canSaveDefaultProps: {
|
|
996
1008
|
canUpdate: false,
|
|
997
1009
|
reason: 'render dialogue',
|
|
998
1010
|
determined: false,
|
|
999
|
-
} })) : (jsx_runtime_1.jsx(RenderModalAdvanced_1.RenderModalAdvanced, {
|
|
1011
|
+
} })) : (jsx_runtime_1.jsx(RenderModalAdvanced_1.RenderModalAdvanced, { concurrency: concurrency, maxConcurrency: maxConcurrency, minConcurrency: minConcurrency, renderMode: renderMode, setConcurrency: setConcurrency, delayRenderTimeout: delayRenderTimeout, setDelayRenderTimeout: setDelayRenderTimeout, setDisableWebSecurity: setDisableWebSecurity, setIgnoreCertificateErrors: setIgnoreCertificateErrors, setHeadless: setHeadless, headless: headless, ignoreCertificateErrors: ignoreCertificateErrors, disableWebSecurity: disableWebSecurity, openGlOption: openGlOption, setOpenGlOption: setOpenGlOption, offthreadVideoCacheSizeInBytes: offthreadVideoCacheSizeInBytes, setMediaCacheSizeInBytes: setMediaCacheSizeInBytes, mediaCacheSizeInBytes: mediaCacheSizeInBytes, setOffthreadVideoCacheSizeInBytes: setOffthreadVideoCacheSizeInBytes, offthreadVideoThreads: offthreadVideoThreads, setOffthreadVideoThreads: setOffthreadVideoThreads, enableMultiProcessOnLinux: multiProcessOnLinux, setChromiumMultiProcessOnLinux: setChromiumMultiProcessOnLinux, userAgent: userAgent, setUserAgent: setUserAgent, setBeep: setBeepOnFinish, beep: beepOnFinish, repro: repro, setRepro: setRepro, chromeModeOption: chromeMode, setChromeModeOption: setChromeMode, darkMode: darkMode, setDarkMode: setDarkMode })) })
|
|
1000
1012
|
] })
|
|
1001
1013
|
] }));
|
|
1002
1014
|
};
|
|
@@ -1,4 +1,10 @@
|
|
|
1
1
|
import type { PropsEditType } from './DataEditor';
|
|
2
|
+
export declare const CANNOT_SAVE_DEFAULT_PROPS_DOCS = "https://www.remotion.dev/docs/troubleshooting/cannot-save-default-props";
|
|
3
|
+
export type RenderModalWarning = {
|
|
4
|
+
readonly id: string;
|
|
5
|
+
readonly message: string;
|
|
6
|
+
readonly resolveLink?: string;
|
|
7
|
+
};
|
|
2
8
|
export type TypeCanSaveState = {
|
|
3
9
|
canUpdate: true;
|
|
4
10
|
} | {
|
|
@@ -15,4 +21,4 @@ export declare const getRenderModalWarnings: ({ cliProps, canSaveDefaultProps, i
|
|
|
15
21
|
jsSetUsed: boolean;
|
|
16
22
|
inJSONEditor: boolean;
|
|
17
23
|
propsEditType: PropsEditType;
|
|
18
|
-
}) =>
|
|
24
|
+
}) => RenderModalWarning[];
|
|
@@ -1,7 +1,17 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.getRenderModalWarnings = void 0;
|
|
3
|
+
exports.getRenderModalWarnings = exports.CANNOT_SAVE_DEFAULT_PROPS_DOCS = void 0;
|
|
4
4
|
const no_react_1 = require("remotion/no-react");
|
|
5
|
+
exports.CANNOT_SAVE_DEFAULT_PROPS_DOCS = 'https://www.remotion.dev/docs/troubleshooting/cannot-save-default-props';
|
|
6
|
+
const warningOrNull = (id, message) => {
|
|
7
|
+
if (message === null) {
|
|
8
|
+
return null;
|
|
9
|
+
}
|
|
10
|
+
return {
|
|
11
|
+
id,
|
|
12
|
+
message,
|
|
13
|
+
};
|
|
14
|
+
};
|
|
5
15
|
const getInputPropsWarning = ({ cliProps, propsEditType, }) => {
|
|
6
16
|
if (Object.keys(cliProps).length > 0 &&
|
|
7
17
|
propsEditType === 'default-props') {
|
|
@@ -19,7 +29,11 @@ const getCannotSaveDefaultProps = (canSaveDefaultProps) => {
|
|
|
19
29
|
if (!canSaveDefaultProps.determined) {
|
|
20
30
|
return null;
|
|
21
31
|
}
|
|
22
|
-
return
|
|
32
|
+
return {
|
|
33
|
+
id: 'cannot-save-default-props',
|
|
34
|
+
message: `Can't save default props: ${canSaveDefaultProps.reason}.`,
|
|
35
|
+
resolveLink: exports.CANNOT_SAVE_DEFAULT_PROPS_DOCS,
|
|
36
|
+
};
|
|
23
37
|
};
|
|
24
38
|
const customDateUsed = (used, inJSONEditor) => {
|
|
25
39
|
if (used && inJSONEditor) {
|
|
@@ -47,12 +61,12 @@ const setUsed = (used, inJSONEditor) => {
|
|
|
47
61
|
};
|
|
48
62
|
const getRenderModalWarnings = ({ cliProps, canSaveDefaultProps, isCustomDateUsed, customFileUsed, jsMapUsed, jsSetUsed, inJSONEditor, propsEditType, }) => {
|
|
49
63
|
return [
|
|
50
|
-
getInputPropsWarning({ cliProps, propsEditType }),
|
|
64
|
+
warningOrNull('input-props-override', getInputPropsWarning({ cliProps, propsEditType })),
|
|
51
65
|
getCannotSaveDefaultProps(canSaveDefaultProps),
|
|
52
|
-
customDateUsed(isCustomDateUsed, inJSONEditor),
|
|
53
|
-
staticFileUsed(customFileUsed, inJSONEditor),
|
|
54
|
-
mapUsed(jsMapUsed, inJSONEditor),
|
|
55
|
-
setUsed(jsSetUsed, inJSONEditor),
|
|
66
|
+
warningOrNull('custom-date-used', customDateUsed(isCustomDateUsed, inJSONEditor)),
|
|
67
|
+
warningOrNull('static-file-used', staticFileUsed(customFileUsed, inJSONEditor)),
|
|
68
|
+
warningOrNull('map-used', mapUsed(jsMapUsed, inJSONEditor)),
|
|
69
|
+
warningOrNull('set-used', setUsed(jsSetUsed, inJSONEditor)),
|
|
56
70
|
].filter(no_react_1.NoReactInternals.truthy);
|
|
57
71
|
};
|
|
58
72
|
exports.getRenderModalWarnings = getRenderModalWarnings;
|
|
@@ -43,7 +43,7 @@ export declare const addSequenceRenderJob: ({ compositionId, outName, imageForma
|
|
|
43
43
|
chromeMode: "chrome-for-testing" | "headless-shell";
|
|
44
44
|
mediaCacheSizeInBytes: number | null;
|
|
45
45
|
}) => Promise<undefined>;
|
|
46
|
-
export declare const addVideoRenderJob: ({ compositionId, outName, imageFormat, jpegQuality, scale, logLevel, codec, concurrency, crf, startFrame, endFrame, muted, enforceAudioTrack, proResProfile, x264Preset, pixelFormat, audioBitrate, videoBitrate, everyNthFrame, numberOfGifLoops, delayRenderTimeout, audioCodec, disallowParallelEncoding, chromiumOptions, envVariables, inputProps, offthreadVideoCacheSizeInBytes, offthreadVideoThreads, colorSpace, multiProcessOnLinux, encodingMaxRate, encodingBufferSize, beepOnFinish, repro, forSeamlessAacConcatenation, separateAudioTo, metadata, hardwareAcceleration, chromeMode, mediaCacheSizeInBytes, sampleRate, }: {
|
|
46
|
+
export declare const addVideoRenderJob: ({ compositionId, outName, imageFormat, jpegQuality, scale, logLevel, codec, concurrency, crf, gopSize, startFrame, endFrame, muted, enforceAudioTrack, proResProfile, x264Preset, pixelFormat, audioBitrate, videoBitrate, everyNthFrame, numberOfGifLoops, delayRenderTimeout, audioCodec, disallowParallelEncoding, chromiumOptions, envVariables, inputProps, offthreadVideoCacheSizeInBytes, offthreadVideoThreads, colorSpace, multiProcessOnLinux, encodingMaxRate, encodingBufferSize, beepOnFinish, repro, forSeamlessAacConcatenation, separateAudioTo, metadata, hardwareAcceleration, chromeMode, mediaCacheSizeInBytes, sampleRate, }: {
|
|
47
47
|
compositionId: string;
|
|
48
48
|
outName: string;
|
|
49
49
|
imageFormat: "jpeg" | "none" | "png";
|
|
@@ -53,6 +53,7 @@ export declare const addVideoRenderJob: ({ compositionId, outName, imageFormat,
|
|
|
53
53
|
codec: "aac" | "av1" | "gif" | "h264" | "h264-mkv" | "h264-ts" | "h265" | "mp3" | "prores" | "vp8" | "vp9" | "wav";
|
|
54
54
|
concurrency: number;
|
|
55
55
|
crf: number | null;
|
|
56
|
+
gopSize: number | null;
|
|
56
57
|
startFrame: number;
|
|
57
58
|
endFrame: number;
|
|
58
59
|
muted: boolean;
|
|
@@ -63,7 +63,7 @@ const addSequenceRenderJob = ({ compositionId, outName, imageFormat, startFrame,
|
|
|
63
63
|
});
|
|
64
64
|
};
|
|
65
65
|
exports.addSequenceRenderJob = addSequenceRenderJob;
|
|
66
|
-
const addVideoRenderJob = ({ compositionId, outName, imageFormat, jpegQuality, scale, logLevel, codec, concurrency, crf, startFrame, endFrame, muted, enforceAudioTrack, proResProfile, x264Preset, pixelFormat, audioBitrate, videoBitrate, everyNthFrame, numberOfGifLoops, delayRenderTimeout, audioCodec, disallowParallelEncoding, chromiumOptions, envVariables, inputProps, offthreadVideoCacheSizeInBytes, offthreadVideoThreads, colorSpace, multiProcessOnLinux, encodingMaxRate, encodingBufferSize, beepOnFinish, repro, forSeamlessAacConcatenation, separateAudioTo, metadata, hardwareAcceleration, chromeMode, mediaCacheSizeInBytes, sampleRate, }) => {
|
|
66
|
+
const addVideoRenderJob = ({ compositionId, outName, imageFormat, jpegQuality, scale, logLevel, codec, concurrency, crf, gopSize, startFrame, endFrame, muted, enforceAudioTrack, proResProfile, x264Preset, pixelFormat, audioBitrate, videoBitrate, everyNthFrame, numberOfGifLoops, delayRenderTimeout, audioCodec, disallowParallelEncoding, chromiumOptions, envVariables, inputProps, offthreadVideoCacheSizeInBytes, offthreadVideoThreads, colorSpace, multiProcessOnLinux, encodingMaxRate, encodingBufferSize, beepOnFinish, repro, forSeamlessAacConcatenation, separateAudioTo, metadata, hardwareAcceleration, chromeMode, mediaCacheSizeInBytes, sampleRate, }) => {
|
|
67
67
|
return (0, call_api_1.callApi)('/api/render', {
|
|
68
68
|
compositionId,
|
|
69
69
|
type: 'video',
|
|
@@ -75,6 +75,7 @@ const addVideoRenderJob = ({ compositionId, outName, imageFormat, jpegQuality, s
|
|
|
75
75
|
codec,
|
|
76
76
|
concurrency,
|
|
77
77
|
crf,
|
|
78
|
+
gopSize,
|
|
78
79
|
endFrame,
|
|
79
80
|
startFrame,
|
|
80
81
|
muted,
|
|
@@ -47,6 +47,7 @@ const SidebarRenderButton = ({ composition, visible }) => {
|
|
|
47
47
|
initialEnforceAudioTrack: defaults.enforceAudioTrack,
|
|
48
48
|
initialProResProfile: defaults.proResProfile,
|
|
49
49
|
initialx264Preset: defaults.x264Preset,
|
|
50
|
+
initialGopSize: defaults.gopSize,
|
|
50
51
|
initialPixelFormat: null,
|
|
51
52
|
initialAudioBitrate: defaults.audioBitrate,
|
|
52
53
|
initialVideoBitrate: defaults.videoBitrate,
|
|
@@ -40,6 +40,7 @@ const remotion_1 = require("remotion");
|
|
|
40
40
|
const calculate_timeline_1 = require("../../helpers/calculate-timeline");
|
|
41
41
|
const client_id_1 = require("../../helpers/client-id");
|
|
42
42
|
const colors_1 = require("../../helpers/colors");
|
|
43
|
+
const is_current_selected_still_1 = require("../../helpers/is-current-selected-still");
|
|
43
44
|
const is_menu_item_1 = require("../Menu/is-menu-item");
|
|
44
45
|
const SplitterContainer_1 = require("../Splitter/SplitterContainer");
|
|
45
46
|
const SplitterElement_1 = require("../Splitter/SplitterElement");
|
|
@@ -73,6 +74,7 @@ const TimelineInner = () => {
|
|
|
73
74
|
var _a;
|
|
74
75
|
const { sequences } = (0, react_1.useContext)(remotion_1.Internals.SequenceManager);
|
|
75
76
|
const videoConfig = remotion_1.Internals.useUnsafeVideoConfig();
|
|
77
|
+
const isStill = (0, is_current_selected_still_1.useIsStill)();
|
|
76
78
|
const { overrideIdToNodePathMappings } = (0, react_1.useContext)(remotion_1.Internals.OverrideIdsToNodePathsGettersContext);
|
|
77
79
|
const { previewServerState } = (0, react_1.useContext)(client_id_1.StudioServerConnectionCtx);
|
|
78
80
|
const previewConnected = previewServerState.type === 'connected';
|
|
@@ -101,13 +103,13 @@ const TimelineInner = () => {
|
|
|
101
103
|
return null;
|
|
102
104
|
}
|
|
103
105
|
return (jsx_runtime_1.jsx(SubscribeToNodePaths_1.SubscribeToNodePaths, { overrideId: sequence.controls.overrideId, schema: sequence.controls.schema, getStack: sequence.getStack, effects: sequence.effects }, sequence.id));
|
|
104
|
-
}), jsx_runtime_1.jsx(SequencePropsObserver_1.SequencePropsObserver, {}), jsx_runtime_1.jsxs(TimelineWidthProvider_1.TimelineWidthProvider, { children: [
|
|
105
|
-
|
|
106
|
+
}), jsx_runtime_1.jsx(SequencePropsObserver_1.SequencePropsObserver, {}), jsx_runtime_1.jsx(TimelineHeightContainer_1.TimelineHeightContainer, { shown: shown, hasBeenCut: hasBeenCut, children: isStill ? (jsx_runtime_1.jsx(TimelineList_1.TimelineList, { timeline: shown })) : (jsx_runtime_1.jsxs(TimelineWidthProvider_1.TimelineWidthProvider, { children: [
|
|
107
|
+
jsx_runtime_1.jsx(TimelinePinchZoom_1.TimelinePinchZoom, {}), jsx_runtime_1.jsxs(SplitterContainer_1.SplitterContainer, { orientation: "vertical", defaultFlex: 0.2, id: "names-to-timeline", maxFlex: 0.5, minFlex: 0.15, children: [
|
|
106
108
|
jsx_runtime_1.jsx(SplitterElement_1.SplitterElement, { type: "flexer", sticky: jsx_runtime_1.jsx(TimelineTimeIndicators_1.TimelineTimePlaceholders, {}), children: jsx_runtime_1.jsx(TimelineList_1.TimelineList, { timeline: shown }) }), jsx_runtime_1.jsx(SplitterHandle_1.SplitterHandle, { onCollapse: noop, allowToCollapse: "none" }), jsx_runtime_1.jsx(SplitterElement_1.SplitterElement, { type: "anti-flexer", sticky: null, children: jsx_runtime_1.jsxs(TimelineScrollable_1.TimelineScrollable, { children: [
|
|
107
109
|
jsx_runtime_1.jsx(TimelineTracks_1.TimelineTracks, { timeline: shown, hasBeenCut: hasBeenCut }), jsx_runtime_1.jsx(TimelineInOutPointer_1.TimelineInOutPointer, {}), jsx_runtime_1.jsx(TimelinePlayCursorSyncer_1.TimelinePlayCursorSyncer, {}), jsx_runtime_1.jsx(TimelineDragHandler_1.TimelineDragHandler, {}), jsx_runtime_1.jsx(TimelineTimeIndicators_1.TimelineTimeIndicators, {}), jsx_runtime_1.jsx(TimelineSlider_1.TimelineSlider, {})
|
|
108
110
|
] }) })
|
|
109
|
-
] })
|
|
110
|
-
|
|
111
|
+
] })
|
|
112
|
+
] })) })
|
|
111
113
|
] }));
|
|
112
114
|
};
|
|
113
115
|
exports.Timeline = react_1.default.memo(TimelineInner);
|
|
@@ -8,6 +8,7 @@ const remotion_1 = require("remotion");
|
|
|
8
8
|
const client_id_1 = require("../../helpers/client-id");
|
|
9
9
|
const timeline_layout_1 = require("../../helpers/timeline-layout");
|
|
10
10
|
const call_api_1 = require("../call-api");
|
|
11
|
+
const get_timeline_keyframes_1 = require("./get-timeline-keyframes");
|
|
11
12
|
const save_prop_queue_1 = require("./save-prop-queue");
|
|
12
13
|
const timeline_field_row_layout_1 = require("./timeline-field-row-layout");
|
|
13
14
|
const TimelineExpandArrowButton_1 = require("./TimelineExpandArrowButton");
|
|
@@ -130,7 +131,7 @@ const Value = ({ field, nodePath, validatedLocation }) => {
|
|
|
130
131
|
}
|
|
131
132
|
if (propStatus === null || !propStatus.canUpdate) {
|
|
132
133
|
if ((propStatus === null || propStatus === void 0 ? void 0 : propStatus.reason) === 'computed') {
|
|
133
|
-
return jsx_runtime_1.jsx(TimelineSchemaField_1.UnsupportedStatus, { label:
|
|
134
|
+
return jsx_runtime_1.jsx(TimelineSchemaField_1.UnsupportedStatus, { label: (0, get_timeline_keyframes_1.getComputedStatusLabel)(propStatus) });
|
|
134
135
|
}
|
|
135
136
|
return null;
|
|
136
137
|
}
|
|
@@ -8,6 +8,7 @@ export declare const TimelineEffectGroupRow: React.FC<{
|
|
|
8
8
|
readonly nodePathInfo: SequenceNodePathInfo;
|
|
9
9
|
readonly effectIndex: number;
|
|
10
10
|
readonly effectSchema: SequenceSchema;
|
|
11
|
+
readonly documentationLink: string | null;
|
|
11
12
|
readonly nodePath: SequencePropsSubscriptionKey;
|
|
12
13
|
readonly validatedLocation: CodePosition;
|
|
13
14
|
readonly rowDepth: number;
|