@remotion/cli 4.0.27 → 4.0.29
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 +2 -1
- package/dist/config/color-space.d.ts +3 -0
- package/dist/config/color-space.js +12 -0
- package/dist/config/image-format.d.ts +1 -1
- package/dist/config/index.d.ts +7 -2
- package/dist/config/index.js +3 -0
- package/dist/config/log.d.ts +1 -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/NewComposition/RemTextarea.d.ts +1 -1
- package/dist/editor/components/RenderButton.js +2 -1
- package/dist/editor/components/RenderModal/OptionExplainer.js +1 -1
- package/dist/editor/components/RenderModal/RenderModal.d.ts +2 -1
- package/dist/editor/components/RenderModal/RenderModal.js +79 -3
- package/dist/editor/components/RenderModal/RenderModalAdvanced.d.ts +1 -1
- package/dist/editor/components/RenderModal/RenderModalBasic.js +1 -1
- package/dist/editor/components/RenderModal/RenderModalInput.d.ts +3 -1
- package/dist/editor/components/RenderModal/RenderModalInput.js +2 -2
- package/dist/editor/components/RenderModal/RenderModalPicture.d.ts +3 -1
- package/dist/editor/components/RenderModal/RenderModalPicture.js +22 -3
- package/dist/editor/components/RenderModal/human-readable-codec.d.ts +1 -1
- package/dist/editor/components/RenderModal/out-name-checker.js +6 -1
- package/dist/editor/components/RenderQueue/actions.d.ts +20 -2
- package/dist/editor/components/RenderQueue/actions.js +28 -2
- package/dist/editor/components/SegmentedControl.js +2 -1
- package/dist/editor/components/SidebarRenderButton.js +2 -1
- package/dist/editor/helpers/colors.d.ts +1 -1
- package/dist/editor/helpers/render-modal-sections.js +3 -0
- package/dist/editor/state/modals.d.ts +2 -1
- package/dist/get-cli-options.d.ts +3 -2
- package/dist/get-cli-options.js +1 -0
- package/dist/index.d.ts +15 -13
- package/dist/log.d.ts +4 -4
- package/dist/parse-command-line.d.ts +2 -0
- package/dist/parse-command-line.js +3 -0
- package/dist/preview-server/dev-middleware/range-parser.d.ts +1 -1
- package/dist/preview-server/render-queue/get-default-video-contexts.d.ts +2 -2
- package/dist/preview-server/render-queue/get-default-video-contexts.js +2 -2
- package/dist/preview-server/render-queue/job.d.ts +22 -1
- package/dist/preview-server/render-queue/make-retry-payload.js +52 -6
- package/dist/preview-server/render-queue/process-video.js +16 -15
- package/dist/preview-server/render-queue/queue.js +8 -1
- package/dist/preview-server/routes/add-render.js +30 -0
- package/dist/preview-server/routes.js +2 -0
- package/dist/render-flows/render.d.ts +3 -2
- package/dist/render-flows/render.js +2 -1
- package/dist/render.js +2 -1
- package/package.json +8 -8
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.canUpdateDefaultProps = exports.updateDefaultProps = exports.updateAvailable = exports.cancelRenderJob = exports.removeRenderJob = exports.copyToClipboard = exports.openInFileExplorer = exports.subscribeToFileExistenceWatcher = exports.unsubscribeFromFileExistenceWatcher = exports.addVideoRenderJob = exports.addStillRenderJob = void 0;
|
|
3
|
+
exports.canUpdateDefaultProps = exports.updateDefaultProps = exports.updateAvailable = exports.cancelRenderJob = exports.removeRenderJob = exports.copyToClipboard = exports.openInFileExplorer = exports.subscribeToFileExistenceWatcher = exports.unsubscribeFromFileExistenceWatcher = exports.addVideoRenderJob = exports.addSequenceRenderJob = exports.addStillRenderJob = void 0;
|
|
4
4
|
const remotion_1 = require("remotion");
|
|
5
5
|
const callApi = (endpoint, body, signal) => {
|
|
6
6
|
return new Promise((resolve, reject) => {
|
|
@@ -48,7 +48,32 @@ const addStillRenderJob = ({ compositionId, outName, imageFormat, jpegQuality, f
|
|
|
48
48
|
});
|
|
49
49
|
};
|
|
50
50
|
exports.addStillRenderJob = addStillRenderJob;
|
|
51
|
-
const
|
|
51
|
+
const addSequenceRenderJob = ({ compositionId, outName, imageFormat, startFrame, endFrame, scale, verbose, chromiumOptions, delayRenderTimeout, envVariables, inputProps, concurrency, offthreadVideoCacheSizeInBytes, jpegQuality, disallowParallelEncoding, }) => {
|
|
52
|
+
return callApi('/api/render', {
|
|
53
|
+
compositionId,
|
|
54
|
+
type: 'sequence',
|
|
55
|
+
outName,
|
|
56
|
+
imageFormat,
|
|
57
|
+
jpegQuality,
|
|
58
|
+
scale,
|
|
59
|
+
startFrame,
|
|
60
|
+
endFrame,
|
|
61
|
+
verbose,
|
|
62
|
+
chromiumOptions,
|
|
63
|
+
delayRenderTimeout,
|
|
64
|
+
envVariables,
|
|
65
|
+
concurrency,
|
|
66
|
+
serializedInputPropsWithCustomSchema: remotion_1.Internals.serializeJSONWithDate({
|
|
67
|
+
data: inputProps,
|
|
68
|
+
staticBase: window.remotion_staticBase,
|
|
69
|
+
indent: undefined,
|
|
70
|
+
}).serializedString,
|
|
71
|
+
offthreadVideoCacheSizeInBytes,
|
|
72
|
+
disallowParallelEncoding,
|
|
73
|
+
});
|
|
74
|
+
};
|
|
75
|
+
exports.addSequenceRenderJob = addSequenceRenderJob;
|
|
76
|
+
const addVideoRenderJob = ({ compositionId, outName, imageFormat, jpegQuality, scale, verbose, codec, concurrency, crf, startFrame, endFrame, muted, enforceAudioTrack, proResProfile, x264Preset, pixelFormat, audioBitrate, videoBitrate, everyNthFrame, numberOfGifLoops, delayRenderTimeout, audioCodec, disallowParallelEncoding, chromiumOptions, envVariables, inputProps, offthreadVideoCacheSizeInBytes, colorSpace, }) => {
|
|
52
77
|
return callApi('/api/render', {
|
|
53
78
|
compositionId,
|
|
54
79
|
type: 'video',
|
|
@@ -82,6 +107,7 @@ const addVideoRenderJob = ({ compositionId, outName, imageFormat, jpegQuality, s
|
|
|
82
107
|
indent: undefined,
|
|
83
108
|
}).serializedString,
|
|
84
109
|
offthreadVideoCacheSizeInBytes,
|
|
110
|
+
colorSpace,
|
|
85
111
|
});
|
|
86
112
|
};
|
|
87
113
|
exports.addVideoRenderJob = addVideoRenderJob;
|
|
@@ -11,7 +11,7 @@ const container = {
|
|
|
11
11
|
overflow: 'hidden',
|
|
12
12
|
border: '1px solid ' + colors_1.INPUT_BORDER_COLOR_UNHOVERED,
|
|
13
13
|
flexWrap: 'wrap',
|
|
14
|
-
maxWidth:
|
|
14
|
+
maxWidth: 350,
|
|
15
15
|
justifyContent: 'flex-end',
|
|
16
16
|
};
|
|
17
17
|
const item = {
|
|
@@ -23,6 +23,7 @@ const item = {
|
|
|
23
23
|
border: 'none',
|
|
24
24
|
flex: 1,
|
|
25
25
|
justifyContent: 'center',
|
|
26
|
+
whiteSpace: 'nowrap',
|
|
26
27
|
};
|
|
27
28
|
const SegmentedControl = ({ items, needsWrapping }) => {
|
|
28
29
|
const controlStyle = (0, react_1.useMemo)(() => {
|
|
@@ -34,7 +34,7 @@ const SidebarRenderButton = ({ composition, visible }) => {
|
|
|
34
34
|
e.stopPropagation();
|
|
35
35
|
const { initialAudioCodec, initialRenderType, initialVideoCodec } = (0, get_default_video_contexts_1.getDefaultCodecs)({
|
|
36
36
|
defaultCodec: defaults.codec,
|
|
37
|
-
|
|
37
|
+
renderType: isVideo ? 'video' : 'still',
|
|
38
38
|
});
|
|
39
39
|
setSelectedModal({
|
|
40
40
|
type: 'render',
|
|
@@ -78,6 +78,7 @@ const SidebarRenderButton = ({ composition, visible }) => {
|
|
|
78
78
|
defaultProps: (_a = props[composition.id]) !== null && _a !== void 0 ? _a : composition.defaultProps,
|
|
79
79
|
inFrameMark: null,
|
|
80
80
|
outFrameMark: null,
|
|
81
|
+
initialColorSpace: defaults.colorSpace,
|
|
81
82
|
});
|
|
82
83
|
}, [
|
|
83
84
|
composition.defaultProps,
|
|
@@ -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" | "
|
|
19
|
+
}) => "transparent" | "hsla(0, 0%, 100%, 0.15)" | "hsla(0, 0%, 100%, 0.25)" | "rgba(255, 255, 255, 0.06)";
|
|
@@ -11,6 +11,9 @@ const useRenderModalSections = (renderMode, codec) => {
|
|
|
11
11
|
if (renderMode === 'still') {
|
|
12
12
|
return ['general', 'data', 'picture', 'advanced'];
|
|
13
13
|
}
|
|
14
|
+
if (renderMode === 'sequence') {
|
|
15
|
+
return ['general', 'data', 'picture', 'advanced'];
|
|
16
|
+
}
|
|
14
17
|
if (renderMode === 'video') {
|
|
15
18
|
if (codec === 'gif') {
|
|
16
19
|
return ['general', 'data', 'picture', 'gif', 'advanced'];
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { AudioCodec, Codec, OpenGlRenderer, PixelFormat, ProResProfile, StillImageFormat, VideoImageFormat, X264Preset } from '@remotion/renderer';
|
|
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
4
|
import type { RenderType } from '../components/RenderModal/RenderModalAdvanced';
|
|
@@ -35,6 +35,7 @@ export type RenderModalState = {
|
|
|
35
35
|
initialIgnoreCertificateErrors: boolean;
|
|
36
36
|
initialHeadless: boolean;
|
|
37
37
|
initialOffthreadVideoCacheSizeInBytes: number | null;
|
|
38
|
+
initialColorSpace: ColorSpace;
|
|
38
39
|
minConcurrency: number;
|
|
39
40
|
maxConcurrency: number;
|
|
40
41
|
defaultProps: Record<string, unknown>;
|
|
@@ -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: "verbose" | "info" | "warn" | "error";
|
|
25
25
|
scale: number;
|
|
26
26
|
chromiumOptions: ChromiumOptions;
|
|
27
27
|
overwrite: boolean;
|
|
@@ -34,6 +34,7 @@ export declare const getCliOptions: (options: {
|
|
|
34
34
|
videoBitrate: string | null;
|
|
35
35
|
height: number | null;
|
|
36
36
|
width: number | null;
|
|
37
|
-
configFileImageFormat: "
|
|
37
|
+
configFileImageFormat: "png" | "jpeg" | "none" | undefined;
|
|
38
38
|
offthreadVideoCacheSizeInBytes: number | null;
|
|
39
|
+
colorSpace: "default" | "bt709";
|
|
39
40
|
}>;
|
package/dist/get-cli-options.js
CHANGED
|
@@ -128,6 +128,7 @@ const getCliOptions = async (options) => {
|
|
|
128
128
|
width,
|
|
129
129
|
configFileImageFormat: config_1.ConfigInternals.getUserPreferredVideoImageFormat(),
|
|
130
130
|
offthreadVideoCacheSizeInBytes: config_1.ConfigInternals.getOffthreadVideoCacheSizeInBytes(),
|
|
131
|
+
colorSpace: config_1.ConfigInternals.getColorSpace(),
|
|
131
132
|
};
|
|
132
133
|
};
|
|
133
134
|
exports.getCliOptions = getCliOptions;
|
package/dist/index.d.ts
CHANGED
|
@@ -63,24 +63,24 @@ export declare const CliInternals: {
|
|
|
63
63
|
verbose: (message?: any, ...optionalParams: any[]) => void;
|
|
64
64
|
verboseAdvanced: (options: {
|
|
65
65
|
indent: boolean;
|
|
66
|
-
logLevel: "
|
|
66
|
+
logLevel: "verbose" | "info" | "warn" | "error";
|
|
67
67
|
} & {
|
|
68
68
|
tag?: string | undefined;
|
|
69
69
|
}, message?: any, ...optionalParams: any[]) => void;
|
|
70
70
|
info: (message?: any, ...optionalParams: any[]) => void;
|
|
71
71
|
infoAdvanced: (options: {
|
|
72
72
|
indent: boolean;
|
|
73
|
-
logLevel: "
|
|
73
|
+
logLevel: "verbose" | "info" | "warn" | "error";
|
|
74
74
|
}, message?: any, ...optionalParams: any[]) => void;
|
|
75
75
|
warn: (message?: any, ...optionalParams: any[]) => void;
|
|
76
76
|
warnAdvanced: (options: {
|
|
77
77
|
indent: boolean;
|
|
78
|
-
logLevel: "
|
|
78
|
+
logLevel: "verbose" | "info" | "warn" | "error";
|
|
79
79
|
}, message?: any, ...optionalParams: any[]) => void;
|
|
80
80
|
error: (message?: any, ...optionalParams: any[]) => void;
|
|
81
81
|
errorAdvanced: (options: {
|
|
82
82
|
indent: boolean;
|
|
83
|
-
logLevel: "
|
|
83
|
+
logLevel: "verbose" | "info" | "warn" | "error";
|
|
84
84
|
} & {
|
|
85
85
|
tag?: string | undefined;
|
|
86
86
|
}, message?: any, ...optionalParams: any[]) => void;
|
|
@@ -106,7 +106,7 @@ export declare const CliInternals: {
|
|
|
106
106
|
numberOfGifLoops: import("./config/number-of-gif-loops").Loop;
|
|
107
107
|
stillFrame: number;
|
|
108
108
|
browserExecutable: import("@remotion/renderer").BrowserExecutable;
|
|
109
|
-
logLevel: "
|
|
109
|
+
logLevel: "verbose" | "info" | "warn" | "error";
|
|
110
110
|
scale: number;
|
|
111
111
|
chromiumOptions: import("@remotion/renderer").ChromiumOptions;
|
|
112
112
|
overwrite: boolean;
|
|
@@ -119,8 +119,9 @@ export declare const CliInternals: {
|
|
|
119
119
|
videoBitrate: string | null;
|
|
120
120
|
height: number | null;
|
|
121
121
|
width: number | null;
|
|
122
|
-
configFileImageFormat: "
|
|
122
|
+
configFileImageFormat: "png" | "jpeg" | "none" | undefined;
|
|
123
123
|
offthreadVideoCacheSizeInBytes: number | null;
|
|
124
|
+
colorSpace: "default" | "bt709";
|
|
124
125
|
}>;
|
|
125
126
|
loadConfig: (remotionRoot: string) => Promise<string | null>;
|
|
126
127
|
initializeCli: (remotionRoot: string) => Promise<void>;
|
|
@@ -129,7 +130,7 @@ export declare const CliInternals: {
|
|
|
129
130
|
parsedCli: {
|
|
130
131
|
"browser-executable": import("@remotion/renderer").BrowserExecutable;
|
|
131
132
|
"pixel-format": "yuv420p" | "yuva420p" | "yuv422p" | "yuv444p" | "yuv420p10le" | "yuv422p10le" | "yuv444p10le" | "yuva444p10le";
|
|
132
|
-
"image-format": "
|
|
133
|
+
"image-format": "png" | "jpeg" | "pdf" | "webp" | "none";
|
|
133
134
|
"prores-profile": "4444-xq" | "4444" | "hq" | "standard" | "light" | "proxy";
|
|
134
135
|
"x264-preset": "medium" | "ultrafast" | "superfast" | "veryfast" | "faster" | "fast" | "slow" | "slower" | "veryslow" | "placebo";
|
|
135
136
|
"bundle-cache": string;
|
|
@@ -181,10 +182,11 @@ export declare const CliInternals: {
|
|
|
181
182
|
"browser-args": string;
|
|
182
183
|
"user-agent": string;
|
|
183
184
|
"offthreadvideo-cache-size-in-bytes": number | null;
|
|
185
|
+
"color-space": "default" | "bt709";
|
|
184
186
|
} & {
|
|
185
187
|
_: string[];
|
|
186
188
|
};
|
|
187
|
-
printError: (err: Error, logLevel: "
|
|
189
|
+
printError: (err: Error, logLevel: "verbose" | "info" | "warn" | "error") => Promise<void>;
|
|
188
190
|
formatBytes: (number: number, options?: Intl.NumberFormatOptions & {
|
|
189
191
|
locale: string;
|
|
190
192
|
bits?: boolean | undefined;
|
|
@@ -196,7 +198,7 @@ export declare const CliInternals: {
|
|
|
196
198
|
downloadName: string | null;
|
|
197
199
|
outName: string | null;
|
|
198
200
|
configImageFormat: "png" | "jpeg" | "pdf" | "webp" | null;
|
|
199
|
-
cliFlag: "
|
|
201
|
+
cliFlag: "png" | "jpeg" | "pdf" | "webp" | "none" | null;
|
|
200
202
|
isLambda: boolean;
|
|
201
203
|
fromUi: "png" | "jpeg" | "pdf" | "webp" | null;
|
|
202
204
|
}) => {
|
|
@@ -211,8 +213,8 @@ export declare const CliInternals: {
|
|
|
211
213
|
};
|
|
212
214
|
getVideoImageFormat: ({ codec, uiImageFormat, }: {
|
|
213
215
|
codec: import("@remotion/renderer").CodecOrUndefined;
|
|
214
|
-
uiImageFormat: "
|
|
215
|
-
}) => "
|
|
216
|
+
uiImageFormat: "png" | "jpeg" | "none" | null;
|
|
217
|
+
}) => "png" | "jpeg" | "none";
|
|
216
218
|
printCompositions: (compositions: import("remotion").VideoConfig[]) => void;
|
|
217
219
|
getFinalOutputCodec: ({ cliFlag, configFile, downloadName, outName, uiCodec, }: {
|
|
218
220
|
cliFlag: import("@remotion/renderer").CodecOrUndefined;
|
|
@@ -226,7 +228,7 @@ export declare const CliInternals: {
|
|
|
226
228
|
};
|
|
227
229
|
listOfRemotionPackages: string[];
|
|
228
230
|
shouldUseNonOverlayingLogger: ({ logLevel, }: {
|
|
229
|
-
logLevel: "
|
|
231
|
+
logLevel: "verbose" | "info" | "warn" | "error";
|
|
230
232
|
}) => boolean;
|
|
231
233
|
getCompositionWithDimensionOverride: ({ height, width, args, compositionIdFromUi, chromiumOptions, envVariables, port, puppeteerInstance, timeoutInMilliseconds, browserExecutable, serveUrlOrWebpackUrl, indent, serializedInputPropsWithCustomSchema, logLevel, server, offthreadVideoCacheSizeInBytes, }: {
|
|
232
234
|
height: number | null;
|
|
@@ -241,7 +243,7 @@ export declare const CliInternals: {
|
|
|
241
243
|
browserExecutable: import("@remotion/renderer").BrowserExecutable;
|
|
242
244
|
serveUrlOrWebpackUrl: string;
|
|
243
245
|
indent: boolean;
|
|
244
|
-
logLevel: "
|
|
246
|
+
logLevel: "verbose" | "info" | "warn" | "error";
|
|
245
247
|
serializedInputPropsWithCustomSchema: string;
|
|
246
248
|
server: import("@remotion/renderer").RemotionServer;
|
|
247
249
|
offthreadVideoCacheSizeInBytes: number | null;
|
package/dist/log.d.ts
CHANGED
|
@@ -2,24 +2,24 @@ export declare const Log: {
|
|
|
2
2
|
verbose: (message?: any, ...optionalParams: any[]) => void;
|
|
3
3
|
verboseAdvanced: (options: {
|
|
4
4
|
indent: boolean;
|
|
5
|
-
logLevel: "
|
|
5
|
+
logLevel: "verbose" | "info" | "warn" | "error";
|
|
6
6
|
} & {
|
|
7
7
|
tag?: string | undefined;
|
|
8
8
|
}, message?: any, ...optionalParams: any[]) => void;
|
|
9
9
|
info: (message?: any, ...optionalParams: any[]) => void;
|
|
10
10
|
infoAdvanced: (options: {
|
|
11
11
|
indent: boolean;
|
|
12
|
-
logLevel: "
|
|
12
|
+
logLevel: "verbose" | "info" | "warn" | "error";
|
|
13
13
|
}, message?: any, ...optionalParams: any[]) => void;
|
|
14
14
|
warn: (message?: any, ...optionalParams: any[]) => void;
|
|
15
15
|
warnAdvanced: (options: {
|
|
16
16
|
indent: boolean;
|
|
17
|
-
logLevel: "
|
|
17
|
+
logLevel: "verbose" | "info" | "warn" | "error";
|
|
18
18
|
}, message?: any, ...optionalParams: any[]) => void;
|
|
19
19
|
error: (message?: any, ...optionalParams: any[]) => void;
|
|
20
20
|
errorAdvanced: (options: {
|
|
21
21
|
indent: boolean;
|
|
22
|
-
logLevel: "
|
|
22
|
+
logLevel: "verbose" | "info" | "warn" | "error";
|
|
23
23
|
} & {
|
|
24
24
|
tag?: string | undefined;
|
|
25
25
|
}, message?: any, ...optionalParams: any[]) => void;
|
|
@@ -15,6 +15,8 @@ type CommandLineOptions = {
|
|
|
15
15
|
['number-of-shared-audio-tags']: number;
|
|
16
16
|
[BrowserSafeApis.options.offthreadVideoCacheSizeInBytesOption
|
|
17
17
|
.cliFlag]: typeof BrowserSafeApis.options.offthreadVideoCacheSizeInBytesOption.type;
|
|
18
|
+
[BrowserSafeApis.options.colorSpaceOption
|
|
19
|
+
.cliFlag]: typeof BrowserSafeApis.options.colorSpaceOption.type;
|
|
18
20
|
version: string;
|
|
19
21
|
codec: Codec;
|
|
20
22
|
concurrency: number;
|
|
@@ -148,6 +148,9 @@ const parseCommandLine = () => {
|
|
|
148
148
|
if (typeof exports.parsedCli['offthreadvideo-cache-size-in-bytes'] !== 'undefined') {
|
|
149
149
|
config_1.Config.setOffthreadVideoCacheSizeInBytes(exports.parsedCli['offthreadvideo-cache-size-in-bytes']);
|
|
150
150
|
}
|
|
151
|
+
if (typeof exports.parsedCli['color-space'] !== 'undefined') {
|
|
152
|
+
config_1.Config.setColorSpace(exports.parsedCli['color-space']);
|
|
153
|
+
}
|
|
151
154
|
};
|
|
152
155
|
exports.parseCommandLine = parseCommandLine;
|
|
153
156
|
const quietFlagProvided = () => exports.parsedCli.quiet || exports.parsedCli.q;
|
|
@@ -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 | Ranges | -2;
|
|
15
15
|
export {};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import type { Codec } from '@remotion/renderer';
|
|
2
2
|
import type { RenderType } from '../../editor/components/RenderModal/RenderModalAdvanced';
|
|
3
|
-
export declare const getDefaultCodecs: ({ defaultCodec,
|
|
3
|
+
export declare const getDefaultCodecs: ({ defaultCodec, renderType, }: {
|
|
4
4
|
defaultCodec: Codec;
|
|
5
|
-
|
|
5
|
+
renderType: RenderType;
|
|
6
6
|
}) => {
|
|
7
7
|
initialAudioCodec: Codec;
|
|
8
8
|
initialVideoCodec: Codec;
|
|
@@ -2,12 +2,12 @@
|
|
|
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 = ({ defaultCodec,
|
|
5
|
+
const getDefaultCodecs = ({ defaultCodec, renderType, }) => {
|
|
6
6
|
const isAudioCodec = client_1.BrowserSafeApis.isAudioCodec(defaultCodec);
|
|
7
7
|
return {
|
|
8
8
|
initialAudioCodec: isAudioCodec ? defaultCodec : 'mp3',
|
|
9
9
|
initialVideoCodec: isAudioCodec ? 'h264' : defaultCodec,
|
|
10
|
-
initialRenderType:
|
|
10
|
+
initialRenderType: isAudioCodec ? 'audio' : renderType,
|
|
11
11
|
};
|
|
12
12
|
};
|
|
13
13
|
exports.getDefaultCodecs = getDefaultCodecs;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { AudioCodec, Codec, makeCancelSignal, PixelFormat, ProResProfile, StillImageFormat, VideoImageFormat, X264Preset } from '@remotion/renderer';
|
|
1
|
+
import type { AudioCodec, Codec, ColorSpace, makeCancelSignal, PixelFormat, ProResProfile, StillImageFormat, VideoImageFormat, X264Preset } from '@remotion/renderer';
|
|
2
2
|
import type { EnumPath } from '../../editor/components/RenderModal/SchemaEditor/extract-enum-json-paths';
|
|
3
3
|
import type { AggregateRenderProgress } from '../../progress-types';
|
|
4
4
|
import type { RequiredChromiumOptions } from '../../required-chromium-options';
|
|
@@ -30,6 +30,15 @@ type RenderJobDynamicFields = ({
|
|
|
30
30
|
frame: number;
|
|
31
31
|
scale: number;
|
|
32
32
|
offthreadVideoCacheSizeInBytes: number | null;
|
|
33
|
+
} & RenderJobDynamicStatus) | ({
|
|
34
|
+
type: 'sequence';
|
|
35
|
+
imageFormat: VideoImageFormat;
|
|
36
|
+
jpegQuality: number | null;
|
|
37
|
+
scale: number;
|
|
38
|
+
concurrency: number;
|
|
39
|
+
startFrame: number;
|
|
40
|
+
endFrame: number;
|
|
41
|
+
offthreadVideoCacheSizeInBytes: number | null;
|
|
33
42
|
} & RenderJobDynamicStatus) | ({
|
|
34
43
|
type: 'video';
|
|
35
44
|
imageFormat: VideoImageFormat;
|
|
@@ -52,6 +61,7 @@ type RenderJobDynamicFields = ({
|
|
|
52
61
|
numberOfGifLoops: number | null;
|
|
53
62
|
disallowParallelEncoding: boolean;
|
|
54
63
|
offthreadVideoCacheSizeInBytes: number | null;
|
|
64
|
+
colorSpace: ColorSpace;
|
|
55
65
|
} & RenderJobDynamicStatus);
|
|
56
66
|
export type RenderJob = {
|
|
57
67
|
startedAt: number;
|
|
@@ -76,6 +86,16 @@ type AddRenderRequestDynamicFields = {
|
|
|
76
86
|
frame: number;
|
|
77
87
|
scale: number;
|
|
78
88
|
verbose: boolean;
|
|
89
|
+
} | {
|
|
90
|
+
type: 'sequence';
|
|
91
|
+
imageFormat: VideoImageFormat;
|
|
92
|
+
jpegQuality: number | null;
|
|
93
|
+
scale: number;
|
|
94
|
+
verbose: boolean;
|
|
95
|
+
concurrency: number;
|
|
96
|
+
startFrame: number;
|
|
97
|
+
endFrame: number;
|
|
98
|
+
disallowParallelEncoding: boolean;
|
|
79
99
|
} | {
|
|
80
100
|
type: 'video';
|
|
81
101
|
codec: Codec;
|
|
@@ -98,6 +118,7 @@ type AddRenderRequestDynamicFields = {
|
|
|
98
118
|
everyNthFrame: number;
|
|
99
119
|
numberOfGifLoops: number | null;
|
|
100
120
|
disallowParallelEncoding: boolean;
|
|
121
|
+
colorSpace: ColorSpace;
|
|
101
122
|
};
|
|
102
123
|
export type CancelRenderRequest = {
|
|
103
124
|
jobId: string;
|
|
@@ -4,7 +4,7 @@ exports.makeRetryPayload = void 0;
|
|
|
4
4
|
const remotion_1 = require("remotion");
|
|
5
5
|
const get_default_video_contexts_1 = require("./get-default-video-contexts");
|
|
6
6
|
const makeRetryPayload = (job) => {
|
|
7
|
-
var _a, _b, _c, _d;
|
|
7
|
+
var _a, _b, _c, _d, _e;
|
|
8
8
|
const defaults = window.remotion_renderDefaults;
|
|
9
9
|
if (!defaults) {
|
|
10
10
|
throw new Error('defaults not set');
|
|
@@ -12,7 +12,7 @@ const makeRetryPayload = (job) => {
|
|
|
12
12
|
if (job.type === 'still') {
|
|
13
13
|
const { initialAudioCodec, initialRenderType, initialVideoCodec } = (0, get_default_video_contexts_1.getDefaultCodecs)({
|
|
14
14
|
defaultCodec: defaults.codec,
|
|
15
|
-
|
|
15
|
+
renderType: 'still',
|
|
16
16
|
});
|
|
17
17
|
return {
|
|
18
18
|
type: 'render',
|
|
@@ -50,19 +50,64 @@ const makeRetryPayload = (job) => {
|
|
|
50
50
|
inFrameMark: null,
|
|
51
51
|
outFrameMark: null,
|
|
52
52
|
initialOffthreadVideoCacheSizeInBytes: job.offthreadVideoCacheSizeInBytes,
|
|
53
|
+
initialColorSpace: defaults.colorSpace,
|
|
54
|
+
};
|
|
55
|
+
}
|
|
56
|
+
if (job.type === 'sequence') {
|
|
57
|
+
const { initialAudioCodec, initialRenderType, initialVideoCodec } = (0, get_default_video_contexts_1.getDefaultCodecs)({
|
|
58
|
+
defaultCodec: defaults.codec,
|
|
59
|
+
renderType: 'sequence',
|
|
60
|
+
});
|
|
61
|
+
return {
|
|
62
|
+
type: 'render',
|
|
63
|
+
initialFrame: 0,
|
|
64
|
+
compositionId: job.compositionId,
|
|
65
|
+
initialVideoImageFormat: defaults.videoImageFormat,
|
|
66
|
+
initialJpegQuality: (_b = job.jpegQuality) !== null && _b !== void 0 ? _b : defaults.jpegQuality,
|
|
67
|
+
initialOutName: job.outName,
|
|
68
|
+
initialScale: job.scale,
|
|
69
|
+
initialVerbose: job.verbose,
|
|
70
|
+
initialVideoCodecForAudioTab: initialAudioCodec,
|
|
71
|
+
initialRenderType,
|
|
72
|
+
initialVideoCodecForVideoTab: initialVideoCodec,
|
|
73
|
+
initialConcurrency: defaults.concurrency,
|
|
74
|
+
maxConcurrency: defaults.maxConcurrency,
|
|
75
|
+
minConcurrency: defaults.minConcurrency,
|
|
76
|
+
initialMuted: defaults.muted,
|
|
77
|
+
initialEnforceAudioTrack: defaults.enforceAudioTrack,
|
|
78
|
+
initialProResProfile: defaults.proResProfile,
|
|
79
|
+
initialx264Preset: defaults.x264Preset,
|
|
80
|
+
initialPixelFormat: defaults.pixelFormat,
|
|
81
|
+
initialAudioBitrate: defaults.audioBitrate,
|
|
82
|
+
initialVideoBitrate: defaults.videoBitrate,
|
|
83
|
+
initialEveryNthFrame: defaults.everyNthFrame,
|
|
84
|
+
initialNumberOfGifLoops: defaults.numberOfGifLoops,
|
|
85
|
+
initialDelayRenderTimeout: job.delayRenderTimeout,
|
|
86
|
+
initialAudioCodec: defaults.audioCodec,
|
|
87
|
+
initialEnvVariables: job.envVariables,
|
|
88
|
+
initialDisableWebSecurity: job.chromiumOptions.disableWebSecurity,
|
|
89
|
+
initialOpenGlRenderer: job.chromiumOptions.gl,
|
|
90
|
+
initialHeadless: job.chromiumOptions.headless,
|
|
91
|
+
initialIgnoreCertificateErrors: job.chromiumOptions.ignoreCertificateErrors,
|
|
92
|
+
defaultProps: remotion_1.Internals.deserializeJSONWithCustomFields(job.serializedInputPropsWithCustomSchema),
|
|
93
|
+
initialStillImageFormat: defaults.stillImageFormat,
|
|
94
|
+
inFrameMark: job.startFrame,
|
|
95
|
+
outFrameMark: job.endFrame,
|
|
96
|
+
initialOffthreadVideoCacheSizeInBytes: job.offthreadVideoCacheSizeInBytes,
|
|
97
|
+
initialColorSpace: defaults.colorSpace,
|
|
53
98
|
};
|
|
54
99
|
}
|
|
55
100
|
if (job.type === 'video') {
|
|
56
101
|
const { initialAudioCodec, initialRenderType, initialVideoCodec } = (0, get_default_video_contexts_1.getDefaultCodecs)({
|
|
57
102
|
defaultCodec: job.codec,
|
|
58
|
-
|
|
103
|
+
renderType: 'video',
|
|
59
104
|
});
|
|
60
105
|
return {
|
|
61
106
|
type: 'render',
|
|
62
107
|
compositionId: job.compositionId,
|
|
63
108
|
initialStillImageFormat: defaults.stillImageFormat,
|
|
64
109
|
initialVideoImageFormat: job.imageFormat,
|
|
65
|
-
initialJpegQuality: (
|
|
110
|
+
initialJpegQuality: (_c = job.jpegQuality) !== null && _c !== void 0 ? _c : defaults.jpegQuality,
|
|
66
111
|
initialOutName: job.outName,
|
|
67
112
|
initialScale: job.scale,
|
|
68
113
|
initialVerbose: job.verbose,
|
|
@@ -75,8 +120,8 @@ const makeRetryPayload = (job) => {
|
|
|
75
120
|
initialEnforceAudioTrack: job.enforceAudioTrack,
|
|
76
121
|
initialRenderType,
|
|
77
122
|
initialVideoCodecForVideoTab: initialVideoCodec,
|
|
78
|
-
initialProResProfile: (
|
|
79
|
-
initialx264Preset: (
|
|
123
|
+
initialProResProfile: (_d = job.proResProfile) !== null && _d !== void 0 ? _d : defaults.proResProfile,
|
|
124
|
+
initialx264Preset: (_e = job.x264Preset) !== null && _e !== void 0 ? _e : defaults.x264Preset,
|
|
80
125
|
initialPixelFormat: job.pixelFormat,
|
|
81
126
|
initialAudioBitrate: job.audioBitrate,
|
|
82
127
|
initialVideoBitrate: job.videoBitrate,
|
|
@@ -93,6 +138,7 @@ const makeRetryPayload = (job) => {
|
|
|
93
138
|
inFrameMark: job.startFrame,
|
|
94
139
|
outFrameMark: job.endFrame,
|
|
95
140
|
initialOffthreadVideoCacheSizeInBytes: job.offthreadVideoCacheSizeInBytes,
|
|
141
|
+
initialColorSpace: job.colorSpace,
|
|
96
142
|
};
|
|
97
143
|
}
|
|
98
144
|
throw new Error(`Job ${JSON.stringify(job)} Not implemented`);
|
|
@@ -6,7 +6,7 @@ const get_cli_options_1 = require("../../get-cli-options");
|
|
|
6
6
|
const render_1 = require("../../render-flows/render");
|
|
7
7
|
const processVideoJob = async ({ job, remotionRoot, entryPoint, onProgress, addCleanupCallback, }) => {
|
|
8
8
|
var _a, _b, _c;
|
|
9
|
-
if (job.type !== 'video') {
|
|
9
|
+
if (job.type !== 'video' && job.type !== 'sequence') {
|
|
10
10
|
throw new Error('Expected video job');
|
|
11
11
|
}
|
|
12
12
|
const { publicDir, browserExecutable, port, browser, ffmpegOverride } = await (0, get_cli_options_1.getCliOptions)({
|
|
@@ -38,28 +38,29 @@ const processVideoJob = async ({ job, remotionRoot, entryPoint, onProgress, addC
|
|
|
38
38
|
onProgress,
|
|
39
39
|
indent: true,
|
|
40
40
|
concurrency: job.concurrency,
|
|
41
|
-
everyNthFrame: job.everyNthFrame,
|
|
41
|
+
everyNthFrame: job.type === 'video' ? job.everyNthFrame : 1,
|
|
42
42
|
frameRange: [job.startFrame, job.endFrame],
|
|
43
43
|
quiet: false,
|
|
44
|
-
shouldOutputImageSequence:
|
|
44
|
+
shouldOutputImageSequence: job.type === 'sequence',
|
|
45
45
|
addCleanupCallback,
|
|
46
46
|
outputLocationFromUI: job.outName,
|
|
47
|
-
uiCodec: job.codec,
|
|
47
|
+
uiCodec: job.type === 'video' ? job.codec : null,
|
|
48
48
|
uiImageFormat: job.imageFormat,
|
|
49
49
|
cancelSignal: job.cancelToken.cancelSignal,
|
|
50
|
-
crf: job.crf,
|
|
50
|
+
crf: job.type === 'video' ? job.crf : null,
|
|
51
51
|
ffmpegOverride,
|
|
52
|
-
audioBitrate: job.audioBitrate,
|
|
53
|
-
muted: job.muted,
|
|
54
|
-
enforceAudioTrack: job.enforceAudioTrack,
|
|
55
|
-
proResProfile: (_b = job.proResProfile) !== null && _b !== void 0 ? _b : undefined,
|
|
56
|
-
x264Preset: (_c = job.x264Preset) !== null && _c !== void 0 ? _c : undefined,
|
|
57
|
-
pixelFormat: job.pixelFormat,
|
|
58
|
-
videoBitrate: job.videoBitrate,
|
|
59
|
-
numberOfGifLoops: job.numberOfGifLoops,
|
|
60
|
-
audioCodec: job.audioCodec,
|
|
61
|
-
disallowParallelEncoding: job.disallowParallelEncoding,
|
|
52
|
+
audioBitrate: job.type === 'video' ? job.audioBitrate : null,
|
|
53
|
+
muted: job.type === 'video' ? job.muted : true,
|
|
54
|
+
enforceAudioTrack: job.type === 'video' ? job.enforceAudioTrack : false,
|
|
55
|
+
proResProfile: job.type === 'video' ? (_b = job.proResProfile) !== null && _b !== void 0 ? _b : undefined : undefined,
|
|
56
|
+
x264Preset: job.type === 'video' ? (_c = job.x264Preset) !== null && _c !== void 0 ? _c : undefined : undefined,
|
|
57
|
+
pixelFormat: job.type === 'video' ? job.pixelFormat : 'yuv420p',
|
|
58
|
+
videoBitrate: job.type === 'video' ? job.videoBitrate : null,
|
|
59
|
+
numberOfGifLoops: job.type === 'video' ? job.numberOfGifLoops : null,
|
|
60
|
+
audioCodec: job.type === 'video' ? job.audioCodec : null,
|
|
61
|
+
disallowParallelEncoding: job.type === 'video' ? job.disallowParallelEncoding : false,
|
|
62
62
|
offthreadVideoCacheSizeInBytes: job.offthreadVideoCacheSizeInBytes,
|
|
63
|
+
colorSpace: job.type === 'video' ? job.colorSpace : 'default',
|
|
63
64
|
});
|
|
64
65
|
};
|
|
65
66
|
exports.processVideoJob = processVideoJob;
|
|
@@ -50,7 +50,7 @@ const processJob = async ({ job, remotionRoot, entryPoint, onProgress, addCleanu
|
|
|
50
50
|
});
|
|
51
51
|
return;
|
|
52
52
|
}
|
|
53
|
-
if (job.type === 'video') {
|
|
53
|
+
if (job.type === 'video' || job.type === 'sequence') {
|
|
54
54
|
await (0, process_video_1.processVideoJob)({
|
|
55
55
|
job,
|
|
56
56
|
remotionRoot,
|
|
@@ -147,6 +147,13 @@ const processJobIfPossible = async ({ remotionRoot, entryPoint, }) => {
|
|
|
147
147
|
progress,
|
|
148
148
|
};
|
|
149
149
|
}
|
|
150
|
+
if (job.type === 'sequence') {
|
|
151
|
+
return {
|
|
152
|
+
...job,
|
|
153
|
+
status: 'running',
|
|
154
|
+
progress,
|
|
155
|
+
};
|
|
156
|
+
}
|
|
150
157
|
throw new Error('Unknown job type');
|
|
151
158
|
});
|
|
152
159
|
},
|
|
@@ -44,6 +44,36 @@ const handleAddRender = ({ input, entryPoint, remotionRoot, }) => {
|
|
|
44
44
|
envVariables: input.envVariables,
|
|
45
45
|
serializedInputPropsWithCustomSchema: input.serializedInputPropsWithCustomSchema,
|
|
46
46
|
offthreadVideoCacheSizeInBytes: input.offthreadVideoCacheSizeInBytes,
|
|
47
|
+
colorSpace: input.colorSpace,
|
|
48
|
+
},
|
|
49
|
+
});
|
|
50
|
+
}
|
|
51
|
+
if (input.type === 'sequence') {
|
|
52
|
+
(0, queue_1.addJob)({
|
|
53
|
+
entryPoint,
|
|
54
|
+
remotionRoot,
|
|
55
|
+
job: {
|
|
56
|
+
cleanup: [],
|
|
57
|
+
compositionId: input.compositionId,
|
|
58
|
+
deletedOutputLocation: false,
|
|
59
|
+
type: 'sequence',
|
|
60
|
+
status: 'idle',
|
|
61
|
+
id,
|
|
62
|
+
imageFormat: input.imageFormat,
|
|
63
|
+
outName: input.outName,
|
|
64
|
+
jpegQuality: input.jpegQuality,
|
|
65
|
+
scale: input.scale,
|
|
66
|
+
startedAt: Date.now(),
|
|
67
|
+
verbose: input.verbose,
|
|
68
|
+
cancelToken: (0, renderer_1.makeCancelSignal)(),
|
|
69
|
+
concurrency: input.concurrency,
|
|
70
|
+
endFrame: input.endFrame,
|
|
71
|
+
startFrame: input.startFrame,
|
|
72
|
+
delayRenderTimeout: input.delayRenderTimeout,
|
|
73
|
+
chromiumOptions: input.chromiumOptions,
|
|
74
|
+
envVariables: input.envVariables,
|
|
75
|
+
serializedInputPropsWithCustomSchema: input.serializedInputPropsWithCustomSchema,
|
|
76
|
+
offthreadVideoCacheSizeInBytes: input.offthreadVideoCacheSizeInBytes,
|
|
47
77
|
},
|
|
48
78
|
});
|
|
49
79
|
}
|
|
@@ -54,6 +54,7 @@ const handleFallback = async ({ remotionRoot, hash, response, getCurrentInputPro
|
|
|
54
54
|
const ignoreCertificateErrors = config_1.ConfigInternals.getIgnoreCertificateErrors();
|
|
55
55
|
const openGlRenderer = config_1.ConfigInternals.getChromiumOpenGlRenderer();
|
|
56
56
|
const offthreadVideoCacheSizeInBytes = config_1.ConfigInternals.getOffthreadVideoCacheSizeInBytes();
|
|
57
|
+
const colorSpace = config_1.ConfigInternals.getColorSpace();
|
|
57
58
|
const maxConcurrency = renderer_1.RenderInternals.getMaxConcurrency();
|
|
58
59
|
const minConcurrency = renderer_1.RenderInternals.getMinConcurrency();
|
|
59
60
|
response.setHeader('content-type', 'text/html');
|
|
@@ -99,6 +100,7 @@ const handleFallback = async ({ remotionRoot, hash, response, getCurrentInputPro
|
|
|
99
100
|
ignoreCertificateErrors,
|
|
100
101
|
openGlRenderer,
|
|
101
102
|
offthreadVideoCacheSizeInBytes,
|
|
103
|
+
colorSpace,
|
|
102
104
|
},
|
|
103
105
|
publicFolderExists: (0, node_fs_1.existsSync)(publicDir) ? publicDir : null,
|
|
104
106
|
}));
|