@remotion/cli 4.0.21 → 4.0.23
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/benchmark.js +4 -1
- package/dist/better-opn/index.d.ts +0 -1
- package/dist/compositions.js +2 -1
- package/dist/config/image-format.d.ts +1 -1
- package/dist/config/index.d.ts +5 -1
- package/dist/config/index.js +7 -0
- package/dist/config/offthread-video-cache-size.d.ts +2 -0
- package/dist/config/offthread-video-cache-size.js +12 -0
- package/dist/config/x264-preset.d.ts +3 -0
- package/dist/config/x264-preset.js +12 -0
- package/dist/editor/components/Editor.js +14 -1
- package/dist/editor/components/Modals.js +1 -1
- package/dist/editor/components/NewComposition/NewCompCode.d.ts +0 -1
- package/dist/editor/components/NewComposition/RemInput.d.ts +2 -2
- package/dist/editor/components/NewComposition/RemInputTypeColor.d.ts +1 -1
- package/dist/editor/components/NewComposition/RemTextarea.d.ts +1 -1
- package/dist/editor/components/Notifications/ServerDisconnected.js +2 -1
- package/dist/editor/components/RenderButton.js +2 -0
- package/dist/editor/components/RenderModal/CrfSetting.d.ts +2 -2
- package/dist/editor/components/RenderModal/EnforceAudioTrackSetting.d.ts +2 -2
- package/dist/editor/components/RenderModal/MutedSetting.d.ts +2 -2
- package/dist/editor/components/RenderModal/NumberSetting.d.ts +2 -2
- package/dist/editor/components/RenderModal/OptionExplainer.d.ts +2 -2
- package/dist/editor/components/RenderModal/RenderModal.d.ts +3 -1
- package/dist/editor/components/RenderModal/RenderModal.js +16 -2
- package/dist/editor/components/RenderModal/RenderModalAdvanced.d.ts +6 -0
- package/dist/editor/components/RenderModal/RenderModalAdvanced.js +42 -3
- package/dist/editor/components/RenderModal/RenderModalBasic.js +1 -1
- package/dist/editor/components/RenderModal/RenderModalPicture.d.ts +1 -1
- package/dist/editor/components/RenderModal/SchemaEditor/ZodDiscriminatedUnionEditor.js +1 -1
- package/dist/editor/components/RenderModal/SchemaEditor/input-props-serialization.d.ts +14 -0
- package/dist/editor/components/RenderModal/SchemaEditor/input-props-serialization.js +42 -0
- package/dist/editor/components/RenderModal/human-readable-codec.d.ts +1 -1
- package/dist/editor/components/RenderModal/layout.js +1 -1
- package/dist/editor/components/RenderQueue/actions.d.ts +6 -3
- package/dist/editor/components/RenderQueue/actions.js +5 -2
- package/dist/editor/components/RightPanel.d.ts +8 -0
- package/dist/editor/components/RightPanel.js +79 -0
- package/dist/editor/components/SidebarRenderButton.js +9 -1
- package/dist/editor/components/UpdateCheck.d.ts +0 -1
- package/dist/editor/helpers/colors.d.ts +1 -1
- package/dist/editor/helpers/convert-env-variables.d.ts +8 -2
- package/dist/editor/helpers/document-title.js +1 -0
- package/dist/editor/helpers/presets-labels.d.ts +2 -0
- package/dist/editor/helpers/presets-labels.js +37 -0
- package/dist/editor/helpers/render-modal-sections.d.ts +0 -1
- package/dist/editor/state/modals.d.ts +3 -1
- package/dist/get-cli-options.d.ts +3 -1
- package/dist/get-cli-options.js +7 -0
- package/dist/get-composition-id.d.ts +2 -1
- package/dist/get-composition-id.js +3 -1
- package/dist/get-composition-with-dimension-override.d.ts +2 -1
- package/dist/get-composition-with-dimension-override.js +2 -1
- package/dist/index.d.ts +11 -6
- package/dist/list-of-remotion-packages.js +1 -0
- package/dist/parse-command-line.d.ts +5 -1
- package/dist/parse-command-line.js +6 -0
- package/dist/preview-server/dev-middleware/range-parser.d.ts +1 -1
- package/dist/preview-server/error-overlay/react-overlay/listen-to-runtime-errors.js +1 -0
- package/dist/preview-server/error-overlay/react-overlay/utils/open-in-editor.d.ts +1 -1
- package/dist/preview-server/hot-middleware/process-update.d.ts +0 -5
- package/dist/preview-server/hot-middleware/process-update.js +21 -2
- package/dist/preview-server/render-queue/job.d.ts +6 -1
- package/dist/preview-server/render-queue/make-retry-payload.js +5 -1
- package/dist/preview-server/render-queue/process-still.js +1 -0
- package/dist/preview-server/render-queue/process-video.js +3 -1
- package/dist/preview-server/routes/add-render.js +3 -0
- package/dist/preview-server/routes.d.ts +0 -1
- package/dist/preview-server/routes.js +6 -2
- package/dist/render-flows/render.d.ts +4 -2
- package/dist/render-flows/render.js +6 -1
- package/dist/render-flows/still.d.ts +2 -1
- package/dist/render-flows/still.js +4 -1
- package/dist/render.js +3 -1
- package/dist/still.js +2 -1
- package/package.json +9 -9
|
@@ -2,7 +2,9 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.RenderModalAdvanced = void 0;
|
|
4
4
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
+
const client_1 = require("@remotion/renderer/client");
|
|
5
6
|
const react_1 = require("react");
|
|
7
|
+
const presets_labels_1 = require("../../helpers/presets-labels");
|
|
6
8
|
const Checkmark_1 = require("../../icons/Checkmark");
|
|
7
9
|
const Checkbox_1 = require("../Checkbox");
|
|
8
10
|
const is_menu_item_1 = require("../Menu/is-menu-item");
|
|
@@ -15,13 +17,21 @@ const container = {
|
|
|
15
17
|
flex: 1,
|
|
16
18
|
overflowY: 'auto',
|
|
17
19
|
};
|
|
18
|
-
const RenderModalAdvanced = ({ renderMode, maxConcurrency, minConcurrency, setConcurrency, concurrency, setVerboseLogging, verbose, delayRenderTimeout, setDelayRenderTimeout, disallowParallelEncoding, setDisallowParallelEncoding, setDisableWebSecurity, setIgnoreCertificateErrors, setHeadless, headless, ignoreCertificateErrors, disableWebSecurity, openGlOption, setOpenGlOption, setEnvVariables, envVariables, }) => {
|
|
20
|
+
const RenderModalAdvanced = ({ renderMode, maxConcurrency, minConcurrency, setConcurrency, concurrency, setVerboseLogging, verbose, delayRenderTimeout, setDelayRenderTimeout, disallowParallelEncoding, setDisallowParallelEncoding, setDisableWebSecurity, setIgnoreCertificateErrors, setHeadless, headless, ignoreCertificateErrors, disableWebSecurity, openGlOption, setOpenGlOption, setEnvVariables, envVariables, setx264Preset, x264Preset, codec, offthreadVideoCacheSizeInBytes, setOffthreadVideoCacheSizeInBytes, }) => {
|
|
19
21
|
const extendedOpenGlOptions = (0, react_1.useMemo)(() => {
|
|
20
22
|
return ['angle', 'egl', 'swangle', 'swiftshader', 'default'];
|
|
21
23
|
}, []);
|
|
22
24
|
const onVerboseLoggingChanged = (0, react_1.useCallback)((e) => {
|
|
23
25
|
setVerboseLogging(e.target.checked);
|
|
24
26
|
}, [setVerboseLogging]);
|
|
27
|
+
const toggleCustomOffthreadVideoCacheSizeInBytes = (0, react_1.useCallback)(() => {
|
|
28
|
+
setOffthreadVideoCacheSizeInBytes((previous) => {
|
|
29
|
+
if (previous === null) {
|
|
30
|
+
return 512 * 1024 * 1024;
|
|
31
|
+
}
|
|
32
|
+
return null;
|
|
33
|
+
});
|
|
34
|
+
}, [setOffthreadVideoCacheSizeInBytes]);
|
|
25
35
|
const onDisallowParallelEncodingChanged = (0, react_1.useCallback)((e) => {
|
|
26
36
|
setDisallowParallelEncoding(e.target.checked);
|
|
27
37
|
}, [setDisallowParallelEncoding]);
|
|
@@ -50,10 +60,39 @@ const RenderModalAdvanced = ({ renderMode, maxConcurrency, minConcurrency, setCo
|
|
|
50
60
|
};
|
|
51
61
|
});
|
|
52
62
|
}, [extendedOpenGlOptions, openGlOption, setOpenGlOption]);
|
|
53
|
-
|
|
63
|
+
const x264PresetOptions = (0, react_1.useMemo)(() => {
|
|
64
|
+
return client_1.BrowserSafeApis.x264PresetOptions.map((option) => {
|
|
65
|
+
return {
|
|
66
|
+
label: (0, presets_labels_1.labelx264Preset)(option),
|
|
67
|
+
onClick: () => setx264Preset(option),
|
|
68
|
+
key: option,
|
|
69
|
+
selected: x264Preset === option,
|
|
70
|
+
type: 'item',
|
|
71
|
+
id: option,
|
|
72
|
+
keyHint: null,
|
|
73
|
+
leftItem: null,
|
|
74
|
+
quickSwitcherLabel: null,
|
|
75
|
+
subMenu: null,
|
|
76
|
+
value: option,
|
|
77
|
+
};
|
|
78
|
+
});
|
|
79
|
+
}, [setx264Preset, x264Preset]);
|
|
80
|
+
const changeOffthreadVideoCacheSizeInBytes = (0, react_1.useCallback)((cb) => {
|
|
81
|
+
setOffthreadVideoCacheSizeInBytes((prev) => {
|
|
82
|
+
if (prev === null) {
|
|
83
|
+
throw new TypeError('Expected previous value');
|
|
84
|
+
}
|
|
85
|
+
if (typeof cb === 'function') {
|
|
86
|
+
return cb(prev);
|
|
87
|
+
}
|
|
88
|
+
return cb;
|
|
89
|
+
});
|
|
90
|
+
}, [setOffthreadVideoCacheSizeInBytes]);
|
|
91
|
+
return ((0, jsx_runtime_1.jsxs)("div", { style: container, className: is_menu_item_1.VERTICAL_SCROLLBAR_CLASSNAME, children: [renderMode === 'video' && codec === 'h264' ? ((0, jsx_runtime_1.jsxs)("div", { style: layout_1.optionRow, children: [(0, jsx_runtime_1.jsx)("div", { style: layout_1.label, children: "x264 Preset" }), (0, jsx_runtime_1.jsx)("div", { style: layout_1.rightRow, children: (0, jsx_runtime_1.jsx)(ComboBox_1.Combobox, { title: x264Preset, selectedId: x264Preset, values: x264PresetOptions }) })] })) : null, renderMode === 'still' ? null : ((0, jsx_runtime_1.jsx)(NumberSetting_1.NumberSetting, { min: minConcurrency, max: maxConcurrency, step: 1, name: "Concurrency", formatter: (w) => `${w}x`, onValueChanged: setConcurrency, value: concurrency })), (0, jsx_runtime_1.jsx)(NumberSetting_1.NumberSetting
|
|
54
92
|
// Also appears in packages/renderer/src/validate-puppeteer-timeout.ts
|
|
55
93
|
, {
|
|
56
94
|
// Also appears in packages/renderer/src/validate-puppeteer-timeout.ts
|
|
57
|
-
min: 7000, max: 900000, name: "delayRender() timeout", onValueChanged: setDelayRenderTimeout, formatter: (w) => `${w}ms`, step: 1000, value: delayRenderTimeout }), (0, jsx_runtime_1.jsxs)("div", { style: layout_1.optionRow, children: [(0, jsx_runtime_1.jsx)("div", { style: layout_1.label, children: "No parallel encoding" }), (0, jsx_runtime_1.jsx)("div", { style: layout_1.rightRow, children: (0, jsx_runtime_1.jsx)(Checkbox_1.Checkbox, { checked: disallowParallelEncoding, onChange: onDisallowParallelEncodingChanged, name: "disallow-parallel-encoding" }) })] }),
|
|
95
|
+
min: 7000, max: 900000, name: "delayRender() timeout", onValueChanged: setDelayRenderTimeout, formatter: (w) => `${w}ms`, step: 1000, value: delayRenderTimeout }), (0, jsx_runtime_1.jsxs)("div", { style: layout_1.optionRow, children: [(0, jsx_runtime_1.jsx)("div", { style: layout_1.label, children: "No parallel encoding" }), (0, jsx_runtime_1.jsx)("div", { style: layout_1.rightRow, children: (0, jsx_runtime_1.jsx)(Checkbox_1.Checkbox, { checked: disallowParallelEncoding, onChange: onDisallowParallelEncodingChanged, name: "disallow-parallel-encoding" }) })] }), renderMode === 'audio' ? null : ((0, jsx_runtime_1.jsxs)("div", { style: layout_1.optionRow, children: [(0, jsx_runtime_1.jsx)("div", { style: layout_1.label, children: "Custom OffthreadVideo cache" }), (0, jsx_runtime_1.jsx)("div", { style: layout_1.rightRow, children: (0, jsx_runtime_1.jsx)(Checkbox_1.Checkbox, { checked: offthreadVideoCacheSizeInBytes !== null, onChange: toggleCustomOffthreadVideoCacheSizeInBytes, name: "custom-audio-bitrate" }) })] })), renderMode === 'audio' ||
|
|
96
|
+
offthreadVideoCacheSizeInBytes === null ? null : ((0, jsx_runtime_1.jsx)(NumberSetting_1.NumberSetting, { min: minConcurrency, max: 2000 * 1024 * 1024, step: 1024, name: "OffthreadVideo cache size", formatter: (w) => `${w} bytes`, onValueChanged: changeOffthreadVideoCacheSizeInBytes, value: offthreadVideoCacheSizeInBytes })), (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, name: "verbose-logging" }) })] }), (0, jsx_runtime_1.jsx)(RenderModalHr_1.RenderModalHr, {}), (0, jsx_runtime_1.jsxs)("div", { style: layout_1.optionRow, children: [(0, jsx_runtime_1.jsx)("div", { style: layout_1.label, children: "Disable web security" }), (0, jsx_runtime_1.jsx)("div", { style: layout_1.rightRow, children: (0, jsx_runtime_1.jsx)(Checkbox_1.Checkbox, { checked: disableWebSecurity, onChange: onDisableWebSecurityChanged, name: "disable-web-security" }) })] }), (0, jsx_runtime_1.jsxs)("div", { style: layout_1.optionRow, children: [(0, jsx_runtime_1.jsx)("div", { style: layout_1.label, children: "Ignore certificate errors " }), (0, jsx_runtime_1.jsx)("div", { style: layout_1.rightRow, children: (0, jsx_runtime_1.jsx)(Checkbox_1.Checkbox, { checked: ignoreCertificateErrors, onChange: onIgnoreCertificatErrors, name: "ignore-certificate-errors" }) })] }), (0, jsx_runtime_1.jsxs)("div", { style: layout_1.optionRow, children: [(0, jsx_runtime_1.jsx)("div", { style: layout_1.label, children: "Headless mode" }), (0, jsx_runtime_1.jsx)("div", { style: layout_1.rightRow, children: (0, jsx_runtime_1.jsx)(Checkbox_1.Checkbox, { checked: headless, onChange: onHeadless, name: "headless" }) })] }), (0, jsx_runtime_1.jsxs)("div", { style: layout_1.optionRow, children: [(0, jsx_runtime_1.jsx)("div", { style: layout_1.label, children: "OpenGL render backend" }), (0, jsx_runtime_1.jsx)("div", { style: layout_1.rightRow, children: (0, jsx_runtime_1.jsx)(ComboBox_1.Combobox, { values: openGlOptions, selectedId: openGlOption, title: "OpenGl option" }) })] }), (0, jsx_runtime_1.jsx)(RenderModalHr_1.RenderModalHr, {}), (0, jsx_runtime_1.jsx)(RenderModalEnvironmentVariables_1.RenderModalEnvironmentVariables, { envVariables: envVariables, setEnvVariables: setEnvVariables })] }));
|
|
58
97
|
};
|
|
59
98
|
exports.RenderModalAdvanced = RenderModalAdvanced;
|
|
@@ -75,6 +75,6 @@ const RenderModalBasic = ({ renderMode, imageFormatOptions, outName, codec, setV
|
|
|
75
75
|
const onValueChange = (0, react_1.useCallback)((e) => {
|
|
76
76
|
setOutName(e.target.value);
|
|
77
77
|
}, [setOutName]);
|
|
78
|
-
return ((0, jsx_runtime_1.jsxs)("div", { style: container, children: [renderMode === 'still' ? ((0, jsx_runtime_1.jsxs)("div", { style: layout_2.optionRow, children: [(0, jsx_runtime_1.jsx)("div", { style: layout_2.label, children: "Format" }), (0, jsx_runtime_1.jsx)("div", { style: layout_2.rightRow, children: (0, jsx_runtime_1.jsx)(SegmentedControl_1.SegmentedControl, { items: imageFormatOptions, needsWrapping: true }) })] })) : ((0, jsx_runtime_1.jsxs)("div", { style: layout_2.optionRow, children: [(0, jsx_runtime_1.jsxs)("div", { style: layout_2.label, children: ["Codec", (0, jsx_runtime_1.jsx)(layout_1.Spacing, { x: 0.5 }), (0, jsx_runtime_1.jsx)(InfoBubble_1.InfoBubble, { title: "Learn more about this option", children: (0, jsx_runtime_1.jsx)(OptionExplainer_1.OptionExplainer, { option: client_1.BrowserSafeApis.options.videoCodecOption }) })] }), (0, jsx_runtime_1.jsx)("div", { style: layout_2.rightRow, children: (0, jsx_runtime_1.jsx)(ComboBox_1.Combobox, { values: videoCodecOptions, selectedId: codec, title: "Codec" }) })] })), renderMode === 'still' && resolvedComposition.durationInFrames > 1 ? ((0, jsx_runtime_1.jsxs)("div", { style: layout_2.optionRow, children: [(0, jsx_runtime_1.jsx)("div", { style: layout_2.label, children: "Frame" }), (0, jsx_runtime_1.jsx)("div", { style: layout_2.rightRow, children: (0, jsx_runtime_1.jsx)(RemInput_1.RightAlignInput, { children: (0, jsx_runtime_1.jsx)(InputDragger_1.InputDragger, { value: frame, onTextChange: onFrameChanged, placeholder: `0-${resolvedComposition.durationInFrames - 1}`, onValueChange: onFrameSetDirectly, name: "frame", step: 1, min: 0, status: "ok", max: resolvedComposition.durationInFrames - 1, rightAlign: true }) }) })] })) : null, renderMode === 'video' && codec === 'prores' ? ((0, jsx_runtime_1.jsxs)("div", { style: layout_2.optionRow, children: [(0, jsx_runtime_1.jsx)("div", { style: layout_2.label, children: "ProRes profile" }), (0, jsx_runtime_1.jsx)("div", { style: layout_2.rightRow, children: (0, jsx_runtime_1.jsx)(ComboBox_1.Combobox, { title: proResProfile, selectedId: proResProfile, values: proResProfileOptions }) })] })) : null, renderMode === 'still' ? null : ((0, jsx_runtime_1.jsx)(FrameRangeSetting_1.FrameRangeSetting, { durationInFrames: resolvedComposition.durationInFrames, endFrame: endFrame, setEndFrame: setEndFrame, setStartFrame: setStartFrame, startFrame: startFrame })), (0, jsx_runtime_1.jsx)(RenderModalInput_1.RenderModalInput, { existence: existence, inputStyle: layout_2.input, outName: outName, onValueChange: onValueChange, validationMessage: validationMessage })] }));
|
|
78
|
+
return ((0, jsx_runtime_1.jsxs)("div", { style: container, children: [renderMode === 'still' ? ((0, jsx_runtime_1.jsxs)("div", { style: layout_2.optionRow, children: [(0, jsx_runtime_1.jsx)("div", { style: layout_2.label, children: "Format" }), (0, jsx_runtime_1.jsx)("div", { style: layout_2.rightRow, children: (0, jsx_runtime_1.jsx)(SegmentedControl_1.SegmentedControl, { items: imageFormatOptions, needsWrapping: true }) })] })) : ((0, jsx_runtime_1.jsxs)("div", { style: layout_2.optionRow, children: [(0, jsx_runtime_1.jsxs)("div", { style: layout_2.label, children: ["Codec", (0, jsx_runtime_1.jsx)(layout_1.Spacing, { x: 0.5 }), (0, jsx_runtime_1.jsx)(InfoBubble_1.InfoBubble, { title: "Learn more about this option", children: (0, jsx_runtime_1.jsx)(OptionExplainer_1.OptionExplainer, { option: client_1.BrowserSafeApis.options.videoCodecOption }) })] }), (0, jsx_runtime_1.jsx)("div", { style: layout_2.rightRow, children: (0, jsx_runtime_1.jsx)(ComboBox_1.Combobox, { values: videoCodecOptions, selectedId: codec, title: "Codec" }) })] })), renderMode === 'still' && resolvedComposition.durationInFrames > 1 ? ((0, jsx_runtime_1.jsxs)("div", { style: layout_2.optionRow, children: [(0, jsx_runtime_1.jsx)("div", { style: layout_2.label, children: "Frame" }), (0, jsx_runtime_1.jsx)("div", { style: layout_2.rightRow, children: (0, jsx_runtime_1.jsx)(RemInput_1.RightAlignInput, { children: (0, jsx_runtime_1.jsx)(InputDragger_1.InputDragger, { value: frame, onTextChange: onFrameChanged, placeholder: `0-${resolvedComposition.durationInFrames - 1}`, onValueChange: onFrameSetDirectly, name: "frame", step: 1, min: 0, status: "ok", max: resolvedComposition.durationInFrames - 1, rightAlign: true }) }) })] })) : null, renderMode === 'video' && codec === 'prores' ? ((0, jsx_runtime_1.jsxs)("div", { style: layout_2.optionRow, children: [(0, jsx_runtime_1.jsx)("div", { style: layout_2.label, children: "ProRes profile" }), (0, jsx_runtime_1.jsx)("div", { style: layout_2.rightRow, children: (0, jsx_runtime_1.jsx)(ComboBox_1.Combobox, { title: 'proResProfile', selectedId: proResProfile, values: proResProfileOptions }) })] })) : null, renderMode === 'still' ? null : ((0, jsx_runtime_1.jsx)(FrameRangeSetting_1.FrameRangeSetting, { durationInFrames: resolvedComposition.durationInFrames, endFrame: endFrame, setEndFrame: setEndFrame, setStartFrame: setStartFrame, startFrame: startFrame })), (0, jsx_runtime_1.jsx)(RenderModalInput_1.RenderModalInput, { existence: existence, inputStyle: layout_2.input, outName: outName, onValueChange: onValueChange, validationMessage: validationMessage })] }));
|
|
79
79
|
};
|
|
80
80
|
exports.RenderModalBasic = RenderModalBasic;
|
|
@@ -3,7 +3,7 @@ import React from 'react';
|
|
|
3
3
|
import type { SegmentedControlItem } from '../SegmentedControl';
|
|
4
4
|
import type { RenderType } from './RenderModalAdvanced';
|
|
5
5
|
declare const qualityControlModes: readonly ["crf", "bitrate"];
|
|
6
|
-
export type QualityControl = typeof qualityControlModes[number];
|
|
6
|
+
export type QualityControl = (typeof qualityControlModes)[number];
|
|
7
7
|
export declare const RenderModalPicture: React.FC<{
|
|
8
8
|
renderMode: RenderType;
|
|
9
9
|
scale: number;
|
|
@@ -58,7 +58,7 @@ const ZodDiscriminatedUnionEditor = ({ schema, setValue, showSaveButton, saving,
|
|
|
58
58
|
return {
|
|
59
59
|
discriminator: typedSchema.discriminator,
|
|
60
60
|
markup: ((0, jsx_runtime_1.jsxs)(Fieldset_1.Fieldset, { shouldPad: mayPad, success: true, children: [(0, jsx_runtime_1.jsx)(SchemaLabel_1.SchemaLabel, { isDefaultValue: localValue.value[typedSchema.discriminator] ===
|
|
61
|
-
defaultValue[typedSchema.discriminator], jsonPath: [...jsonPath, typedSchema.discriminator], onRemove: onRemove, onReset: reset, onSave: save, saveDisabledByParent: saveDisabledByParent, saving: saving, showSaveButton: showSaveButton, suffix: null, valid: localValue.zodValidation.success }), (0, jsx_runtime_1.jsx)(ComboBox_1.Combobox, { title: "Select type", values: comboBoxValues, selectedId: value[typedSchema.discriminator] })] })),
|
|
61
|
+
defaultValue[typedSchema.discriminator], jsonPath: [...jsonPath, typedSchema.discriminator], onRemove: onRemove, onReset: reset, onSave: save, saveDisabledByParent: saveDisabledByParent, saving: saving, showSaveButton: showSaveButton, suffix: null, valid: localValue.zodValidation.success }), (0, jsx_runtime_1.jsx)(ComboBox_1.Combobox, { title: "Select type", values: comboBoxValues, selectedId: value[typedSchema.discriminator] })] }, 'replacement')),
|
|
62
62
|
};
|
|
63
63
|
}, [
|
|
64
64
|
comboBoxValues,
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export type SerializedJSONWithCustomFields = {
|
|
2
|
+
serializedString: string;
|
|
3
|
+
customDateUsed: boolean;
|
|
4
|
+
customFileUsed: boolean;
|
|
5
|
+
mapUsed: boolean;
|
|
6
|
+
setUsed: boolean;
|
|
7
|
+
};
|
|
8
|
+
export declare const FILE_TOKEN = "remotion-file:";
|
|
9
|
+
export declare const serializeJSONWithDate: ({ data, indent, staticBase, }: {
|
|
10
|
+
data: unknown;
|
|
11
|
+
indent: number | undefined;
|
|
12
|
+
staticBase: string;
|
|
13
|
+
}) => SerializedJSONWithCustomFields;
|
|
14
|
+
export declare const deserializeJSONWithCustomFields: (data: string) => any;
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.deserializeJSONWithCustomFields = exports.serializeJSONWithDate = exports.FILE_TOKEN = void 0;
|
|
4
|
+
const DATE_TOKEN = 'remotion-date:';
|
|
5
|
+
exports.FILE_TOKEN = 'remotion-file:';
|
|
6
|
+
const serializeJSONWithDate = ({ data, indent, staticBase, }) => {
|
|
7
|
+
let customDateUsed = false;
|
|
8
|
+
let customFileUsed = false;
|
|
9
|
+
let mapUsed = false;
|
|
10
|
+
let setUsed = false;
|
|
11
|
+
const serializedString = JSON.stringify(data, function (key, value) {
|
|
12
|
+
const item = this[key];
|
|
13
|
+
if (item instanceof Date) {
|
|
14
|
+
customDateUsed = true;
|
|
15
|
+
return `${DATE_TOKEN}${item.toISOString()}`;
|
|
16
|
+
}
|
|
17
|
+
if (item instanceof Map) {
|
|
18
|
+
mapUsed = true;
|
|
19
|
+
return value;
|
|
20
|
+
}
|
|
21
|
+
if (item instanceof Set) {
|
|
22
|
+
setUsed = true;
|
|
23
|
+
return value;
|
|
24
|
+
}
|
|
25
|
+
if (typeof item === 'string' && item.startsWith(staticBase)) {
|
|
26
|
+
customFileUsed = true;
|
|
27
|
+
return `${exports.FILE_TOKEN}${item.replace(staticBase + '/', '')}`;
|
|
28
|
+
}
|
|
29
|
+
return value;
|
|
30
|
+
}, indent);
|
|
31
|
+
return { serializedString, customDateUsed, customFileUsed, mapUsed, setUsed };
|
|
32
|
+
};
|
|
33
|
+
exports.serializeJSONWithDate = serializeJSONWithDate;
|
|
34
|
+
const deserializeJSONWithCustomFields = (data) => {
|
|
35
|
+
return JSON.parse(data, (_, value) => {
|
|
36
|
+
if (typeof value === 'string' && value.startsWith(DATE_TOKEN)) {
|
|
37
|
+
return new Date(value.replace(DATE_TOKEN, ''));
|
|
38
|
+
}
|
|
39
|
+
return value;
|
|
40
|
+
});
|
|
41
|
+
};
|
|
42
|
+
exports.deserializeJSONWithCustomFields = deserializeJSONWithCustomFields;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import type { Codec } from '@remotion/renderer';
|
|
2
|
-
export declare const humanReadableCodec: (codec: Codec) => "
|
|
2
|
+
export declare const humanReadableCodec: (codec: Codec) => "AAC" | "MP3" | "GIF" | "H.264" | "H.264 Matroska" | "H.265" | "ProRes" | "WebM VP8" | "WebM VP9" | "Waveform" | undefined;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import type { AudioCodec, Codec, PixelFormat, ProResProfile, StillImageFormat, VideoImageFormat } from '@remotion/renderer';
|
|
1
|
+
import type { AudioCodec, Codec, PixelFormat, ProResProfile, StillImageFormat, VideoImageFormat, X264Preset } from '@remotion/renderer';
|
|
2
2
|
import type { RenderJob } from '../../../preview-server/render-queue/job';
|
|
3
3
|
import type { RequiredChromiumOptions } from '../../../required-chromium-options';
|
|
4
4
|
import type { EnumPath } from '../RenderModal/SchemaEditor/extract-enum-json-paths';
|
|
5
|
-
export declare const addStillRenderJob: ({ compositionId, outName, imageFormat, jpegQuality, frame, scale, verbose, chromiumOptions, delayRenderTimeout, envVariables, inputProps, }: {
|
|
5
|
+
export declare const addStillRenderJob: ({ compositionId, outName, imageFormat, jpegQuality, frame, scale, verbose, chromiumOptions, delayRenderTimeout, envVariables, inputProps, offthreadVideoCacheSizeInBytes, }: {
|
|
6
6
|
compositionId: string;
|
|
7
7
|
outName: string;
|
|
8
8
|
imageFormat: StillImageFormat;
|
|
@@ -14,8 +14,9 @@ export declare const addStillRenderJob: ({ compositionId, outName, imageFormat,
|
|
|
14
14
|
delayRenderTimeout: number;
|
|
15
15
|
envVariables: Record<string, string>;
|
|
16
16
|
inputProps: Record<string, unknown>;
|
|
17
|
+
offthreadVideoCacheSizeInBytes: number | null;
|
|
17
18
|
}) => Promise<undefined>;
|
|
18
|
-
export declare const addVideoRenderJob: ({ compositionId, outName, imageFormat, jpegQuality, scale, verbose, codec, concurrency, crf, startFrame, endFrame, muted, enforceAudioTrack, proResProfile, pixelFormat, audioBitrate, videoBitrate, everyNthFrame, numberOfGifLoops, delayRenderTimeout, audioCodec, disallowParallelEncoding, chromiumOptions, envVariables, inputProps, }: {
|
|
19
|
+
export declare const addVideoRenderJob: ({ compositionId, outName, imageFormat, jpegQuality, scale, verbose, codec, concurrency, crf, startFrame, endFrame, muted, enforceAudioTrack, proResProfile, x264Preset, pixelFormat, audioBitrate, videoBitrate, everyNthFrame, numberOfGifLoops, delayRenderTimeout, audioCodec, disallowParallelEncoding, chromiumOptions, envVariables, inputProps, offthreadVideoCacheSizeInBytes, }: {
|
|
19
20
|
compositionId: string;
|
|
20
21
|
outName: string;
|
|
21
22
|
imageFormat: VideoImageFormat;
|
|
@@ -30,6 +31,7 @@ export declare const addVideoRenderJob: ({ compositionId, outName, imageFormat,
|
|
|
30
31
|
muted: boolean;
|
|
31
32
|
enforceAudioTrack: boolean;
|
|
32
33
|
proResProfile: ProResProfile | null;
|
|
34
|
+
x264Preset: X264Preset | null;
|
|
33
35
|
pixelFormat: PixelFormat;
|
|
34
36
|
audioBitrate: string | null;
|
|
35
37
|
videoBitrate: string | null;
|
|
@@ -41,6 +43,7 @@ export declare const addVideoRenderJob: ({ compositionId, outName, imageFormat,
|
|
|
41
43
|
chromiumOptions: RequiredChromiumOptions;
|
|
42
44
|
envVariables: Record<string, string>;
|
|
43
45
|
inputProps: Record<string, unknown>;
|
|
46
|
+
offthreadVideoCacheSizeInBytes: number | null;
|
|
44
47
|
}) => Promise<undefined>;
|
|
45
48
|
export declare const unsubscribeFromFileExistenceWatcher: ({ file, clientId, }: {
|
|
46
49
|
file: string;
|
|
@@ -26,7 +26,7 @@ const callApi = (endpoint, body, signal) => {
|
|
|
26
26
|
});
|
|
27
27
|
});
|
|
28
28
|
};
|
|
29
|
-
const addStillRenderJob = ({ compositionId, outName, imageFormat, jpegQuality, frame, scale, verbose, chromiumOptions, delayRenderTimeout, envVariables, inputProps, }) => {
|
|
29
|
+
const addStillRenderJob = ({ compositionId, outName, imageFormat, jpegQuality, frame, scale, verbose, chromiumOptions, delayRenderTimeout, envVariables, inputProps, offthreadVideoCacheSizeInBytes, }) => {
|
|
30
30
|
return callApi('/api/render', {
|
|
31
31
|
compositionId,
|
|
32
32
|
type: 'still',
|
|
@@ -44,10 +44,11 @@ const addStillRenderJob = ({ compositionId, outName, imageFormat, jpegQuality, f
|
|
|
44
44
|
staticBase: window.remotion_staticBase,
|
|
45
45
|
indent: undefined,
|
|
46
46
|
}).serializedString,
|
|
47
|
+
offthreadVideoCacheSizeInBytes,
|
|
47
48
|
});
|
|
48
49
|
};
|
|
49
50
|
exports.addStillRenderJob = addStillRenderJob;
|
|
50
|
-
const addVideoRenderJob = ({ compositionId, outName, imageFormat, jpegQuality, scale, verbose, codec, concurrency, crf, startFrame, endFrame, muted, enforceAudioTrack, proResProfile, pixelFormat, audioBitrate, videoBitrate, everyNthFrame, numberOfGifLoops, delayRenderTimeout, audioCodec, disallowParallelEncoding, chromiumOptions, envVariables, inputProps, }) => {
|
|
51
|
+
const addVideoRenderJob = ({ compositionId, outName, imageFormat, jpegQuality, scale, verbose, codec, concurrency, crf, startFrame, endFrame, muted, enforceAudioTrack, proResProfile, x264Preset, pixelFormat, audioBitrate, videoBitrate, everyNthFrame, numberOfGifLoops, delayRenderTimeout, audioCodec, disallowParallelEncoding, chromiumOptions, envVariables, inputProps, offthreadVideoCacheSizeInBytes, }) => {
|
|
51
52
|
return callApi('/api/render', {
|
|
52
53
|
compositionId,
|
|
53
54
|
type: 'video',
|
|
@@ -64,6 +65,7 @@ const addVideoRenderJob = ({ compositionId, outName, imageFormat, jpegQuality, s
|
|
|
64
65
|
muted,
|
|
65
66
|
enforceAudioTrack,
|
|
66
67
|
proResProfile,
|
|
68
|
+
x264Preset,
|
|
67
69
|
pixelFormat,
|
|
68
70
|
audioBitrate,
|
|
69
71
|
videoBitrate,
|
|
@@ -79,6 +81,7 @@ const addVideoRenderJob = ({ compositionId, outName, imageFormat, jpegQuality, s
|
|
|
79
81
|
staticBase: window.remotion_staticBase,
|
|
80
82
|
indent: undefined,
|
|
81
83
|
}).serializedString,
|
|
84
|
+
offthreadVideoCacheSizeInBytes,
|
|
82
85
|
});
|
|
83
86
|
};
|
|
84
87
|
exports.addVideoRenderJob = addVideoRenderJob;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
type SidebarPanel = 'input-props' | 'renders';
|
|
3
|
+
export declare const persistSelectedPanel: (panel: SidebarPanel) => void;
|
|
4
|
+
export declare const rightSidebarTabs: React.RefObject<{
|
|
5
|
+
selectRendersPanel: () => void;
|
|
6
|
+
}>;
|
|
7
|
+
export declare const RightPanel: React.FC<{}>;
|
|
8
|
+
export {};
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.RightPanel = exports.rightSidebarTabs = exports.persistSelectedPanel = void 0;
|
|
4
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
+
const react_1 = require("react");
|
|
6
|
+
const remotion_1 = require("remotion");
|
|
7
|
+
const colors_1 = require("../helpers/colors");
|
|
8
|
+
const DataEditor_1 = require("./RenderModal/DataEditor");
|
|
9
|
+
const RenderQueue_1 = require("./RenderQueue");
|
|
10
|
+
const RendersTab_1 = require("./RendersTab");
|
|
11
|
+
const Tabs_1 = require("./Tabs");
|
|
12
|
+
const container = {
|
|
13
|
+
height: '100%',
|
|
14
|
+
width: '100%',
|
|
15
|
+
position: 'absolute',
|
|
16
|
+
display: 'flex',
|
|
17
|
+
flexDirection: 'column',
|
|
18
|
+
};
|
|
19
|
+
const PropsEditor = ({ composition }) => {
|
|
20
|
+
const { props, updateProps } = (0, react_1.useContext)(remotion_1.Internals.EditorPropsContext);
|
|
21
|
+
const setInputProps = (0, react_1.useCallback)((newProps) => {
|
|
22
|
+
updateProps({
|
|
23
|
+
id: composition.id,
|
|
24
|
+
defaultProps: composition.defaultProps,
|
|
25
|
+
newProps,
|
|
26
|
+
});
|
|
27
|
+
}, [composition.defaultProps, composition.id, updateProps]);
|
|
28
|
+
const actualProps = (0, react_1.useMemo)(() => { var _a, _b; return (_b = (_a = props[composition.id]) !== null && _a !== void 0 ? _a : composition.defaultProps) !== null && _b !== void 0 ? _b : {}; }, [composition.defaultProps, composition.id, props]);
|
|
29
|
+
return ((0, jsx_runtime_1.jsx)(DataEditor_1.DataEditor, { unresolvedComposition: composition, inputProps: actualProps, setInputProps: setInputProps, mayShowSaveButton: true, propsEditType: "default-props" }, composition.id));
|
|
30
|
+
};
|
|
31
|
+
const localStorageKey = 'remotion.sidebarPanel';
|
|
32
|
+
const getSelectedPanel = () => {
|
|
33
|
+
const panel = localStorage.getItem(localStorageKey);
|
|
34
|
+
if (panel === 'renders') {
|
|
35
|
+
return 'renders';
|
|
36
|
+
}
|
|
37
|
+
return 'input-props';
|
|
38
|
+
};
|
|
39
|
+
const tabsContainer = {
|
|
40
|
+
backgroundColor: colors_1.BACKGROUND,
|
|
41
|
+
};
|
|
42
|
+
const persistSelectedPanel = (panel) => {
|
|
43
|
+
localStorage.setItem(localStorageKey, panel);
|
|
44
|
+
};
|
|
45
|
+
exports.persistSelectedPanel = persistSelectedPanel;
|
|
46
|
+
exports.rightSidebarTabs = (0, react_1.createRef)();
|
|
47
|
+
const RightPanel = () => {
|
|
48
|
+
const [panel, setPanel] = (0, react_1.useState)(() => getSelectedPanel());
|
|
49
|
+
const onCompositionsSelected = (0, react_1.useCallback)(() => {
|
|
50
|
+
setPanel('input-props');
|
|
51
|
+
(0, exports.persistSelectedPanel)('input-props');
|
|
52
|
+
}, []);
|
|
53
|
+
const onRendersSelected = (0, react_1.useCallback)(() => {
|
|
54
|
+
setPanel('renders');
|
|
55
|
+
(0, exports.persistSelectedPanel)('renders');
|
|
56
|
+
}, []);
|
|
57
|
+
(0, react_1.useImperativeHandle)(exports.rightSidebarTabs, () => {
|
|
58
|
+
return {
|
|
59
|
+
selectRendersPanel: () => {
|
|
60
|
+
setPanel('renders');
|
|
61
|
+
(0, exports.persistSelectedPanel)('renders');
|
|
62
|
+
},
|
|
63
|
+
};
|
|
64
|
+
}, []);
|
|
65
|
+
const { compositions, currentComposition } = (0, react_1.useContext)(remotion_1.Internals.CompositionManager);
|
|
66
|
+
const composition = (0, react_1.useMemo)(() => {
|
|
67
|
+
for (const comp of compositions) {
|
|
68
|
+
if (comp.id === currentComposition) {
|
|
69
|
+
return comp;
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
return null;
|
|
73
|
+
}, [compositions, currentComposition]);
|
|
74
|
+
if (composition === null) {
|
|
75
|
+
return null;
|
|
76
|
+
}
|
|
77
|
+
return ((0, jsx_runtime_1.jsxs)("div", { style: container, className: "css-reset", children: [(0, jsx_runtime_1.jsx)("div", { style: tabsContainer, children: (0, jsx_runtime_1.jsxs)(Tabs_1.Tabs, { children: [(0, jsx_runtime_1.jsx)(Tabs_1.Tab, { selected: panel === 'input-props', onClick: onCompositionsSelected, children: "Props" }), (0, jsx_runtime_1.jsx)(RendersTab_1.RendersTab, { onClick: onRendersSelected, selected: panel === 'renders' })] }) }), panel === 'renders' ? ((0, jsx_runtime_1.jsx)(RenderQueue_1.RenderQueue, {})) : ((0, jsx_runtime_1.jsx)(PropsEditor, { composition: composition }))] }));
|
|
78
|
+
};
|
|
79
|
+
exports.RightPanel = RightPanel;
|
|
@@ -61,6 +61,7 @@ const SidebarRenderButton = ({ composition, visible }) => {
|
|
|
61
61
|
initialMuted: defaults.muted,
|
|
62
62
|
initialEnforceAudioTrack: defaults.enforceAudioTrack,
|
|
63
63
|
initialProResProfile: defaults.proResProfile,
|
|
64
|
+
initialx264Preset: defaults.x264Preset,
|
|
64
65
|
initialPixelFormat: defaults.pixelFormat,
|
|
65
66
|
initialAudioBitrate: defaults.audioBitrate,
|
|
66
67
|
initialVideoBitrate: defaults.videoBitrate,
|
|
@@ -72,12 +73,19 @@ const SidebarRenderButton = ({ composition, visible }) => {
|
|
|
72
73
|
initialDisableWebSecurity: defaults.disableWebSecurity,
|
|
73
74
|
initialOpenGlRenderer: defaults.openGlRenderer,
|
|
74
75
|
initialHeadless: defaults.headless,
|
|
76
|
+
initialOffthreadVideoCacheSizeInBytes: defaults.offthreadVideoCacheSizeInBytes,
|
|
75
77
|
initialIgnoreCertificateErrors: defaults.ignoreCertificateErrors,
|
|
76
78
|
defaultProps: (_a = props[composition.id]) !== null && _a !== void 0 ? _a : composition.defaultProps,
|
|
77
79
|
inFrameMark: null,
|
|
78
80
|
outFrameMark: null,
|
|
79
81
|
});
|
|
80
|
-
}, [
|
|
82
|
+
}, [
|
|
83
|
+
composition.defaultProps,
|
|
84
|
+
composition.id,
|
|
85
|
+
isVideo,
|
|
86
|
+
props,
|
|
87
|
+
setSelectedModal,
|
|
88
|
+
]);
|
|
81
89
|
const renderAction = (0, react_1.useCallback)((color) => {
|
|
82
90
|
return (0, jsx_runtime_1.jsx)(render_1.ThinRenderIcon, { fill: color, svgProps: iconStyle });
|
|
83
91
|
}, [iconStyle]);
|
|
@@ -16,4 +16,4 @@ export declare const BLUE_DISABLED = "#284f73";
|
|
|
16
16
|
export declare const getBackgroundFromHoverState: ({ selected, hovered, }: {
|
|
17
17
|
selected: boolean;
|
|
18
18
|
hovered: boolean;
|
|
19
|
-
}) => "transparent" | "hsla(0, 0%, 100%, 0.15)" | "
|
|
19
|
+
}) => "transparent" | "hsla(0, 0%, 100%, 0.15)" | "rgba(255, 255, 255, 0.06)" | "hsla(0, 0%, 100%, 0.25)";
|
|
@@ -1,2 +1,8 @@
|
|
|
1
|
-
export declare const envVariablesObjectToArray: (envVariables: Record<string, string>) => [
|
|
2
|
-
|
|
1
|
+
export declare const envVariablesObjectToArray: (envVariables: Record<string, string>) => [
|
|
2
|
+
string,
|
|
3
|
+
string
|
|
4
|
+
][];
|
|
5
|
+
export declare const envVariablesArrayToObject: (envVariables: [
|
|
6
|
+
string,
|
|
7
|
+
string
|
|
8
|
+
][]) => Record<string, string>;
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.labelx264Preset = void 0;
|
|
4
|
+
const labelx264Preset = (profile) => {
|
|
5
|
+
if (profile === 'ultrafast') {
|
|
6
|
+
return 'ultrafast';
|
|
7
|
+
}
|
|
8
|
+
if (profile === 'superfast') {
|
|
9
|
+
return 'superfast';
|
|
10
|
+
}
|
|
11
|
+
if (profile === 'veryfast') {
|
|
12
|
+
return 'veryfast';
|
|
13
|
+
}
|
|
14
|
+
if (profile === 'faster') {
|
|
15
|
+
return 'faster';
|
|
16
|
+
}
|
|
17
|
+
if (profile === 'fast') {
|
|
18
|
+
return 'fast';
|
|
19
|
+
}
|
|
20
|
+
if (profile === 'medium') {
|
|
21
|
+
return 'medium';
|
|
22
|
+
}
|
|
23
|
+
if (profile === 'slow') {
|
|
24
|
+
return 'slow';
|
|
25
|
+
}
|
|
26
|
+
if (profile === 'slower') {
|
|
27
|
+
return 'slower';
|
|
28
|
+
}
|
|
29
|
+
if (profile === 'veryslow') {
|
|
30
|
+
return 'veryslow';
|
|
31
|
+
}
|
|
32
|
+
if (profile === 'placebo') {
|
|
33
|
+
return 'placebo';
|
|
34
|
+
}
|
|
35
|
+
throw new TypeError(`Unknown x264 preset: ${profile}`);
|
|
36
|
+
};
|
|
37
|
+
exports.labelx264Preset = labelx264Preset;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { AudioCodec, Codec, OpenGlRenderer, PixelFormat, ProResProfile, StillImageFormat, VideoImageFormat } from '@remotion/renderer';
|
|
1
|
+
import type { AudioCodec, Codec, OpenGlRenderer, PixelFormat, ProResProfile, StillImageFormat, VideoImageFormat, X264Preset } from '@remotion/renderer';
|
|
2
2
|
import type React from 'react';
|
|
3
3
|
import type { QuickSwitcherMode } from '../components/QuickSwitcher/NoResults';
|
|
4
4
|
import type { RenderType } from '../components/RenderModal/RenderModalAdvanced';
|
|
@@ -22,6 +22,7 @@ export type RenderModalState = {
|
|
|
22
22
|
initialMuted: boolean;
|
|
23
23
|
initialEnforceAudioTrack: boolean;
|
|
24
24
|
initialProResProfile: ProResProfile;
|
|
25
|
+
initialx264Preset: X264Preset;
|
|
25
26
|
initialPixelFormat: PixelFormat;
|
|
26
27
|
initialVideoBitrate: string | null;
|
|
27
28
|
initialAudioBitrate: string | null;
|
|
@@ -33,6 +34,7 @@ export type RenderModalState = {
|
|
|
33
34
|
initialOpenGlRenderer: OpenGlRenderer | null;
|
|
34
35
|
initialIgnoreCertificateErrors: boolean;
|
|
35
36
|
initialHeadless: boolean;
|
|
37
|
+
initialOffthreadVideoCacheSizeInBytes: number | null;
|
|
36
38
|
minConcurrency: number;
|
|
37
39
|
maxConcurrency: number;
|
|
38
40
|
defaultProps: Record<string, unknown>;
|
|
@@ -16,6 +16,7 @@ export declare const getCliOptions: (options: {
|
|
|
16
16
|
crf: import("@remotion/renderer").Crf | null;
|
|
17
17
|
pixelFormat: "yuv420p" | "yuva420p" | "yuv422p" | "yuv444p" | "yuv420p10le" | "yuv422p10le" | "yuv444p10le" | "yuva444p10le";
|
|
18
18
|
proResProfile: "4444-xq" | "4444" | "hq" | "standard" | "light" | "proxy" | undefined;
|
|
19
|
+
x264Preset: "medium" | "ultrafast" | "superfast" | "veryfast" | "faster" | "fast" | "slow" | "slower" | "veryslow" | "placebo" | undefined;
|
|
19
20
|
everyNthFrame: number;
|
|
20
21
|
numberOfGifLoops: import("./config/number-of-gif-loops").Loop;
|
|
21
22
|
stillFrame: number;
|
|
@@ -33,5 +34,6 @@ export declare const getCliOptions: (options: {
|
|
|
33
34
|
videoBitrate: string | null;
|
|
34
35
|
height: number | null;
|
|
35
36
|
width: number | null;
|
|
36
|
-
configFileImageFormat: "
|
|
37
|
+
configFileImageFormat: "none" | "png" | "jpeg" | undefined;
|
|
38
|
+
offthreadVideoCacheSizeInBytes: number | null;
|
|
37
39
|
}>;
|
package/dist/get-cli-options.js
CHANGED
|
@@ -44,6 +44,10 @@ const getProResProfile = () => {
|
|
|
44
44
|
const proResProfile = config_1.ConfigInternals.getProResProfile();
|
|
45
45
|
return proResProfile;
|
|
46
46
|
};
|
|
47
|
+
const getx264Preset = () => {
|
|
48
|
+
const x264Preset = config_1.ConfigInternals.getPresetProfile();
|
|
49
|
+
return x264Preset;
|
|
50
|
+
};
|
|
47
51
|
const getAndValidateBrowser = async (browserExecutable) => {
|
|
48
52
|
const browser = getBrowser();
|
|
49
53
|
try {
|
|
@@ -71,6 +75,7 @@ const getCliOptions = async (options) => {
|
|
|
71
75
|
const videoBitrate = config_1.ConfigInternals.getVideoBitrate();
|
|
72
76
|
const pixelFormat = config_1.ConfigInternals.getPixelFormat();
|
|
73
77
|
const proResProfile = getProResProfile();
|
|
78
|
+
const x264Preset = getx264Preset();
|
|
74
79
|
const browserExecutable = config_1.ConfigInternals.getBrowserExecutable();
|
|
75
80
|
const scale = config_1.ConfigInternals.getScale();
|
|
76
81
|
const port = config_1.ConfigInternals.getServerPort();
|
|
@@ -99,6 +104,7 @@ const getCliOptions = async (options) => {
|
|
|
99
104
|
crf,
|
|
100
105
|
pixelFormat,
|
|
101
106
|
proResProfile,
|
|
107
|
+
x264Preset,
|
|
102
108
|
everyNthFrame,
|
|
103
109
|
numberOfGifLoops,
|
|
104
110
|
stillFrame: config_1.ConfigInternals.getStillFrame(),
|
|
@@ -117,6 +123,7 @@ const getCliOptions = async (options) => {
|
|
|
117
123
|
height,
|
|
118
124
|
width,
|
|
119
125
|
configFileImageFormat: config_1.ConfigInternals.getUserPreferredVideoImageFormat(),
|
|
126
|
+
offthreadVideoCacheSizeInBytes: config_1.ConfigInternals.getOffthreadVideoCacheSizeInBytes(),
|
|
120
127
|
};
|
|
121
128
|
};
|
|
122
129
|
exports.getCliOptions = getCliOptions;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { BrowserExecutable, ChromiumOptions, HeadlessBrowser, LogLevel, RemotionServer } from '@remotion/renderer';
|
|
2
2
|
import type { VideoConfig } from 'remotion';
|
|
3
|
-
export declare const getCompositionId: ({ args, compositionIdFromUi, serializedInputPropsWithCustomSchema, puppeteerInstance, envVariables, timeoutInMilliseconds, chromiumOptions, port, browserExecutable, serveUrlOrWebpackUrl, logLevel, indent, server, }: {
|
|
3
|
+
export declare const getCompositionId: ({ args, compositionIdFromUi, serializedInputPropsWithCustomSchema, puppeteerInstance, envVariables, timeoutInMilliseconds, chromiumOptions, port, browserExecutable, serveUrlOrWebpackUrl, logLevel, indent, server, offthreadVideoCacheSizeInBytes, }: {
|
|
4
4
|
args: string[];
|
|
5
5
|
compositionIdFromUi: string | null;
|
|
6
6
|
serializedInputPropsWithCustomSchema: string;
|
|
@@ -14,6 +14,7 @@ export declare const getCompositionId: ({ args, compositionIdFromUi, serializedI
|
|
|
14
14
|
logLevel: LogLevel;
|
|
15
15
|
indent: boolean;
|
|
16
16
|
server: RemotionServer;
|
|
17
|
+
offthreadVideoCacheSizeInBytes: number | null;
|
|
17
18
|
}) => Promise<{
|
|
18
19
|
compositionId: string;
|
|
19
20
|
reason: string;
|
|
@@ -16,7 +16,7 @@ const getCompName = ({ cliArgs, compositionIdFromUi, }) => {
|
|
|
16
16
|
const [compName, ...remainingArgs] = cliArgs;
|
|
17
17
|
return { compName, remainingArgs, reason: 'Passed as argument' };
|
|
18
18
|
};
|
|
19
|
-
const getCompositionId = async ({ args, compositionIdFromUi, serializedInputPropsWithCustomSchema, puppeteerInstance, envVariables, timeoutInMilliseconds, chromiumOptions, port, browserExecutable, serveUrlOrWebpackUrl, logLevel, indent, server, }) => {
|
|
19
|
+
const getCompositionId = async ({ args, compositionIdFromUi, serializedInputPropsWithCustomSchema, puppeteerInstance, envVariables, timeoutInMilliseconds, chromiumOptions, port, browserExecutable, serveUrlOrWebpackUrl, logLevel, indent, server, offthreadVideoCacheSizeInBytes, }) => {
|
|
20
20
|
const { compName, remainingArgs, reason: compReason, } = getCompName({
|
|
21
21
|
cliArgs: args,
|
|
22
22
|
compositionIdFromUi,
|
|
@@ -36,6 +36,7 @@ const getCompositionId = async ({ args, compositionIdFromUi, serializedInputProp
|
|
|
36
36
|
server,
|
|
37
37
|
indent,
|
|
38
38
|
onBrowserLog: null,
|
|
39
|
+
offthreadVideoCacheSizeInBytes,
|
|
39
40
|
});
|
|
40
41
|
if (propsSize > 10000000) {
|
|
41
42
|
log_1.Log.warnAdvanced({
|
|
@@ -67,6 +68,7 @@ const getCompositionId = async ({ args, compositionIdFromUi, serializedInputProp
|
|
|
67
68
|
serveUrlOrWebpackUrl,
|
|
68
69
|
onBrowserLog: null,
|
|
69
70
|
serializedInputPropsWithCustomSchema,
|
|
71
|
+
offthreadVideoCacheSizeInBytes,
|
|
70
72
|
});
|
|
71
73
|
const { compositionId, reason } = await (0, show_compositions_picker_1.showSingleCompositionsPicker)(comps);
|
|
72
74
|
if (compositionId && typeof compositionId === 'string') {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { BrowserExecutable, ChromiumOptions, HeadlessBrowser, LogLevel, RemotionServer } from '@remotion/renderer';
|
|
2
2
|
import type { VideoConfig } from 'remotion';
|
|
3
|
-
export declare const getCompositionWithDimensionOverride: ({ height, width, args, compositionIdFromUi, chromiumOptions, envVariables, port, puppeteerInstance, timeoutInMilliseconds, browserExecutable, serveUrlOrWebpackUrl, indent, serializedInputPropsWithCustomSchema, logLevel, server, }: {
|
|
3
|
+
export declare const getCompositionWithDimensionOverride: ({ height, width, args, compositionIdFromUi, chromiumOptions, envVariables, port, puppeteerInstance, timeoutInMilliseconds, browserExecutable, serveUrlOrWebpackUrl, indent, serializedInputPropsWithCustomSchema, logLevel, server, offthreadVideoCacheSizeInBytes, }: {
|
|
4
4
|
height: number | null;
|
|
5
5
|
width: number | null;
|
|
6
6
|
args: string[];
|
|
@@ -16,6 +16,7 @@ export declare const getCompositionWithDimensionOverride: ({ height, width, args
|
|
|
16
16
|
logLevel: LogLevel;
|
|
17
17
|
serializedInputPropsWithCustomSchema: string;
|
|
18
18
|
server: RemotionServer;
|
|
19
|
+
offthreadVideoCacheSizeInBytes: number | null;
|
|
19
20
|
}) => Promise<{
|
|
20
21
|
compositionId: string;
|
|
21
22
|
reason: string;
|