@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
package/dist/benchmark.js
CHANGED
|
@@ -95,7 +95,7 @@ const benchmarkCommand = async (remotionRoot, args) => {
|
|
|
95
95
|
process.exit(1);
|
|
96
96
|
}
|
|
97
97
|
const fullEntryPoint = (0, convert_entry_point_to_serve_url_1.convertEntryPointToServeUrl)(file);
|
|
98
|
-
const { inputProps, envVariables, browserExecutable, chromiumOptions, port, puppeteerTimeout, browser, scale, publicDir, proResProfile, frameRange: defaultFrameRange, overwrite, jpegQuality, crf: configFileCrf, pixelFormat, scale: configFileScale, numberOfGifLoops, everyNthFrame, muted, enforceAudioTrack, ffmpegOverride, audioBitrate, videoBitrate, height, width, concurrency: unparsedConcurrency, logLevel, } = await (0, get_cli_options_1.getCliOptions)({
|
|
98
|
+
const { inputProps, envVariables, browserExecutable, chromiumOptions, port, puppeteerTimeout, browser, scale, publicDir, proResProfile, x264Preset, frameRange: defaultFrameRange, overwrite, jpegQuality, crf: configFileCrf, pixelFormat, scale: configFileScale, numberOfGifLoops, everyNthFrame, muted, enforceAudioTrack, ffmpegOverride, audioBitrate, videoBitrate, height, width, concurrency: unparsedConcurrency, logLevel, offthreadVideoCacheSizeInBytes, } = await (0, get_cli_options_1.getCliOptions)({
|
|
99
99
|
isLambda: false,
|
|
100
100
|
type: 'series',
|
|
101
101
|
remotionRoot,
|
|
@@ -145,6 +145,7 @@ const benchmarkCommand = async (remotionRoot, args) => {
|
|
|
145
145
|
// Intentionally disabling server to not cache results
|
|
146
146
|
server: undefined,
|
|
147
147
|
logLevel,
|
|
148
|
+
offthreadVideoCacheSizeInBytes,
|
|
148
149
|
});
|
|
149
150
|
const ids = (remainingArgs[0]
|
|
150
151
|
? remainingArgs[0]
|
|
@@ -201,6 +202,7 @@ const benchmarkCommand = async (remotionRoot, args) => {
|
|
|
201
202
|
overwrite,
|
|
202
203
|
pixelFormat,
|
|
203
204
|
proResProfile,
|
|
205
|
+
x264Preset,
|
|
204
206
|
jpegQuality,
|
|
205
207
|
chromiumOptions,
|
|
206
208
|
timeoutInMilliseconds: config_1.ConfigInternals.getCurrentPuppeteerTimeout(),
|
|
@@ -234,6 +236,7 @@ const benchmarkCommand = async (remotionRoot, args) => {
|
|
|
234
236
|
indent: undefined,
|
|
235
237
|
staticBase: null,
|
|
236
238
|
}).serializedString,
|
|
239
|
+
offthreadVideoCacheSizeInBytes,
|
|
237
240
|
}, (run, progress) => {
|
|
238
241
|
benchmarkProgress.update(makeBenchmarkProgressBar({
|
|
239
242
|
totalRuns: runs,
|
package/dist/compositions.js
CHANGED
|
@@ -20,7 +20,7 @@ const listCompositionsCommand = async (remotionRoot, args) => {
|
|
|
20
20
|
}
|
|
21
21
|
const logLevel = config_1.ConfigInternals.Logging.getLogLevel();
|
|
22
22
|
log_1.Log.verbose('Entry point:', file, 'reason:', reason);
|
|
23
|
-
const { browserExecutable, chromiumOptions, envVariables, inputProps, puppeteerTimeout, port, publicDir, } = await (0, get_cli_options_1.getCliOptions)({
|
|
23
|
+
const { browserExecutable, chromiumOptions, envVariables, inputProps, puppeteerTimeout, port, publicDir, offthreadVideoCacheSizeInBytes, } = await (0, get_cli_options_1.getCliOptions)({
|
|
24
24
|
isLambda: false,
|
|
25
25
|
type: 'get-compositions',
|
|
26
26
|
remotionRoot,
|
|
@@ -57,6 +57,7 @@ const listCompositionsCommand = async (remotionRoot, args) => {
|
|
|
57
57
|
puppeteerInstance: undefined,
|
|
58
58
|
logLevel,
|
|
59
59
|
server: undefined,
|
|
60
|
+
offthreadVideoCacheSizeInBytes,
|
|
60
61
|
});
|
|
61
62
|
(0, print_compositions_1.printCompositions)(compositions);
|
|
62
63
|
};
|
|
@@ -2,4 +2,4 @@ import type { StillImageFormat, VideoImageFormat } from '@remotion/renderer';
|
|
|
2
2
|
export declare const setStillImageFormat: (format: StillImageFormat) => void;
|
|
3
3
|
export declare const setVideoImageFormat: (format: VideoImageFormat) => void;
|
|
4
4
|
export declare const getUserPreferredStillImageFormat: () => "png" | "jpeg" | "pdf" | "webp" | undefined;
|
|
5
|
-
export declare const getUserPreferredVideoImageFormat: () => "
|
|
5
|
+
export declare const getUserPreferredVideoImageFormat: () => "none" | "png" | "jpeg" | undefined;
|
package/dist/config/index.d.ts
CHANGED
|
@@ -220,6 +220,7 @@ declare global {
|
|
|
220
220
|
* See https://avpres.net/FFmpeg/im_ProRes.html for meaning of possible values.
|
|
221
221
|
*/
|
|
222
222
|
readonly setProResProfile: (profile: '4444-xq' | '4444' | 'hq' | 'standard' | 'light' | 'proxy' | undefined) => void;
|
|
223
|
+
readonly setX264Preset: (profile: 'ultrafast' | 'superfast' | 'veryfast' | 'faster' | 'fast' | 'medium' | 'slow' | 'slower' | 'veryslow' | 'placebo' | undefined) => void;
|
|
223
224
|
/**
|
|
224
225
|
* Override the arguments that Remotion passes to FFMPEG.
|
|
225
226
|
* Consult https://remotion.dev/docs/renderer/render-media#ffmpegoverride before using this feature.
|
|
@@ -245,6 +246,7 @@ type FlatConfig = RemotionConfigObject & RemotionBundlingOptions & {
|
|
|
245
246
|
* See the Encoding guide in the docs for defaults and available options.
|
|
246
247
|
*/
|
|
247
248
|
setAudioCodec: (codec: 'pcm-16' | 'aac' | 'mp3' | 'opus') => void;
|
|
249
|
+
setOffthreadVideoCacheSizeInBytes: (size: number | null) => void;
|
|
248
250
|
/**
|
|
249
251
|
* @deprecated 'The config format has changed. Change `Config.Bundling.*()` calls to `Config.*()` in your config file.'
|
|
250
252
|
*/
|
|
@@ -278,6 +280,7 @@ export declare const ConfigInternals: {
|
|
|
278
280
|
getBrowser: () => null;
|
|
279
281
|
getPixelFormat: () => "yuv420p" | "yuva420p" | "yuv422p" | "yuv444p" | "yuv420p10le" | "yuv422p10le" | "yuv444p10le" | "yuva444p10le";
|
|
280
282
|
getProResProfile: () => "4444-xq" | "4444" | "hq" | "standard" | "light" | "proxy" | undefined;
|
|
283
|
+
getPresetProfile: () => "medium" | "ultrafast" | "superfast" | "veryfast" | "faster" | "fast" | "slow" | "slower" | "veryslow" | "placebo" | undefined;
|
|
281
284
|
getShouldOverwrite: ({ defaultValue, }: {
|
|
282
285
|
defaultValue: boolean;
|
|
283
286
|
}) => boolean;
|
|
@@ -297,7 +300,7 @@ export declare const ConfigInternals: {
|
|
|
297
300
|
getShouldOutputImageSequence: (frameRange: FrameRange | null) => boolean;
|
|
298
301
|
getDotEnvLocation: () => string | null;
|
|
299
302
|
getUserPreferredStillImageFormat: () => "png" | "jpeg" | "pdf" | "webp" | undefined;
|
|
300
|
-
getUserPreferredVideoImageFormat: () => "
|
|
303
|
+
getUserPreferredVideoImageFormat: () => "none" | "png" | "jpeg" | undefined;
|
|
301
304
|
getWebpackOverrideFn: () => WebpackOverrideFn;
|
|
302
305
|
getWebpackCaching: () => boolean;
|
|
303
306
|
getOutputLocation: () => string | null;
|
|
@@ -323,4 +326,5 @@ export declare const ConfigInternals: {
|
|
|
323
326
|
getWebpackPolling: () => number | null;
|
|
324
327
|
getShouldOpenBrowser: () => boolean;
|
|
325
328
|
getChromiumUserAgent: () => string | null;
|
|
329
|
+
getOffthreadVideoCacheSizeInBytes: () => number | null;
|
|
326
330
|
};
|
package/dist/config/index.js
CHANGED
|
@@ -46,6 +46,7 @@ const scale_1 = require("./scale");
|
|
|
46
46
|
const still_frame_1 = require("./still-frame");
|
|
47
47
|
const timeout_1 = require("./timeout");
|
|
48
48
|
const webpack_caching_1 = require("./webpack-caching");
|
|
49
|
+
const x264_preset_1 = require("./x264-preset");
|
|
49
50
|
const audio_codec_1 = require("./audio-codec");
|
|
50
51
|
const bitrate_1 = require("./bitrate");
|
|
51
52
|
const browser_executable_2 = require("./browser-executable");
|
|
@@ -68,6 +69,7 @@ const max_timeline_tracks_2 = require("./max-timeline-tracks");
|
|
|
68
69
|
const muted_1 = require("./muted");
|
|
69
70
|
const number_of_gif_loops_1 = require("./number-of-gif-loops");
|
|
70
71
|
const number_of_shared_audio_tags_1 = require("./number-of-shared-audio-tags");
|
|
72
|
+
const offthread_video_cache_size_1 = require("./offthread-video-cache-size");
|
|
71
73
|
const open_browser_1 = require("./open-browser");
|
|
72
74
|
const output_location_2 = require("./output-location");
|
|
73
75
|
const override_webpack_2 = require("./override-webpack");
|
|
@@ -82,6 +84,7 @@ const user_agent_1 = require("./user-agent");
|
|
|
82
84
|
const webpack_caching_2 = require("./webpack-caching");
|
|
83
85
|
const webpack_poll_1 = require("./webpack-poll");
|
|
84
86
|
const width_1 = require("./width");
|
|
87
|
+
const x264_preset_2 = require("./x264-preset");
|
|
85
88
|
exports.Config = {
|
|
86
89
|
get Bundling() {
|
|
87
90
|
throw new Error('The config format has changed. Change `Config.Bundling.*()` calls to `Config.*()` in your config file.');
|
|
@@ -144,12 +147,14 @@ exports.Config = {
|
|
|
144
147
|
setCrf: crf_1.setCrf,
|
|
145
148
|
setImageSequence: image_sequence_2.setImageSequence,
|
|
146
149
|
setProResProfile: prores_profile_2.setProResProfile,
|
|
150
|
+
setX264Preset: x264_preset_2.setX264Preset,
|
|
147
151
|
setAudioBitrate: bitrate_1.setAudioBitrate,
|
|
148
152
|
setVideoBitrate: bitrate_1.setVideoBitrate,
|
|
149
153
|
overrideHeight: height_1.overrideHeight,
|
|
150
154
|
overrideWidth: width_1.overrideWidth,
|
|
151
155
|
overrideFfmpegCommand: ffmpeg_override_1.setFfmpegOverrideFunction,
|
|
152
156
|
setAudioCodec: audio_codec_1.setAudioCodec,
|
|
157
|
+
setOffthreadVideoCacheSizeInBytes: offthread_video_cache_size_1.setOffthreadVideoCacheSizeInBytes,
|
|
153
158
|
};
|
|
154
159
|
exports.ConfigInternals = {
|
|
155
160
|
getRange: frame_range_1.getRange,
|
|
@@ -157,6 +162,7 @@ exports.ConfigInternals = {
|
|
|
157
162
|
getBrowser: browser_1.getBrowser,
|
|
158
163
|
getPixelFormat: pixel_format_1.getPixelFormat,
|
|
159
164
|
getProResProfile: prores_profile_1.getProResProfile,
|
|
165
|
+
getPresetProfile: x264_preset_1.getX264Preset,
|
|
160
166
|
getShouldOverwrite: overwrite_1.getShouldOverwrite,
|
|
161
167
|
getBrowserExecutable: browser_executable_1.getBrowserExecutable,
|
|
162
168
|
getScale: scale_1.getScale,
|
|
@@ -200,4 +206,5 @@ exports.ConfigInternals = {
|
|
|
200
206
|
getWebpackPolling: webpack_poll_1.getWebpackPolling,
|
|
201
207
|
getShouldOpenBrowser: open_browser_1.getShouldOpenBrowser,
|
|
202
208
|
getChromiumUserAgent: user_agent_1.getChromiumUserAgent,
|
|
209
|
+
getOffthreadVideoCacheSizeInBytes: offthread_video_cache_size_1.getOffthreadVideoCacheSizeInBytes,
|
|
203
210
|
};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.setOffthreadVideoCacheSizeInBytes = exports.getOffthreadVideoCacheSizeInBytes = void 0;
|
|
4
|
+
let offthreadVideoCacheSizeInBytes = null;
|
|
5
|
+
const getOffthreadVideoCacheSizeInBytes = () => {
|
|
6
|
+
return offthreadVideoCacheSizeInBytes;
|
|
7
|
+
};
|
|
8
|
+
exports.getOffthreadVideoCacheSizeInBytes = getOffthreadVideoCacheSizeInBytes;
|
|
9
|
+
const setOffthreadVideoCacheSizeInBytes = (size) => {
|
|
10
|
+
offthreadVideoCacheSizeInBytes = size;
|
|
11
|
+
};
|
|
12
|
+
exports.setOffthreadVideoCacheSizeInBytes = setOffthreadVideoCacheSizeInBytes;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.setX264Preset = exports.getX264Preset = void 0;
|
|
4
|
+
let preset;
|
|
5
|
+
const getX264Preset = () => {
|
|
6
|
+
return preset;
|
|
7
|
+
};
|
|
8
|
+
exports.getX264Preset = getX264Preset;
|
|
9
|
+
const setX264Preset = (profile) => {
|
|
10
|
+
preset = profile;
|
|
11
|
+
};
|
|
12
|
+
exports.setX264Preset = setX264Preset;
|
|
@@ -29,6 +29,17 @@ const Editor = () => {
|
|
|
29
29
|
}
|
|
30
30
|
return (0, remotion_1.delayRender)('Waiting for registerRoot()');
|
|
31
31
|
});
|
|
32
|
+
(0, react_1.useEffect)(() => {
|
|
33
|
+
const listenToChanges = (e) => {
|
|
34
|
+
if (window.remotion_unsavedProps) {
|
|
35
|
+
e.returnValue = 'Are you sure you want to leave?';
|
|
36
|
+
}
|
|
37
|
+
};
|
|
38
|
+
window.addEventListener('beforeunload', listenToChanges);
|
|
39
|
+
return () => {
|
|
40
|
+
window.removeEventListener('beforeunload', listenToChanges);
|
|
41
|
+
};
|
|
42
|
+
}, []);
|
|
32
43
|
(0, react_1.useEffect)(() => {
|
|
33
44
|
if (Root) {
|
|
34
45
|
return;
|
|
@@ -37,7 +48,9 @@ const Editor = () => {
|
|
|
37
48
|
setRoot(() => NewRoot);
|
|
38
49
|
(0, remotion_1.continueRender)(waitForRoot);
|
|
39
50
|
});
|
|
40
|
-
return () =>
|
|
51
|
+
return () => {
|
|
52
|
+
cleanup();
|
|
53
|
+
};
|
|
41
54
|
}, [Root, waitForRoot]);
|
|
42
55
|
return ((0, jsx_runtime_1.jsx)(z_index_1.HigherZIndex, { onEscape: noop_1.noop, onOutsideClick: noop_1.noop, children: (0, jsx_runtime_1.jsxs)(timeline_zoom_1.TimelineZoomContext, { children: [(0, jsx_runtime_1.jsxs)("div", { style: background, children: [Root === null ? null : (0, jsx_runtime_1.jsx)(Root, {}), (0, jsx_runtime_1.jsxs)(remotion_1.Internals.CanUseRemotionHooksProvider, { children: [Root === null ? (0, jsx_runtime_1.jsx)(NoRegisterRoot_1.NoRegisterRoot, {}) : (0, jsx_runtime_1.jsx)(EditorContent_1.EditorContent, {}), (0, jsx_runtime_1.jsx)(GlobalKeybindings_1.GlobalKeybindings, {})] }), (0, jsx_runtime_1.jsx)(NotificationCenter_1.NotificationCenter, {})] }), (0, jsx_runtime_1.jsx)(Modals_1.Modals, {})] }) }));
|
|
43
56
|
};
|
|
@@ -16,7 +16,7 @@ const UpdateModal_1 = require("./UpdateModal/UpdateModal");
|
|
|
16
16
|
const Modals = () => {
|
|
17
17
|
const { selectedModal: modalContextType } = (0, react_1.useContext)(modals_1.ModalsContext);
|
|
18
18
|
const canRender = (0, react_1.useContext)(client_id_1.StudioServerConnectionCtx).type === 'connected';
|
|
19
|
-
return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [modalContextType && modalContextType.type === 'new-comp' && ((0, jsx_runtime_1.jsx)(NewComposition_1.default, { initialCompType: modalContextType.compType })), modalContextType && canRender && modalContextType.type === 'render' && ((0, jsx_runtime_1.jsx)(RenderModal_1.RenderModalWithLoader, { initialFrame: modalContextType.initialFrame, compositionId: modalContextType.compositionId, initialVideoImageFormat: modalContextType.initialVideoImageFormat, initialJpegQuality: modalContextType.initialJpegQuality, initialOutName: modalContextType.initialOutName, initialScale: modalContextType.initialScale, initialVerbose: modalContextType.initialVerbose, initialRenderType: modalContextType.initialRenderType, initialVideoCodecForAudioTab: modalContextType.initialVideoCodecForAudioTab, initialVideoCodecForVideoTab: modalContextType.initialVideoCodecForVideoTab, initialConcurrency: modalContextType.initialConcurrency, maxConcurrency: modalContextType.maxConcurrency, minConcurrency: modalContextType.minConcurrency, initialStillImageFormat: modalContextType.initialStillImageFormat, initialMuted: modalContextType.initialMuted, initialEnforceAudioTrack: modalContextType.initialEnforceAudioTrack, initialProResProfile: modalContextType.initialProResProfile, initialPixelFormat: modalContextType.initialPixelFormat, initialAudioBitrate: modalContextType.initialAudioBitrate, initialVideoBitrate: modalContextType.initialVideoBitrate, initialEveryNthFrame: modalContextType.initialEveryNthFrame, initialNumberOfGifLoops: modalContextType.initialNumberOfGifLoops, initialDelayRenderTimeout: modalContextType.initialDelayRenderTimeout, initialAudioCodec: modalContextType.initialAudioCodec, initialEnvVariables: modalContextType.initialEnvVariables, initialDisableWebSecurity: modalContextType.initialDisableWebSecurity, initialGl: modalContextType.initialOpenGlRenderer, initialHeadless: modalContextType.initialHeadless, initialIgnoreCertificateErrors: modalContextType.initialIgnoreCertificateErrors, defaultProps: modalContextType.defaultProps, inFrameMark: modalContextType.inFrameMark, outFrameMark: modalContextType.outFrameMark })), modalContextType &&
|
|
19
|
+
return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [modalContextType && modalContextType.type === 'new-comp' && ((0, jsx_runtime_1.jsx)(NewComposition_1.default, { initialCompType: modalContextType.compType })), modalContextType && canRender && modalContextType.type === 'render' && ((0, jsx_runtime_1.jsx)(RenderModal_1.RenderModalWithLoader, { initialFrame: modalContextType.initialFrame, compositionId: modalContextType.compositionId, initialVideoImageFormat: modalContextType.initialVideoImageFormat, initialJpegQuality: modalContextType.initialJpegQuality, initialOutName: modalContextType.initialOutName, initialScale: modalContextType.initialScale, initialVerbose: modalContextType.initialVerbose, initialRenderType: modalContextType.initialRenderType, initialOffthreadVideoCacheSizeInBytes: modalContextType.initialOffthreadVideoCacheSizeInBytes, initialVideoCodecForAudioTab: modalContextType.initialVideoCodecForAudioTab, initialVideoCodecForVideoTab: modalContextType.initialVideoCodecForVideoTab, initialConcurrency: modalContextType.initialConcurrency, maxConcurrency: modalContextType.maxConcurrency, minConcurrency: modalContextType.minConcurrency, initialStillImageFormat: modalContextType.initialStillImageFormat, initialMuted: modalContextType.initialMuted, initialEnforceAudioTrack: modalContextType.initialEnforceAudioTrack, initialProResProfile: modalContextType.initialProResProfile, initialx264Preset: modalContextType.initialx264Preset, initialPixelFormat: modalContextType.initialPixelFormat, initialAudioBitrate: modalContextType.initialAudioBitrate, initialVideoBitrate: modalContextType.initialVideoBitrate, initialEveryNthFrame: modalContextType.initialEveryNthFrame, initialNumberOfGifLoops: modalContextType.initialNumberOfGifLoops, initialDelayRenderTimeout: modalContextType.initialDelayRenderTimeout, initialAudioCodec: modalContextType.initialAudioCodec, initialEnvVariables: modalContextType.initialEnvVariables, initialDisableWebSecurity: modalContextType.initialDisableWebSecurity, initialGl: modalContextType.initialOpenGlRenderer, initialHeadless: modalContextType.initialHeadless, initialIgnoreCertificateErrors: modalContextType.initialIgnoreCertificateErrors, defaultProps: modalContextType.defaultProps, inFrameMark: modalContextType.inFrameMark, outFrameMark: modalContextType.outFrameMark })), modalContextType &&
|
|
20
20
|
canRender &&
|
|
21
21
|
modalContextType.type === 'render-progress' && ((0, jsx_runtime_1.jsx)(RenderStatusModal_1.RenderStatusModal, { jobId: modalContextType.jobId })), modalContextType && modalContextType.type === 'update' && ((0, jsx_runtime_1.jsx)(UpdateModal_1.UpdateModal, { info: modalContextType.info })), modalContextType && modalContextType.type === 'quick-switcher' && ((0, jsx_runtime_1.jsx)(QuickSwitcher_1.default, { invocationTimestamp: modalContextType.invocationTimestamp, initialMode: modalContextType.mode }))] }));
|
|
22
22
|
};
|
|
@@ -12,6 +12,6 @@ export declare const getInputBorderColor: ({ status, isFocused, isHovered, }: {
|
|
|
12
12
|
status: 'error' | 'warning' | 'ok';
|
|
13
13
|
isFocused: boolean;
|
|
14
14
|
isHovered: boolean;
|
|
15
|
-
}) => "hsla(0, 0%, 100%, 0.15)" | "rgba(0, 0, 0, 0.6)" | "rgba(255, 255, 255, 0.05)" | "#
|
|
16
|
-
export declare const RemotionInput: React.ForwardRefExoticComponent<Pick<Props, "
|
|
15
|
+
}) => "hsla(0, 0%, 100%, 0.15)" | "#ff3232" | "rgba(0, 0, 0, 0.6)" | "rgba(255, 255, 255, 0.05)" | "#f1c40f";
|
|
16
|
+
export declare const RemotionInput: React.ForwardRefExoticComponent<Pick<Props, "key" | keyof React.InputHTMLAttributes<HTMLInputElement> | "status" | "rightAlign"> & React.RefAttributes<HTMLInputElement>>;
|
|
17
17
|
export {};
|
|
@@ -4,5 +4,5 @@ type Props = React.DetailedHTMLProps<React.InputHTMLAttributes<HTMLInputElement>
|
|
|
4
4
|
status: RemInputStatus;
|
|
5
5
|
name: string;
|
|
6
6
|
};
|
|
7
|
-
export declare const RemInputTypeColor: React.ForwardRefExoticComponent<Pick<Props, "
|
|
7
|
+
export declare const RemInputTypeColor: React.ForwardRefExoticComponent<Pick<Props, "key" | keyof React.InputHTMLAttributes<HTMLInputElement> | "status"> & React.RefAttributes<HTMLInputElement>>;
|
|
8
8
|
export {};
|
|
@@ -3,5 +3,5 @@ type Props = React.DetailedHTMLProps<React.InputHTMLAttributes<HTMLTextAreaEleme
|
|
|
3
3
|
status: 'error' | 'warning' | 'ok';
|
|
4
4
|
};
|
|
5
5
|
export declare const inputBaseStyle: React.CSSProperties;
|
|
6
|
-
export declare const RemTextarea: React.ForwardRefExoticComponent<Pick<Props, "
|
|
6
|
+
export declare const RemTextarea: React.ForwardRefExoticComponent<Pick<Props, "key" | "status" | keyof React.InputHTMLAttributes<HTMLTextAreaElement>> & React.RefAttributes<HTMLTextAreaElement>>;
|
|
7
7
|
export {};
|
|
@@ -38,14 +38,15 @@ window.addEventListener('beforeunload', () => {
|
|
|
38
38
|
});
|
|
39
39
|
const ServerDisconnected = () => {
|
|
40
40
|
const ctx = (0, react_1.useContext)(client_id_1.StudioServerConnectionCtx);
|
|
41
|
+
const fav = document.getElementById('__remotion_favicon');
|
|
41
42
|
if (ctx.type !== 'disconnected') {
|
|
43
|
+
fav.setAttribute('href', '/remotion.png');
|
|
42
44
|
return null;
|
|
43
45
|
}
|
|
44
46
|
if (pageIsGoingToReload) {
|
|
45
47
|
return null;
|
|
46
48
|
}
|
|
47
49
|
const base64Favicon = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGQAAABkCAYAAABw4pVUAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAARiSURBVHgB7d1NThRBFAfw/2tGgru5gXMD8QZ4AmVjAi6kN0TiAm8gnkBcGARNumcx4E48Ae0JaE9gewLHlQSZelaNgyHGL/RVd1X3+y10RQL58+rVx1QBKKWUUkoppZRSSimllFJKKVUjQs32stEiJcktZiwxzKL9Fvqzb6S0/44JVBKbtwa9aj29U6JjagtkJzsYzBEyBi9d5utsQIULCcxvelgo03R5jBarJZCXw/17E+bt82r4Hy4gtuEQekUbK8h7IHvDV5vMZht+VAlRfmYw3EhXKrSA10Ce2X7RIzpGDVzlgM1wPb2bI2JeA9nN99/b/waoV+XCmTAex1g13gLZyUZrdjjJ0CAbTB5bMN4C2ctHxwxaRABiCsZLIG6KmxC/R2BiCCaBBwn4NgJk10B2GOWj3Wz/IQLlpUL28oOjyy4AG1AZppuhVYt4hWRZ1o8gDGc6rL4YHjxCQMQDOcNCEI38bxnmLTc9d30PARAPZAITZP/4A1ctx3bjcw0NEw8koeQ64tRnu25qeggTb+q2/BmRcyv9K7yw3MTOsmiFuLMOtICblJzS5+Mm+opoIBOgFYHMuL5yVHcoooFQuwJxag9FNJCIG/rv1BqKaCDfzshbqbZQxAJxK3SJI9qATUPJstdef0axQGJbof+jwRc6eQ2PxAIx4DZXx3duSrybv3oCTyR7yACdYR762sIXDKQbFfId4ZGPJi8YCA3QLf05YvF+IhYIEV1Dx9hNu8XdbLQFQV6OcDuFaFNyKiwWiJ19DNBN/VN8XoMQrRABDFqCEJ32CiBisT08rRAZAwjRQAKjgcgQO+rVQARMb3gJ0UAkML+DEA1EwAQkdkNMcnOx1Zcxf8V9ol7y88GSm4tdDKRy1xsgSIes/0BM4ndN5HZ7OzZkMePperqSQ5jkkFWhO6r76WrYJ4b2N+YTumF60QeeSG6/d2DI4rHvW1eCPaT9Q9YZw/sVOMlZVoUWM8zpg/Su97dVJGdZFVrKhbFR05MdYoFcwWmF1rF9kbG8UeP7KaI3qBp628QTHrueUccwdZHw/ZDWNHY7tU1u1B2GIxqIYSO2Dd0Ud79wnq/eaOpBgR4EMVDW/oijINu87d7U6hYaJBrInA0k0iu4bvVtZ1KrBRrm4Vr06GNkF3cO7RCVhvK4pmiFOISkjOStk1lVrBQIiPh5SAyN3fWKWeMuEBjxCmEkh3bVvokAzd5idL2iQqDEA1nASXmK+XFIfeTCo5gFAudllvo8G20TUeNVElMQ58QrxLHD1jbB3GumSnhsz7qHE9BhTEGc87aOm16KJHi7rfqj8yfI53E1j/l9eK8L651stJUQeXx/iuzU1QztZLGIsRp+xvtOh3Qo3/qCedumEC6qZetpJztwz7O6UAa4FNsP7ELTfXbWbskUdjgq9M9VCJoFcwvTlfyPDd9t3XNJjA+2IZcGpmxi+7tpjW3OupurJziZhtKWPzWhlFJKKaWUUkoppZRSSiml/uwrgZ/Bfwo/wccAAAAASUVORK5CYII=';
|
|
48
|
-
const fav = document.getElementById('__remotion_favicon');
|
|
49
50
|
fav.setAttribute('href', base64Favicon);
|
|
50
51
|
return ((0, jsx_runtime_1.jsx)("div", { style: container, className: "css-reset", children: (0, jsx_runtime_1.jsxs)("div", { style: message, children: ["The studio server has disconnected. ", (0, jsx_runtime_1.jsx)("br", {}), window.remotion_studioServerCommand ? ((0, jsx_runtime_1.jsxs)("span", { children: ["Run", ' ', (0, jsx_runtime_1.jsx)("code", { style: inlineCode, children: window.remotion_studioServerCommand }), ' ', "to run it again."] })) : ((0, jsx_runtime_1.jsx)("span", { children: "Fast refresh will not work." }))] }) }));
|
|
51
52
|
};
|
|
@@ -82,6 +82,7 @@ const RenderButton = () => {
|
|
|
82
82
|
initialMuted: defaults.muted,
|
|
83
83
|
initialEnforceAudioTrack: defaults.enforceAudioTrack,
|
|
84
84
|
initialProResProfile: defaults.proResProfile,
|
|
85
|
+
initialx264Preset: defaults.x264Preset,
|
|
85
86
|
initialPixelFormat: defaults.pixelFormat,
|
|
86
87
|
initialAudioBitrate: defaults.audioBitrate,
|
|
87
88
|
initialVideoBitrate: defaults.videoBitrate,
|
|
@@ -94,6 +95,7 @@ const RenderButton = () => {
|
|
|
94
95
|
initialOpenGlRenderer: defaults.openGlRenderer,
|
|
95
96
|
initialHeadless: defaults.headless,
|
|
96
97
|
initialIgnoreCertificateErrors: defaults.ignoreCertificateErrors,
|
|
98
|
+
initialOffthreadVideoCacheSizeInBytes: defaults.offthreadVideoCacheSizeInBytes,
|
|
97
99
|
defaultProps: (_c = props[video.id]) !== null && _c !== void 0 ? _c : video.defaultProps,
|
|
98
100
|
inFrameMark: inFrame,
|
|
99
101
|
outFrameMark: outFrame,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import type {
|
|
2
|
+
import type { AnyRemotionOption, Codec } from '@remotion/renderer';
|
|
3
3
|
export declare const useCrfState: (codec: Codec) => {
|
|
4
4
|
crf: number;
|
|
5
5
|
setCrf: import("react").Dispatch<import("react").SetStateAction<number>>;
|
|
@@ -11,5 +11,5 @@ export declare const CrfSetting: React.FC<{
|
|
|
11
11
|
setCrf: React.Dispatch<React.SetStateAction<number>>;
|
|
12
12
|
min: number;
|
|
13
13
|
max: number;
|
|
14
|
-
option:
|
|
14
|
+
option: AnyRemotionOption;
|
|
15
15
|
}>;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { AnyRemotionOption } from '@remotion/renderer';
|
|
2
2
|
import React from 'react';
|
|
3
3
|
export declare const EnforceAudioTrackSetting: React.FC<{
|
|
4
4
|
enforceAudioTrack: boolean;
|
|
5
5
|
setEnforceAudioTrack: React.Dispatch<React.SetStateAction<boolean>>;
|
|
6
6
|
muted: boolean;
|
|
7
|
-
option:
|
|
7
|
+
option: AnyRemotionOption;
|
|
8
8
|
}>;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { AnyRemotionOption } from '@remotion/renderer';
|
|
2
2
|
import React from 'react';
|
|
3
3
|
export declare const MutedSetting: React.FC<{
|
|
4
4
|
muted: boolean;
|
|
5
5
|
setMuted: React.Dispatch<React.SetStateAction<boolean>>;
|
|
6
6
|
enforceAudioTrack: boolean;
|
|
7
|
-
hint:
|
|
7
|
+
hint: AnyRemotionOption;
|
|
8
8
|
}>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { AnyRemotionOption } from '@remotion/renderer';
|
|
2
2
|
import React from 'react';
|
|
3
3
|
export declare const NumberSetting: React.FC<{
|
|
4
4
|
name: string;
|
|
@@ -8,5 +8,5 @@ export declare const NumberSetting: React.FC<{
|
|
|
8
8
|
min: number;
|
|
9
9
|
step: number;
|
|
10
10
|
formatter?: (value: string | number) => string;
|
|
11
|
-
hint?:
|
|
11
|
+
hint?: AnyRemotionOption;
|
|
12
12
|
}>;
|
|
@@ -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 React from 'react';
|
|
3
3
|
import type { RenderType } from './RenderModalAdvanced';
|
|
4
4
|
type RenderModalProps = {
|
|
@@ -20,6 +20,7 @@ type RenderModalProps = {
|
|
|
20
20
|
initialMuted: boolean;
|
|
21
21
|
initialEnforceAudioTrack: boolean;
|
|
22
22
|
initialProResProfile: ProResProfile;
|
|
23
|
+
initialx264Preset: X264Preset;
|
|
23
24
|
initialPixelFormat: PixelFormat;
|
|
24
25
|
initialVideoBitrate: string | null;
|
|
25
26
|
initialAudioBitrate: string | null;
|
|
@@ -30,6 +31,7 @@ type RenderModalProps = {
|
|
|
30
31
|
initialDisableWebSecurity: boolean;
|
|
31
32
|
initialGl: OpenGlRenderer | null;
|
|
32
33
|
initialIgnoreCertificateErrors: boolean;
|
|
34
|
+
initialOffthreadVideoCacheSizeInBytes: number | null;
|
|
33
35
|
initialHeadless: boolean;
|
|
34
36
|
defaultProps: Record<string, unknown>;
|
|
35
37
|
inFrameMark: number | null;
|
|
@@ -114,7 +114,7 @@ const outer = {
|
|
|
114
114
|
display: 'flex',
|
|
115
115
|
flexDirection: 'column',
|
|
116
116
|
};
|
|
117
|
-
const RenderModal = ({ initialFrame, initialVideoImageFormat, initialStillImageFormat, initialJpegQuality, initialScale, initialVerbose, initialOutName, initialRenderType, initialVideoCodecForAudioTab, initialVideoCodecForVideoTab, initialConcurrency, maxConcurrency, minConcurrency, initialMuted, initialEnforceAudioTrack, initialProResProfile, initialPixelFormat, initialVideoBitrate, initialAudioBitrate, initialEveryNthFrame, initialNumberOfGifLoops, initialDelayRenderTimeout, initialAudioCodec, initialEnvVariables, initialDisableWebSecurity, initialGl, initialHeadless, initialIgnoreCertificateErrors, defaultProps, inFrameMark, outFrameMark, onClose, resolvedComposition, unresolvedComposition, }) => {
|
|
117
|
+
const RenderModal = ({ initialFrame, initialVideoImageFormat, initialStillImageFormat, initialJpegQuality, initialScale, initialVerbose, initialOutName, initialRenderType, initialVideoCodecForAudioTab, initialVideoCodecForVideoTab, initialConcurrency, maxConcurrency, minConcurrency, initialMuted, initialEnforceAudioTrack, initialProResProfile, initialx264Preset, initialPixelFormat, initialVideoBitrate, initialAudioBitrate, initialEveryNthFrame, initialNumberOfGifLoops, initialDelayRenderTimeout, initialOffthreadVideoCacheSizeInBytes, initialAudioCodec, initialEnvVariables, initialDisableWebSecurity, initialGl, initialHeadless, initialIgnoreCertificateErrors, defaultProps, inFrameMark, outFrameMark, onClose, resolvedComposition, unresolvedComposition, }) => {
|
|
118
118
|
const isMounted = (0, react_1.useRef)(true);
|
|
119
119
|
const [state, dispatch] = (0, react_1.useReducer)(reducer, initialState);
|
|
120
120
|
const [unclampedFrame, setFrame] = (0, react_1.useState)(() => initialFrame);
|
|
@@ -151,6 +151,7 @@ const RenderModal = ({ initialFrame, initialVideoImageFormat, initialStillImageF
|
|
|
151
151
|
const [endFrameOrNull, setEndFrame] = (0, react_1.useState)(() => outFrameMark !== null && outFrameMark !== void 0 ? outFrameMark : null);
|
|
152
152
|
const [startFrameOrNull, setStartFrame] = (0, react_1.useState)(() => inFrameMark !== null && inFrameMark !== void 0 ? inFrameMark : null);
|
|
153
153
|
const [proResProfileSetting, setProResProfile] = (0, react_1.useState)(() => initialProResProfile);
|
|
154
|
+
const [x264PresetSetting, setx264Preset] = (0, react_1.useState)(() => initialx264Preset);
|
|
154
155
|
const [pixelFormat, setPixelFormat] = (0, react_1.useState)(() => initialPixelFormat);
|
|
155
156
|
const [preferredQualityControlType, setQualityControl] = (0, react_1.useState)(() => initialVideoBitrate === null ? 'crf' : 'bitrate');
|
|
156
157
|
const [shouldHaveCustomTargetAudioBitrate, setShouldHaveCustomTargetAudioBitrate,] = (0, react_1.useState)(() => initialAudioBitrate !== null);
|
|
@@ -159,6 +160,7 @@ const RenderModal = ({ initialFrame, initialVideoImageFormat, initialStillImageF
|
|
|
159
160
|
const [limitNumberOfGifLoops, setLimitNumberOfGifLoops] = (0, react_1.useState)(() => initialNumberOfGifLoops !== null);
|
|
160
161
|
const [numberOfGifLoopsSetting, setNumberOfGifLoopsSetting] = (0, react_1.useState)(() => initialNumberOfGifLoops !== null && initialNumberOfGifLoops !== void 0 ? initialNumberOfGifLoops : 1);
|
|
161
162
|
const [delayRenderTimeout, setDelayRenderTimeout] = (0, react_1.useState)(() => initialDelayRenderTimeout);
|
|
163
|
+
const [offthreadVideoCacheSizeInBytes, setOffthreadVideoCacheSizeInBytes] = (0, react_1.useState)(initialOffthreadVideoCacheSizeInBytes);
|
|
162
164
|
const codec = (0, react_1.useMemo)(() => {
|
|
163
165
|
if (renderMode === 'audio') {
|
|
164
166
|
return videoCodecForAudioTab;
|
|
@@ -232,6 +234,12 @@ const RenderModal = ({ initialFrame, initialVideoImageFormat, initialStillImageF
|
|
|
232
234
|
}
|
|
233
235
|
return null;
|
|
234
236
|
}, [codec, proResProfileSetting, renderMode]);
|
|
237
|
+
const x264Preset = (0, react_1.useMemo)(() => {
|
|
238
|
+
if (renderMode === 'video' && codec === 'h264') {
|
|
239
|
+
return x264PresetSetting;
|
|
240
|
+
}
|
|
241
|
+
return null;
|
|
242
|
+
}, [codec, x264PresetSetting, renderMode]);
|
|
235
243
|
const [inputProps, setInputProps] = (0, react_1.useState)(() => defaultProps);
|
|
236
244
|
const endFrame = (0, react_1.useMemo)(() => {
|
|
237
245
|
if (endFrameOrNull === null) {
|
|
@@ -326,6 +334,7 @@ const RenderModal = ({ initialFrame, initialVideoImageFormat, initialStillImageF
|
|
|
326
334
|
delayRenderTimeout,
|
|
327
335
|
envVariables: (0, convert_env_variables_1.envVariablesArrayToObject)(envVariables),
|
|
328
336
|
inputProps,
|
|
337
|
+
offthreadVideoCacheSizeInBytes,
|
|
329
338
|
})
|
|
330
339
|
.then(() => {
|
|
331
340
|
dispatchIfMounted({ type: 'succeed' });
|
|
@@ -348,6 +357,7 @@ const RenderModal = ({ initialFrame, initialVideoImageFormat, initialStillImageF
|
|
|
348
357
|
delayRenderTimeout,
|
|
349
358
|
envVariables,
|
|
350
359
|
inputProps,
|
|
360
|
+
offthreadVideoCacheSizeInBytes,
|
|
351
361
|
onClose,
|
|
352
362
|
]);
|
|
353
363
|
const [everyNthFrameSetting, setEveryNthFrameSetting] = (0, react_1.useState)(() => initialEveryNthFrame);
|
|
@@ -379,6 +389,7 @@ const RenderModal = ({ initialFrame, initialVideoImageFormat, initialStillImageF
|
|
|
379
389
|
muted,
|
|
380
390
|
enforceAudioTrack,
|
|
381
391
|
proResProfile,
|
|
392
|
+
x264Preset,
|
|
382
393
|
pixelFormat,
|
|
383
394
|
audioBitrate,
|
|
384
395
|
videoBitrate,
|
|
@@ -390,6 +401,7 @@ const RenderModal = ({ initialFrame, initialVideoImageFormat, initialStillImageF
|
|
|
390
401
|
chromiumOptions,
|
|
391
402
|
envVariables: (0, convert_env_variables_1.envVariablesArrayToObject)(envVariables),
|
|
392
403
|
inputProps,
|
|
404
|
+
offthreadVideoCacheSizeInBytes,
|
|
393
405
|
})
|
|
394
406
|
.then(() => {
|
|
395
407
|
dispatchIfMounted({ type: 'succeed' });
|
|
@@ -417,6 +429,7 @@ const RenderModal = ({ initialFrame, initialVideoImageFormat, initialStillImageF
|
|
|
417
429
|
muted,
|
|
418
430
|
enforceAudioTrack,
|
|
419
431
|
proResProfile,
|
|
432
|
+
x264Preset,
|
|
420
433
|
pixelFormat,
|
|
421
434
|
audioBitrate,
|
|
422
435
|
videoBitrate,
|
|
@@ -428,6 +441,7 @@ const RenderModal = ({ initialFrame, initialVideoImageFormat, initialStillImageF
|
|
|
428
441
|
chromiumOptions,
|
|
429
442
|
envVariables,
|
|
430
443
|
inputProps,
|
|
444
|
+
offthreadVideoCacheSizeInBytes,
|
|
431
445
|
onClose,
|
|
432
446
|
]);
|
|
433
447
|
(0, react_1.useEffect)(() => {
|
|
@@ -585,7 +599,7 @@ const RenderModal = ({ initialFrame, initialVideoImageFormat, initialStillImageF
|
|
|
585
599
|
return ((0, jsx_runtime_1.jsxs)("div", { style: outer, children: [(0, jsx_runtime_1.jsx)(ModalHeader_1.NewCompHeader, { title: `Render ${resolvedComposition.id}` }), (0, jsx_runtime_1.jsxs)("div", { style: container, children: [(0, jsx_runtime_1.jsx)(SegmentedControl_1.SegmentedControl, { items: renderTabOptions, needsWrapping: false }), (0, jsx_runtime_1.jsx)("div", { style: flexer }), (0, jsx_runtime_1.jsxs)(Button_1.Button, { autoFocus: true, onClick: trigger, disabled: renderDisabled, style: {
|
|
586
600
|
...buttonStyle,
|
|
587
601
|
backgroundColor: outnameValidation.valid ? colors_1.BLUE : colors_1.BLUE_DISABLED,
|
|
588
|
-
}, children: [state.type === 'idle' ? `Render ${renderMode}` : 'Rendering...', (0, jsx_runtime_1.jsx)(ShortcutHint_1.ShortcutHint, { keyToPress: "\u21B5", cmdOrCtrl: true })] })] }), (0, jsx_runtime_1.jsxs)("div", { style: horizontalLayout, children: [(0, jsx_runtime_1.jsxs)("div", { style: leftSidebar, children: [shownTabs.includes('general') ? ((0, jsx_runtime_1.jsxs)(vertical_1.VerticalTab, { style: horizontalTab, selected: tab === 'general', onClick: () => setTab('general'), children: [(0, jsx_runtime_1.jsx)("div", { style: iconContainer, children: (0, jsx_runtime_1.jsx)(file_1.FileIcon, { style: icon }) }), "General"] })) : null, shownTabs.includes('data') ? ((0, jsx_runtime_1.jsxs)(vertical_1.VerticalTab, { style: horizontalTab, selected: tab === 'data', onClick: () => setTab('data'), children: [(0, jsx_runtime_1.jsx)("div", { style: iconContainer, children: (0, jsx_runtime_1.jsx)(data_1.DataIcon, { style: icon }) }), "Input Props"] })) : null, shownTabs.includes('picture') ? ((0, jsx_runtime_1.jsxs)(vertical_1.VerticalTab, { style: horizontalTab, selected: tab === 'picture', onClick: () => setTab('picture'), children: [(0, jsx_runtime_1.jsx)("div", { style: iconContainer, children: (0, jsx_runtime_1.jsx)(frame_1.PicIcon, { style: icon }) }), "Picture"] })) : null, shownTabs.includes('audio') ? ((0, jsx_runtime_1.jsxs)(vertical_1.VerticalTab, { style: horizontalTab, selected: tab === 'audio', onClick: () => setTab('audio'), children: [(0, jsx_runtime_1.jsx)("div", { style: iconContainer, children: (0, jsx_runtime_1.jsx)(audio_1.AudioIcon, { style: icon }) }), "Audio"] })) : null, shownTabs.includes('gif') ? ((0, jsx_runtime_1.jsxs)(vertical_1.VerticalTab, { style: horizontalTab, selected: tab === 'gif', onClick: () => setTab('gif'), children: [(0, jsx_runtime_1.jsx)("div", { style: iconContainer, children: (0, jsx_runtime_1.jsx)(gif_1.GifIcon, { style: icon }) }), "GIF"] })) : null, shownTabs.includes('advanced') ? ((0, jsx_runtime_1.jsxs)(vertical_1.VerticalTab, { style: horizontalTab, selected: tab === 'advanced', onClick: () => setTab('advanced'), children: [(0, jsx_runtime_1.jsx)("div", { style: iconContainer, children: (0, jsx_runtime_1.jsx)(gear_1.GearIcon, { style: icon }) }), "Other"] })) : null] }), (0, jsx_runtime_1.jsx)("div", { style: optionsPanel, className: is_menu_item_1.VERTICAL_SCROLLBAR_CLASSNAME, children: tab === 'general' ? ((0, 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, startFrame: startFrame, validationMessage: outnameValidation.valid ? null : outnameValidation.error.message })) : tab === 'picture' ? ((0, jsx_runtime_1.jsx)(RenderModalPicture_1.RenderModalPicture, { renderMode: renderMode, scale: scale, setScale: setScale, pixelFormat: pixelFormat, setPixelFormat: setPixelFormat, imageFormatOptions: imageFormatOptions, crf: crf, setCrf: setCrf, customTargetVideoBitrate: customTargetVideoBitrate, maxCrf: maxCrf, minCrf: minCrf, jpegQuality: jpegQuality, qualityControlType: qualityControlType, setJpegQuality: setJpegQuality, setCustomTargetVideoBitrateValue: setCustomTargetVideoBitrateValue, setQualityControl: setQualityControl, videoImageFormat: videoImageFormat, stillImageFormat: stillImageFormat, shouldDisplayQualityControlPicker: supportsBothQualityControls })) : tab === 'audio' ? ((0, jsx_runtime_1.jsx)(RenderModalAudio_1.RenderModalAudio, { muted: muted, renderMode: renderMode, setMuted: setMuted, codec: codec, audioCodec: audioCodec, setAudioCodec: setAudioCodec, enforceAudioTrack: enforceAudioTrack, setEnforceAudioTrackState: setEnforceAudioTrackState, customTargetAudioBitrate: customTargetAudioBitrate, setCustomTargetAudioBitrateValue: setCustomTargetAudioBitrateValue, setShouldHaveCustomTargetAudioBitrate: setShouldHaveCustomTargetAudioBitrate, shouldHaveCustomTargetAudioBitrate: shouldHaveCustomTargetAudioBitrate })) : tab === 'gif' ? ((0, jsx_runtime_1.jsx)(RenderModalGif_1.RenderModalGif, { everyNthFrame: everyNthFrame, limitNumberOfGifLoops: limitNumberOfGifLoops, numberOfGifLoopsSetting: numberOfGifLoopsSetting, setEveryNthFrameSetting: setEveryNthFrameSetting, setLimitNumberOfGifLoops: setLimitNumberOfGifLoops, setNumberOfGifLoopsSetting: setNumberOfGifLoopsSetting })) : tab === 'data' ? ((0, jsx_runtime_1.jsx)(DataEditor_1.DataEditor, { inputProps: inputProps, setInputProps: setInputProps, unresolvedComposition: unresolvedComposition, mayShowSaveButton: false, propsEditType: "input-props", saving: saving, setSaving: setSaving })) : ((0, jsx_runtime_1.jsx)(RenderModalAdvanced_1.RenderModalAdvanced, { concurrency: concurrency, maxConcurrency: maxConcurrency, minConcurrency: minConcurrency, renderMode: renderMode, setConcurrency: setConcurrency, setVerboseLogging: setVerboseLogging, verbose: verbose, delayRenderTimeout: delayRenderTimeout, setDelayRenderTimeout: setDelayRenderTimeout, disallowParallelEncoding: disallowParallelEncoding, setDisallowParallelEncoding: setDisallowParallelEncoding, setDisableWebSecurity: setDisableWebSecurity, setIgnoreCertificateErrors: setIgnoreCertificateErrors, setHeadless: setHeadless, headless: headless, ignoreCertificateErrors: ignoreCertificateErrors, disableWebSecurity: disableWebSecurity, openGlOption: openGlOption, setOpenGlOption: setOpenGlOption, setEnvVariables: setEnvVariables, envVariables: envVariables })) })] })] }));
|
|
602
|
+
}, children: [state.type === 'idle' ? `Render ${renderMode}` : 'Rendering...', (0, jsx_runtime_1.jsx)(ShortcutHint_1.ShortcutHint, { keyToPress: "\u21B5", cmdOrCtrl: true })] })] }), (0, jsx_runtime_1.jsxs)("div", { style: horizontalLayout, children: [(0, jsx_runtime_1.jsxs)("div", { style: leftSidebar, children: [shownTabs.includes('general') ? ((0, jsx_runtime_1.jsxs)(vertical_1.VerticalTab, { style: horizontalTab, selected: tab === 'general', onClick: () => setTab('general'), children: [(0, jsx_runtime_1.jsx)("div", { style: iconContainer, children: (0, jsx_runtime_1.jsx)(file_1.FileIcon, { style: icon }) }), "General"] })) : null, shownTabs.includes('data') ? ((0, jsx_runtime_1.jsxs)(vertical_1.VerticalTab, { style: horizontalTab, selected: tab === 'data', onClick: () => setTab('data'), children: [(0, jsx_runtime_1.jsx)("div", { style: iconContainer, children: (0, jsx_runtime_1.jsx)(data_1.DataIcon, { style: icon }) }), "Input Props"] })) : null, shownTabs.includes('picture') ? ((0, jsx_runtime_1.jsxs)(vertical_1.VerticalTab, { style: horizontalTab, selected: tab === 'picture', onClick: () => setTab('picture'), children: [(0, jsx_runtime_1.jsx)("div", { style: iconContainer, children: (0, jsx_runtime_1.jsx)(frame_1.PicIcon, { style: icon }) }), "Picture"] })) : null, shownTabs.includes('audio') ? ((0, jsx_runtime_1.jsxs)(vertical_1.VerticalTab, { style: horizontalTab, selected: tab === 'audio', onClick: () => setTab('audio'), children: [(0, jsx_runtime_1.jsx)("div", { style: iconContainer, children: (0, jsx_runtime_1.jsx)(audio_1.AudioIcon, { style: icon }) }), "Audio"] })) : null, shownTabs.includes('gif') ? ((0, jsx_runtime_1.jsxs)(vertical_1.VerticalTab, { style: horizontalTab, selected: tab === 'gif', onClick: () => setTab('gif'), children: [(0, jsx_runtime_1.jsx)("div", { style: iconContainer, children: (0, jsx_runtime_1.jsx)(gif_1.GifIcon, { style: icon }) }), "GIF"] })) : null, shownTabs.includes('advanced') ? ((0, jsx_runtime_1.jsxs)(vertical_1.VerticalTab, { style: horizontalTab, selected: tab === 'advanced', onClick: () => setTab('advanced'), children: [(0, jsx_runtime_1.jsx)("div", { style: iconContainer, children: (0, jsx_runtime_1.jsx)(gear_1.GearIcon, { style: icon }) }), "Other"] })) : null] }), (0, jsx_runtime_1.jsx)("div", { style: optionsPanel, className: is_menu_item_1.VERTICAL_SCROLLBAR_CLASSNAME, children: tab === 'general' ? ((0, 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, startFrame: startFrame, validationMessage: outnameValidation.valid ? null : outnameValidation.error.message })) : tab === 'picture' ? ((0, jsx_runtime_1.jsx)(RenderModalPicture_1.RenderModalPicture, { renderMode: renderMode, scale: scale, setScale: setScale, pixelFormat: pixelFormat, setPixelFormat: setPixelFormat, imageFormatOptions: imageFormatOptions, crf: crf, setCrf: setCrf, customTargetVideoBitrate: customTargetVideoBitrate, maxCrf: maxCrf, minCrf: minCrf, jpegQuality: jpegQuality, qualityControlType: qualityControlType, setJpegQuality: setJpegQuality, setCustomTargetVideoBitrateValue: setCustomTargetVideoBitrateValue, setQualityControl: setQualityControl, videoImageFormat: videoImageFormat, stillImageFormat: stillImageFormat, shouldDisplayQualityControlPicker: supportsBothQualityControls })) : tab === 'audio' ? ((0, jsx_runtime_1.jsx)(RenderModalAudio_1.RenderModalAudio, { muted: muted, renderMode: renderMode, setMuted: setMuted, codec: codec, audioCodec: audioCodec, setAudioCodec: setAudioCodec, enforceAudioTrack: enforceAudioTrack, setEnforceAudioTrackState: setEnforceAudioTrackState, customTargetAudioBitrate: customTargetAudioBitrate, setCustomTargetAudioBitrateValue: setCustomTargetAudioBitrateValue, setShouldHaveCustomTargetAudioBitrate: setShouldHaveCustomTargetAudioBitrate, shouldHaveCustomTargetAudioBitrate: shouldHaveCustomTargetAudioBitrate })) : tab === 'gif' ? ((0, jsx_runtime_1.jsx)(RenderModalGif_1.RenderModalGif, { everyNthFrame: everyNthFrame, limitNumberOfGifLoops: limitNumberOfGifLoops, numberOfGifLoopsSetting: numberOfGifLoopsSetting, setEveryNthFrameSetting: setEveryNthFrameSetting, setLimitNumberOfGifLoops: setLimitNumberOfGifLoops, setNumberOfGifLoopsSetting: setNumberOfGifLoopsSetting })) : tab === 'data' ? ((0, jsx_runtime_1.jsx)(DataEditor_1.DataEditor, { inputProps: inputProps, setInputProps: setInputProps, unresolvedComposition: unresolvedComposition, mayShowSaveButton: false, propsEditType: "input-props", saving: saving, setSaving: setSaving })) : ((0, jsx_runtime_1.jsx)(RenderModalAdvanced_1.RenderModalAdvanced, { x264Preset: x264Preset, setx264Preset: setx264Preset, concurrency: concurrency, maxConcurrency: maxConcurrency, minConcurrency: minConcurrency, renderMode: renderMode, setConcurrency: setConcurrency, setVerboseLogging: setVerboseLogging, verbose: verbose, delayRenderTimeout: delayRenderTimeout, setDelayRenderTimeout: setDelayRenderTimeout, disallowParallelEncoding: disallowParallelEncoding, setDisallowParallelEncoding: setDisallowParallelEncoding, setDisableWebSecurity: setDisableWebSecurity, setIgnoreCertificateErrors: setIgnoreCertificateErrors, setHeadless: setHeadless, headless: headless, ignoreCertificateErrors: ignoreCertificateErrors, disableWebSecurity: disableWebSecurity, openGlOption: openGlOption, setOpenGlOption: setOpenGlOption, setEnvVariables: setEnvVariables, envVariables: envVariables, offthreadVideoCacheSizeInBytes: offthreadVideoCacheSizeInBytes, setOffthreadVideoCacheSizeInBytes: setOffthreadVideoCacheSizeInBytes, codec: codec })) })] })] }));
|
|
589
603
|
};
|
|
590
604
|
const RenderModalWithLoader = (props) => {
|
|
591
605
|
const { setSelectedModal } = (0, react_1.useContext)(modals_1.ModalsContext);
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { Codec, X264Preset } from '@remotion/renderer';
|
|
1
2
|
import React from 'react';
|
|
2
3
|
import type { UiOpenGlOptions } from '../../../required-chromium-options';
|
|
3
4
|
export type RenderType = 'still' | 'video' | 'audio';
|
|
@@ -23,4 +24,9 @@ export declare const RenderModalAdvanced: React.FC<{
|
|
|
23
24
|
setOpenGlOption: React.Dispatch<React.SetStateAction<UiOpenGlOptions>>;
|
|
24
25
|
envVariables: [string, string][];
|
|
25
26
|
setEnvVariables: React.Dispatch<React.SetStateAction<[string, string][]>>;
|
|
27
|
+
x264Preset: X264Preset | null;
|
|
28
|
+
setx264Preset: React.Dispatch<React.SetStateAction<X264Preset>>;
|
|
29
|
+
offthreadVideoCacheSizeInBytes: number | null;
|
|
30
|
+
setOffthreadVideoCacheSizeInBytes: React.Dispatch<React.SetStateAction<number | null>>;
|
|
31
|
+
codec: Codec;
|
|
26
32
|
}>;
|