@remotion/cli 4.0.76 → 4.0.79
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/benchmark.js +3 -1
- package/dist/config/bitrate.d.ts +4 -0
- package/dist/config/bitrate.js +22 -1
- package/dist/config/index.d.ts +10 -0
- package/dist/config/index.js +4 -0
- package/dist/editor/components/Canvas.js +1 -1
- package/dist/editor/components/Modals.js +1 -1
- package/dist/editor/components/NewComposition/RemInput.d.ts +1 -1
- package/dist/editor/components/RenderButton.js +3 -0
- package/dist/editor/components/RenderModal/CrfSetting.d.ts +3 -2
- package/dist/editor/components/RenderModal/EnforceAudioTrackSetting.d.ts +0 -2
- package/dist/editor/components/RenderModal/EnforceAudioTrackSetting.js +3 -4
- package/dist/editor/components/RenderModal/JpegQualitySetting.js +1 -2
- package/dist/editor/components/RenderModal/MutedSetting.d.ts +0 -2
- package/dist/editor/components/RenderModal/MutedSetting.js +3 -4
- package/dist/editor/components/RenderModal/NumberSetting.d.ts +2 -2
- package/dist/editor/components/RenderModal/NumberSetting.js +4 -5
- package/dist/editor/components/RenderModal/OptionExplainerBubble.d.ts +5 -0
- package/dist/editor/components/RenderModal/OptionExplainerBubble.js +12 -0
- package/dist/editor/components/RenderModal/RenderModal.d.ts +3 -0
- package/dist/editor/components/RenderModal/RenderModal.js +15 -4
- package/dist/editor/components/RenderModal/RenderModalAdvanced.d.ts +2 -0
- package/dist/editor/components/RenderModal/RenderModalAdvanced.js +19 -5
- package/dist/editor/components/RenderModal/RenderModalAudio.js +4 -4
- package/dist/editor/components/RenderModal/RenderModalBasic.js +2 -3
- package/dist/editor/components/RenderModal/RenderModalPicture.d.ts +4 -0
- package/dist/editor/components/RenderModal/RenderModalPicture.js +19 -5
- package/dist/editor/components/RenderModal/ScaleSetting.js +1 -2
- package/dist/editor/components/RenderModal/SchemaEditor/SchemaLabel.d.ts +1 -0
- package/dist/editor/components/RenderModal/SchemaEditor/SchemaLabel.js +19 -4
- package/dist/editor/components/RenderModal/SchemaEditor/SchemaSeparationLine.d.ts +8 -0
- package/dist/editor/components/RenderModal/SchemaEditor/SchemaSeparationLine.js +70 -2
- package/dist/editor/components/RenderModal/SchemaEditor/SchemaVerticalGuide.d.ts +1 -1
- package/dist/editor/components/RenderModal/SchemaEditor/SchemaVerticalGuide.js +23 -5
- package/dist/editor/components/RenderModal/SchemaEditor/ZodArrayEditor.js +12 -23
- package/dist/editor/components/RenderModal/SchemaEditor/ZodArrayItemEditor.js +6 -1
- package/dist/editor/components/RenderModal/SchemaEditor/ZodBooleanEditor.js +1 -1
- package/dist/editor/components/RenderModal/SchemaEditor/ZodColorEditor.js +1 -1
- package/dist/editor/components/RenderModal/SchemaEditor/ZodDateEditor.js +1 -1
- package/dist/editor/components/RenderModal/SchemaEditor/ZodDiscriminatedUnionEditor.js +1 -1
- package/dist/editor/components/RenderModal/SchemaEditor/ZodEnumEditor.js +1 -1
- package/dist/editor/components/RenderModal/SchemaEditor/ZodNonEditableValue.js +1 -1
- package/dist/editor/components/RenderModal/SchemaEditor/ZodNumberEditor.js +1 -1
- package/dist/editor/components/RenderModal/SchemaEditor/ZodObjectEditor.js +13 -5
- package/dist/editor/components/RenderModal/SchemaEditor/ZodOrNullishEditor.js +1 -1
- package/dist/editor/components/RenderModal/SchemaEditor/ZodStaticFileEditor.js +1 -1
- package/dist/editor/components/RenderModal/SchemaEditor/ZodStringEditor.js +1 -1
- package/dist/editor/components/RenderModal/SchemaEditor/ZodTextareaEditor.js +1 -1
- package/dist/editor/components/RenderModal/layout.d.ts +1 -0
- package/dist/editor/components/RenderModal/layout.js +6 -3
- package/dist/editor/components/RenderQueue/actions.d.ts +3 -1
- package/dist/editor/components/RenderQueue/actions.js +3 -1
- package/dist/editor/components/SidebarRenderButton.js +3 -0
- package/dist/editor/helpers/colors.d.ts +1 -0
- package/dist/editor/helpers/colors.js +2 -1
- package/dist/editor/state/modals.d.ts +3 -0
- package/dist/get-cli-options.d.ts +2 -0
- package/dist/get-cli-options.js +4 -0
- package/dist/index.d.ts +4 -0
- package/dist/parse-command-line.d.ts +6 -2
- package/dist/parse-command-line.js +6 -0
- package/dist/preview-server/render-queue/job.d.ts +4 -0
- package/dist/preview-server/render-queue/make-retry-payload.js +9 -0
- package/dist/preview-server/render-queue/process-video.js +2 -0
- package/dist/preview-server/routes/add-render.js +2 -0
- package/dist/preview-server/routes.js +6 -0
- package/dist/render-flows/render.d.ts +3 -1
- package/dist/render-flows/render.js +3 -1
- package/dist/render.js +3 -1
- package/package.json +8 -8
package/dist/benchmark.js
CHANGED
|
@@ -96,7 +96,7 @@ const benchmarkCommand = async (remotionRoot, args, logLevel) => {
|
|
|
96
96
|
process.exit(1);
|
|
97
97
|
}
|
|
98
98
|
const fullEntryPoint = (0, convert_entry_point_to_serve_url_1.convertEntryPointToServeUrl)(file);
|
|
99
|
-
const { inputProps, envVariables, browserExecutable, chromiumOptions, 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, offthreadVideoCacheSizeInBytes, colorSpace, } = await (0, get_cli_options_1.getCliOptions)({
|
|
99
|
+
const { inputProps, envVariables, browserExecutable, chromiumOptions, puppeteerTimeout, browser, scale, publicDir, proResProfile, x264Preset, frameRange: defaultFrameRange, overwrite, jpegQuality, crf: configFileCrf, pixelFormat, scale: configFileScale, numberOfGifLoops, everyNthFrame, muted, enforceAudioTrack, ffmpegOverride, audioBitrate, videoBitrate, encodingMaxRate, encodingBufferSize, height, width, concurrency: unparsedConcurrency, offthreadVideoCacheSizeInBytes, colorSpace, } = await (0, get_cli_options_1.getCliOptions)({
|
|
100
100
|
isLambda: false,
|
|
101
101
|
type: 'series',
|
|
102
102
|
remotionRoot,
|
|
@@ -222,6 +222,8 @@ const benchmarkCommand = async (remotionRoot, args, logLevel) => {
|
|
|
222
222
|
codec,
|
|
223
223
|
audioBitrate,
|
|
224
224
|
videoBitrate,
|
|
225
|
+
encodingMaxRate,
|
|
226
|
+
encodingBufferSize,
|
|
225
227
|
puppeteerInstance,
|
|
226
228
|
concurrency: con,
|
|
227
229
|
audioCodec: null,
|
package/dist/config/bitrate.d.ts
CHANGED
|
@@ -2,3 +2,7 @@ export declare const setAudioBitrate: (bitrate: string | null) => void;
|
|
|
2
2
|
export declare const getAudioBitrate: () => string | null;
|
|
3
3
|
export declare const setVideoBitrate: (bitrate: string | null) => void;
|
|
4
4
|
export declare const getVideoBitrate: () => string | null;
|
|
5
|
+
export declare const setEncodingMaxRate: (bitrate: string | null) => void;
|
|
6
|
+
export declare const getEncodingMaxRate: () => string | null;
|
|
7
|
+
export declare const setEncodingBufferSize: (bitrate: string | null) => void;
|
|
8
|
+
export declare const getEncodingBufferSize: () => string | null;
|
package/dist/config/bitrate.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.getVideoBitrate = exports.setVideoBitrate = exports.getAudioBitrate = exports.setAudioBitrate = void 0;
|
|
3
|
+
exports.getEncodingBufferSize = exports.setEncodingBufferSize = exports.getEncodingMaxRate = exports.setEncodingMaxRate = exports.getVideoBitrate = exports.setVideoBitrate = exports.getAudioBitrate = exports.setAudioBitrate = void 0;
|
|
4
4
|
let audioBitrate = null;
|
|
5
5
|
const setAudioBitrate = (bitrate) => {
|
|
6
6
|
audioBitrate = bitrate;
|
|
@@ -19,3 +19,24 @@ const getVideoBitrate = () => {
|
|
|
19
19
|
return videoBitrate;
|
|
20
20
|
};
|
|
21
21
|
exports.getVideoBitrate = getVideoBitrate;
|
|
22
|
+
let encodingMaxRate = null;
|
|
23
|
+
const setEncodingMaxRate = (bitrate) => {
|
|
24
|
+
encodingMaxRate = bitrate;
|
|
25
|
+
};
|
|
26
|
+
exports.setEncodingMaxRate = setEncodingMaxRate;
|
|
27
|
+
const getEncodingMaxRate = () => {
|
|
28
|
+
return encodingMaxRate;
|
|
29
|
+
};
|
|
30
|
+
exports.getEncodingMaxRate = getEncodingMaxRate;
|
|
31
|
+
/**
|
|
32
|
+
* encodingBufferSize is not a bitrate, but it is a bitrate-related option and get validated like a bitrate.
|
|
33
|
+
*/
|
|
34
|
+
let encodingBufferSize = null;
|
|
35
|
+
const setEncodingBufferSize = (bitrate) => {
|
|
36
|
+
encodingBufferSize = bitrate;
|
|
37
|
+
};
|
|
38
|
+
exports.setEncodingBufferSize = setEncodingBufferSize;
|
|
39
|
+
const getEncodingBufferSize = () => {
|
|
40
|
+
return encodingBufferSize;
|
|
41
|
+
};
|
|
42
|
+
exports.getEncodingBufferSize = getEncodingBufferSize;
|
package/dist/config/index.d.ts
CHANGED
|
@@ -250,6 +250,14 @@ declare global {
|
|
|
250
250
|
* Mutually exclusive with setCrf().
|
|
251
251
|
*/
|
|
252
252
|
readonly setVideoBitrate: (bitrate: string | null) => void;
|
|
253
|
+
/**
|
|
254
|
+
* Set a maximum bitrate to be passed to FFmpeg.
|
|
255
|
+
*/
|
|
256
|
+
readonly setEncodingMaxRate: (bitrate: string | null) => void;
|
|
257
|
+
/**
|
|
258
|
+
* Set a buffer size to be passed to FFmpeg.
|
|
259
|
+
*/
|
|
260
|
+
readonly setEncodingBufferSize: (bitrate: string | null) => void;
|
|
253
261
|
/**
|
|
254
262
|
* Opt into bt709 rendering.
|
|
255
263
|
*/
|
|
@@ -347,6 +355,8 @@ export declare const ConfigInternals: {
|
|
|
347
355
|
getFfmpegOverrideFunction: () => import("@remotion/renderer").FfmpegOverrideFn;
|
|
348
356
|
getAudioBitrate: () => string | null;
|
|
349
357
|
getVideoBitrate: () => string | null;
|
|
358
|
+
getEncodingBufferSize: () => string | null;
|
|
359
|
+
getEncodingMaxRate: () => string | null;
|
|
350
360
|
getHeight: () => number | null;
|
|
351
361
|
getWidth: () => number | null;
|
|
352
362
|
getCrfOrUndefined: () => Crf;
|
package/dist/config/index.js
CHANGED
|
@@ -140,6 +140,8 @@ exports.Config = {
|
|
|
140
140
|
setJpegQuality: jpeg_quality_2.setJpegQuality,
|
|
141
141
|
setStillImageFormat: image_format_1.setStillImageFormat,
|
|
142
142
|
setVideoImageFormat: image_format_1.setVideoImageFormat,
|
|
143
|
+
setEncodingMaxRate: bitrate_1.setEncodingMaxRate,
|
|
144
|
+
setEncodingBufferSize: bitrate_1.setEncodingBufferSize,
|
|
143
145
|
setFrameRange: frame_range_2.setFrameRange,
|
|
144
146
|
setScale: scale_2.setScale,
|
|
145
147
|
setEveryNthFrame: every_nth_frame_1.setEveryNthFrame,
|
|
@@ -209,6 +211,8 @@ exports.ConfigInternals = {
|
|
|
209
211
|
getFfmpegOverrideFunction: ffmpeg_override_1.getFfmpegOverrideFunction,
|
|
210
212
|
getAudioBitrate: bitrate_1.getAudioBitrate,
|
|
211
213
|
getVideoBitrate: bitrate_1.getVideoBitrate,
|
|
214
|
+
getEncodingBufferSize: bitrate_1.getEncodingBufferSize,
|
|
215
|
+
getEncodingMaxRate: bitrate_1.getEncodingMaxRate,
|
|
212
216
|
getHeight: height_1.getHeight,
|
|
213
217
|
getWidth: width_1.getWidth,
|
|
214
218
|
getCrfOrUndefined: crf_1.getCrfOrUndefined,
|
|
@@ -255,6 +255,6 @@ const Canvas = ({ canvasContent }) => {
|
|
|
255
255
|
(0, react_1.useEffect)(() => {
|
|
256
256
|
fetchMetadata();
|
|
257
257
|
}, [fetchMetadata]);
|
|
258
|
-
return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsxs)("div", { ref: canvas_ref_1.canvasRef, style: container, children: [size ? ((0, jsx_runtime_1.jsx)(Preview_1.VideoPreview, { canvasContent: canvasContent, contentDimensions: contentDimensions, canvasSize: size, assetMetadata: assetResolution })) : null, isFit ? null : ((0, jsx_runtime_1.jsx)("div", { style: resetZoom, className: "css-reset", children: (0, jsx_runtime_1.jsx)(ResetZoomButton_1.ResetZoomButton, { onClick: onReset }) })), editorShowGuides && ((0, jsx_runtime_1.jsx)(EditorGuides_1.default, { canvasSize: size, contentDimensions: contentDimensions, assetMetadata: assetResolution }))] }), areRulersVisible && ((0, jsx_runtime_1.jsx)(EditorRuler_1.EditorRulers, { contentDimensions: contentDimensions, canvasSize: size, assetMetadata: assetResolution, containerRef: canvas_ref_1.canvasRef }))] }));
|
|
258
|
+
return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsxs)("div", { ref: canvas_ref_1.canvasRef, style: container, children: [size ? ((0, jsx_runtime_1.jsx)(Preview_1.VideoPreview, { canvasContent: canvasContent, contentDimensions: contentDimensions, canvasSize: size, assetMetadata: assetResolution })) : null, isFit ? null : ((0, jsx_runtime_1.jsx)("div", { style: resetZoom, className: "css-reset", children: (0, jsx_runtime_1.jsx)(ResetZoomButton_1.ResetZoomButton, { onClick: onReset }) })), editorShowGuides && canvasContent.type === 'composition' && ((0, jsx_runtime_1.jsx)(EditorGuides_1.default, { canvasSize: size, contentDimensions: contentDimensions, assetMetadata: assetResolution }))] }), areRulersVisible && ((0, jsx_runtime_1.jsx)(EditorRuler_1.EditorRulers, { contentDimensions: contentDimensions, canvasSize: size, assetMetadata: assetResolution, containerRef: canvas_ref_1.canvasRef }))] }));
|
|
259
259
|
};
|
|
260
260
|
exports.Canvas = Canvas;
|
|
@@ -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, initialScale: modalContextType.initialScale, initialLogLevel: modalContextType.initialLogLevel, initialOffthreadVideoCacheSizeInBytes: modalContextType.initialOffthreadVideoCacheSizeInBytes, initialConcurrency: modalContextType.initialConcurrency, maxConcurrency: modalContextType.maxConcurrency, minConcurrency: modalContextType.minConcurrency, initialStillImageFormat: modalContextType.initialStillImageFormat, initialMuted: modalContextType.initialMuted, initialEnforceAudioTrack: modalContextType.initialEnforceAudioTrack, initialProResProfile: modalContextType.initialProResProfile, initialx264Preset: modalContextType.initialx264Preset, initialPixelFormat: modalContextType.initialPixelFormat, initialAudioBitrate: modalContextType.initialAudioBitrate, initialVideoBitrate: modalContextType.initialVideoBitrate, initialEveryNthFrame: modalContextType.initialEveryNthFrame, initialNumberOfGifLoops: modalContextType.initialNumberOfGifLoops, initialDelayRenderTimeout: modalContextType.initialDelayRenderTimeout, initialEnvVariables: modalContextType.initialEnvVariables, initialDisableWebSecurity: modalContextType.initialDisableWebSecurity, initialGl: modalContextType.initialOpenGlRenderer, initialHeadless: modalContextType.initialHeadless, initialIgnoreCertificateErrors: modalContextType.initialIgnoreCertificateErrors,
|
|
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, initialScale: modalContextType.initialScale, initialLogLevel: modalContextType.initialLogLevel, initialOffthreadVideoCacheSizeInBytes: modalContextType.initialOffthreadVideoCacheSizeInBytes, initialConcurrency: modalContextType.initialConcurrency, maxConcurrency: modalContextType.maxConcurrency, minConcurrency: modalContextType.minConcurrency, initialStillImageFormat: modalContextType.initialStillImageFormat, initialMuted: modalContextType.initialMuted, initialEnforceAudioTrack: modalContextType.initialEnforceAudioTrack, initialProResProfile: modalContextType.initialProResProfile, initialx264Preset: modalContextType.initialx264Preset, initialPixelFormat: modalContextType.initialPixelFormat, initialAudioBitrate: modalContextType.initialAudioBitrate, initialVideoBitrate: modalContextType.initialVideoBitrate, initialEveryNthFrame: modalContextType.initialEveryNthFrame, initialNumberOfGifLoops: modalContextType.initialNumberOfGifLoops, initialDelayRenderTimeout: modalContextType.initialDelayRenderTimeout, initialEnvVariables: modalContextType.initialEnvVariables, initialDisableWebSecurity: modalContextType.initialDisableWebSecurity, initialGl: modalContextType.initialOpenGlRenderer, initialHeadless: modalContextType.initialHeadless, initialIgnoreCertificateErrors: modalContextType.initialIgnoreCertificateErrors, initialEncodingBufferSize: modalContextType.initialEncodingBufferSize, initialEncodingMaxRate: modalContextType.initialEncodingMaxRate, initialUserAgent: modalContextType.initialUserAgent, initialColorSpace: modalContextType.initialColorSpace, initialMultiProcessOnLinux: modalContextType.initialMultiProcessOnLinux, defaultProps: modalContextType.defaultProps, inFrameMark: modalContextType.inFrameMark, outFrameMark: modalContextType.outFrameMark, defaultConfigurationAudioCodec: modalContextType.defaultConfigurationAudioCodec, defaultConfigurationVideoCodec: modalContextType.defaultConfigurationVideoCodec })), 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, knownBugs: modalContextType.knownBugs })), 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
|
-
}) => "#ff3232" | "hsla(0, 0%, 100%, 0.15)" | "#f1c40f" | "rgba(
|
|
15
|
+
}) => "#ff3232" | "hsla(0, 0%, 100%, 0.15)" | "#f1c40f" | "rgba(0, 0, 0, 0.6)" | "rgba(255, 255, 255, 0.05)";
|
|
16
16
|
export declare const RemotionInput: React.ForwardRefExoticComponent<Pick<Props, "key" | keyof React.InputHTMLAttributes<HTMLInputElement> | "status" | "rightAlign"> & React.RefAttributes<HTMLInputElement>>;
|
|
17
17
|
export {};
|
|
@@ -84,6 +84,9 @@ const RenderButton = () => {
|
|
|
84
84
|
initialColorSpace: defaults.colorSpace,
|
|
85
85
|
initialMultiProcessOnLinux: defaults.multiProcessOnLinux,
|
|
86
86
|
defaultConfigurationVideoCodec: defaults.codec,
|
|
87
|
+
initialEncodingBufferSize: defaults.encodingBufferSize,
|
|
88
|
+
initialEncodingMaxRate: defaults.encodingMaxRate,
|
|
89
|
+
initialUserAgent: defaults.userAgent,
|
|
87
90
|
});
|
|
88
91
|
}, [video, setSelectedModal, frame, props, inFrame, outFrame]);
|
|
89
92
|
if (!video) {
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import type {
|
|
2
|
+
import type { Codec } from '@remotion/renderer';
|
|
3
|
+
import type { AvailableOptions } from '@remotion/renderer/client';
|
|
3
4
|
export declare const useCrfState: (codec: Codec) => {
|
|
4
5
|
crf: number;
|
|
5
6
|
setCrf: import("react").Dispatch<import("react").SetStateAction<number>>;
|
|
@@ -11,5 +12,5 @@ export declare const CrfSetting: React.FC<{
|
|
|
11
12
|
setCrf: React.Dispatch<React.SetStateAction<number>>;
|
|
12
13
|
min: number;
|
|
13
14
|
max: number;
|
|
14
|
-
option:
|
|
15
|
+
option: AvailableOptions;
|
|
15
16
|
}>;
|
|
@@ -1,8 +1,6 @@
|
|
|
1
|
-
import type { AnyRemotionOption } from '@remotion/renderer';
|
|
2
1
|
import React from 'react';
|
|
3
2
|
export declare const EnforceAudioTrackSetting: React.FC<{
|
|
4
3
|
enforceAudioTrack: boolean;
|
|
5
4
|
setEnforceAudioTrack: React.Dispatch<React.SetStateAction<boolean>>;
|
|
6
5
|
muted: boolean;
|
|
7
|
-
option: AnyRemotionOption;
|
|
8
6
|
}>;
|
|
@@ -5,13 +5,12 @@ const jsx_runtime_1 = require("react/jsx-runtime");
|
|
|
5
5
|
const react_1 = require("react");
|
|
6
6
|
const Checkbox_1 = require("../Checkbox");
|
|
7
7
|
const layout_1 = require("../layout");
|
|
8
|
-
const InfoBubble_1 = require("./InfoBubble");
|
|
9
8
|
const layout_2 = require("./layout");
|
|
10
|
-
const
|
|
11
|
-
const EnforceAudioTrackSetting = ({ enforceAudioTrack, muted, setEnforceAudioTrack
|
|
9
|
+
const OptionExplainerBubble_1 = require("./OptionExplainerBubble");
|
|
10
|
+
const EnforceAudioTrackSetting = ({ enforceAudioTrack, muted, setEnforceAudioTrack }) => {
|
|
12
11
|
const onEnforceAudioTrackChanged = (0, react_1.useCallback)((e) => {
|
|
13
12
|
setEnforceAudioTrack(e.target.checked);
|
|
14
13
|
}, [setEnforceAudioTrack]);
|
|
15
|
-
return ((0, jsx_runtime_1.jsxs)("div", { style: layout_2.optionRow, children: [(0, jsx_runtime_1.jsxs)("div", { style: layout_2.label, children: ["Enforce Audio Track", (0, jsx_runtime_1.jsx)(layout_1.Spacing, { x: 0.5 }), (0, jsx_runtime_1.jsx)(
|
|
14
|
+
return ((0, jsx_runtime_1.jsxs)("div", { style: layout_2.optionRow, children: [(0, jsx_runtime_1.jsxs)("div", { style: layout_2.label, children: ["Enforce Audio Track", (0, jsx_runtime_1.jsx)(layout_1.Spacing, { x: 0.5 }), (0, jsx_runtime_1.jsx)(OptionExplainerBubble_1.OptionExplainerBubble, { id: "enforceAudioOption" })] }), (0, jsx_runtime_1.jsx)("div", { style: layout_2.rightRow, children: (0, jsx_runtime_1.jsx)(Checkbox_1.Checkbox, { disabled: muted && !enforceAudioTrack, checked: enforceAudioTrack, onChange: onEnforceAudioTrackChanged, name: "enforce-audio-track" }) })] }));
|
|
16
15
|
};
|
|
17
16
|
exports.EnforceAudioTrackSetting = EnforceAudioTrackSetting;
|
|
@@ -2,11 +2,10 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.JpegQualitySetting = void 0;
|
|
4
4
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
-
const client_1 = require("@remotion/renderer/client");
|
|
6
5
|
const NumberSetting_1 = require("./NumberSetting");
|
|
7
6
|
const MIN_JPEG_QUALITY = 1;
|
|
8
7
|
const MAX_JPEG_QUALITY = 100;
|
|
9
8
|
const JpegQualitySetting = ({ jpegQuality, setJpegQuality }) => {
|
|
10
|
-
return ((0, jsx_runtime_1.jsx)(NumberSetting_1.NumberSetting, { min: MIN_JPEG_QUALITY, max: MAX_JPEG_QUALITY, step: 1, name: "JPEG Quality", onValueChanged: setJpegQuality, value: jpegQuality, hint:
|
|
9
|
+
return ((0, jsx_runtime_1.jsx)(NumberSetting_1.NumberSetting, { min: MIN_JPEG_QUALITY, max: MAX_JPEG_QUALITY, step: 1, name: "JPEG Quality", onValueChanged: setJpegQuality, value: jpegQuality, hint: 'jpegQualityOption' }));
|
|
11
10
|
};
|
|
12
11
|
exports.JpegQualitySetting = JpegQualitySetting;
|
|
@@ -1,8 +1,6 @@
|
|
|
1
|
-
import type { AnyRemotionOption } from '@remotion/renderer';
|
|
2
1
|
import React from 'react';
|
|
3
2
|
export declare const MutedSetting: React.FC<{
|
|
4
3
|
muted: boolean;
|
|
5
4
|
setMuted: React.Dispatch<React.SetStateAction<boolean>>;
|
|
6
5
|
enforceAudioTrack: boolean;
|
|
7
|
-
hint: AnyRemotionOption;
|
|
8
6
|
}>;
|
|
@@ -5,13 +5,12 @@ const jsx_runtime_1 = require("react/jsx-runtime");
|
|
|
5
5
|
const react_1 = require("react");
|
|
6
6
|
const Checkbox_1 = require("../Checkbox");
|
|
7
7
|
const layout_1 = require("../layout");
|
|
8
|
-
const InfoBubble_1 = require("./InfoBubble");
|
|
9
8
|
const layout_2 = require("./layout");
|
|
10
|
-
const
|
|
11
|
-
const MutedSetting = ({ muted, setMuted, enforceAudioTrack
|
|
9
|
+
const OptionExplainerBubble_1 = require("./OptionExplainerBubble");
|
|
10
|
+
const MutedSetting = ({ muted, setMuted, enforceAudioTrack }) => {
|
|
12
11
|
const onMutedChanged = (0, react_1.useCallback)((e) => {
|
|
13
12
|
setMuted(e.target.checked);
|
|
14
13
|
}, [setMuted]);
|
|
15
|
-
return ((0, jsx_runtime_1.jsxs)("div", { style: layout_2.optionRow, children: [(0, jsx_runtime_1.jsxs)("div", { style: layout_2.label, children: ["Muted", (0, jsx_runtime_1.jsx)(layout_1.Spacing, { x: 0.5 }), (0, jsx_runtime_1.jsx)(
|
|
14
|
+
return ((0, jsx_runtime_1.jsxs)("div", { style: layout_2.optionRow, children: [(0, jsx_runtime_1.jsxs)("div", { style: layout_2.label, children: ["Muted", (0, jsx_runtime_1.jsx)(layout_1.Spacing, { x: 0.5 }), (0, jsx_runtime_1.jsx)(OptionExplainerBubble_1.OptionExplainerBubble, { id: "muteOption" })] }), (0, jsx_runtime_1.jsx)(layout_1.Spacing, { x: 0.25 }), (0, jsx_runtime_1.jsx)("div", { style: layout_2.rightRow, children: (0, jsx_runtime_1.jsx)(Checkbox_1.Checkbox, { checked: muted, disabled: enforceAudioTrack && !muted, onChange: onMutedChanged, name: "muted" }) })] }));
|
|
16
15
|
};
|
|
17
16
|
exports.MutedSetting = MutedSetting;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { AvailableOptions } from '@remotion/renderer/client';
|
|
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?: AvailableOptions;
|
|
12
12
|
}>;
|
|
@@ -6,23 +6,22 @@ const react_1 = require("react");
|
|
|
6
6
|
const layout_1 = require("../layout");
|
|
7
7
|
const InputDragger_1 = require("../NewComposition/InputDragger");
|
|
8
8
|
const RemInput_1 = require("../NewComposition/RemInput");
|
|
9
|
-
const InfoBubble_1 = require("./InfoBubble");
|
|
10
9
|
const layout_2 = require("./layout");
|
|
11
|
-
const
|
|
10
|
+
const OptionExplainerBubble_1 = require("./OptionExplainerBubble");
|
|
12
11
|
const NumberSetting = ({ name, value, step, hint, onValueChanged, max, min, formatter }) => {
|
|
13
12
|
const onTextChanged = (0, react_1.useCallback)((e) => {
|
|
14
13
|
onValueChanged((q) => {
|
|
15
|
-
const newSetting = parseInt(e, 10);
|
|
14
|
+
const newSetting = step < 1 ? parseFloat(e) : parseInt(e, 10);
|
|
16
15
|
if (Number.isNaN(newSetting)) {
|
|
17
16
|
return q;
|
|
18
17
|
}
|
|
19
18
|
return Math.min(max !== null && max !== void 0 ? max : Infinity, Math.max(newSetting, min));
|
|
20
19
|
});
|
|
21
|
-
}, [max, min, onValueChanged]);
|
|
20
|
+
}, [max, min, onValueChanged, step]);
|
|
22
21
|
const onValueChange = (0, react_1.useCallback)((newConcurrency) => {
|
|
23
22
|
onValueChanged(newConcurrency);
|
|
24
23
|
}, [onValueChanged]);
|
|
25
|
-
return ((0, jsx_runtime_1.jsxs)("div", { style: layout_2.optionRow, children: [(0, jsx_runtime_1.jsxs)("div", { style: layout_2.label, children: [name, hint ? ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(layout_1.Spacing, { x: 0.
|
|
24
|
+
return ((0, jsx_runtime_1.jsxs)("div", { style: layout_2.optionRow, children: [(0, jsx_runtime_1.jsxs)("div", { style: layout_2.label, children: [name, hint ? ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(layout_1.Spacing, { x: 0.5 }), (0, jsx_runtime_1.jsx)(OptionExplainerBubble_1.OptionExplainerBubble, { id: hint })] })) : null] }), (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: value, name: name.toLowerCase(), onTextChange: onTextChanged, onValueChange: onValueChange, step: step, placeholder: [min, max]
|
|
26
25
|
.map((f) => (f !== null && f !== undefined ? f : ''))
|
|
27
26
|
.join('-'), min: min, max: max, formatter: formatter, status: "ok", rightAlign: true }) }) })] }));
|
|
28
27
|
};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.OptionExplainerBubble = void 0;
|
|
4
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
+
const client_1 = require("@remotion/renderer/client");
|
|
6
|
+
const InfoBubble_1 = require("./InfoBubble");
|
|
7
|
+
const OptionExplainer_1 = require("./OptionExplainer");
|
|
8
|
+
const OptionExplainerBubble = ({ id }) => {
|
|
9
|
+
const option = client_1.BrowserSafeApis.options[id];
|
|
10
|
+
return ((0, jsx_runtime_1.jsx)(InfoBubble_1.InfoBubble, { title: "Learn more about this option", children: (0, jsx_runtime_1.jsx)(OptionExplainer_1.OptionExplainer, { option: option }) }));
|
|
11
|
+
};
|
|
12
|
+
exports.OptionExplainerBubble = OptionExplainerBubble;
|
|
@@ -28,6 +28,9 @@ type RenderModalProps = {
|
|
|
28
28
|
initialOffthreadVideoCacheSizeInBytes: number | null;
|
|
29
29
|
initialHeadless: boolean;
|
|
30
30
|
initialColorSpace: ColorSpace;
|
|
31
|
+
initialEncodingMaxRate: string | null;
|
|
32
|
+
initialEncodingBufferSize: string | null;
|
|
33
|
+
initialUserAgent: string | null;
|
|
31
34
|
defaultProps: Record<string, unknown>;
|
|
32
35
|
inFrameMark: number | null;
|
|
33
36
|
outFrameMark: number | null;
|
|
@@ -117,7 +117,7 @@ const outer = {
|
|
|
117
117
|
display: 'flex',
|
|
118
118
|
flexDirection: 'column',
|
|
119
119
|
};
|
|
120
|
-
const RenderModal = ({ initialFrame, initialVideoImageFormat, initialStillImageFormat, initialJpegQuality, initialScale, initialLogLevel, initialConcurrency, maxConcurrency, minConcurrency, initialMuted, initialEnforceAudioTrack, initialProResProfile, initialx264Preset, initialPixelFormat, initialVideoBitrate, initialAudioBitrate, initialEveryNthFrame, initialNumberOfGifLoops, initialDelayRenderTimeout, initialOffthreadVideoCacheSizeInBytes, initialEnvVariables, initialDisableWebSecurity, initialGl, initialHeadless, initialIgnoreCertificateErrors, defaultProps, inFrameMark, outFrameMark, onClose, resolvedComposition, unresolvedComposition, initialColorSpace, initialMultiProcessOnLinux, defaultConfigurationAudioCodec, defaultConfigurationVideoCodec, }) => {
|
|
120
|
+
const RenderModal = ({ initialFrame, initialVideoImageFormat, initialStillImageFormat, initialJpegQuality, initialScale, initialLogLevel, initialConcurrency, maxConcurrency, minConcurrency, initialMuted, initialEnforceAudioTrack, initialProResProfile, initialx264Preset, initialPixelFormat, initialVideoBitrate, initialAudioBitrate, initialEveryNthFrame, initialNumberOfGifLoops, initialDelayRenderTimeout, initialOffthreadVideoCacheSizeInBytes, initialEnvVariables, initialDisableWebSecurity, initialGl, initialHeadless, initialIgnoreCertificateErrors, initialEncodingBufferSize, initialEncodingMaxRate, initialUserAgent, defaultProps, inFrameMark, outFrameMark, onClose, resolvedComposition, unresolvedComposition, initialColorSpace, initialMultiProcessOnLinux, defaultConfigurationAudioCodec, defaultConfigurationVideoCodec, }) => {
|
|
121
121
|
const isMounted = (0, react_1.useRef)(true);
|
|
122
122
|
const [isVideo] = (0, react_1.useState)(() => {
|
|
123
123
|
return typeof resolvedComposition.durationInFrames === 'undefined'
|
|
@@ -165,14 +165,18 @@ const RenderModal = ({ initialFrame, initialVideoImageFormat, initialStillImageF
|
|
|
165
165
|
const [multiProcessOnLinux, setChromiumMultiProcessOnLinux] = (0, react_1.useState)(() => initialMultiProcessOnLinux);
|
|
166
166
|
const [openGlOption, setOpenGlOption] = (0, react_1.useState)(() => initialGl !== null && initialGl !== void 0 ? initialGl : 'default');
|
|
167
167
|
const [colorSpace, setColorSpace] = (0, react_1.useState)(() => initialColorSpace);
|
|
168
|
+
const [userAgent, setUserAgent] = (0, react_1.useState)(() => initialUserAgent === null
|
|
169
|
+
? null
|
|
170
|
+
: initialUserAgent.trim() === ''
|
|
171
|
+
? null
|
|
172
|
+
: initialUserAgent);
|
|
168
173
|
const chromiumOptions = (0, react_1.useMemo)(() => {
|
|
169
174
|
return {
|
|
170
175
|
headless,
|
|
171
176
|
disableWebSecurity,
|
|
172
177
|
ignoreCertificateErrors,
|
|
173
178
|
gl: openGlOption === 'default' ? null : openGlOption,
|
|
174
|
-
|
|
175
|
-
userAgent: null,
|
|
179
|
+
userAgent: userAgent === null ? null : userAgent.trim() === '' ? null : userAgent,
|
|
176
180
|
enableMultiProcessOnLinux: multiProcessOnLinux,
|
|
177
181
|
};
|
|
178
182
|
}, [
|
|
@@ -180,6 +184,7 @@ const RenderModal = ({ initialFrame, initialVideoImageFormat, initialStillImageF
|
|
|
180
184
|
disableWebSecurity,
|
|
181
185
|
ignoreCertificateErrors,
|
|
182
186
|
openGlOption,
|
|
187
|
+
userAgent,
|
|
183
188
|
multiProcessOnLinux,
|
|
184
189
|
]);
|
|
185
190
|
const [outName, setOutName] = (0, react_1.useState)(() => initialOutName);
|
|
@@ -192,6 +197,8 @@ const RenderModal = ({ initialFrame, initialVideoImageFormat, initialStillImageF
|
|
|
192
197
|
const [shouldHaveCustomTargetAudioBitrate, setShouldHaveCustomTargetAudioBitrate,] = (0, react_1.useState)(() => initialAudioBitrate !== null);
|
|
193
198
|
const [customTargetAudioBitrate, setCustomTargetAudioBitrateValue] = (0, react_1.useState)(() => initialAudioBitrate !== null && initialAudioBitrate !== void 0 ? initialAudioBitrate : '320K');
|
|
194
199
|
const [customTargetVideoBitrate, setCustomTargetVideoBitrateValue] = (0, react_1.useState)(() => initialVideoBitrate !== null && initialVideoBitrate !== void 0 ? initialVideoBitrate : '1M');
|
|
200
|
+
const [encodingMaxRate, setEncodingMaxRate] = (0, react_1.useState)(() => initialEncodingMaxRate !== null && initialEncodingMaxRate !== void 0 ? initialEncodingMaxRate : null);
|
|
201
|
+
const [encodingBufferSize, setEncodingBufferSize] = (0, react_1.useState)(() => initialEncodingBufferSize !== null && initialEncodingBufferSize !== void 0 ? initialEncodingBufferSize : null);
|
|
195
202
|
const [limitNumberOfGifLoops, setLimitNumberOfGifLoops] = (0, react_1.useState)(() => initialNumberOfGifLoops !== null);
|
|
196
203
|
const [numberOfGifLoopsSetting, setNumberOfGifLoopsSetting] = (0, react_1.useState)(() => initialNumberOfGifLoops !== null && initialNumberOfGifLoops !== void 0 ? initialNumberOfGifLoops : 1);
|
|
197
204
|
const [delayRenderTimeout, setDelayRenderTimeout] = (0, react_1.useState)(() => initialDelayRenderTimeout);
|
|
@@ -459,6 +466,8 @@ const RenderModal = ({ initialFrame, initialVideoImageFormat, initialStillImageF
|
|
|
459
466
|
offthreadVideoCacheSizeInBytes,
|
|
460
467
|
colorSpace,
|
|
461
468
|
multiProcessOnLinux,
|
|
469
|
+
encodingBufferSize,
|
|
470
|
+
encodingMaxRate,
|
|
462
471
|
})
|
|
463
472
|
.then(() => {
|
|
464
473
|
dispatchIfMounted({ type: 'succeed' });
|
|
@@ -501,6 +510,8 @@ const RenderModal = ({ initialFrame, initialVideoImageFormat, initialStillImageF
|
|
|
501
510
|
offthreadVideoCacheSizeInBytes,
|
|
502
511
|
colorSpace,
|
|
503
512
|
multiProcessOnLinux,
|
|
513
|
+
encodingBufferSize,
|
|
514
|
+
encodingMaxRate,
|
|
504
515
|
onClose,
|
|
505
516
|
]);
|
|
506
517
|
const onClickSequence = (0, react_1.useCallback)(() => {
|
|
@@ -763,7 +774,7 @@ const RenderModal = ({ initialFrame, initialVideoImageFormat, initialStillImageF
|
|
|
763
774
|
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: {
|
|
764
775
|
...buttonStyle,
|
|
765
776
|
backgroundColor: outnameValidation.valid ? colors_1.BLUE : colors_1.BLUE_DISABLED,
|
|
766
|
-
}, 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, pixelFormatOptions: pixelFormatOptions, imageFormatOptions: imageFormatOptions, crf: crf, setCrf: setCrf, customTargetVideoBitrate: customTargetVideoBitrate, maxCrf: maxCrf, minCrf: minCrf, jpegQuality: jpegQuality, qualityControlType: qualityControlType, setJpegQuality: setJpegQuality, setColorSpace: setColorSpace, colorSpace: colorSpace, 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: setLogLevel, logLevel: logLevel, 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, enableMultiProcessOnLinux: multiProcessOnLinux, setChromiumMultiProcessOnLinux: setChromiumMultiProcessOnLinux, codec: codec })) })] })] }));
|
|
777
|
+
}, 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, pixelFormatOptions: pixelFormatOptions, imageFormatOptions: imageFormatOptions, crf: crf, setCrf: setCrf, customTargetVideoBitrate: customTargetVideoBitrate, maxCrf: maxCrf, minCrf: minCrf, jpegQuality: jpegQuality, qualityControlType: qualityControlType, setJpegQuality: setJpegQuality, setColorSpace: setColorSpace, colorSpace: colorSpace, setCustomTargetVideoBitrateValue: setCustomTargetVideoBitrateValue, setQualityControl: setQualityControl, videoImageFormat: videoImageFormat, stillImageFormat: stillImageFormat, shouldDisplayQualityControlPicker: supportsBothQualityControls, encodingBufferSize: encodingBufferSize, setEncodingBufferSize: setEncodingBufferSize, encodingMaxRate: encodingMaxRate, setEncodingMaxRate: setEncodingMaxRate })) : 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: setLogLevel, logLevel: logLevel, 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, enableMultiProcessOnLinux: multiProcessOnLinux, setChromiumMultiProcessOnLinux: setChromiumMultiProcessOnLinux, codec: codec, userAgent: userAgent, setUserAgent: setUserAgent })) })] })] }));
|
|
767
778
|
};
|
|
768
779
|
const RenderModalWithLoader = (props) => {
|
|
769
780
|
const { setSelectedModal } = (0, react_1.useContext)(modals_1.ModalsContext);
|
|
@@ -31,4 +31,6 @@ export declare const RenderModalAdvanced: React.FC<{
|
|
|
31
31
|
codec: Codec;
|
|
32
32
|
enableMultiProcessOnLinux: boolean;
|
|
33
33
|
setChromiumMultiProcessOnLinux: React.Dispatch<React.SetStateAction<boolean>>;
|
|
34
|
+
userAgent: string | null;
|
|
35
|
+
setUserAgent: React.Dispatch<React.SetStateAction<string | null>>;
|
|
34
36
|
}>;
|
|
@@ -7,17 +7,20 @@ const react_1 = require("react");
|
|
|
7
7
|
const presets_labels_1 = require("../../helpers/presets-labels");
|
|
8
8
|
const Checkmark_1 = require("../../icons/Checkmark");
|
|
9
9
|
const Checkbox_1 = require("../Checkbox");
|
|
10
|
+
const layout_1 = require("../layout");
|
|
10
11
|
const is_menu_item_1 = require("../Menu/is-menu-item");
|
|
11
12
|
const ComboBox_1 = require("../NewComposition/ComboBox");
|
|
12
|
-
const
|
|
13
|
+
const RemInput_1 = require("../NewComposition/RemInput");
|
|
14
|
+
const layout_2 = require("./layout");
|
|
13
15
|
const NumberSetting_1 = require("./NumberSetting");
|
|
16
|
+
const OptionExplainerBubble_1 = require("./OptionExplainerBubble");
|
|
14
17
|
const RenderModalEnvironmentVariables_1 = require("./RenderModalEnvironmentVariables");
|
|
15
18
|
const RenderModalHr_1 = require("./RenderModalHr");
|
|
16
19
|
const container = {
|
|
17
20
|
flex: 1,
|
|
18
21
|
overflowY: 'auto',
|
|
19
22
|
};
|
|
20
|
-
const RenderModalAdvanced = ({ renderMode, maxConcurrency, minConcurrency, setConcurrency, concurrency, setVerboseLogging, logLevel, delayRenderTimeout, setDelayRenderTimeout, disallowParallelEncoding, setDisallowParallelEncoding, setDisableWebSecurity, setIgnoreCertificateErrors, setHeadless, headless, ignoreCertificateErrors, disableWebSecurity, openGlOption, setOpenGlOption, setEnvVariables, envVariables, setx264Preset, x264Preset, codec, offthreadVideoCacheSizeInBytes, setOffthreadVideoCacheSizeInBytes, enableMultiProcessOnLinux, setChromiumMultiProcessOnLinux, }) => {
|
|
23
|
+
const RenderModalAdvanced = ({ renderMode, maxConcurrency, minConcurrency, setConcurrency, concurrency, setVerboseLogging, logLevel, delayRenderTimeout, setDelayRenderTimeout, disallowParallelEncoding, setDisallowParallelEncoding, setDisableWebSecurity, setIgnoreCertificateErrors, setHeadless, headless, ignoreCertificateErrors, disableWebSecurity, openGlOption, setOpenGlOption, setEnvVariables, envVariables, setx264Preset, x264Preset, codec, offthreadVideoCacheSizeInBytes, setOffthreadVideoCacheSizeInBytes, enableMultiProcessOnLinux, setChromiumMultiProcessOnLinux, setUserAgent, userAgent, }) => {
|
|
21
24
|
const extendedOpenGlOptions = (0, react_1.useMemo)(() => {
|
|
22
25
|
return [
|
|
23
26
|
'angle',
|
|
@@ -40,6 +43,14 @@ const RenderModalAdvanced = ({ renderMode, maxConcurrency, minConcurrency, setCo
|
|
|
40
43
|
return null;
|
|
41
44
|
});
|
|
42
45
|
}, [setOffthreadVideoCacheSizeInBytes]);
|
|
46
|
+
const toggleCustomUserAgent = (0, react_1.useCallback)(() => {
|
|
47
|
+
setUserAgent((previous) => {
|
|
48
|
+
if (previous === null) {
|
|
49
|
+
return 'Mozilla/5.0 (Remotion)';
|
|
50
|
+
}
|
|
51
|
+
return null;
|
|
52
|
+
});
|
|
53
|
+
}, [setUserAgent]);
|
|
43
54
|
const onDisallowParallelEncodingChanged = (0, react_1.useCallback)((e) => {
|
|
44
55
|
setDisallowParallelEncoding(e.target.checked);
|
|
45
56
|
}, [setDisallowParallelEncoding]);
|
|
@@ -55,6 +66,9 @@ const RenderModalAdvanced = ({ renderMode, maxConcurrency, minConcurrency, setCo
|
|
|
55
66
|
const onHeadless = (0, react_1.useCallback)((e) => {
|
|
56
67
|
setHeadless(e.target.checked);
|
|
57
68
|
}, [setHeadless]);
|
|
69
|
+
const onUserAgentChanged = (0, react_1.useCallback)((e) => {
|
|
70
|
+
setUserAgent(e.target.value);
|
|
71
|
+
}, [setUserAgent]);
|
|
58
72
|
const openGlOptions = (0, react_1.useMemo)(() => {
|
|
59
73
|
return extendedOpenGlOptions.map((option) => {
|
|
60
74
|
return {
|
|
@@ -99,11 +113,11 @@ const RenderModalAdvanced = ({ renderMode, maxConcurrency, minConcurrency, setCo
|
|
|
99
113
|
return cb;
|
|
100
114
|
});
|
|
101
115
|
}, [setOffthreadVideoCacheSizeInBytes]);
|
|
102
|
-
return ((0, jsx_runtime_1.jsxs)("div", { style: container, className: is_menu_item_1.VERTICAL_SCROLLBAR_CLASSNAME, children: [
|
|
116
|
+
return ((0, jsx_runtime_1.jsxs)("div", { style: container, className: is_menu_item_1.VERTICAL_SCROLLBAR_CLASSNAME, children: [(0, jsx_runtime_1.jsxs)("div", { style: layout_2.optionRow, children: [(0, jsx_runtime_1.jsx)("div", { style: layout_2.label, children: "Verbose logging" }), (0, jsx_runtime_1.jsx)("div", { style: layout_2.rightRow, children: (0, jsx_runtime_1.jsx)(Checkbox_1.Checkbox, { checked: logLevel === 'verbose', onChange: onVerboseLoggingChanged, name: "verbose-logging" }) })] }), 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 })), renderMode === 'video' && codec === 'h264' ? ((0, jsx_runtime_1.jsxs)("div", { style: layout_2.optionRow, children: [(0, jsx_runtime_1.jsx)("div", { style: layout_2.label, children: "x264 Preset" }), (0, jsx_runtime_1.jsx)("div", { style: layout_2.rightRow, children: (0, jsx_runtime_1.jsx)(ComboBox_1.Combobox, { title: x264Preset, selectedId: x264Preset, values: x264PresetOptions }) })] })) : null, (0, jsx_runtime_1.jsx)(NumberSetting_1.NumberSetting
|
|
103
117
|
// Also appears in packages/renderer/src/validate-puppeteer-timeout.ts
|
|
104
118
|
, {
|
|
105
119
|
// Also appears in packages/renderer/src/validate-puppeteer-timeout.ts
|
|
106
|
-
min: 7000, max: 900000, name: "delayRender() timeout", onValueChanged: setDelayRenderTimeout, formatter: (w) => `${w}ms`, step: 1000, value: delayRenderTimeout }), (0, jsx_runtime_1.jsxs)("div", { style:
|
|
107
|
-
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:
|
|
120
|
+
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_2.optionRow, children: [(0, jsx_runtime_1.jsx)("div", { style: layout_2.label, children: "No parallel encoding" }), (0, jsx_runtime_1.jsx)("div", { style: layout_2.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_2.optionRow, children: [(0, jsx_runtime_1.jsx)("div", { style: layout_2.label, children: "Custom OffthreadVideo cache" }), (0, jsx_runtime_1.jsx)(layout_1.Spacing, { x: 0.5 }), (0, jsx_runtime_1.jsx)(OptionExplainerBubble_1.OptionExplainerBubble, { id: "offthreadVideoCacheSizeInBytes" }), (0, jsx_runtime_1.jsx)("div", { style: layout_2.rightRow, children: (0, jsx_runtime_1.jsx)(Checkbox_1.Checkbox, { checked: offthreadVideoCacheSizeInBytes !== null, onChange: toggleCustomOffthreadVideoCacheSizeInBytes, name: "custom-audio-bitrate" }) })] })), renderMode === 'audio' ||
|
|
121
|
+
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.jsx)(RenderModalHr_1.RenderModalHr, {}), (0, jsx_runtime_1.jsxs)("div", { style: layout_2.optionRow, children: [(0, jsx_runtime_1.jsx)("div", { style: layout_2.label, children: "Disable web security" }), (0, jsx_runtime_1.jsx)("div", { style: layout_2.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_2.optionRow, children: [(0, jsx_runtime_1.jsx)("div", { style: layout_2.label, children: "Ignore certificate errors" }), (0, jsx_runtime_1.jsx)("div", { style: layout_2.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_2.optionRow, children: [(0, jsx_runtime_1.jsx)("div", { style: layout_2.label, children: "Headless mode" }), (0, jsx_runtime_1.jsx)("div", { style: layout_2.rightRow, children: (0, jsx_runtime_1.jsx)(Checkbox_1.Checkbox, { checked: headless, onChange: onHeadless, name: "headless" }) })] }), (0, jsx_runtime_1.jsxs)("div", { style: layout_2.optionRow, children: [(0, jsx_runtime_1.jsxs)("div", { style: layout_2.label, children: ["OpenGL render backend ", (0, jsx_runtime_1.jsx)(layout_1.Spacing, { x: 0.5 }), (0, jsx_runtime_1.jsx)(OptionExplainerBubble_1.OptionExplainerBubble, { id: "glOption" })] }), (0, jsx_runtime_1.jsx)("div", { style: layout_2.rightRow, children: (0, jsx_runtime_1.jsx)(ComboBox_1.Combobox, { values: openGlOptions, selectedId: openGlOption, title: "OpenGl option" }) })] }), (0, jsx_runtime_1.jsxs)("div", { style: layout_2.optionRow, children: [(0, jsx_runtime_1.jsx)("div", { style: layout_2.label, children: "Multi-process Chrome on Linux" }), (0, jsx_runtime_1.jsx)(layout_1.Spacing, { x: 0.5 }), (0, jsx_runtime_1.jsx)(OptionExplainerBubble_1.OptionExplainerBubble, { id: "enableMultiprocessOnLinuxOption" }), (0, jsx_runtime_1.jsx)("div", { style: layout_2.rightRow, children: (0, jsx_runtime_1.jsx)(Checkbox_1.Checkbox, { checked: enableMultiProcessOnLinux, onChange: onEnableMultiProcessOnLinux, name: "enable-multi-process-on-linux" }) })] }), (0, jsx_runtime_1.jsxs)("div", { style: layout_2.optionRow, children: [(0, jsx_runtime_1.jsx)("div", { style: layout_2.label, children: "Custom User Agent" }), (0, jsx_runtime_1.jsx)("div", { style: layout_2.rightRow, children: (0, jsx_runtime_1.jsx)(Checkbox_1.Checkbox, { checked: userAgent !== null, onChange: toggleCustomUserAgent, name: "custom-user-agent" }) })] }), userAgent === null ? null : ((0, jsx_runtime_1.jsxs)("div", { style: layout_2.optionRow, children: [(0, jsx_runtime_1.jsx)("div", { style: layout_2.label, children: "User Agent" }), (0, jsx_runtime_1.jsx)("div", { style: layout_2.rightRow, children: (0, jsx_runtime_1.jsx)("div", { children: (0, jsx_runtime_1.jsx)(RemInput_1.RemotionInput, { style: layout_2.input, value: userAgent, onChange: onUserAgentChanged, status: "ok", rightAlign: true }) }) })] })), (0, jsx_runtime_1.jsx)(RenderModalHr_1.RenderModalHr, {}), (0, jsx_runtime_1.jsx)(RenderModalEnvironmentVariables_1.RenderModalEnvironmentVariables, { envVariables: envVariables, setEnvVariables: setEnvVariables })] }));
|
|
108
122
|
};
|
|
109
123
|
exports.RenderModalAdvanced = RenderModalAdvanced;
|
|
@@ -6,14 +6,14 @@ const client_1 = require("@remotion/renderer/client");
|
|
|
6
6
|
const react_1 = require("react");
|
|
7
7
|
const Checkmark_1 = require("../../icons/Checkmark");
|
|
8
8
|
const Checkbox_1 = require("../Checkbox");
|
|
9
|
+
const layout_1 = require("../layout");
|
|
9
10
|
const ComboBox_1 = require("../NewComposition/ComboBox");
|
|
10
11
|
const RemInput_1 = require("../NewComposition/RemInput");
|
|
11
12
|
const EnforceAudioTrackSetting_1 = require("./EnforceAudioTrackSetting");
|
|
12
13
|
const human_readable_audio_codecs_1 = require("./human-readable-audio-codecs");
|
|
13
|
-
const
|
|
14
|
-
const layout_1 = require("./layout");
|
|
14
|
+
const layout_2 = require("./layout");
|
|
15
15
|
const MutedSetting_1 = require("./MutedSetting");
|
|
16
|
-
const
|
|
16
|
+
const OptionExplainerBubble_1 = require("./OptionExplainerBubble");
|
|
17
17
|
const RenderModalHr_1 = require("./RenderModalHr");
|
|
18
18
|
const container = {
|
|
19
19
|
flex: 1,
|
|
@@ -41,6 +41,6 @@ const RenderModalAudio = ({ muted, setMuted, renderMode, enforceAudioTrack, setE
|
|
|
41
41
|
};
|
|
42
42
|
});
|
|
43
43
|
}, [codec, setAudioCodec]);
|
|
44
|
-
return ((0, jsx_runtime_1.jsxs)("div", { style: container, children: [renderMode === 'video' && audioCodecOptions(codec).length >= 2 ? ((0, jsx_runtime_1.jsxs)("div", { style:
|
|
44
|
+
return ((0, jsx_runtime_1.jsxs)("div", { style: container, children: [renderMode === 'video' && audioCodecOptions(codec).length >= 2 ? ((0, jsx_runtime_1.jsxs)("div", { style: layout_2.optionRow, children: [(0, jsx_runtime_1.jsx)("div", { style: layout_2.label, children: "Audio Codec" }), (0, jsx_runtime_1.jsx)("div", { style: layout_2.rightRow, children: (0, jsx_runtime_1.jsx)(ComboBox_1.Combobox, { values: audioCodecOptions(codec), selectedId: audioCodec, title: "AudioCodec" }) })] })) : null, renderMode === 'video' ? ((0, jsx_runtime_1.jsx)(MutedSetting_1.MutedSetting, { enforceAudioTrack: enforceAudioTrack, muted: muted, setMuted: setMuted })) : null, (renderMode === 'video' || renderMode === 'audio') && ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(EnforceAudioTrackSetting_1.EnforceAudioTrackSetting, { muted: muted, enforceAudioTrack: enforceAudioTrack, setEnforceAudioTrack: setEnforceAudioTrackState }), (0, jsx_runtime_1.jsx)(RenderModalHr_1.RenderModalHr, {})] })), renderMode === 'still' ? null : ((0, jsx_runtime_1.jsxs)("div", { style: layout_2.optionRow, children: [(0, jsx_runtime_1.jsx)("div", { style: layout_2.label, children: "Custom audio bitrate" }), (0, jsx_runtime_1.jsx)(layout_1.Spacing, { x: 0.5 }), (0, jsx_runtime_1.jsx)(OptionExplainerBubble_1.OptionExplainerBubble, { id: "audioBitrateOption" }), (0, jsx_runtime_1.jsx)("div", { style: layout_2.rightRow, children: (0, jsx_runtime_1.jsx)(Checkbox_1.Checkbox, { checked: shouldHaveCustomTargetAudioBitrate, onChange: onShouldHaveTargetAudioBitrateChanged, name: "custom-audio-bitrate" }) })] })), shouldHaveCustomTargetAudioBitrate && renderMode !== 'still' ? ((0, jsx_runtime_1.jsxs)("div", { style: layout_2.optionRow, children: [(0, jsx_runtime_1.jsx)("div", { style: layout_2.label, children: "Target audio bitrate" }), (0, jsx_runtime_1.jsx)("div", { style: layout_2.rightRow, children: (0, jsx_runtime_1.jsx)("div", { children: (0, jsx_runtime_1.jsx)(RemInput_1.RemotionInput, { style: layout_2.input, value: customTargetAudioBitrate, onChange: onTargetAudioBitrateChanged, status: "ok", rightAlign: true }) }) })] })) : null] }));
|
|
45
45
|
};
|
|
46
46
|
exports.RenderModalAudio = RenderModalAudio;
|
|
@@ -14,9 +14,8 @@ const RemInput_1 = require("../NewComposition/RemInput");
|
|
|
14
14
|
const SegmentedControl_1 = require("../SegmentedControl");
|
|
15
15
|
const FrameRangeSetting_1 = require("./FrameRangeSetting");
|
|
16
16
|
const human_readable_codec_1 = require("./human-readable-codec");
|
|
17
|
-
const InfoBubble_1 = require("./InfoBubble");
|
|
18
17
|
const layout_2 = require("./layout");
|
|
19
|
-
const
|
|
18
|
+
const OptionExplainerBubble_1 = require("./OptionExplainerBubble");
|
|
20
19
|
const RenderModalInput_1 = require("./RenderModalInput");
|
|
21
20
|
const container = {
|
|
22
21
|
flex: 1,
|
|
@@ -75,6 +74,6 @@ const RenderModalBasic = ({ renderMode, imageFormatOptions, outName, codec, setV
|
|
|
75
74
|
const onValueChange = (0, react_1.useCallback)((e) => {
|
|
76
75
|
setOutName(e.target.value);
|
|
77
76
|
}, [setOutName]);
|
|
78
|
-
return ((0, jsx_runtime_1.jsxs)("div", { style: container, children: [renderMode === 'still' || renderMode === 'sequence' ? ((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)(
|
|
77
|
+
return ((0, jsx_runtime_1.jsxs)("div", { style: container, children: [renderMode === 'still' || renderMode === 'sequence' ? ((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)(OptionExplainerBubble_1.OptionExplainerBubble, { id: "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, renderType: renderMode })] }));
|
|
79
78
|
};
|
|
80
79
|
exports.RenderModalBasic = RenderModalBasic;
|
|
@@ -27,5 +27,9 @@ export declare const RenderModalPicture: React.FC<{
|
|
|
27
27
|
customTargetVideoBitrate: string;
|
|
28
28
|
shouldDisplayQualityControlPicker: boolean;
|
|
29
29
|
pixelFormatOptions: ComboboxValue[];
|
|
30
|
+
encodingBufferSize: string | null;
|
|
31
|
+
setEncodingBufferSize: React.Dispatch<React.SetStateAction<string | null>>;
|
|
32
|
+
encodingMaxRate: string | null;
|
|
33
|
+
setEncodingMaxRate: React.Dispatch<React.SetStateAction<string | null>>;
|
|
30
34
|
}>;
|
|
31
35
|
export {};
|