@remotion/cli 4.0.51 → 4.0.53
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/index.d.ts +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 +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/SidebarRenderButton.js +3 -28
- package/dist/editor/helpers/presets-labels.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 +4 -3
- package/dist/index.js +4 -0
- package/dist/list-of-remotion-packages.js +2 -0
- package/dist/make-on-download.d.ts +3 -1
- package/dist/make-on-download.js +3 -1
- package/dist/preview-server/dev-middleware/range-parser.d.ts +1 -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 +9 -9
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) {
|
package/dist/config/index.d.ts
CHANGED
|
@@ -296,7 +296,7 @@ export declare const ConfigInternals: {
|
|
|
296
296
|
getBrowser: () => null;
|
|
297
297
|
getPixelFormat: () => "yuv420p" | "yuva420p" | "yuv422p" | "yuv444p" | "yuv420p10le" | "yuv422p10le" | "yuv444p10le" | "yuva444p10le";
|
|
298
298
|
getProResProfile: () => "4444-xq" | "4444" | "hq" | "standard" | "light" | "proxy" | undefined;
|
|
299
|
-
getPresetProfile: () => "
|
|
299
|
+
getPresetProfile: () => "ultrafast" | "superfast" | "veryfast" | "faster" | "fast" | "medium" | "slow" | "slower" | "veryslow" | "placebo" | undefined;
|
|
300
300
|
getShouldOverwrite: ({ defaultValue, }: {
|
|
301
301
|
defaultValue: boolean;
|
|
302
302
|
}) => boolean;
|
|
@@ -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
|
};
|
|
@@ -13,5 +13,5 @@ export declare const getInputBorderColor: ({ status, isFocused, isHovered, }: {
|
|
|
13
13
|
isFocused: boolean;
|
|
14
14
|
isHovered: boolean;
|
|
15
15
|
}) => "hsla(0, 0%, 100%, 0.15)" | "rgba(0, 0, 0, 0.6)" | "rgba(255, 255, 255, 0.05)" | "#ff3232" | "#f1c40f";
|
|
16
|
-
export declare const RemotionInput: React.ForwardRefExoticComponent<Pick<Props, "status" | "key" |
|
|
16
|
+
export declare const RemotionInput: React.ForwardRefExoticComponent<Pick<Props, "status" | "key" | keyof React.InputHTMLAttributes<HTMLInputElement> | "rightAlign"> & React.RefAttributes<HTMLInputElement>>;
|
|
17
17
|
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);
|
|
@@ -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,2 +1,2 @@
|
|
|
1
1
|
import type { X264Preset } from '@remotion/renderer';
|
|
2
|
-
export declare const labelx264Preset: (profile: X264Preset) => "
|
|
2
|
+
export declare const labelx264Preset: (profile: X264Preset) => "ultrafast" | "superfast" | "veryfast" | "faster" | "fast" | "medium" | "slow" | "slower" | "veryslow" | "placebo";
|
|
@@ -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';
|
|
@@ -16,7 +16,7 @@ export declare const getCliOptions: (options: {
|
|
|
16
16
|
crf: import("@remotion/renderer").Crf | null;
|
|
17
17
|
pixelFormat: "yuv420p" | "yuva420p" | "yuv422p" | "yuv444p" | "yuv420p10le" | "yuv422p10le" | "yuv444p10le" | "yuva444p10le";
|
|
18
18
|
proResProfile: "4444-xq" | "4444" | "hq" | "standard" | "light" | "proxy" | undefined;
|
|
19
|
-
x264Preset: "
|
|
19
|
+
x264Preset: "ultrafast" | "superfast" | "veryfast" | "faster" | "fast" | "medium" | "slow" | "slower" | "veryslow" | "placebo" | undefined;
|
|
20
20
|
everyNthFrame: number;
|
|
21
21
|
numberOfGifLoops: import("./config/number-of-gif-loops").Loop;
|
|
22
22
|
stillFrame: number;
|
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
|
+
};
|
package/dist/index.d.ts
CHANGED
|
@@ -101,7 +101,7 @@ export declare const CliInternals: {
|
|
|
101
101
|
crf: import("@remotion/renderer").Crf | null;
|
|
102
102
|
pixelFormat: "yuv420p" | "yuva420p" | "yuv422p" | "yuv444p" | "yuv420p10le" | "yuv422p10le" | "yuv444p10le" | "yuva444p10le";
|
|
103
103
|
proResProfile: "4444-xq" | "4444" | "hq" | "standard" | "light" | "proxy" | undefined;
|
|
104
|
-
x264Preset: "
|
|
104
|
+
x264Preset: "ultrafast" | "superfast" | "veryfast" | "faster" | "fast" | "medium" | "slow" | "slower" | "veryslow" | "placebo" | undefined;
|
|
105
105
|
everyNthFrame: number;
|
|
106
106
|
numberOfGifLoops: import("./config/number-of-gif-loops").Loop;
|
|
107
107
|
stillFrame: number;
|
|
@@ -133,7 +133,7 @@ export declare const CliInternals: {
|
|
|
133
133
|
"pixel-format": "yuv420p" | "yuva420p" | "yuv422p" | "yuv444p" | "yuv420p10le" | "yuv422p10le" | "yuv444p10le" | "yuva444p10le";
|
|
134
134
|
"image-format": "png" | "jpeg" | "pdf" | "webp" | "none";
|
|
135
135
|
"prores-profile": "4444-xq" | "4444" | "hq" | "standard" | "light" | "proxy";
|
|
136
|
-
"x264-preset": "
|
|
136
|
+
"x264-preset": "ultrafast" | "superfast" | "veryfast" | "faster" | "fast" | "medium" | "slow" | "slower" | "veryslow" | "placebo";
|
|
137
137
|
"bundle-cache": string;
|
|
138
138
|
"env-file": string;
|
|
139
139
|
"ignore-certificate-errors": string;
|
|
@@ -220,12 +220,13 @@ export declare const CliInternals: {
|
|
|
220
220
|
uiImageFormat: "png" | "jpeg" | "none" | null;
|
|
221
221
|
}) => "png" | "jpeg" | "none";
|
|
222
222
|
printCompositions: (compositions: import("remotion").VideoConfig[]) => void;
|
|
223
|
-
getFinalOutputCodec: ({ cliFlag, configFile, downloadName, outName, uiCodec, }: {
|
|
223
|
+
getFinalOutputCodec: ({ cliFlag, configFile, downloadName, outName, uiCodec, compositionCodec, }: {
|
|
224
224
|
cliFlag: import("@remotion/renderer").CodecOrUndefined;
|
|
225
225
|
outName: string | null;
|
|
226
226
|
downloadName: string | null;
|
|
227
227
|
configFile: "h264" | "h265" | "vp8" | "vp9" | "mp3" | "aac" | "wav" | "prores" | "h264-mkv" | "gif" | null;
|
|
228
228
|
uiCodec: "h264" | "h265" | "vp8" | "vp9" | "mp3" | "aac" | "wav" | "prores" | "h264-mkv" | "gif" | null;
|
|
229
|
+
compositionCodec: "h264" | "h265" | "vp8" | "vp9" | "mp3" | "aac" | "wav" | "prores" | "h264-mkv" | "gif" | null;
|
|
229
230
|
}) => {
|
|
230
231
|
codec: "h264" | "h265" | "vp8" | "vp9" | "mp3" | "aac" | "wav" | "prores" | "h264-mkv" | "gif";
|
|
231
232
|
reason: string;
|
package/dist/index.js
CHANGED
|
@@ -35,6 +35,7 @@ const get_cli_options_1 = require("./get-cli-options");
|
|
|
35
35
|
const get_composition_with_dimension_override_1 = require("./get-composition-with-dimension-override");
|
|
36
36
|
const get_config_file_name_1 = require("./get-config-file-name");
|
|
37
37
|
const get_final_output_codec_1 = require("./get-final-output-codec");
|
|
38
|
+
const gpu_1 = require("./gpu");
|
|
38
39
|
const image_formats_1 = require("./image-formats");
|
|
39
40
|
const initialize_cli_1 = require("./initialize-cli");
|
|
40
41
|
const lambda_command_1 = require("./lambda-command");
|
|
@@ -103,6 +104,9 @@ const cli = async () => {
|
|
|
103
104
|
else if (command === 'ffmpeg') {
|
|
104
105
|
(0, ffmpeg_1.ffmpegCommand)(remotionRoot, process.argv.slice(3));
|
|
105
106
|
}
|
|
107
|
+
else if (command === 'gpu') {
|
|
108
|
+
await (0, gpu_1.gpuCommand)(remotionRoot);
|
|
109
|
+
}
|
|
106
110
|
else if (command === 'ffprobe') {
|
|
107
111
|
(0, ffmpeg_1.ffprobeCommand)(remotionRoot, process.argv.slice(3));
|
|
108
112
|
}
|
|
@@ -3,6 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.listOfRemotionPackages = void 0;
|
|
4
4
|
// Keep in sync with create-video
|
|
5
5
|
exports.listOfRemotionPackages = [
|
|
6
|
+
'@remotion/layout-utils',
|
|
6
7
|
'@remotion/bundler',
|
|
7
8
|
'@remotion/cli',
|
|
8
9
|
'@remotion/cloudrun',
|
|
@@ -26,5 +27,6 @@ exports.listOfRemotionPackages = [
|
|
|
26
27
|
'@remotion/shapes',
|
|
27
28
|
'@remotion/zod-types',
|
|
28
29
|
'@remotion/tailwind',
|
|
30
|
+
'@remotion/transitions',
|
|
29
31
|
'remotion',
|
|
30
32
|
];
|
|
@@ -1,12 +1,14 @@
|
|
|
1
1
|
import type { LogLevel, RenderMediaOnDownload } from '@remotion/renderer';
|
|
2
2
|
import type { DownloadProgress } from './progress-types';
|
|
3
|
-
export declare const makeOnDownload: ({ indent, logLevel, updatesDontOverwrite, downloads, updateRenderProgress, }: {
|
|
3
|
+
export declare const makeOnDownload: ({ indent, logLevel, updatesDontOverwrite, downloads, updateRenderProgress, isUsingParallelEncoding, }: {
|
|
4
4
|
indent: boolean;
|
|
5
5
|
logLevel: LogLevel;
|
|
6
6
|
updatesDontOverwrite: boolean;
|
|
7
7
|
downloads: DownloadProgress[];
|
|
8
|
+
isUsingParallelEncoding: boolean;
|
|
8
9
|
updateRenderProgress: (progress: {
|
|
9
10
|
newline: boolean;
|
|
10
11
|
printToConsole: boolean;
|
|
12
|
+
isUsingParallelEncoding: boolean;
|
|
11
13
|
}) => void;
|
|
12
14
|
}) => RenderMediaOnDownload;
|
package/dist/make-on-download.js
CHANGED
|
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.makeOnDownload = void 0;
|
|
4
4
|
const format_bytes_1 = require("./format-bytes");
|
|
5
5
|
const log_1 = require("./log");
|
|
6
|
-
const makeOnDownload = ({ indent, logLevel, updatesDontOverwrite, downloads, updateRenderProgress, }) => {
|
|
6
|
+
const makeOnDownload = ({ indent, logLevel, updatesDontOverwrite, downloads, updateRenderProgress, isUsingParallelEncoding, }) => {
|
|
7
7
|
return (src) => {
|
|
8
8
|
const id = Math.random();
|
|
9
9
|
const download = {
|
|
@@ -19,6 +19,7 @@ const makeOnDownload = ({ indent, logLevel, updatesDontOverwrite, downloads, upd
|
|
|
19
19
|
updateRenderProgress({
|
|
20
20
|
newline: false,
|
|
21
21
|
printToConsole: !updatesDontOverwrite,
|
|
22
|
+
isUsingParallelEncoding,
|
|
22
23
|
});
|
|
23
24
|
let lastUpdate = Date.now();
|
|
24
25
|
return ({ percent, downloaded, totalSize }) => {
|
|
@@ -33,6 +34,7 @@ const makeOnDownload = ({ indent, logLevel, updatesDontOverwrite, downloads, upd
|
|
|
33
34
|
updateRenderProgress({
|
|
34
35
|
newline: false,
|
|
35
36
|
printToConsole: !updatesDontOverwrite,
|
|
37
|
+
isUsingParallelEncoding,
|
|
36
38
|
});
|
|
37
39
|
};
|
|
38
40
|
};
|
|
@@ -11,5 +11,5 @@ type Range = {
|
|
|
11
11
|
type Ranges = Range[] & {
|
|
12
12
|
type?: string;
|
|
13
13
|
};
|
|
14
|
-
export declare function parseRange(size: number, str: string | string[]): -1 |
|
|
14
|
+
export declare function parseRange(size: number, str: string | string[]): -1 | -2 | Ranges;
|
|
15
15
|
export {};
|
|
@@ -1,10 +1,14 @@
|
|
|
1
|
-
import type { Codec } from '@remotion/renderer';
|
|
1
|
+
import type { AudioCodec, Codec } from '@remotion/renderer';
|
|
2
2
|
import type { RenderType } from '../../editor/components/RenderModal/RenderModalAdvanced';
|
|
3
|
-
export declare const getDefaultCodecs: ({
|
|
4
|
-
|
|
3
|
+
export declare const getDefaultCodecs: ({ defaultConfigurationVideoCodec, compositionDefaultVideoCodec, renderType, defaultConfigurationAudioCodec, }: {
|
|
4
|
+
defaultConfigurationVideoCodec: Codec | null;
|
|
5
|
+
defaultConfigurationAudioCodec: AudioCodec | null;
|
|
6
|
+
compositionDefaultVideoCodec: Codec | null;
|
|
5
7
|
renderType: RenderType;
|
|
6
8
|
}) => {
|
|
7
|
-
initialAudioCodec:
|
|
9
|
+
initialAudioCodec: AudioCodec;
|
|
8
10
|
initialVideoCodec: Codec;
|
|
9
11
|
initialRenderType: RenderType;
|
|
12
|
+
initialVideoCodecForAudioTab: Codec;
|
|
13
|
+
initialVideoCodecForVideoTab: Codec;
|
|
10
14
|
};
|
|
@@ -2,12 +2,28 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.getDefaultCodecs = void 0;
|
|
4
4
|
const client_1 = require("@remotion/renderer/client");
|
|
5
|
-
const getDefaultCodecs = ({
|
|
6
|
-
|
|
5
|
+
const getDefaultCodecs = ({ defaultConfigurationVideoCodec, compositionDefaultVideoCodec, renderType, defaultConfigurationAudioCodec, }) => {
|
|
6
|
+
var _a;
|
|
7
|
+
const userPreferredVideoCodec = (_a = compositionDefaultVideoCodec !== null && compositionDefaultVideoCodec !== void 0 ? compositionDefaultVideoCodec : defaultConfigurationVideoCodec) !== null && _a !== void 0 ? _a : 'h264';
|
|
8
|
+
const isVideoCodecAnAudioCodec = client_1.BrowserSafeApis.isAudioCodec(userPreferredVideoCodec);
|
|
9
|
+
if (isVideoCodecAnAudioCodec) {
|
|
10
|
+
return {
|
|
11
|
+
initialAudioCodec: userPreferredVideoCodec,
|
|
12
|
+
initialRenderType: 'audio',
|
|
13
|
+
initialVideoCodec: userPreferredVideoCodec,
|
|
14
|
+
initialVideoCodecForAudioTab: userPreferredVideoCodec,
|
|
15
|
+
initialVideoCodecForVideoTab: client_1.BrowserSafeApis.isAudioCodec(defaultConfigurationVideoCodec)
|
|
16
|
+
? 'h264'
|
|
17
|
+
: defaultConfigurationVideoCodec,
|
|
18
|
+
};
|
|
19
|
+
}
|
|
20
|
+
const suitableAudioCodecForVideoCodec = client_1.BrowserSafeApis.defaultAudioCodecs[userPreferredVideoCodec].compressed;
|
|
7
21
|
return {
|
|
8
|
-
initialAudioCodec:
|
|
9
|
-
initialVideoCodec:
|
|
10
|
-
initialRenderType:
|
|
22
|
+
initialAudioCodec: defaultConfigurationAudioCodec !== null && defaultConfigurationAudioCodec !== void 0 ? defaultConfigurationAudioCodec : suitableAudioCodecForVideoCodec,
|
|
23
|
+
initialVideoCodec: userPreferredVideoCodec,
|
|
24
|
+
initialRenderType: renderType,
|
|
25
|
+
initialVideoCodecForAudioTab: userPreferredVideoCodec,
|
|
26
|
+
initialVideoCodecForVideoTab: userPreferredVideoCodec,
|
|
11
27
|
};
|
|
12
28
|
};
|
|
13
29
|
exports.getDefaultCodecs = getDefaultCodecs;
|
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.makeRetryPayload = void 0;
|
|
4
4
|
const remotion_1 = require("remotion");
|
|
5
|
-
const get_default_video_contexts_1 = require("./get-default-video-contexts");
|
|
6
5
|
const makeRetryPayload = (job) => {
|
|
7
6
|
var _a, _b, _c, _d, _e;
|
|
8
7
|
const defaults = window.remotion_renderDefaults;
|
|
@@ -10,10 +9,6 @@ const makeRetryPayload = (job) => {
|
|
|
10
9
|
throw new Error('defaults not set');
|
|
11
10
|
}
|
|
12
11
|
if (job.type === 'still') {
|
|
13
|
-
const { initialAudioCodec, initialRenderType, initialVideoCodec } = (0, get_default_video_contexts_1.getDefaultCodecs)({
|
|
14
|
-
defaultCodec: defaults.codec,
|
|
15
|
-
renderType: 'still',
|
|
16
|
-
});
|
|
17
12
|
return {
|
|
18
13
|
type: 'render',
|
|
19
14
|
compositionId: job.compositionId,
|
|
@@ -21,12 +16,8 @@ const makeRetryPayload = (job) => {
|
|
|
21
16
|
initialStillImageFormat: job.imageFormat,
|
|
22
17
|
initialVideoImageFormat: defaults.videoImageFormat,
|
|
23
18
|
initialJpegQuality: (_a = job.jpegQuality) !== null && _a !== void 0 ? _a : defaults.jpegQuality,
|
|
24
|
-
initialOutName: job.outName,
|
|
25
19
|
initialScale: job.scale,
|
|
26
20
|
initialVerbose: job.verbose,
|
|
27
|
-
initialVideoCodecForAudioTab: initialAudioCodec,
|
|
28
|
-
initialRenderType,
|
|
29
|
-
initialVideoCodecForVideoTab: initialVideoCodec,
|
|
30
21
|
initialConcurrency: defaults.concurrency,
|
|
31
22
|
maxConcurrency: defaults.maxConcurrency,
|
|
32
23
|
minConcurrency: defaults.minConcurrency,
|
|
@@ -40,7 +31,7 @@ const makeRetryPayload = (job) => {
|
|
|
40
31
|
initialEveryNthFrame: defaults.everyNthFrame,
|
|
41
32
|
initialNumberOfGifLoops: defaults.numberOfGifLoops,
|
|
42
33
|
initialDelayRenderTimeout: job.delayRenderTimeout,
|
|
43
|
-
|
|
34
|
+
defaultConfigurationAudioCodec: defaults.audioCodec,
|
|
44
35
|
initialEnvVariables: job.envVariables,
|
|
45
36
|
initialDisableWebSecurity: job.chromiumOptions.disableWebSecurity,
|
|
46
37
|
initialOpenGlRenderer: job.chromiumOptions.gl,
|
|
@@ -52,25 +43,18 @@ const makeRetryPayload = (job) => {
|
|
|
52
43
|
initialOffthreadVideoCacheSizeInBytes: job.offthreadVideoCacheSizeInBytes,
|
|
53
44
|
initialColorSpace: defaults.colorSpace,
|
|
54
45
|
initialMultiProcessOnLinux: job.multiProcessOnLinux,
|
|
46
|
+
defaultConfigurationVideoCodec: defaults.codec,
|
|
55
47
|
};
|
|
56
48
|
}
|
|
57
49
|
if (job.type === 'sequence') {
|
|
58
|
-
const { initialAudioCodec, initialRenderType, initialVideoCodec } = (0, get_default_video_contexts_1.getDefaultCodecs)({
|
|
59
|
-
defaultCodec: defaults.codec,
|
|
60
|
-
renderType: 'sequence',
|
|
61
|
-
});
|
|
62
50
|
return {
|
|
63
51
|
type: 'render',
|
|
64
52
|
initialFrame: 0,
|
|
65
53
|
compositionId: job.compositionId,
|
|
66
54
|
initialVideoImageFormat: defaults.videoImageFormat,
|
|
67
55
|
initialJpegQuality: (_b = job.jpegQuality) !== null && _b !== void 0 ? _b : defaults.jpegQuality,
|
|
68
|
-
initialOutName: job.outName,
|
|
69
56
|
initialScale: job.scale,
|
|
70
57
|
initialVerbose: job.verbose,
|
|
71
|
-
initialVideoCodecForAudioTab: initialAudioCodec,
|
|
72
|
-
initialRenderType,
|
|
73
|
-
initialVideoCodecForVideoTab: initialVideoCodec,
|
|
74
58
|
initialConcurrency: defaults.concurrency,
|
|
75
59
|
maxConcurrency: defaults.maxConcurrency,
|
|
76
60
|
minConcurrency: defaults.minConcurrency,
|
|
@@ -84,7 +68,6 @@ const makeRetryPayload = (job) => {
|
|
|
84
68
|
initialEveryNthFrame: defaults.everyNthFrame,
|
|
85
69
|
initialNumberOfGifLoops: defaults.numberOfGifLoops,
|
|
86
70
|
initialDelayRenderTimeout: job.delayRenderTimeout,
|
|
87
|
-
initialAudioCodec: defaults.audioCodec,
|
|
88
71
|
initialEnvVariables: job.envVariables,
|
|
89
72
|
initialDisableWebSecurity: job.chromiumOptions.disableWebSecurity,
|
|
90
73
|
initialOpenGlRenderer: job.chromiumOptions.gl,
|
|
@@ -97,20 +80,17 @@ const makeRetryPayload = (job) => {
|
|
|
97
80
|
initialOffthreadVideoCacheSizeInBytes: job.offthreadVideoCacheSizeInBytes,
|
|
98
81
|
initialColorSpace: defaults.colorSpace,
|
|
99
82
|
initialMultiProcessOnLinux: job.multiProcessOnLinux,
|
|
83
|
+
defaultConfigurationVideoCodec: defaults.codec,
|
|
84
|
+
defaultConfigurationAudioCodec: defaults.audioCodec,
|
|
100
85
|
};
|
|
101
86
|
}
|
|
102
87
|
if (job.type === 'video') {
|
|
103
|
-
const { initialAudioCodec, initialRenderType, initialVideoCodec } = (0, get_default_video_contexts_1.getDefaultCodecs)({
|
|
104
|
-
defaultCodec: job.codec,
|
|
105
|
-
renderType: 'video',
|
|
106
|
-
});
|
|
107
88
|
return {
|
|
108
89
|
type: 'render',
|
|
109
90
|
compositionId: job.compositionId,
|
|
110
91
|
initialStillImageFormat: defaults.stillImageFormat,
|
|
111
92
|
initialVideoImageFormat: job.imageFormat,
|
|
112
93
|
initialJpegQuality: (_c = job.jpegQuality) !== null && _c !== void 0 ? _c : defaults.jpegQuality,
|
|
113
|
-
initialOutName: job.outName,
|
|
114
94
|
initialScale: job.scale,
|
|
115
95
|
initialVerbose: job.verbose,
|
|
116
96
|
initialFrame: 0,
|
|
@@ -118,10 +98,7 @@ const makeRetryPayload = (job) => {
|
|
|
118
98
|
maxConcurrency: defaults.maxConcurrency,
|
|
119
99
|
minConcurrency: defaults.minConcurrency,
|
|
120
100
|
initialMuted: job.muted,
|
|
121
|
-
initialVideoCodecForAudioTab: initialAudioCodec,
|
|
122
101
|
initialEnforceAudioTrack: job.enforceAudioTrack,
|
|
123
|
-
initialRenderType,
|
|
124
|
-
initialVideoCodecForVideoTab: initialVideoCodec,
|
|
125
102
|
initialProResProfile: (_d = job.proResProfile) !== null && _d !== void 0 ? _d : defaults.proResProfile,
|
|
126
103
|
initialx264Preset: (_e = job.x264Preset) !== null && _e !== void 0 ? _e : defaults.x264Preset,
|
|
127
104
|
initialPixelFormat: job.pixelFormat,
|
|
@@ -130,7 +107,6 @@ const makeRetryPayload = (job) => {
|
|
|
130
107
|
initialEveryNthFrame: job.everyNthFrame,
|
|
131
108
|
initialNumberOfGifLoops: job.numberOfGifLoops,
|
|
132
109
|
initialDelayRenderTimeout: job.delayRenderTimeout,
|
|
133
|
-
initialAudioCodec: job.audioCodec,
|
|
134
110
|
initialEnvVariables: job.envVariables,
|
|
135
111
|
initialDisableWebSecurity: job.chromiumOptions.disableWebSecurity,
|
|
136
112
|
initialOpenGlRenderer: job.chromiumOptions.gl,
|
|
@@ -142,6 +118,8 @@ const makeRetryPayload = (job) => {
|
|
|
142
118
|
initialOffthreadVideoCacheSizeInBytes: job.offthreadVideoCacheSizeInBytes,
|
|
143
119
|
initialColorSpace: job.colorSpace,
|
|
144
120
|
initialMultiProcessOnLinux: job.multiProcessOnLinux,
|
|
121
|
+
defaultConfigurationVideoCodec: defaults.codec,
|
|
122
|
+
defaultConfigurationAudioCodec: job.audioCodec,
|
|
145
123
|
};
|
|
146
124
|
}
|
|
147
125
|
throw new Error(`Job ${JSON.stringify(job)} Not implemented`);
|
package/dist/print-help.js
CHANGED
|
@@ -2,79 +2,50 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.printHelp = void 0;
|
|
4
4
|
const chalk_1 = require("./chalk");
|
|
5
|
+
const gpu_1 = require("./gpu");
|
|
5
6
|
const log_1 = require("./log");
|
|
6
7
|
const versions_1 = require("./versions");
|
|
7
8
|
const packagejson = require('../package.json');
|
|
8
|
-
const printFlags = (flags) => {
|
|
9
|
-
flags.forEach(([flag, description]) => {
|
|
10
|
-
log_1.Log.info(chalk_1.chalk.blue(`${flag.padEnd(22, ' ')} ${description}`));
|
|
11
|
-
});
|
|
12
|
-
};
|
|
13
9
|
const printHelp = () => {
|
|
14
|
-
log_1.Log.info(`@remotion/cli ${packagejson.version}
|
|
10
|
+
log_1.Log.info(`@remotion/cli ${packagejson.version}`);
|
|
11
|
+
log_1.Log.info(`© ${new Date().getFullYear()} The Remotion AG`);
|
|
15
12
|
log_1.Log.info();
|
|
16
13
|
log_1.Log.info('Available commands:');
|
|
17
14
|
log_1.Log.info('');
|
|
18
|
-
log_1.Log.info('remotion studio <entry-point.ts>');
|
|
19
|
-
log_1.Log.info(
|
|
20
|
-
|
|
21
|
-
log_1.Log.info();
|
|
22
|
-
log_1.Log.info('remotion render
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
log_1.Log.info();
|
|
45
|
-
log_1.Log.info('remotion
|
|
46
|
-
log_1.Log.info(
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
['--jpeg-quality', 'Quality for rendered frames, JPEG only, 0-100'],
|
|
53
|
-
['--overwrite', 'Overwrite if file exists, default true'],
|
|
54
|
-
['--browser-executable', 'Custom path for browser executable'],
|
|
55
|
-
['--bundle-cache', 'Cache webpack bundle, boolean, default true'],
|
|
56
|
-
['--log', 'Log level, "error", "warning", "verbose", "info" (default)'],
|
|
57
|
-
['--port', 'Custom port to use for the HTTP server'],
|
|
58
|
-
['--env-file', 'Specify a location for a dotenv file'],
|
|
59
|
-
]);
|
|
60
|
-
log_1.Log.info();
|
|
61
|
-
log_1.Log.info('remotion compositions <index-file.ts>');
|
|
62
|
-
log_1.Log.info(chalk_1.chalk.gray('Prints the available compositions.'));
|
|
63
|
-
log_1.Log.info();
|
|
64
|
-
log_1.Log.info('remotion benchmark <index-file.ts> <list-of-compositions>');
|
|
65
|
-
log_1.Log.info(chalk_1.chalk.gray('Benchmarks rendering a composition. Same options as for render.'));
|
|
66
|
-
log_1.Log.info();
|
|
67
|
-
log_1.Log.info('remotion ' + versions_1.VERSIONS_COMMAND);
|
|
68
|
-
log_1.Log.info(chalk_1.chalk.gray('Prints and validates versions of all Remotion packages.'));
|
|
69
|
-
log_1.Log.info();
|
|
70
|
-
log_1.Log.info('remotion upgrade');
|
|
71
|
-
log_1.Log.info(chalk_1.chalk.gray('Ensure Remotion is on the newest version.'));
|
|
72
|
-
printFlags([
|
|
73
|
-
[
|
|
74
|
-
'--package-manager',
|
|
75
|
-
'Force a specific package manager, defaults to use from lockfile',
|
|
76
|
-
],
|
|
77
|
-
]);
|
|
15
|
+
log_1.Log.info(chalk_1.chalk.blue('remotion studio') + chalk_1.chalk.gray(' <entry-point.ts>'));
|
|
16
|
+
log_1.Log.info('Start the Remotion studio.');
|
|
17
|
+
log_1.Log.info(chalk_1.chalk.gray('https://www.remotion.dev/docs/cli/studio'));
|
|
18
|
+
log_1.Log.info();
|
|
19
|
+
log_1.Log.info(chalk_1.chalk.blue('remotion render') +
|
|
20
|
+
chalk_1.chalk.gray(' <entry-point.ts> <comp-id> <output-file.mp4>'));
|
|
21
|
+
log_1.Log.info('Render video, audio or an image sequence.');
|
|
22
|
+
log_1.Log.info(chalk_1.chalk.gray('https://www.remotion.dev/docs/cli/render'));
|
|
23
|
+
log_1.Log.info();
|
|
24
|
+
log_1.Log.info(chalk_1.chalk.blue('remotion still') +
|
|
25
|
+
chalk_1.chalk.gray(' <entry-point.ts> <comp-id> <still.png>'));
|
|
26
|
+
log_1.Log.info('Render a still frame and save it as an image.');
|
|
27
|
+
log_1.Log.info(chalk_1.chalk.gray('https://www.remotion.dev/docs/cli/still'));
|
|
28
|
+
log_1.Log.info();
|
|
29
|
+
log_1.Log.info(chalk_1.chalk.blue('remotion compositions') + chalk_1.chalk.gray(' <index-file.ts>'));
|
|
30
|
+
log_1.Log.info('Prints the available compositions.');
|
|
31
|
+
log_1.Log.info(chalk_1.chalk.gray('https://www.remotion.dev/docs/cli/compositions'));
|
|
32
|
+
log_1.Log.info();
|
|
33
|
+
log_1.Log.info(chalk_1.chalk.blue('remotion benchmark') +
|
|
34
|
+
chalk_1.chalk.gray(' <index-file.ts> <list-of-compositions>'));
|
|
35
|
+
log_1.Log.info('Benchmarks rendering a composition. Same options as for render.');
|
|
36
|
+
log_1.Log.info(chalk_1.chalk.gray('https://www.remotion.dev/docs/cli/benchmark'));
|
|
37
|
+
log_1.Log.info();
|
|
38
|
+
log_1.Log.info(chalk_1.chalk.blue('remotion ' + versions_1.VERSIONS_COMMAND));
|
|
39
|
+
log_1.Log.info('Prints and validates versions of all Remotion packages.');
|
|
40
|
+
log_1.Log.info(chalk_1.chalk.gray('https://www.remotion.dev/docs/cli/versions'));
|
|
41
|
+
log_1.Log.info();
|
|
42
|
+
log_1.Log.info(chalk_1.chalk.blue('remotion ' + gpu_1.GPU_COMMAND));
|
|
43
|
+
log_1.Log.info('Prints information about how Chrome uses the CPU.');
|
|
44
|
+
log_1.Log.info(chalk_1.chalk.gray('https://www.remotion.dev/docs/cli/gpu'));
|
|
45
|
+
log_1.Log.info();
|
|
46
|
+
log_1.Log.info(chalk_1.chalk.blue('remotion upgrade'));
|
|
47
|
+
log_1.Log.info('Ensure Remotion is on the newest version.');
|
|
48
|
+
log_1.Log.info(chalk_1.chalk.gray('https://www.remotion.dev/docs/cli/upgrade'));
|
|
78
49
|
log_1.Log.info();
|
|
79
50
|
log_1.Log.info('Visit https://www.remotion.dev/docs/cli for browsable CLI documentation.');
|
|
80
51
|
};
|
package/dist/progress-bar.d.ts
CHANGED
|
@@ -25,10 +25,11 @@ export declare const makeBundlingAndCopyProgress: ({ bundling, copying, symLinks
|
|
|
25
25
|
copying: CopyingState;
|
|
26
26
|
symLinks: SymbolicLinksState;
|
|
27
27
|
}, bundlingStep: number, steps: number) => string;
|
|
28
|
-
export declare const makeRenderingAndStitchingProgress: ({ prog, steps, stitchingStep, }: {
|
|
28
|
+
export declare const makeRenderingAndStitchingProgress: ({ prog, steps, stitchingStep, isUsingParallelEncoding, }: {
|
|
29
29
|
prog: AggregateRenderProgress;
|
|
30
30
|
steps: number;
|
|
31
31
|
stitchingStep: number;
|
|
32
|
+
isUsingParallelEncoding: boolean;
|
|
32
33
|
}) => {
|
|
33
34
|
output: string;
|
|
34
35
|
progress: number;
|
package/dist/progress-bar.js
CHANGED
|
@@ -122,7 +122,7 @@ const makeRenderingProgress = ({ frames, totalFrames, steps, concurrency, doneIn
|
|
|
122
122
|
.filter(truthy_1.truthy)
|
|
123
123
|
.join(' ');
|
|
124
124
|
};
|
|
125
|
-
const makeStitchingProgress = ({ stitchingProgress, steps, stitchingStep, }) => {
|
|
125
|
+
const makeStitchingProgress = ({ stitchingProgress, steps, stitchingStep, isUsingParallelEncoding, }) => {
|
|
126
126
|
const { frames, totalFrames, doneIn, stage, codec } = stitchingProgress;
|
|
127
127
|
const progress = frames / totalFrames;
|
|
128
128
|
const mediaType = codec === 'gif'
|
|
@@ -133,7 +133,7 @@ const makeStitchingProgress = ({ stitchingProgress, steps, stitchingStep, }) =>
|
|
|
133
133
|
return [
|
|
134
134
|
`(${stitchingStep + 1}/${steps})`,
|
|
135
135
|
(0, make_progress_bar_1.makeProgressBar)(progress),
|
|
136
|
-
stage === 'muxing' &&
|
|
136
|
+
stage === 'muxing' && isUsingParallelEncoding
|
|
137
137
|
? `${doneIn ? 'Muxed' : 'Muxing'} ${mediaType}`
|
|
138
138
|
: `${doneIn ? 'Encoded' : 'Encoding'} ${mediaType}`,
|
|
139
139
|
doneIn === null ? `${frames}/${totalFrames}` : chalk_1.chalk.gray(`${doneIn}ms`),
|
|
@@ -141,7 +141,7 @@ const makeStitchingProgress = ({ stitchingProgress, steps, stitchingStep, }) =>
|
|
|
141
141
|
.filter(truthy_1.truthy)
|
|
142
142
|
.join(' ');
|
|
143
143
|
};
|
|
144
|
-
const makeRenderingAndStitchingProgress = ({ prog, steps, stitchingStep, }) => {
|
|
144
|
+
const makeRenderingAndStitchingProgress = ({ prog, steps, stitchingStep, isUsingParallelEncoding, }) => {
|
|
145
145
|
const { rendering, stitching, downloads, bundling } = prog;
|
|
146
146
|
const output = [
|
|
147
147
|
rendering ? makeRenderingProgress(rendering) : null,
|
|
@@ -152,6 +152,7 @@ const makeRenderingAndStitchingProgress = ({ prog, steps, stitchingStep, }) => {
|
|
|
152
152
|
stitchingProgress: stitching,
|
|
153
153
|
steps,
|
|
154
154
|
stitchingStep,
|
|
155
|
+
isUsingParallelEncoding,
|
|
155
156
|
}),
|
|
156
157
|
]
|
|
157
158
|
.filter(truthy_1.truthy)
|
|
@@ -62,6 +62,7 @@ const renderVideoFlow = async ({ remotionRoot, fullEntryPoint, indent, logLevel,
|
|
|
62
62
|
viewport: null,
|
|
63
63
|
logLevel,
|
|
64
64
|
});
|
|
65
|
+
let isUsingParallelEncoding = false;
|
|
65
66
|
const updatesDontOverwrite = (0, should_use_non_overlaying_logger_1.shouldUseNonOverlayingLogger)({ logLevel });
|
|
66
67
|
const renderProgress = (0, progress_bar_1.createOverwriteableCliOutput)({
|
|
67
68
|
quiet,
|
|
@@ -96,6 +97,7 @@ const renderVideoFlow = async ({ remotionRoot, fullEntryPoint, indent, logLevel,
|
|
|
96
97
|
prog: aggregateRenderProgress,
|
|
97
98
|
steps: steps.length,
|
|
98
99
|
stitchingStep: steps.indexOf('stitching'),
|
|
100
|
+
isUsingParallelEncoding,
|
|
99
101
|
});
|
|
100
102
|
onProgress({ message, value: progress, ...aggregateRenderProgress });
|
|
101
103
|
if (printToConsole) {
|
|
@@ -127,6 +129,7 @@ const renderVideoFlow = async ({ remotionRoot, fullEntryPoint, indent, logLevel,
|
|
|
127
129
|
logLevel,
|
|
128
130
|
updateRenderProgress,
|
|
129
131
|
updatesDontOverwrite,
|
|
132
|
+
isUsingParallelEncoding,
|
|
130
133
|
});
|
|
131
134
|
const puppeteerInstance = await browserInstance;
|
|
132
135
|
addCleanupCallback(() => puppeteerInstance.close(false, logLevel, indent));
|
|
@@ -165,6 +168,7 @@ const renderVideoFlow = async ({ remotionRoot, fullEntryPoint, indent, logLevel,
|
|
|
165
168
|
downloadName: null,
|
|
166
169
|
outName: (0, user_passed_output_location_1.getUserPassedOutputLocation)(argsAfterComposition, outputLocationFromUI),
|
|
167
170
|
uiCodec,
|
|
171
|
+
compositionCodec: config.defaultCodec,
|
|
168
172
|
});
|
|
169
173
|
renderer_1.RenderInternals.validateEvenDimensionsWithCodec({
|
|
170
174
|
width: config.width,
|
|
@@ -217,7 +221,9 @@ const renderVideoFlow = async ({ remotionRoot, fullEntryPoint, indent, logLevel,
|
|
|
217
221
|
renderingProgress.frames = rendered;
|
|
218
222
|
updateRenderProgress({ newline: false, printToConsole: true });
|
|
219
223
|
},
|
|
220
|
-
onStart: () =>
|
|
224
|
+
onStart: ({ parallelEncoding }) => {
|
|
225
|
+
isUsingParallelEncoding = parallelEncoding;
|
|
226
|
+
},
|
|
221
227
|
onDownload,
|
|
222
228
|
cancelSignal: cancelSignal !== null && cancelSignal !== void 0 ? cancelSignal : undefined,
|
|
223
229
|
outputDir,
|
|
@@ -246,6 +252,7 @@ const renderVideoFlow = async ({ remotionRoot, fullEntryPoint, indent, logLevel,
|
|
|
246
252
|
data: config.props,
|
|
247
253
|
}).serializedString,
|
|
248
254
|
offthreadVideoCacheSizeInBytes,
|
|
255
|
+
parallelEncodingEnabled: isUsingParallelEncoding,
|
|
249
256
|
});
|
|
250
257
|
updateRenderProgress({ newline: true, printToConsole: true });
|
|
251
258
|
log_1.Log.infoAdvanced({ indent, logLevel }, chalk_1.chalk.blue(`▶ ${absoluteOutputFile}`));
|
|
@@ -38,11 +38,12 @@ const renderStillFlow = async ({ remotionRoot, fullEntryPoint, entryPointReason,
|
|
|
38
38
|
renderer_1.RenderInternals.isServeUrl(fullEntryPoint) ? null : 'bundling',
|
|
39
39
|
'rendering',
|
|
40
40
|
].filter(truthy_1.truthy);
|
|
41
|
-
const updateRenderProgress = ({ newline, printToConsole, }) => {
|
|
41
|
+
const updateRenderProgress = ({ newline, printToConsole, isUsingParallelEncoding, }) => {
|
|
42
42
|
const { output, progress, message } = (0, progress_bar_1.makeRenderingAndStitchingProgress)({
|
|
43
43
|
prog: aggregate,
|
|
44
44
|
steps: steps.length,
|
|
45
45
|
stitchingStep: steps.indexOf('stitching'),
|
|
46
|
+
isUsingParallelEncoding,
|
|
46
47
|
});
|
|
47
48
|
if (printToConsole) {
|
|
48
49
|
renderProgress.update(updatesDontOverwrite ? message : output, newline);
|
|
@@ -69,7 +70,11 @@ const renderStillFlow = async ({ remotionRoot, fullEntryPoint, entryPointReason,
|
|
|
69
70
|
onProgress: ({ copying, bundling }) => {
|
|
70
71
|
aggregate.bundling = bundling;
|
|
71
72
|
aggregate.copyingState = copying;
|
|
72
|
-
updateRenderProgress({
|
|
73
|
+
updateRenderProgress({
|
|
74
|
+
newline: false,
|
|
75
|
+
printToConsole: true,
|
|
76
|
+
isUsingParallelEncoding: false,
|
|
77
|
+
});
|
|
73
78
|
},
|
|
74
79
|
indentOutput: indent,
|
|
75
80
|
logLevel,
|
|
@@ -142,13 +147,18 @@ const renderStillFlow = async ({ remotionRoot, fullEntryPoint, entryPointReason,
|
|
|
142
147
|
steps,
|
|
143
148
|
totalFrames: 1,
|
|
144
149
|
};
|
|
145
|
-
updateRenderProgress({
|
|
150
|
+
updateRenderProgress({
|
|
151
|
+
newline: false,
|
|
152
|
+
printToConsole: true,
|
|
153
|
+
isUsingParallelEncoding: false,
|
|
154
|
+
});
|
|
146
155
|
const onDownload = (0, make_on_download_1.makeOnDownload)({
|
|
147
156
|
downloads: aggregate.downloads,
|
|
148
157
|
indent,
|
|
149
158
|
logLevel,
|
|
150
159
|
updateRenderProgress,
|
|
151
160
|
updatesDontOverwrite,
|
|
161
|
+
isUsingParallelEncoding: false,
|
|
152
162
|
});
|
|
153
163
|
await renderer_1.RenderInternals.internalRenderStill({
|
|
154
164
|
composition: config,
|
|
@@ -186,7 +196,11 @@ const renderStillFlow = async ({ remotionRoot, fullEntryPoint, entryPointReason,
|
|
|
186
196
|
steps,
|
|
187
197
|
totalFrames: 1,
|
|
188
198
|
};
|
|
189
|
-
updateRenderProgress({
|
|
199
|
+
updateRenderProgress({
|
|
200
|
+
newline: true,
|
|
201
|
+
printToConsole: true,
|
|
202
|
+
isUsingParallelEncoding: false,
|
|
203
|
+
});
|
|
190
204
|
log_1.Log.infoAdvanced({ indent, logLevel }, chalk_1.chalk.blue(`${exists ? '○' : '+'} ${absoluteOutputLocation}`));
|
|
191
205
|
};
|
|
192
206
|
exports.renderStillFlow = renderStillFlow;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@remotion/cli",
|
|
3
|
-
"version": "4.0.
|
|
3
|
+
"version": "4.0.53",
|
|
4
4
|
"description": "CLI for Remotion",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"sideEffects": false,
|
|
@@ -35,11 +35,11 @@
|
|
|
35
35
|
"prompts": "2.4.1",
|
|
36
36
|
"semver": "7.5.3",
|
|
37
37
|
"source-map": "0.6.1",
|
|
38
|
-
"@remotion/bundler": "4.0.
|
|
39
|
-
"@remotion/media-utils": "4.0.
|
|
40
|
-
"@remotion/player": "4.0.
|
|
41
|
-
"@remotion/renderer": "4.0.
|
|
42
|
-
"remotion": "4.0.
|
|
38
|
+
"@remotion/bundler": "4.0.53",
|
|
39
|
+
"@remotion/media-utils": "4.0.53",
|
|
40
|
+
"@remotion/player": "4.0.53",
|
|
41
|
+
"@remotion/renderer": "4.0.53",
|
|
42
|
+
"remotion": "4.0.53"
|
|
43
43
|
},
|
|
44
44
|
"peerDependencies": {
|
|
45
45
|
"react": ">=16.8.0",
|
|
@@ -53,7 +53,7 @@
|
|
|
53
53
|
"@types/prompts": "^2.4.1",
|
|
54
54
|
"@types/react": "18.0.26",
|
|
55
55
|
"@types/prettier": "^2.7.2",
|
|
56
|
-
"@types/react-dom": "18.0.
|
|
56
|
+
"@types/react-dom": "18.0.11",
|
|
57
57
|
"@types/semver": "^7.3.4",
|
|
58
58
|
"eslint": "8.42.0",
|
|
59
59
|
"eslint-plugin-10x": "1.5.2",
|
|
@@ -65,8 +65,8 @@
|
|
|
65
65
|
"react-dom": "^18.0.0",
|
|
66
66
|
"vitest": "0.31.1",
|
|
67
67
|
"zod": "^3.22.3",
|
|
68
|
-
"@remotion/zod-types": "4.0.
|
|
69
|
-
"@remotion/tailwind": "4.0.
|
|
68
|
+
"@remotion/zod-types": "4.0.53",
|
|
69
|
+
"@remotion/tailwind": "4.0.53"
|
|
70
70
|
},
|
|
71
71
|
"keywords": [
|
|
72
72
|
"remotion",
|