@remotion/cli 4.0.50 → 4.0.52
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 +9 -8
- package/dist/config/chromium-flags.d.ts +1 -1
- package/dist/config/index.d.ts +3 -3
- package/dist/config/log.d.ts +1 -1
- package/dist/editor/components/CurrentComposition.d.ts +0 -1
- package/dist/editor/components/Modals.js +1 -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/RenderButton.js +2 -19
- package/dist/editor/components/RenderModal/RenderModal.d.ts +2 -6
- package/dist/editor/components/RenderModal/RenderModal.js +25 -1
- package/dist/editor/components/RenderModal/RenderModalAdvanced.js +9 -1
- package/dist/editor/components/SidebarRenderButton.js +3 -28
- package/dist/editor/components/Timeline/TimelineInOutPointerHandle.d.ts +4 -2
- package/dist/editor/components/Timeline/TimelineInOutPointerHandle.js +10 -5
- package/dist/editor/components/UpdateCheck.d.ts +0 -1
- package/dist/editor/helpers/colors.d.ts +1 -1
- package/dist/editor/state/modals.d.ts +2 -6
- package/dist/get-cli-options.d.ts +1 -1
- package/dist/get-cli-options.js +12 -3
- package/dist/get-final-output-codec.d.ts +2 -1
- package/dist/get-final-output-codec.js +4 -1
- package/dist/gpu.d.ts +2 -0
- package/dist/gpu.js +43 -0
- package/dist/index.d.ts +11 -10
- package/dist/index.js +4 -0
- package/dist/list-of-remotion-packages.js +1 -0
- package/dist/log.d.ts +4 -4
- package/dist/make-on-download.d.ts +3 -1
- package/dist/make-on-download.js +3 -1
- package/dist/preview-server/render-queue/get-default-video-contexts.d.ts +8 -4
- package/dist/preview-server/render-queue/get-default-video-contexts.js +21 -5
- package/dist/preview-server/render-queue/make-retry-payload.js +6 -28
- package/dist/print-help.js +37 -66
- package/dist/progress-bar.d.ts +2 -1
- package/dist/progress-bar.js +4 -3
- package/dist/render-flows/render.js +8 -1
- package/dist/render-flows/still.js +18 -4
- package/package.json +8 -8
- package/dist/config/presets-profile.d.ts +0 -3
- package/dist/config/presets-profile.js +0 -12
- package/dist/editor/components/DownloadButton.d.ts +0 -0
- package/dist/editor/components/DownloadButton.js +0 -1
- package/dist/handle-common-errors.d.ts +0 -2
- package/dist/handle-common-errors.js +0 -60
package/dist/benchmark.js
CHANGED
|
@@ -84,7 +84,7 @@ const makeBenchmarkProgressBar = ({ totalRuns, run, progress, doneIn, }) => {
|
|
|
84
84
|
].join(' ');
|
|
85
85
|
};
|
|
86
86
|
const benchmarkCommand = async (remotionRoot, args) => {
|
|
87
|
-
var _a, _b;
|
|
87
|
+
var _a, _b, _c;
|
|
88
88
|
const runs = (_a = parse_command_line_1.parsedCli.runs) !== null && _a !== void 0 ? _a : DEFAULT_RUNS;
|
|
89
89
|
const { file, reason, remainingArgs } = (0, entry_point_1.findEntryPoint)(args, remotionRoot);
|
|
90
90
|
if (!file) {
|
|
@@ -165,14 +165,15 @@ const benchmarkCommand = async (remotionRoot, args) => {
|
|
|
165
165
|
}
|
|
166
166
|
const benchmark = {};
|
|
167
167
|
let count = 1;
|
|
168
|
-
const { codec, reason: codecReason } = (0, get_final_output_codec_1.getFinalOutputCodec)({
|
|
169
|
-
cliFlag: parse_command_line_1.parsedCli.codec,
|
|
170
|
-
downloadName: null,
|
|
171
|
-
outName: null,
|
|
172
|
-
configFile: (_b = config_1.ConfigInternals.getOutputCodecOrUndefined()) !== null && _b !== void 0 ? _b : null,
|
|
173
|
-
uiCodec: null,
|
|
174
|
-
});
|
|
175
168
|
for (const composition of compositions) {
|
|
169
|
+
const { codec, reason: codecReason } = (0, get_final_output_codec_1.getFinalOutputCodec)({
|
|
170
|
+
cliFlag: parse_command_line_1.parsedCli.codec,
|
|
171
|
+
downloadName: null,
|
|
172
|
+
outName: null,
|
|
173
|
+
configFile: (_b = config_1.ConfigInternals.getOutputCodecOrUndefined()) !== null && _b !== void 0 ? _b : null,
|
|
174
|
+
uiCodec: null,
|
|
175
|
+
compositionCodec: (_c = composition.defaultCodec) !== null && _c !== void 0 ? _c : null,
|
|
176
|
+
});
|
|
176
177
|
const concurrency = getValidConcurrency(unparsedConcurrency);
|
|
177
178
|
benchmark[composition.id] = {};
|
|
178
179
|
for (const con of concurrency) {
|
|
@@ -3,7 +3,7 @@ export declare const getChromiumDisableWebSecurity: () => boolean;
|
|
|
3
3
|
export declare const setChromiumDisableWebSecurity: (should: boolean) => void;
|
|
4
4
|
export declare const getIgnoreCertificateErrors: () => boolean;
|
|
5
5
|
export declare const setChromiumIgnoreCertificateErrors: (should: boolean) => void;
|
|
6
|
-
export declare const getChromiumOpenGlRenderer: () => "swangle" | "angle" | "egl" | "swiftshader" | "vulkan" | null;
|
|
6
|
+
export declare const getChromiumOpenGlRenderer: () => "swangle" | "angle" | "egl" | "swiftshader" | "vulkan" | "angle-egl" | null;
|
|
7
7
|
export declare const setChromiumOpenGlRenderer: (renderer: OpenGlRenderer) => void;
|
|
8
8
|
export declare const getChromiumHeadlessMode: () => boolean;
|
|
9
9
|
export declare const setChromiumHeadlessMode: (should: boolean) => void;
|
package/dist/config/index.d.ts
CHANGED
|
@@ -103,10 +103,10 @@ declare global {
|
|
|
103
103
|
*/
|
|
104
104
|
readonly setChromiumHeadlessMode: (should: boolean) => void;
|
|
105
105
|
/**
|
|
106
|
-
* Set the OpenGL rendering backend for Chrome. Possible values: 'egl', 'angle', 'swiftshader', 'swangle' and '
|
|
106
|
+
* Set the OpenGL rendering backend for Chrome. Possible values: 'egl', 'angle', 'swiftshader', 'swangle', 'vulkan' and 'angle-egl'.
|
|
107
107
|
* Default: 'swangle' in Lambda, null elsewhere.
|
|
108
108
|
*/
|
|
109
|
-
readonly setChromiumOpenGlRenderer: (renderer: 'swangle' | 'angle' | 'egl' | 'swiftshader' | 'vulkan') => void;
|
|
109
|
+
readonly setChromiumOpenGlRenderer: (renderer: 'swangle' | 'angle' | 'egl' | 'swiftshader' | 'vulkan' | 'angle-egl') => void;
|
|
110
110
|
/**
|
|
111
111
|
* Set the user agent for Chrome. Only works during rendering.
|
|
112
112
|
* Default is the default user agent for Chrome
|
|
@@ -306,7 +306,7 @@ export declare const ConfigInternals: {
|
|
|
306
306
|
getChromiumDisableWebSecurity: () => boolean;
|
|
307
307
|
getIgnoreCertificateErrors: () => boolean;
|
|
308
308
|
getChromiumHeadlessMode: () => boolean;
|
|
309
|
-
getChromiumOpenGlRenderer: () => "swangle" | "angle" | "egl" | "swiftshader" | "vulkan" | null;
|
|
309
|
+
getChromiumOpenGlRenderer: () => "swangle" | "angle" | "egl" | "swiftshader" | "vulkan" | "angle-egl" | null;
|
|
310
310
|
getEveryNthFrame: () => number;
|
|
311
311
|
getConcurrency: () => string | number | null;
|
|
312
312
|
getCurrentPuppeteerTimeout: () => number;
|
package/dist/config/log.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const getLogLevel: () => "
|
|
1
|
+
export declare const getLogLevel: () => "error" | "verbose" | "info" | "warn", setLogLevel: (newLogLevel: "error" | "verbose" | "info" | "warn") => void;
|
|
@@ -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,
|
|
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, initialVerbose: modalContextType.initialVerbose, 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, defaultProps: modalContextType.defaultProps, inFrameMark: modalContextType.inFrameMark, outFrameMark: modalContextType.outFrameMark, initialColorSpace: modalContextType.initialColorSpace, initialMultiProcessOnLinux: modalContextType.initialMultiProcessOnLinux, 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
|
-
}) => "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, "key" |
|
|
15
|
+
}) => "#ff3232" | "hsla(0, 0%, 100%, 0.15)" | "#f1c40f" | "rgba(0, 0, 0, 0.6)" | "rgba(255, 255, 255, 0.05)";
|
|
16
|
+
export declare const RemotionInput: React.ForwardRefExoticComponent<Pick<Props, "key" | "status" | "rightAlign" | keyof React.InputHTMLAttributes<HTMLInputElement>> & 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, "key" | keyof React.InputHTMLAttributes<HTMLInputElement
|
|
7
|
+
export declare const RemInputTypeColor: React.ForwardRefExoticComponent<Pick<Props, "key" | "status" | keyof React.InputHTMLAttributes<HTMLInputElement>> & React.RefAttributes<HTMLInputElement>>;
|
|
8
8
|
export {};
|
|
@@ -2,12 +2,9 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.RenderButton = void 0;
|
|
4
4
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
-
const client_1 = require("@remotion/renderer/client");
|
|
6
5
|
const react_1 = require("react");
|
|
7
6
|
const remotion_1 = require("remotion");
|
|
8
|
-
const get_default_out_name_1 = require("../../get-default-out-name");
|
|
9
7
|
const Button_1 = require("../../preview-server/error-overlay/remotion-overlay/Button");
|
|
10
|
-
const get_default_video_contexts_1 = require("../../preview-server/render-queue/get-default-video-contexts");
|
|
11
8
|
const client_id_1 = require("../helpers/client-id");
|
|
12
9
|
const use_keybinding_1 = require("../helpers/use-keybinding");
|
|
13
10
|
const render_1 = require("../icons/render");
|
|
@@ -48,34 +45,19 @@ const RenderButton = () => {
|
|
|
48
45
|
if (!video) {
|
|
49
46
|
return null;
|
|
50
47
|
}
|
|
51
|
-
const isVideo = video.durationInFrames > 1;
|
|
52
48
|
const defaults = window.remotion_renderDefaults;
|
|
53
49
|
if (!defaults) {
|
|
54
50
|
throw new TypeError('Expected defaults');
|
|
55
51
|
}
|
|
56
|
-
const { initialAudioCodec, initialRenderType, initialVideoCodec } = (0, get_default_video_contexts_1.getDefaultCodecs)({
|
|
57
|
-
defaultCodec: defaults.codec,
|
|
58
|
-
renderType: isVideo ? 'video' : 'still',
|
|
59
|
-
});
|
|
60
52
|
setSelectedModal({
|
|
61
53
|
type: 'render',
|
|
62
54
|
compositionId: video.id,
|
|
63
55
|
initialFrame: frame,
|
|
64
56
|
initialStillImageFormat: defaults.stillImageFormat,
|
|
65
57
|
initialVideoImageFormat: defaults.videoImageFormat,
|
|
66
|
-
initialOutName: (0, get_default_out_name_1.getDefaultOutLocation)({
|
|
67
|
-
compositionName: video.id,
|
|
68
|
-
defaultExtension: isVideo
|
|
69
|
-
? client_1.BrowserSafeApis.getFileExtensionFromCodec(initialVideoCodec, defaults.audioCodec)
|
|
70
|
-
: defaults.stillImageFormat,
|
|
71
|
-
type: 'asset',
|
|
72
|
-
}),
|
|
73
58
|
initialJpegQuality: defaults.jpegQuality,
|
|
74
59
|
initialScale: (_b = (_a = window.remotion_renderDefaults) === null || _a === void 0 ? void 0 : _a.scale) !== null && _b !== void 0 ? _b : 1,
|
|
75
60
|
initialVerbose: defaults.logLevel === 'verbose',
|
|
76
|
-
initialVideoCodecForAudioTab: initialAudioCodec,
|
|
77
|
-
initialRenderType,
|
|
78
|
-
initialVideoCodecForVideoTab: initialVideoCodec,
|
|
79
61
|
initialConcurrency: defaults.concurrency,
|
|
80
62
|
maxConcurrency: defaults.maxConcurrency,
|
|
81
63
|
minConcurrency: defaults.minConcurrency,
|
|
@@ -89,7 +71,7 @@ const RenderButton = () => {
|
|
|
89
71
|
initialEveryNthFrame: defaults.everyNthFrame,
|
|
90
72
|
initialNumberOfGifLoops: defaults.numberOfGifLoops,
|
|
91
73
|
initialDelayRenderTimeout: defaults.delayRenderTimeout,
|
|
92
|
-
|
|
74
|
+
defaultConfigurationAudioCodec: defaults.audioCodec,
|
|
93
75
|
initialEnvVariables: window.process.env,
|
|
94
76
|
initialDisableWebSecurity: defaults.disableWebSecurity,
|
|
95
77
|
initialOpenGlRenderer: defaults.openGlRenderer,
|
|
@@ -101,6 +83,7 @@ const RenderButton = () => {
|
|
|
101
83
|
outFrameMark: outFrame,
|
|
102
84
|
initialColorSpace: defaults.colorSpace,
|
|
103
85
|
initialMultiProcessOnLinux: defaults.multiProcessOnLinux,
|
|
86
|
+
defaultConfigurationVideoCodec: defaults.codec,
|
|
104
87
|
});
|
|
105
88
|
}, [video, setSelectedModal, frame, props, inFrame, outFrame]);
|
|
106
89
|
if (!video) {
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import type { AudioCodec, Codec, ColorSpace, OpenGlRenderer, PixelFormat, ProResProfile, StillImageFormat, VideoImageFormat, X264Preset } from '@remotion/renderer';
|
|
2
2
|
import React from 'react';
|
|
3
|
-
import type { RenderType } from './RenderModalAdvanced';
|
|
4
3
|
type RenderModalProps = {
|
|
5
4
|
compositionId: string;
|
|
6
5
|
initialFrame: number;
|
|
@@ -9,11 +8,6 @@ type RenderModalProps = {
|
|
|
9
8
|
initialJpegQuality: number;
|
|
10
9
|
initialScale: number;
|
|
11
10
|
initialVerbose: boolean;
|
|
12
|
-
initialOutName: string;
|
|
13
|
-
initialRenderType: RenderType;
|
|
14
|
-
initialVideoCodecForAudioTab: Codec;
|
|
15
|
-
initialVideoCodecForVideoTab: Codec;
|
|
16
|
-
initialAudioCodec: AudioCodec | null;
|
|
17
11
|
initialConcurrency: number;
|
|
18
12
|
minConcurrency: number;
|
|
19
13
|
maxConcurrency: number;
|
|
@@ -38,6 +32,8 @@ type RenderModalProps = {
|
|
|
38
32
|
inFrameMark: number | null;
|
|
39
33
|
outFrameMark: number | null;
|
|
40
34
|
initialMultiProcessOnLinux: boolean;
|
|
35
|
+
defaultConfigurationVideoCodec: Codec | null;
|
|
36
|
+
defaultConfigurationAudioCodec: AudioCodec | null;
|
|
41
37
|
};
|
|
42
38
|
export declare const RenderModalWithLoader: React.FC<RenderModalProps>;
|
|
43
39
|
export {};
|
|
@@ -16,6 +16,8 @@ const file_1 = require("../../icons/file");
|
|
|
16
16
|
const frame_1 = require("../../icons/frame");
|
|
17
17
|
const gear_1 = require("../../icons/gear");
|
|
18
18
|
const gif_1 = require("../../icons/gif");
|
|
19
|
+
const get_default_out_name_1 = require("../../../get-default-out-name");
|
|
20
|
+
const get_default_video_contexts_1 = require("../../../preview-server/render-queue/get-default-video-contexts");
|
|
19
21
|
const colors_1 = require("../../helpers/colors");
|
|
20
22
|
const modals_1 = require("../../state/modals");
|
|
21
23
|
const sidebar_1 = require("../../state/sidebar");
|
|
@@ -114,8 +116,21 @@ const outer = {
|
|
|
114
116
|
display: 'flex',
|
|
115
117
|
flexDirection: 'column',
|
|
116
118
|
};
|
|
117
|
-
const RenderModal = ({ initialFrame, initialVideoImageFormat, initialStillImageFormat, initialJpegQuality, initialScale, initialVerbose,
|
|
119
|
+
const RenderModal = ({ initialFrame, initialVideoImageFormat, initialStillImageFormat, initialJpegQuality, initialScale, initialVerbose, 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, }) => {
|
|
118
120
|
const isMounted = (0, react_1.useRef)(true);
|
|
121
|
+
const [isVideo] = (0, react_1.useState)(() => {
|
|
122
|
+
return typeof resolvedComposition.durationInFrames === 'undefined'
|
|
123
|
+
? true
|
|
124
|
+
: resolvedComposition.durationInFrames > 1;
|
|
125
|
+
});
|
|
126
|
+
const [{ initialAudioCodec, initialRenderType, initialVideoCodec, initialVideoCodecForAudioTab, initialVideoCodecForVideoTab, },] = (0, react_1.useState)(() => {
|
|
127
|
+
return (0, get_default_video_contexts_1.getDefaultCodecs)({
|
|
128
|
+
defaultConfigurationVideoCodec,
|
|
129
|
+
compositionDefaultVideoCodec: resolvedComposition.defaultCodec,
|
|
130
|
+
defaultConfigurationAudioCodec,
|
|
131
|
+
renderType: isVideo ? 'video' : 'still',
|
|
132
|
+
});
|
|
133
|
+
});
|
|
119
134
|
const [state, dispatch] = (0, react_1.useReducer)(reducer, initialState);
|
|
120
135
|
const [unclampedFrame, setFrame] = (0, react_1.useState)(() => initialFrame);
|
|
121
136
|
const [saving, setSaving] = (0, react_1.useState)(false);
|
|
@@ -126,6 +141,15 @@ const RenderModal = ({ initialFrame, initialVideoImageFormat, initialStillImageF
|
|
|
126
141
|
const [videoCodecForVideoTab, setVideoCodecForVideoTab] = (0, react_1.useState)(() => initialVideoCodecForVideoTab);
|
|
127
142
|
const [userSelectedAudioCodec, setUserSelectedAudioCodec] = (0, react_1.useState)(() => initialAudioCodec);
|
|
128
143
|
const [envVariables, setEnvVariables] = (0, react_1.useState)(() => (0, convert_env_variables_1.envVariablesObjectToArray)(initialEnvVariables).filter(([key]) => key !== 'NODE_ENV'));
|
|
144
|
+
const [initialOutName] = (0, react_1.useState)(() => {
|
|
145
|
+
return (0, get_default_out_name_1.getDefaultOutLocation)({
|
|
146
|
+
compositionName: resolvedComposition.id,
|
|
147
|
+
defaultExtension: isVideo
|
|
148
|
+
? client_1.BrowserSafeApis.getFileExtensionFromCodec(initialVideoCodec, initialAudioCodec)
|
|
149
|
+
: initialStillImageFormat,
|
|
150
|
+
type: 'asset',
|
|
151
|
+
});
|
|
152
|
+
});
|
|
129
153
|
const [videoCodecForAudioTab, setVideoCodecForAudioTab] = (0, react_1.useState)(() => initialVideoCodecForAudioTab);
|
|
130
154
|
const [mutedState, setMuted] = (0, react_1.useState)(() => initialMuted);
|
|
131
155
|
const [enforceAudioTrackState, setEnforceAudioTrackState] = (0, react_1.useState)(() => initialEnforceAudioTrack);
|
|
@@ -19,7 +19,15 @@ const container = {
|
|
|
19
19
|
};
|
|
20
20
|
const RenderModalAdvanced = ({ renderMode, maxConcurrency, minConcurrency, setConcurrency, concurrency, setVerboseLogging, verbose, delayRenderTimeout, setDelayRenderTimeout, disallowParallelEncoding, setDisallowParallelEncoding, setDisableWebSecurity, setIgnoreCertificateErrors, setHeadless, headless, ignoreCertificateErrors, disableWebSecurity, openGlOption, setOpenGlOption, setEnvVariables, envVariables, setx264Preset, x264Preset, codec, offthreadVideoCacheSizeInBytes, setOffthreadVideoCacheSizeInBytes, enableMultiProcessOnLinux, setChromiumMultiProcessOnLinux, }) => {
|
|
21
21
|
const extendedOpenGlOptions = (0, react_1.useMemo)(() => {
|
|
22
|
-
return [
|
|
22
|
+
return [
|
|
23
|
+
'angle',
|
|
24
|
+
'egl',
|
|
25
|
+
'swangle',
|
|
26
|
+
'swiftshader',
|
|
27
|
+
'vulkan',
|
|
28
|
+
'angle-egl',
|
|
29
|
+
'default',
|
|
30
|
+
];
|
|
23
31
|
}, []);
|
|
24
32
|
const onVerboseLoggingChanged = (0, react_1.useCallback)((e) => {
|
|
25
33
|
setVerboseLogging(e.target.checked);
|
|
@@ -2,11 +2,8 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.SidebarRenderButton = void 0;
|
|
4
4
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
-
const client_1 = require("@remotion/renderer/client");
|
|
6
5
|
const react_1 = require("react");
|
|
7
6
|
const remotion_1 = require("remotion");
|
|
8
|
-
const get_default_out_name_1 = require("../../get-default-out-name");
|
|
9
|
-
const get_default_video_contexts_1 = require("../../preview-server/render-queue/get-default-video-contexts");
|
|
10
7
|
const client_id_1 = require("../helpers/client-id");
|
|
11
8
|
const render_1 = require("../icons/render");
|
|
12
9
|
const modals_1 = require("../state/modals");
|
|
@@ -22,9 +19,6 @@ const SidebarRenderButton = ({ composition, visible }) => {
|
|
|
22
19
|
}, []);
|
|
23
20
|
const connectionStatus = (0, react_1.useContext)(client_id_1.StudioServerConnectionCtx).type;
|
|
24
21
|
const { props } = (0, react_1.useContext)(remotion_1.Internals.EditorPropsContext);
|
|
25
|
-
const isVideo = typeof composition.durationInFrames === 'undefined'
|
|
26
|
-
? true
|
|
27
|
-
: composition.durationInFrames > 1;
|
|
28
22
|
const onClick = (0, react_1.useCallback)((e) => {
|
|
29
23
|
var _a;
|
|
30
24
|
const defaults = window.remotion_renderDefaults;
|
|
@@ -32,10 +26,6 @@ const SidebarRenderButton = ({ composition, visible }) => {
|
|
|
32
26
|
throw new Error('expected defaults');
|
|
33
27
|
}
|
|
34
28
|
e.stopPropagation();
|
|
35
|
-
const { initialAudioCodec, initialRenderType, initialVideoCodec } = (0, get_default_video_contexts_1.getDefaultCodecs)({
|
|
36
|
-
defaultCodec: defaults.codec,
|
|
37
|
-
renderType: isVideo ? 'video' : 'still',
|
|
38
|
-
});
|
|
39
29
|
setSelectedModal({
|
|
40
30
|
type: 'render',
|
|
41
31
|
compositionId: composition.id,
|
|
@@ -45,16 +35,6 @@ const SidebarRenderButton = ({ composition, visible }) => {
|
|
|
45
35
|
initialJpegQuality: defaults.jpegQuality,
|
|
46
36
|
initialScale: defaults.scale,
|
|
47
37
|
initialVerbose: defaults.logLevel === 'verbose',
|
|
48
|
-
initialOutName: (0, get_default_out_name_1.getDefaultOutLocation)({
|
|
49
|
-
compositionName: composition.id,
|
|
50
|
-
defaultExtension: isVideo
|
|
51
|
-
? client_1.BrowserSafeApis.getFileExtensionFromCodec(initialVideoCodec, defaults.audioCodec)
|
|
52
|
-
: defaults.stillImageFormat,
|
|
53
|
-
type: 'asset',
|
|
54
|
-
}),
|
|
55
|
-
initialVideoCodecForAudioTab: initialAudioCodec,
|
|
56
|
-
initialRenderType,
|
|
57
|
-
initialVideoCodecForVideoTab: initialVideoCodec,
|
|
58
38
|
initialConcurrency: defaults.concurrency,
|
|
59
39
|
maxConcurrency: defaults.maxConcurrency,
|
|
60
40
|
minConcurrency: defaults.minConcurrency,
|
|
@@ -68,7 +48,7 @@ const SidebarRenderButton = ({ composition, visible }) => {
|
|
|
68
48
|
initialEveryNthFrame: defaults.everyNthFrame,
|
|
69
49
|
initialNumberOfGifLoops: defaults.numberOfGifLoops,
|
|
70
50
|
initialDelayRenderTimeout: defaults.delayRenderTimeout,
|
|
71
|
-
|
|
51
|
+
defaultConfigurationAudioCodec: defaults.audioCodec,
|
|
72
52
|
initialEnvVariables: window.process.env,
|
|
73
53
|
initialDisableWebSecurity: defaults.disableWebSecurity,
|
|
74
54
|
initialOpenGlRenderer: defaults.openGlRenderer,
|
|
@@ -80,14 +60,9 @@ const SidebarRenderButton = ({ composition, visible }) => {
|
|
|
80
60
|
outFrameMark: null,
|
|
81
61
|
initialColorSpace: defaults.colorSpace,
|
|
82
62
|
initialMultiProcessOnLinux: defaults.multiProcessOnLinux,
|
|
63
|
+
defaultConfigurationVideoCodec: defaults.codec,
|
|
83
64
|
});
|
|
84
|
-
}, [
|
|
85
|
-
composition.defaultProps,
|
|
86
|
-
composition.id,
|
|
87
|
-
isVideo,
|
|
88
|
-
props,
|
|
89
|
-
setSelectedModal,
|
|
90
|
-
]);
|
|
65
|
+
}, [composition.defaultProps, composition.id, props, setSelectedModal]);
|
|
91
66
|
const renderAction = (0, react_1.useCallback)((color) => {
|
|
92
67
|
return (0, jsx_runtime_1.jsx)(render_1.ThinRenderIcon, { fill: color, svgProps: iconStyle });
|
|
93
68
|
}, [iconStyle]);
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
export declare const inPointerHandle: React.RefObject<HTMLDivElement>;
|
|
3
3
|
export declare const outPointerHandle: React.RefObject<HTMLDivElement>;
|
|
4
|
-
|
|
4
|
+
type Props = {
|
|
5
5
|
dragging: boolean;
|
|
6
6
|
type: 'in' | 'out';
|
|
7
7
|
atFrame: number;
|
|
8
|
-
}
|
|
8
|
+
};
|
|
9
|
+
export declare const TimelineInOutPointerHandle: React.FC<Props>;
|
|
10
|
+
export {};
|
|
@@ -17,12 +17,8 @@ const line = {
|
|
|
17
17
|
};
|
|
18
18
|
exports.inPointerHandle = (0, react_1.createRef)();
|
|
19
19
|
exports.outPointerHandle = (0, react_1.createRef)();
|
|
20
|
-
const
|
|
21
|
-
const timelineWidth = (0, react_1.useContext)(TimelineWidthProvider_1.TimelineWidthContext);
|
|
20
|
+
const InnerTimelineInOutPointerHandle = ({ atFrame, dragging, timelineWidth, type }) => {
|
|
22
21
|
const videoConfig = (0, remotion_1.useVideoConfig)();
|
|
23
|
-
if (timelineWidth === null) {
|
|
24
|
-
throw new Error('Timeline width is null');
|
|
25
|
-
}
|
|
26
22
|
const style = (0, react_1.useMemo)(() => {
|
|
27
23
|
return {
|
|
28
24
|
...line,
|
|
@@ -34,4 +30,13 @@ const TimelineInOutPointerHandle = ({ dragging, type, atFrame }) => {
|
|
|
34
30
|
}, [atFrame, dragging, timelineWidth, videoConfig.durationInFrames]);
|
|
35
31
|
return ((0, jsx_runtime_1.jsx)("div", { ref: type === 'in' ? exports.inPointerHandle : exports.outPointerHandle, style: style }));
|
|
36
32
|
};
|
|
33
|
+
const TimelineInOutPointerHandle = ({ dragging, type, atFrame, }) => {
|
|
34
|
+
const timelineWidth = (0, react_1.useContext)(TimelineWidthProvider_1.TimelineWidthContext);
|
|
35
|
+
// When switching from a content which has no timeline (still or asset preview)
|
|
36
|
+
// the timeline first needs to mount, so we need to wait for the timeline width
|
|
37
|
+
if (timelineWidth === null) {
|
|
38
|
+
return null;
|
|
39
|
+
}
|
|
40
|
+
return ((0, jsx_runtime_1.jsx)(InnerTimelineInOutPointerHandle, { atFrame: atFrame, dragging: dragging, timelineWidth: timelineWidth, type: type }));
|
|
41
|
+
};
|
|
37
42
|
exports.TimelineInOutPointerHandle = TimelineInOutPointerHandle;
|
|
@@ -16,4 +16,4 @@ export declare const BLUE_DISABLED = "#284f73";
|
|
|
16
16
|
export declare const getBackgroundFromHoverState: ({ selected, hovered, }: {
|
|
17
17
|
selected: boolean;
|
|
18
18
|
hovered: boolean;
|
|
19
|
-
}) => "transparent" | "hsla(0, 0%, 100%, 0.
|
|
19
|
+
}) => "transparent" | "hsla(0, 0%, 100%, 0.25)" | "hsla(0, 0%, 100%, 0.15)" | "rgba(255, 255, 255, 0.06)";
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import type { AudioCodec, Codec, ColorSpace, OpenGlRenderer, PixelFormat, ProResProfile, StillImageFormat, VideoImageFormat, X264Preset } from '@remotion/renderer';
|
|
2
2
|
import type React from 'react';
|
|
3
3
|
import type { QuickSwitcherMode } from '../components/QuickSwitcher/NoResults';
|
|
4
|
-
import type { RenderType } from '../components/RenderModal/RenderModalAdvanced';
|
|
5
4
|
import type { Bug, UpdateInfo } from '../components/UpdateCheck';
|
|
6
5
|
export type CompType = 'composition' | 'still';
|
|
7
6
|
export type RenderModalState = {
|
|
@@ -11,13 +10,8 @@ export type RenderModalState = {
|
|
|
11
10
|
initialStillImageFormat: StillImageFormat;
|
|
12
11
|
initialVideoImageFormat: VideoImageFormat;
|
|
13
12
|
initialJpegQuality: number;
|
|
14
|
-
initialOutName: string;
|
|
15
13
|
initialScale: number;
|
|
16
14
|
initialVerbose: boolean;
|
|
17
|
-
initialRenderType: RenderType;
|
|
18
|
-
initialVideoCodecForAudioTab: Codec;
|
|
19
|
-
initialVideoCodecForVideoTab: Codec;
|
|
20
|
-
initialAudioCodec: AudioCodec | null;
|
|
21
15
|
initialConcurrency: number;
|
|
22
16
|
initialMuted: boolean;
|
|
23
17
|
initialEnforceAudioTrack: boolean;
|
|
@@ -42,6 +36,8 @@ export type RenderModalState = {
|
|
|
42
36
|
defaultProps: Record<string, unknown>;
|
|
43
37
|
inFrameMark: number | null;
|
|
44
38
|
outFrameMark: number | null;
|
|
39
|
+
defaultConfigurationVideoCodec: Codec;
|
|
40
|
+
defaultConfigurationAudioCodec: AudioCodec | null;
|
|
45
41
|
};
|
|
46
42
|
export type ModalState = {
|
|
47
43
|
type: 'new-comp';
|
|
@@ -21,7 +21,7 @@ export declare const getCliOptions: (options: {
|
|
|
21
21
|
numberOfGifLoops: import("./config/number-of-gif-loops").Loop;
|
|
22
22
|
stillFrame: number;
|
|
23
23
|
browserExecutable: BrowserExecutable;
|
|
24
|
-
logLevel: "
|
|
24
|
+
logLevel: "error" | "verbose" | "info" | "warn";
|
|
25
25
|
scale: number;
|
|
26
26
|
chromiumOptions: ChromiumOptions;
|
|
27
27
|
overwrite: boolean;
|
package/dist/get-cli-options.js
CHANGED
|
@@ -48,10 +48,14 @@ const getx264Preset = () => {
|
|
|
48
48
|
const x264Preset = config_1.ConfigInternals.getPresetProfile();
|
|
49
49
|
return x264Preset;
|
|
50
50
|
};
|
|
51
|
-
const getAndValidateBrowser = async (browserExecutable) => {
|
|
51
|
+
const getAndValidateBrowser = async ({ browserExecutable, indent, logLevel, }) => {
|
|
52
52
|
const browser = getBrowser();
|
|
53
53
|
try {
|
|
54
|
-
await renderer_1.RenderInternals.ensureLocalBrowser(
|
|
54
|
+
await renderer_1.RenderInternals.ensureLocalBrowser({
|
|
55
|
+
preferredBrowserExecutable: browserExecutable,
|
|
56
|
+
indent,
|
|
57
|
+
logLevel,
|
|
58
|
+
});
|
|
55
59
|
}
|
|
56
60
|
catch (err) {
|
|
57
61
|
log_1.Log.error('Could not download a browser for rendering frames.');
|
|
@@ -97,6 +101,7 @@ const getCliOptions = async (options) => {
|
|
|
97
101
|
setting: 'concurrency',
|
|
98
102
|
checkIfValidForCurrentMachine: false,
|
|
99
103
|
});
|
|
104
|
+
const logLevel = config_1.ConfigInternals.Logging.getLogLevel();
|
|
100
105
|
return {
|
|
101
106
|
puppeteerTimeout: config_1.ConfigInternals.getCurrentPuppeteerTimeout(),
|
|
102
107
|
concurrency,
|
|
@@ -105,7 +110,11 @@ const getCliOptions = async (options) => {
|
|
|
105
110
|
inputProps: (0, get_input_props_1.getInputProps)(null),
|
|
106
111
|
envVariables: await (0, get_env_1.getEnvironmentVariables)(null),
|
|
107
112
|
jpegQuality: config_1.ConfigInternals.getJpegQuality(),
|
|
108
|
-
browser: await getAndValidateBrowser(
|
|
113
|
+
browser: await getAndValidateBrowser({
|
|
114
|
+
browserExecutable,
|
|
115
|
+
indent: false,
|
|
116
|
+
logLevel,
|
|
117
|
+
}),
|
|
109
118
|
crf,
|
|
110
119
|
pixelFormat,
|
|
111
120
|
proResProfile,
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import type { Codec, CodecOrUndefined } from '@remotion/renderer';
|
|
2
|
-
export declare const getFinalOutputCodec: ({ cliFlag, configFile, downloadName, outName, uiCodec, }: {
|
|
2
|
+
export declare const getFinalOutputCodec: ({ cliFlag, configFile, downloadName, outName, uiCodec, compositionCodec, }: {
|
|
3
3
|
cliFlag: CodecOrUndefined;
|
|
4
4
|
outName: string | null;
|
|
5
5
|
downloadName: string | null;
|
|
6
6
|
configFile: Codec | null;
|
|
7
7
|
uiCodec: Codec | null;
|
|
8
|
+
compositionCodec: Codec | null;
|
|
8
9
|
}) => {
|
|
9
10
|
codec: Codec;
|
|
10
11
|
reason: string;
|
|
@@ -12,7 +12,7 @@ const deriveCodecsFromFilename = (extension) => {
|
|
|
12
12
|
possible: (_b = renderer_1.RenderInternals.makeFileExtensionMap()[extension]) !== null && _b !== void 0 ? _b : [],
|
|
13
13
|
};
|
|
14
14
|
};
|
|
15
|
-
const getFinalOutputCodec = ({ cliFlag, configFile, downloadName, outName, uiCodec, }) => {
|
|
15
|
+
const getFinalOutputCodec = ({ cliFlag, configFile, downloadName, outName, uiCodec, compositionCodec, }) => {
|
|
16
16
|
if (uiCodec) {
|
|
17
17
|
return { codec: uiCodec, reason: 'via UI' };
|
|
18
18
|
}
|
|
@@ -49,6 +49,9 @@ const getFinalOutputCodec = ({ cliFlag, configFile, downloadName, outName, uiCod
|
|
|
49
49
|
reason: 'derived from out name',
|
|
50
50
|
};
|
|
51
51
|
}
|
|
52
|
+
if (compositionCodec) {
|
|
53
|
+
return { codec: compositionCodec, reason: 'via calculateMetadata' };
|
|
54
|
+
}
|
|
52
55
|
if (configFile) {
|
|
53
56
|
return {
|
|
54
57
|
codec: configFile,
|
package/dist/gpu.d.ts
ADDED
package/dist/gpu.js
ADDED
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.gpuCommand = exports.GPU_COMMAND = void 0;
|
|
4
|
+
const renderer_1 = require("@remotion/renderer");
|
|
5
|
+
const chalk_1 = require("./chalk");
|
|
6
|
+
const get_cli_options_1 = require("./get-cli-options");
|
|
7
|
+
const log_1 = require("./log");
|
|
8
|
+
exports.GPU_COMMAND = 'gpu';
|
|
9
|
+
const gpuCommand = async (remotionRoot) => {
|
|
10
|
+
const { browserExecutable, logLevel, chromiumOptions } = await (0, get_cli_options_1.getCliOptions)({
|
|
11
|
+
isLambda: false,
|
|
12
|
+
remotionRoot,
|
|
13
|
+
type: 'get-compositions',
|
|
14
|
+
});
|
|
15
|
+
const statuses = await renderer_1.RenderInternals.getChromiumGpuInformation({
|
|
16
|
+
browserExecutable,
|
|
17
|
+
indent: false,
|
|
18
|
+
logLevel,
|
|
19
|
+
chromiumOptions,
|
|
20
|
+
});
|
|
21
|
+
for (const { feature, status } of statuses) {
|
|
22
|
+
log_1.Log.info(`${feature}: ${colorStatus(status)}`);
|
|
23
|
+
}
|
|
24
|
+
};
|
|
25
|
+
exports.gpuCommand = gpuCommand;
|
|
26
|
+
const colorStatus = (status) => {
|
|
27
|
+
if (status === 'Enabled') {
|
|
28
|
+
return chalk_1.chalk.green(status);
|
|
29
|
+
}
|
|
30
|
+
if (status === 'Hardware accelerated') {
|
|
31
|
+
return chalk_1.chalk.green(status);
|
|
32
|
+
}
|
|
33
|
+
if (status === 'Disabled') {
|
|
34
|
+
return chalk_1.chalk.red(status);
|
|
35
|
+
}
|
|
36
|
+
if (status === 'Software only. Hardware acceleration disabled') {
|
|
37
|
+
return chalk_1.chalk.red(status);
|
|
38
|
+
}
|
|
39
|
+
if (status === 'Software only, hardware acceleration unavailable') {
|
|
40
|
+
return chalk_1.chalk.red(status);
|
|
41
|
+
}
|
|
42
|
+
return status;
|
|
43
|
+
};
|