@remotion/cli 4.0.2 → 4.0.4
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 +13 -2
- package/dist/cloudrun-command.d.ts +1 -0
- package/dist/cloudrun-command.js +27 -0
- package/dist/codemods/stringify-with-path.js +3 -3
- package/dist/compositions.js +6 -1
- package/dist/config/image-format.d.ts +1 -1
- package/dist/config/index.d.ts +1 -1
- package/dist/editor/components/NewComposition/RemInput.d.ts +1 -1
- package/dist/editor/components/NewComposition/RemInputTypeColor.d.ts +1 -1
- package/dist/editor/components/NewComposition/RemTextarea.d.ts +1 -1
- package/dist/editor/components/RenderModal/DataEditor.js +3 -3
- package/dist/editor/components/RenderModal/RenderModalJSONPropsEditor.d.ts +1 -1
- package/dist/editor/components/RenderModal/RenderModalJSONPropsEditor.js +2 -2
- package/dist/editor/components/RenderModal/SchemaEditor/SchemaEditor.d.ts +1 -1
- package/dist/editor/components/RenderModal/human-readable-codec.d.ts +1 -1
- package/dist/editor/components/RenderQueue/actions.d.ts +1 -1
- package/dist/editor/components/RenderQueue/actions.js +12 -4
- package/dist/editor/helpers/render-modal-sections.d.ts +0 -1
- package/dist/get-cli-options.d.ts +1 -1
- package/dist/get-composition-id.d.ts +2 -2
- package/dist/get-composition-id.js +7 -4
- package/dist/get-composition-with-dimension-override.d.ts +2 -2
- package/dist/get-composition-with-dimension-override.js +2 -2
- package/dist/index.d.ts +7 -7
- package/dist/preview-server/dev-middleware/range-parser.d.ts +1 -1
- package/dist/preview-server/render-queue/job.d.ts +2 -2
- package/dist/preview-server/render-queue/make-retry-payload.js +3 -2
- package/dist/preview-server/render-queue/process-still.js +1 -1
- package/dist/preview-server/render-queue/process-video.js +1 -1
- package/dist/preview-server/routes/add-render.js +2 -2
- package/dist/preview-server/routes/update-default-props.js +2 -2
- package/dist/preview-server/routes.d.ts +0 -1
- package/dist/render-flows/render.d.ts +2 -2
- package/dist/render-flows/render.js +18 -7
- package/dist/render-flows/still.d.ts +2 -2
- package/dist/render-flows/still.js +12 -6
- package/dist/render.js +6 -1
- package/dist/still.js +6 -1
- package/package.json +8 -8
package/dist/benchmark.js
CHANGED
|
@@ -18,6 +18,7 @@ const setup_cache_1 = require("./setup-cache");
|
|
|
18
18
|
const should_use_non_overlaying_logger_1 = require("./should-use-non-overlaying-logger");
|
|
19
19
|
const show_compositions_picker_1 = require("./show-compositions-picker");
|
|
20
20
|
const truthy_1 = require("./truthy");
|
|
21
|
+
const remotion_1 = require("remotion");
|
|
21
22
|
const DEFAULT_RUNS = 3;
|
|
22
23
|
const getValidConcurrency = (cliConcurrency) => {
|
|
23
24
|
const { concurrencies } = parse_command_line_1.parsedCli;
|
|
@@ -125,9 +126,14 @@ const benchmarkCommand = async (remotionRoot, args) => {
|
|
|
125
126
|
});
|
|
126
127
|
(0, cleanup_before_quit_1.registerCleanupJob)(() => cleanupBundle());
|
|
127
128
|
const puppeteerInstance = await browserInstance;
|
|
129
|
+
const serializedInputPropsWithCustomSchema = remotion_1.Internals.serializeJSONWithDate({
|
|
130
|
+
data: inputProps !== null && inputProps !== void 0 ? inputProps : {},
|
|
131
|
+
indent: undefined,
|
|
132
|
+
staticBase: null,
|
|
133
|
+
}).serializedString;
|
|
128
134
|
const comps = await renderer_1.RenderInternals.internalGetCompositions({
|
|
129
135
|
serveUrlOrWebpackUrl: bundleLocation,
|
|
130
|
-
|
|
136
|
+
serializedInputPropsWithCustomSchema,
|
|
131
137
|
envVariables,
|
|
132
138
|
chromiumOptions,
|
|
133
139
|
timeoutInMilliseconds: puppeteerTimeout,
|
|
@@ -191,7 +197,7 @@ const benchmarkCommand = async (remotionRoot, args) => {
|
|
|
191
197
|
codec,
|
|
192
198
|
uiImageFormat: null,
|
|
193
199
|
}),
|
|
194
|
-
|
|
200
|
+
serializedInputPropsWithCustomSchema,
|
|
195
201
|
overwrite,
|
|
196
202
|
pixelFormat,
|
|
197
203
|
proResProfile,
|
|
@@ -223,6 +229,11 @@ const benchmarkCommand = async (remotionRoot, args) => {
|
|
|
223
229
|
onStart: () => undefined,
|
|
224
230
|
preferLossless: false,
|
|
225
231
|
server: undefined,
|
|
232
|
+
serializedResolvedPropsWithCustomSchema: remotion_1.Internals.serializeJSONWithDate({
|
|
233
|
+
data: composition.props,
|
|
234
|
+
indent: undefined,
|
|
235
|
+
staticBase: null,
|
|
236
|
+
}).serializedString,
|
|
226
237
|
}, (run, progress) => {
|
|
227
238
|
benchmarkProgress.update(makeBenchmarkProgressBar({
|
|
228
239
|
totalRuns: runs,
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const cloudrunCommand: (remotionRoot: string, args: string[]) => Promise<never>;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.cloudrunCommand = void 0;
|
|
4
|
+
const log_1 = require("./log");
|
|
5
|
+
const get_package_manager_1 = require("./preview-server/get-package-manager");
|
|
6
|
+
const update_available_1 = require("./preview-server/update-available");
|
|
7
|
+
const cloudrunCommand = async (remotionRoot, args) => {
|
|
8
|
+
try {
|
|
9
|
+
const path = require.resolve('@remotion/cloudrun', {
|
|
10
|
+
paths: [remotionRoot],
|
|
11
|
+
});
|
|
12
|
+
const { CloudrunInternals } = require(path);
|
|
13
|
+
await CloudrunInternals.executeCommand(args, remotionRoot);
|
|
14
|
+
process.exit(0);
|
|
15
|
+
}
|
|
16
|
+
catch (err) {
|
|
17
|
+
const manager = (0, get_package_manager_1.getPackageManager)(remotionRoot, undefined);
|
|
18
|
+
const installCommand = manager === 'unknown' ? 'npm i' : manager.installCommand;
|
|
19
|
+
log_1.Log.error(err);
|
|
20
|
+
log_1.Log.error('Remotion CloudRun is not installed.');
|
|
21
|
+
log_1.Log.info('');
|
|
22
|
+
log_1.Log.info('You can install it using:');
|
|
23
|
+
log_1.Log.info(`${installCommand} @remotion/cloudrun@${(0, update_available_1.getRemotionVersion)()}`);
|
|
24
|
+
process.exit(1);
|
|
25
|
+
}
|
|
26
|
+
};
|
|
27
|
+
exports.cloudrunCommand = cloudrunCommand;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.stringifyDefaultProps = void 0;
|
|
4
|
-
const
|
|
4
|
+
const remotion_1 = require("remotion");
|
|
5
5
|
const doesMatchPath = (path1, enumPaths) => {
|
|
6
6
|
return enumPaths.some((p) => path1.every((item, index) => {
|
|
7
7
|
if (p[index] === '[]' && !Number.isNaN(Number(item))) {
|
|
@@ -21,8 +21,8 @@ const stringifyDefaultProps = ({ props, enumPaths, }) => JSON.stringify(props, r
|
|
|
21
21
|
if (typeof item === 'string' && doesMatchPath(path, enumPaths)) {
|
|
22
22
|
return `${item}__ADD_AS_CONST__`;
|
|
23
23
|
}
|
|
24
|
-
if (typeof item === 'string' && item.startsWith(
|
|
25
|
-
return `__REMOVEQUOTE____WRAP_IN_STATIC_FILE_START__${decodeURIComponent(item.replace(
|
|
24
|
+
if (typeof item === 'string' && item.startsWith(remotion_1.Internals.FILE_TOKEN)) {
|
|
25
|
+
return `__REMOVEQUOTE____WRAP_IN_STATIC_FILE_START__${decodeURIComponent(item.replace(remotion_1.Internals.FILE_TOKEN, ''))}__WRAP_IN_STATIC_FILE_END____REMOVEQUOTE__`;
|
|
26
26
|
}
|
|
27
27
|
return value;
|
|
28
28
|
}))
|
package/dist/compositions.js
CHANGED
|
@@ -9,6 +9,7 @@ const get_cli_options_1 = require("./get-cli-options");
|
|
|
9
9
|
const log_1 = require("./log");
|
|
10
10
|
const print_compositions_1 = require("./print-compositions");
|
|
11
11
|
const setup_cache_1 = require("./setup-cache");
|
|
12
|
+
const remotion_1 = require("remotion");
|
|
12
13
|
const listCompositionsCommand = async (remotionRoot, args) => {
|
|
13
14
|
const { file, reason } = (0, entry_point_1.findEntryPoint)(args, remotionRoot);
|
|
14
15
|
if (!file) {
|
|
@@ -44,7 +45,11 @@ const listCompositionsCommand = async (remotionRoot, args) => {
|
|
|
44
45
|
browserExecutable,
|
|
45
46
|
chromiumOptions,
|
|
46
47
|
envVariables,
|
|
47
|
-
|
|
48
|
+
serializedInputPropsWithCustomSchema: remotion_1.Internals.serializeJSONWithDate({
|
|
49
|
+
data: inputProps,
|
|
50
|
+
staticBase: null,
|
|
51
|
+
indent: undefined,
|
|
52
|
+
}).serializedString,
|
|
48
53
|
timeoutInMilliseconds: puppeteerTimeout,
|
|
49
54
|
port,
|
|
50
55
|
indent: false,
|
|
@@ -2,4 +2,4 @@ import type { StillImageFormat, VideoImageFormat } from '@remotion/renderer';
|
|
|
2
2
|
export declare const setStillImageFormat: (format: StillImageFormat) => void;
|
|
3
3
|
export declare const setVideoImageFormat: (format: VideoImageFormat) => void;
|
|
4
4
|
export declare const getUserPreferredStillImageFormat: () => "png" | "jpeg" | "pdf" | "webp" | undefined;
|
|
5
|
-
export declare const getUserPreferredVideoImageFormat: () => "
|
|
5
|
+
export declare const getUserPreferredVideoImageFormat: () => "none" | "png" | "jpeg" | undefined;
|
package/dist/config/index.d.ts
CHANGED
|
@@ -297,7 +297,7 @@ export declare const ConfigInternals: {
|
|
|
297
297
|
getShouldOutputImageSequence: (frameRange: FrameRange | null) => boolean;
|
|
298
298
|
getDotEnvLocation: () => string | null;
|
|
299
299
|
getUserPreferredStillImageFormat: () => "png" | "jpeg" | "pdf" | "webp" | undefined;
|
|
300
|
-
getUserPreferredVideoImageFormat: () => "
|
|
300
|
+
getUserPreferredVideoImageFormat: () => "none" | "png" | "jpeg" | undefined;
|
|
301
301
|
getWebpackOverrideFn: () => WebpackOverrideFn;
|
|
302
302
|
getWebpackCaching: () => boolean;
|
|
303
303
|
getOutputLocation: () => string | null;
|
|
@@ -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, "
|
|
16
|
+
export declare const RemotionInput: React.ForwardRefExoticComponent<Pick<Props, "key" | keyof React.InputHTMLAttributes<HTMLInputElement> | "status" | "rightAlign"> & React.RefAttributes<HTMLInputElement>>;
|
|
17
17
|
export {};
|
|
@@ -4,5 +4,5 @@ type Props = React.DetailedHTMLProps<React.InputHTMLAttributes<HTMLInputElement>
|
|
|
4
4
|
status: RemInputStatus;
|
|
5
5
|
name: string;
|
|
6
6
|
};
|
|
7
|
-
export declare const RemInputTypeColor: React.ForwardRefExoticComponent<Pick<Props, "
|
|
7
|
+
export declare const RemInputTypeColor: React.ForwardRefExoticComponent<Pick<Props, "key" | keyof React.InputHTMLAttributes<HTMLInputElement> | "status"> & React.RefAttributes<HTMLInputElement>>;
|
|
8
8
|
export {};
|
|
@@ -3,5 +3,5 @@ type Props = React.DetailedHTMLProps<React.InputHTMLAttributes<HTMLTextAreaEleme
|
|
|
3
3
|
status: 'error' | 'warning' | 'ok';
|
|
4
4
|
};
|
|
5
5
|
export declare const inputBaseStyle: React.CSSProperties;
|
|
6
|
-
export declare const RemTextarea: React.ForwardRefExoticComponent<Pick<Props, "
|
|
6
|
+
export declare const RemTextarea: React.ForwardRefExoticComponent<Pick<Props, "key" | "status" | keyof React.InputHTMLAttributes<HTMLTextAreaElement>> & React.RefAttributes<HTMLTextAreaElement>>;
|
|
7
7
|
export {};
|
|
@@ -39,7 +39,6 @@ const SegmentedControl_1 = require("../SegmentedControl");
|
|
|
39
39
|
const get_render_modal_warnings_1 = require("./get-render-modal-warnings");
|
|
40
40
|
const RenderModalJSONPropsEditor_1 = require("./RenderModalJSONPropsEditor");
|
|
41
41
|
const extract_enum_json_paths_1 = require("./SchemaEditor/extract-enum-json-paths");
|
|
42
|
-
const input_props_serialization_1 = require("./SchemaEditor/input-props-serialization");
|
|
43
42
|
const SchemaEditor_1 = require("./SchemaEditor/SchemaEditor");
|
|
44
43
|
const SchemaErrorMessages_1 = require("./SchemaEditor/SchemaErrorMessages");
|
|
45
44
|
const WarningIndicatorButton_1 = require("./WarningIndicatorButton");
|
|
@@ -99,7 +98,7 @@ const DataEditor = ({ unresolvedComposition, inputProps, setInputProps, mayShowS
|
|
|
99
98
|
return null;
|
|
100
99
|
}
|
|
101
100
|
const value = inputProps;
|
|
102
|
-
return
|
|
101
|
+
return remotion_1.Internals.serializeJSONWithDate({
|
|
103
102
|
data: value,
|
|
104
103
|
indent: 2,
|
|
105
104
|
staticBase: window.remotion_staticBase,
|
|
@@ -226,12 +225,13 @@ const DataEditor = ({ unresolvedComposition, inputProps, setInputProps, mayShowS
|
|
|
226
225
|
setSaving(false);
|
|
227
226
|
}, [fastRefreshes]);
|
|
228
227
|
const onSave = (0, react_1.useCallback)((updater) => {
|
|
228
|
+
var _a;
|
|
229
229
|
if (schema === 'no-zod' || schema === 'no-schema' || z === null) {
|
|
230
230
|
(0, NotificationCenter_1.sendErrorNotification)('Cannot update default props: No Zod schema');
|
|
231
231
|
return;
|
|
232
232
|
}
|
|
233
233
|
setSaving(true);
|
|
234
|
-
(0, actions_1.updateDefaultProps)(unresolvedComposition.id, updater(unresolvedComposition.defaultProps), (0, extract_enum_json_paths_1.extractEnumJsonPaths)(schema, z, []))
|
|
234
|
+
(0, actions_1.updateDefaultProps)(unresolvedComposition.id, updater((_a = unresolvedComposition.defaultProps) !== null && _a !== void 0 ? _a : {}), (0, extract_enum_json_paths_1.extractEnumJsonPaths)(schema, z, []))
|
|
235
235
|
.then((response) => {
|
|
236
236
|
if (!response.success) {
|
|
237
237
|
console.log(response.stack);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import type { z } from 'zod';
|
|
3
|
-
import type { SerializedJSONWithCustomFields } from '
|
|
3
|
+
import type { SerializedJSONWithCustomFields } from 'remotion';
|
|
4
4
|
export type EditType = 'inputProps' | 'defaultProps';
|
|
5
5
|
export declare const RenderModalJSONPropsEditor: React.FC<{
|
|
6
6
|
value: unknown;
|
|
@@ -32,8 +32,8 @@ const use_keybinding_1 = require("../../helpers/use-keybinding");
|
|
|
32
32
|
const layout_1 = require("../layout");
|
|
33
33
|
const RemTextarea_1 = require("../NewComposition/RemTextarea");
|
|
34
34
|
const ValidationMessage_1 = require("../NewComposition/ValidationMessage");
|
|
35
|
-
const input_props_serialization_1 = require("./SchemaEditor/input-props-serialization");
|
|
36
35
|
const ZodErrorMessages_1 = require("./SchemaEditor/ZodErrorMessages");
|
|
36
|
+
const remotion_1 = require("remotion");
|
|
37
37
|
const style = {
|
|
38
38
|
fontFamily: 'monospace',
|
|
39
39
|
flex: 1,
|
|
@@ -46,7 +46,7 @@ const scrollable = {
|
|
|
46
46
|
};
|
|
47
47
|
const parseJSON = (str, schema) => {
|
|
48
48
|
try {
|
|
49
|
-
const value =
|
|
49
|
+
const value = remotion_1.Internals.deserializeJSONWithCustomFields(str);
|
|
50
50
|
const zodValidation = schema.safeParse(value);
|
|
51
51
|
return { str, value, validJSON: true, zodValidation };
|
|
52
52
|
}
|
|
@@ -6,7 +6,7 @@ export declare const SchemaEditor: React.FC<{
|
|
|
6
6
|
setValue: React.Dispatch<React.SetStateAction<Record<string, unknown>>>;
|
|
7
7
|
zodValidationResult: z.SafeParseReturnType<unknown, unknown>;
|
|
8
8
|
defaultProps: Record<string, unknown>;
|
|
9
|
-
onSave: (updater: (oldState: unknown) => unknown) => void;
|
|
9
|
+
onSave: (updater: (oldState: Record<string, unknown>) => Record<string, unknown>) => void;
|
|
10
10
|
showSaveButton: boolean;
|
|
11
11
|
saving: boolean;
|
|
12
12
|
saveDisabledByParent: boolean;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import type { Codec } from '@remotion/renderer';
|
|
2
|
-
export declare const humanReadableCodec: (codec: Codec) => "
|
|
2
|
+
export declare const humanReadableCodec: (codec: Codec) => "AAC" | "MP3" | "GIF" | "H.264" | "H.264 Matroska" | "H.265" | "ProRes" | "WebM VP8" | "WebM VP9" | "Waveform" | undefined;
|
|
@@ -56,5 +56,5 @@ export declare const openInFileExplorer: ({ directory }: {
|
|
|
56
56
|
export declare const removeRenderJob: (job: RenderJob) => Promise<undefined>;
|
|
57
57
|
export declare const cancelRenderJob: (job: RenderJob) => Promise<import("../../../preview-server/render-queue/job").CancelRenderResponse>;
|
|
58
58
|
export declare const updateAvailable: (signal: AbortSignal) => Promise<import("../../../preview-server/render-queue/job").UpdateAvailableResponse>;
|
|
59
|
-
export declare const updateDefaultProps: (compositionId: string, defaultProps:
|
|
59
|
+
export declare const updateDefaultProps: (compositionId: string, defaultProps: Record<string, unknown>, enumPaths: EnumPath[]) => Promise<import("../../../preview-server/render-queue/job").UpdateDefaultPropsResponse>;
|
|
60
60
|
export declare const canUpdateDefaultProps: (compositionId: string) => Promise<import("../../../preview-server/render-queue/job").CanUpdateDefaultPropsResponse>;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.canUpdateDefaultProps = exports.updateDefaultProps = exports.updateAvailable = exports.cancelRenderJob = exports.removeRenderJob = exports.openInFileExplorer = exports.subscribeToFileExistenceWatcher = exports.unsubscribeFromFileExistenceWatcher = exports.addVideoRenderJob = exports.addStillRenderJob = void 0;
|
|
4
|
-
const
|
|
4
|
+
const remotion_1 = require("remotion");
|
|
5
5
|
const callApi = (endpoint, body, signal) => {
|
|
6
6
|
return new Promise((resolve, reject) => {
|
|
7
7
|
fetch(endpoint, {
|
|
@@ -39,7 +39,11 @@ const addStillRenderJob = ({ compositionId, outName, imageFormat, jpegQuality, f
|
|
|
39
39
|
chromiumOptions,
|
|
40
40
|
delayRenderTimeout,
|
|
41
41
|
envVariables,
|
|
42
|
-
|
|
42
|
+
serializedInputPropsWithCustomSchema: remotion_1.Internals.serializeJSONWithDate({
|
|
43
|
+
data: inputProps,
|
|
44
|
+
staticBase: window.remotion_staticBase,
|
|
45
|
+
indent: undefined,
|
|
46
|
+
}).serializedString,
|
|
43
47
|
});
|
|
44
48
|
};
|
|
45
49
|
exports.addStillRenderJob = addStillRenderJob;
|
|
@@ -70,7 +74,11 @@ const addVideoRenderJob = ({ compositionId, outName, imageFormat, jpegQuality, s
|
|
|
70
74
|
disallowParallelEncoding,
|
|
71
75
|
chromiumOptions,
|
|
72
76
|
envVariables,
|
|
73
|
-
|
|
77
|
+
serializedInputPropsWithCustomSchema: remotion_1.Internals.serializeJSONWithDate({
|
|
78
|
+
data: inputProps,
|
|
79
|
+
staticBase: window.remotion_staticBase,
|
|
80
|
+
indent: undefined,
|
|
81
|
+
}).serializedString,
|
|
74
82
|
});
|
|
75
83
|
};
|
|
76
84
|
exports.addVideoRenderJob = addVideoRenderJob;
|
|
@@ -112,7 +120,7 @@ exports.updateAvailable = updateAvailable;
|
|
|
112
120
|
const updateDefaultProps = (compositionId, defaultProps, enumPaths) => {
|
|
113
121
|
return callApi('/api/update-default-props', {
|
|
114
122
|
compositionId,
|
|
115
|
-
defaultProps:
|
|
123
|
+
defaultProps: remotion_1.Internals.serializeJSONWithDate({
|
|
116
124
|
data: defaultProps,
|
|
117
125
|
indent: undefined,
|
|
118
126
|
staticBase: window.remotion_staticBase,
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import type { BrowserExecutable, ChromiumOptions, HeadlessBrowser, LogLevel, RemotionServer } from '@remotion/renderer';
|
|
2
2
|
import type { VideoConfig } from 'remotion';
|
|
3
|
-
export declare const getCompositionId: ({ args, compositionIdFromUi,
|
|
3
|
+
export declare const getCompositionId: ({ args, compositionIdFromUi, serializedInputPropsWithCustomSchema, puppeteerInstance, envVariables, timeoutInMilliseconds, chromiumOptions, port, browserExecutable, serveUrlOrWebpackUrl, logLevel, indent, server, }: {
|
|
4
4
|
args: string[];
|
|
5
5
|
compositionIdFromUi: string | null;
|
|
6
|
-
|
|
6
|
+
serializedInputPropsWithCustomSchema: string;
|
|
7
7
|
puppeteerInstance: HeadlessBrowser | undefined;
|
|
8
8
|
envVariables: Record<string, string>;
|
|
9
9
|
timeoutInMilliseconds: number;
|
|
@@ -16,7 +16,7 @@ const getCompName = ({ cliArgs, compositionIdFromUi, }) => {
|
|
|
16
16
|
const [compName, ...remainingArgs] = cliArgs;
|
|
17
17
|
return { compName, remainingArgs, reason: 'Passed as argument' };
|
|
18
18
|
};
|
|
19
|
-
const getCompositionId = async ({ args, compositionIdFromUi,
|
|
19
|
+
const getCompositionId = async ({ args, compositionIdFromUi, serializedInputPropsWithCustomSchema, puppeteerInstance, envVariables, timeoutInMilliseconds, chromiumOptions, port, browserExecutable, serveUrlOrWebpackUrl, logLevel, indent, server, }) => {
|
|
20
20
|
const { compName, remainingArgs, reason: compReason, } = getCompName({
|
|
21
21
|
cliArgs: args,
|
|
22
22
|
compositionIdFromUi,
|
|
@@ -24,7 +24,7 @@ const getCompositionId = async ({ args, compositionIdFromUi, inputProps, puppete
|
|
|
24
24
|
if (compName) {
|
|
25
25
|
const { metadata: config, propsSize } = await renderer_1.RenderInternals.internalSelectComposition({
|
|
26
26
|
id: compName,
|
|
27
|
-
|
|
27
|
+
serializedInputPropsWithCustomSchema,
|
|
28
28
|
puppeteerInstance,
|
|
29
29
|
envVariables,
|
|
30
30
|
timeoutInMilliseconds,
|
|
@@ -38,7 +38,10 @@ const getCompositionId = async ({ args, compositionIdFromUi, inputProps, puppete
|
|
|
38
38
|
onBrowserLog: null,
|
|
39
39
|
});
|
|
40
40
|
if (propsSize > 10000000) {
|
|
41
|
-
log_1.Log.
|
|
41
|
+
log_1.Log.warnAdvanced({
|
|
42
|
+
indent,
|
|
43
|
+
logLevel,
|
|
44
|
+
}, `The props of your composition are large (${(0, format_bytes_1.formatBytes)(propsSize)}). This may cause slowdown.`);
|
|
42
45
|
}
|
|
43
46
|
if (!config) {
|
|
44
47
|
throw new Error(`Cannot find composition with ID "${compName}"`);
|
|
@@ -52,7 +55,6 @@ const getCompositionId = async ({ args, compositionIdFromUi, inputProps, puppete
|
|
|
52
55
|
}
|
|
53
56
|
if (!process.env.CI) {
|
|
54
57
|
const comps = await renderer_1.RenderInternals.internalGetCompositions({
|
|
55
|
-
inputProps,
|
|
56
58
|
puppeteerInstance,
|
|
57
59
|
envVariables,
|
|
58
60
|
timeoutInMilliseconds,
|
|
@@ -64,6 +66,7 @@ const getCompositionId = async ({ args, compositionIdFromUi, inputProps, puppete
|
|
|
64
66
|
server,
|
|
65
67
|
serveUrlOrWebpackUrl,
|
|
66
68
|
onBrowserLog: null,
|
|
69
|
+
serializedInputPropsWithCustomSchema,
|
|
67
70
|
});
|
|
68
71
|
const { compositionId, reason } = await (0, show_compositions_picker_1.showSingleCompositionsPicker)(comps);
|
|
69
72
|
if (compositionId && typeof compositionId === 'string') {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { BrowserExecutable, ChromiumOptions, HeadlessBrowser, LogLevel, RemotionServer } from '@remotion/renderer';
|
|
2
2
|
import type { VideoConfig } from 'remotion';
|
|
3
|
-
export declare const getCompositionWithDimensionOverride: ({ height, width, args, compositionIdFromUi, chromiumOptions, envVariables, port, puppeteerInstance, timeoutInMilliseconds, browserExecutable, serveUrlOrWebpackUrl, indent,
|
|
3
|
+
export declare const getCompositionWithDimensionOverride: ({ height, width, args, compositionIdFromUi, chromiumOptions, envVariables, port, puppeteerInstance, timeoutInMilliseconds, browserExecutable, serveUrlOrWebpackUrl, indent, serializedInputPropsWithCustomSchema, logLevel, server, }: {
|
|
4
4
|
height: number | null;
|
|
5
5
|
width: number | null;
|
|
6
6
|
args: string[];
|
|
@@ -14,7 +14,7 @@ export declare const getCompositionWithDimensionOverride: ({ height, width, args
|
|
|
14
14
|
serveUrlOrWebpackUrl: string;
|
|
15
15
|
indent: boolean;
|
|
16
16
|
logLevel: LogLevel;
|
|
17
|
-
|
|
17
|
+
serializedInputPropsWithCustomSchema: string;
|
|
18
18
|
server: RemotionServer;
|
|
19
19
|
}) => Promise<{
|
|
20
20
|
compositionId: string;
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.getCompositionWithDimensionOverride = void 0;
|
|
4
4
|
const get_composition_id_1 = require("./get-composition-id");
|
|
5
|
-
const getCompositionWithDimensionOverride = async ({ height, width, args, compositionIdFromUi, chromiumOptions, envVariables, port, puppeteerInstance, timeoutInMilliseconds, browserExecutable, serveUrlOrWebpackUrl, indent,
|
|
5
|
+
const getCompositionWithDimensionOverride = async ({ height, width, args, compositionIdFromUi, chromiumOptions, envVariables, port, puppeteerInstance, timeoutInMilliseconds, browserExecutable, serveUrlOrWebpackUrl, indent, serializedInputPropsWithCustomSchema, logLevel, server, }) => {
|
|
6
6
|
const returnValue = await (0, get_composition_id_1.getCompositionId)({
|
|
7
7
|
args,
|
|
8
8
|
compositionIdFromUi,
|
|
@@ -12,7 +12,7 @@ const getCompositionWithDimensionOverride = async ({ height, width, args, compos
|
|
|
12
12
|
browserExecutable,
|
|
13
13
|
chromiumOptions,
|
|
14
14
|
envVariables,
|
|
15
|
-
|
|
15
|
+
serializedInputPropsWithCustomSchema,
|
|
16
16
|
port,
|
|
17
17
|
puppeteerInstance,
|
|
18
18
|
timeoutInMilliseconds,
|
package/dist/index.d.ts
CHANGED
|
@@ -112,7 +112,7 @@ export declare const CliInternals: {
|
|
|
112
112
|
videoBitrate: string | null;
|
|
113
113
|
height: number | null;
|
|
114
114
|
width: number | null;
|
|
115
|
-
configFileImageFormat: "
|
|
115
|
+
configFileImageFormat: "none" | "png" | "jpeg" | undefined;
|
|
116
116
|
}>;
|
|
117
117
|
loadConfig: (remotionRoot: string) => Promise<string | null>;
|
|
118
118
|
initializeCli: (remotionRoot: string) => Promise<void>;
|
|
@@ -121,7 +121,7 @@ export declare const CliInternals: {
|
|
|
121
121
|
parsedCli: {
|
|
122
122
|
"browser-executable": import("@remotion/renderer").BrowserExecutable;
|
|
123
123
|
"pixel-format": "yuv420p" | "yuva420p" | "yuv422p" | "yuv444p" | "yuv420p10le" | "yuv422p10le" | "yuv444p10le" | "yuva444p10le";
|
|
124
|
-
"image-format": "
|
|
124
|
+
"image-format": "none" | "png" | "jpeg" | "pdf" | "webp";
|
|
125
125
|
"prores-profile": "4444-xq" | "4444" | "hq" | "standard" | "light" | "proxy";
|
|
126
126
|
"bundle-cache": string;
|
|
127
127
|
"env-file": string;
|
|
@@ -185,7 +185,7 @@ export declare const CliInternals: {
|
|
|
185
185
|
downloadName: string | null;
|
|
186
186
|
outName: string | null;
|
|
187
187
|
configImageFormat: "png" | "jpeg" | "pdf" | "webp" | null;
|
|
188
|
-
cliFlag: "
|
|
188
|
+
cliFlag: "none" | "png" | "jpeg" | "pdf" | "webp" | null;
|
|
189
189
|
isLambda: boolean;
|
|
190
190
|
fromUi: "png" | "jpeg" | "pdf" | "webp" | null;
|
|
191
191
|
}) => {
|
|
@@ -200,8 +200,8 @@ export declare const CliInternals: {
|
|
|
200
200
|
};
|
|
201
201
|
getVideoImageFormat: ({ codec, uiImageFormat, }: {
|
|
202
202
|
codec: import("@remotion/renderer").CodecOrUndefined;
|
|
203
|
-
uiImageFormat: "
|
|
204
|
-
}) => "
|
|
203
|
+
uiImageFormat: "none" | "png" | "jpeg" | null;
|
|
204
|
+
}) => "none" | "png" | "jpeg";
|
|
205
205
|
printCompositions: (compositions: import("remotion").VideoConfig[]) => void;
|
|
206
206
|
getFinalOutputCodec: ({ cliFlag, configFile, downloadName, outName, uiCodec, }: {
|
|
207
207
|
cliFlag: import("@remotion/renderer").CodecOrUndefined;
|
|
@@ -217,7 +217,7 @@ export declare const CliInternals: {
|
|
|
217
217
|
shouldUseNonOverlayingLogger: ({ logLevel, }: {
|
|
218
218
|
logLevel: "verbose" | "info" | "warn" | "error";
|
|
219
219
|
}) => boolean;
|
|
220
|
-
getCompositionWithDimensionOverride: ({ height, width, args, compositionIdFromUi, chromiumOptions, envVariables, port, puppeteerInstance, timeoutInMilliseconds, browserExecutable, serveUrlOrWebpackUrl, indent,
|
|
220
|
+
getCompositionWithDimensionOverride: ({ height, width, args, compositionIdFromUi, chromiumOptions, envVariables, port, puppeteerInstance, timeoutInMilliseconds, browserExecutable, serveUrlOrWebpackUrl, indent, serializedInputPropsWithCustomSchema, logLevel, server, }: {
|
|
221
221
|
height: number | null;
|
|
222
222
|
width: number | null;
|
|
223
223
|
args: string[];
|
|
@@ -231,7 +231,7 @@ export declare const CliInternals: {
|
|
|
231
231
|
serveUrlOrWebpackUrl: string;
|
|
232
232
|
indent: boolean;
|
|
233
233
|
logLevel: "verbose" | "info" | "warn" | "error";
|
|
234
|
-
|
|
234
|
+
serializedInputPropsWithCustomSchema: string;
|
|
235
235
|
server: import("@remotion/renderer").RemotionServer;
|
|
236
236
|
}) => Promise<{
|
|
237
237
|
compositionId: string;
|
|
@@ -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 {};
|
|
@@ -61,7 +61,7 @@ export type RenderJob = {
|
|
|
61
61
|
cancelToken: ReturnType<typeof makeCancelSignal>;
|
|
62
62
|
chromiumOptions: RequiredChromiumOptions;
|
|
63
63
|
envVariables: Record<string, string>;
|
|
64
|
-
|
|
64
|
+
serializedInputPropsWithCustomSchema: string;
|
|
65
65
|
} & RenderJobDynamicFields;
|
|
66
66
|
export type RenderJobWithCleanup = RenderJob & {
|
|
67
67
|
cleanup: (() => void)[];
|
|
@@ -105,7 +105,7 @@ export type AddRenderRequest = {
|
|
|
105
105
|
chromiumOptions: RequiredChromiumOptions;
|
|
106
106
|
delayRenderTimeout: number;
|
|
107
107
|
envVariables: Record<string, string>;
|
|
108
|
-
|
|
108
|
+
serializedInputPropsWithCustomSchema: string;
|
|
109
109
|
} & AddRenderRequestDynamicFields;
|
|
110
110
|
export type RemoveRenderRequest = {
|
|
111
111
|
jobId: string;
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.makeRetryPayload = void 0;
|
|
4
4
|
const get_default_video_contexts_1 = require("./get-default-video-contexts");
|
|
5
|
+
const remotion_1 = require("remotion");
|
|
5
6
|
const makeRetryPayload = (job) => {
|
|
6
7
|
var _a, _b, _c;
|
|
7
8
|
const defaults = window.remotion_renderDefaults;
|
|
@@ -44,7 +45,7 @@ const makeRetryPayload = (job) => {
|
|
|
44
45
|
initialOpenGlRenderer: job.chromiumOptions.gl,
|
|
45
46
|
initialHeadless: job.chromiumOptions.headless,
|
|
46
47
|
initialIgnoreCertificateErrors: job.chromiumOptions.ignoreCertificateErrors,
|
|
47
|
-
defaultProps: job.
|
|
48
|
+
defaultProps: remotion_1.Internals.deserializeJSONWithCustomFields(job.serializedInputPropsWithCustomSchema),
|
|
48
49
|
inFrameMark: null,
|
|
49
50
|
outFrameMark: null,
|
|
50
51
|
};
|
|
@@ -85,7 +86,7 @@ const makeRetryPayload = (job) => {
|
|
|
85
86
|
initialOpenGlRenderer: job.chromiumOptions.gl,
|
|
86
87
|
initialHeadless: job.chromiumOptions.headless,
|
|
87
88
|
initialIgnoreCertificateErrors: job.chromiumOptions.ignoreCertificateErrors,
|
|
88
|
-
defaultProps: job.
|
|
89
|
+
defaultProps: remotion_1.Internals.deserializeJSONWithCustomFields(job.serializedInputPropsWithCustomSchema),
|
|
89
90
|
inFrameMark: job.startFrame,
|
|
90
91
|
outFrameMark: job.endFrame,
|
|
91
92
|
};
|
|
@@ -23,7 +23,7 @@ const processStill = async ({ job, remotionRoot, entryPoint, onProgress, addClea
|
|
|
23
23
|
envVariables: job.envVariables,
|
|
24
24
|
height: null,
|
|
25
25
|
fullEntryPoint,
|
|
26
|
-
|
|
26
|
+
serializedInputPropsWithCustomSchema: job.serializedInputPropsWithCustomSchema,
|
|
27
27
|
overwrite: true,
|
|
28
28
|
port,
|
|
29
29
|
publicDir,
|
|
@@ -24,7 +24,7 @@ const processVideoJob = async ({ job, remotionRoot, entryPoint, onProgress, addC
|
|
|
24
24
|
envVariables: job.envVariables,
|
|
25
25
|
height: null,
|
|
26
26
|
fullEntryPoint,
|
|
27
|
-
|
|
27
|
+
serializedInputPropsWithCustomSchema: job.serializedInputPropsWithCustomSchema,
|
|
28
28
|
overwrite: true,
|
|
29
29
|
port,
|
|
30
30
|
publicDir,
|
|
@@ -41,7 +41,7 @@ const handleAddRender = ({ input, entryPoint, remotionRoot, }) => {
|
|
|
41
41
|
disallowParallelEncoding: input.disallowParallelEncoding,
|
|
42
42
|
chromiumOptions: input.chromiumOptions,
|
|
43
43
|
envVariables: input.envVariables,
|
|
44
|
-
|
|
44
|
+
serializedInputPropsWithCustomSchema: input.serializedInputPropsWithCustomSchema,
|
|
45
45
|
},
|
|
46
46
|
});
|
|
47
47
|
}
|
|
@@ -65,7 +65,7 @@ const handleAddRender = ({ input, entryPoint, remotionRoot, }) => {
|
|
|
65
65
|
chromiumOptions: input.chromiumOptions,
|
|
66
66
|
delayRenderTimeout: input.delayRenderTimeout,
|
|
67
67
|
envVariables: input.envVariables,
|
|
68
|
-
|
|
68
|
+
serializedInputPropsWithCustomSchema: input.serializedInputPropsWithCustomSchema,
|
|
69
69
|
},
|
|
70
70
|
entryPoint,
|
|
71
71
|
remotionRoot,
|
|
@@ -3,9 +3,9 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.updateDefaultPropsHandler = void 0;
|
|
4
4
|
const node_fs_1 = require("node:fs");
|
|
5
5
|
const update_default_props_1 = require("../../codemods/update-default-props");
|
|
6
|
-
const input_props_serialization_1 = require("../../editor/components/RenderModal/SchemaEditor/input-props-serialization");
|
|
7
6
|
const project_info_1 = require("../project-info");
|
|
8
7
|
const can_update_default_props_1 = require("./can-update-default-props");
|
|
8
|
+
const remotion_1 = require("remotion");
|
|
9
9
|
const updateDefaultPropsHandler = async ({ input: { compositionId, defaultProps, enumPaths }, remotionRoot }) => {
|
|
10
10
|
try {
|
|
11
11
|
const projectInfo = await (0, project_info_1.getProjectInfo)(remotionRoot);
|
|
@@ -16,7 +16,7 @@ const updateDefaultPropsHandler = async ({ input: { compositionId, defaultProps,
|
|
|
16
16
|
const updated = await (0, update_default_props_1.updateDefaultProps)({
|
|
17
17
|
compositionId,
|
|
18
18
|
input: (0, node_fs_1.readFileSync)(projectInfo.videoFile, 'utf-8'),
|
|
19
|
-
newDefaultProps:
|
|
19
|
+
newDefaultProps: remotion_1.Internals.deserializeJSONWithCustomFields(defaultProps),
|
|
20
20
|
enumPaths,
|
|
21
21
|
});
|
|
22
22
|
(0, node_fs_1.writeFileSync)(projectInfo.videoFile, updated);
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/// <reference types="node" />
|
|
2
1
|
import type { IncomingMessage, ServerResponse } from 'node:http';
|
|
3
2
|
import type { LiveEventsServer } from './live-events';
|
|
4
3
|
export declare const handleRoutes: ({ hash, hashPrefix, request, response, liveEventsServer, getCurrentInputProps, getEnvVariables, remotionRoot, entryPoint, publicDir, }: {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { AudioCodec, Browser, BrowserExecutable, CancelSignal, ChromiumOptions, Codec, Crf, FfmpegOverrideFn, FrameRange, LogLevel, PixelFormat, ProResProfile, VideoImageFormat } from '@remotion/renderer';
|
|
2
2
|
import type { Loop } from '../config/number-of-gif-loops';
|
|
3
3
|
import type { JobProgressCallback } from '../preview-server/render-queue/job';
|
|
4
|
-
export declare const renderVideoFlow: ({ remotionRoot, fullEntryPoint, indent, logLevel, browserExecutable, browser, chromiumOptions, scale, shouldOutputImageSequence, publicDir,
|
|
4
|
+
export declare const renderVideoFlow: ({ remotionRoot, fullEntryPoint, indent, logLevel, browserExecutable, browser, chromiumOptions, scale, shouldOutputImageSequence, publicDir, envVariables, puppeteerTimeout, port, height, width, remainingArgs, compositionIdFromUi, entryPointReason, overwrite, quiet, concurrency, frameRange, everyNthFrame, outputLocationFromUI, jpegQuality, onProgress, addCleanupCallback, cancelSignal, crf, uiCodec, uiImageFormat, ffmpegOverride, audioBitrate, muted, enforceAudioTrack, proResProfile, pixelFormat, videoBitrate, numberOfGifLoops, audioCodec, serializedInputPropsWithCustomSchema, disallowParallelEncoding, }: {
|
|
5
5
|
remotionRoot: string;
|
|
6
6
|
fullEntryPoint: string;
|
|
7
7
|
entryPointReason: string;
|
|
@@ -13,7 +13,7 @@ export declare const renderVideoFlow: ({ remotionRoot, fullEntryPoint, indent, l
|
|
|
13
13
|
indent: boolean;
|
|
14
14
|
shouldOutputImageSequence: boolean;
|
|
15
15
|
publicDir: string | null;
|
|
16
|
-
|
|
16
|
+
serializedInputPropsWithCustomSchema: string;
|
|
17
17
|
envVariables: Record<string, string>;
|
|
18
18
|
puppeteerTimeout: number;
|
|
19
19
|
port: number | null;
|
|
@@ -45,7 +45,8 @@ const setup_cache_1 = require("../setup-cache");
|
|
|
45
45
|
const should_use_non_overlaying_logger_1 = require("../should-use-non-overlaying-logger");
|
|
46
46
|
const truthy_1 = require("../truthy");
|
|
47
47
|
const user_passed_output_location_1 = require("../user-passed-output-location");
|
|
48
|
-
const
|
|
48
|
+
const remotion_1 = require("remotion");
|
|
49
|
+
const renderVideoFlow = async ({ remotionRoot, fullEntryPoint, indent, logLevel, browserExecutable, browser, chromiumOptions, scale, shouldOutputImageSequence, publicDir, envVariables, puppeteerTimeout, port, height, width, remainingArgs, compositionIdFromUi, entryPointReason, overwrite, quiet, concurrency, frameRange, everyNthFrame, outputLocationFromUI, jpegQuality, onProgress, addCleanupCallback, cancelSignal, crf, uiCodec, uiImageFormat, ffmpegOverride, audioBitrate, muted, enforceAudioTrack, proResProfile, pixelFormat, videoBitrate, numberOfGifLoops, audioCodec, serializedInputPropsWithCustomSchema, disallowParallelEncoding, }) => {
|
|
49
50
|
var _a;
|
|
50
51
|
const downloads = [];
|
|
51
52
|
if (browserExecutable) {
|
|
@@ -138,7 +139,7 @@ const renderVideoFlow = async ({ remotionRoot, fullEntryPoint, indent, logLevel,
|
|
|
138
139
|
const puppeteerInstance = await browserInstance;
|
|
139
140
|
addCleanupCallback(() => puppeteerInstance.close(false, logLevel, indent));
|
|
140
141
|
const actualConcurrency = renderer_1.RenderInternals.getActualConcurrency(concurrency);
|
|
141
|
-
const server = renderer_1.RenderInternals.prepareServer({
|
|
142
|
+
const server = await renderer_1.RenderInternals.prepareServer({
|
|
142
143
|
concurrency: actualConcurrency,
|
|
143
144
|
indent,
|
|
144
145
|
port,
|
|
@@ -146,7 +147,7 @@ const renderVideoFlow = async ({ remotionRoot, fullEntryPoint, indent, logLevel,
|
|
|
146
147
|
logLevel,
|
|
147
148
|
webpackConfigOrServeUrl: urlOrBundle,
|
|
148
149
|
});
|
|
149
|
-
addCleanupCallback(() => server.
|
|
150
|
+
addCleanupCallback(() => server.closeServer(false));
|
|
150
151
|
const { compositionId, config, reason, argsAfterComposition } = await (0, get_composition_with_dimension_override_1.getCompositionWithDimensionOverride)({
|
|
151
152
|
height,
|
|
152
153
|
width,
|
|
@@ -156,13 +157,13 @@ const renderVideoFlow = async ({ remotionRoot, fullEntryPoint, indent, logLevel,
|
|
|
156
157
|
chromiumOptions,
|
|
157
158
|
envVariables,
|
|
158
159
|
indent,
|
|
159
|
-
|
|
160
|
+
serializedInputPropsWithCustomSchema,
|
|
160
161
|
port,
|
|
161
162
|
puppeteerInstance,
|
|
162
163
|
serveUrlOrWebpackUrl: urlOrBundle,
|
|
163
164
|
timeoutInMilliseconds: puppeteerTimeout,
|
|
164
165
|
logLevel,
|
|
165
|
-
server
|
|
166
|
+
server,
|
|
166
167
|
});
|
|
167
168
|
const { codec, reason: codecReason } = (0, get_final_output_codec_1.getFinalOutputCodec)({
|
|
168
169
|
cliFlag: parse_command_line_1.parsedCli.codec,
|
|
@@ -216,7 +217,7 @@ const renderVideoFlow = async ({ remotionRoot, fullEntryPoint, indent, logLevel,
|
|
|
216
217
|
log_1.Log.verboseAdvanced({ indent, logLevel }, 'Output dir', outputDir);
|
|
217
218
|
await renderer_1.RenderInternals.internalRenderFrames({
|
|
218
219
|
imageFormat,
|
|
219
|
-
|
|
220
|
+
serializedInputPropsWithCustomSchema,
|
|
220
221
|
onFrameUpdate: (rendered) => {
|
|
221
222
|
renderingProgress.frames = rendered;
|
|
222
223
|
updateRenderProgress(false);
|
|
@@ -244,6 +245,11 @@ const renderVideoFlow = async ({ remotionRoot, fullEntryPoint, indent, logLevel,
|
|
|
244
245
|
onBrowserLog: null,
|
|
245
246
|
onFrameBuffer: null,
|
|
246
247
|
logLevel,
|
|
248
|
+
serializedResolvedPropsWithCustomSchema: remotion_1.Internals.serializeJSONWithDate({
|
|
249
|
+
indent: undefined,
|
|
250
|
+
staticBase: null,
|
|
251
|
+
data: config.props,
|
|
252
|
+
}).serializedString,
|
|
247
253
|
});
|
|
248
254
|
updateRenderProgress(true);
|
|
249
255
|
log_1.Log.infoAdvanced({ indent, logLevel }, chalk_1.chalk.blue(`▶ ${absoluteOutputFile}`));
|
|
@@ -266,7 +272,7 @@ const renderVideoFlow = async ({ remotionRoot, fullEntryPoint, indent, logLevel,
|
|
|
266
272
|
crf: crf !== null && crf !== void 0 ? crf : null,
|
|
267
273
|
envVariables,
|
|
268
274
|
frameRange,
|
|
269
|
-
|
|
275
|
+
serializedInputPropsWithCustomSchema,
|
|
270
276
|
overwrite,
|
|
271
277
|
pixelFormat,
|
|
272
278
|
proResProfile,
|
|
@@ -311,6 +317,11 @@ const renderVideoFlow = async ({ remotionRoot, fullEntryPoint, indent, logLevel,
|
|
|
311
317
|
disallowParallelEncoding,
|
|
312
318
|
onBrowserLog: null,
|
|
313
319
|
onStart: () => undefined,
|
|
320
|
+
serializedResolvedPropsWithCustomSchema: remotion_1.Internals.serializeJSONWithDate({
|
|
321
|
+
data: config.props,
|
|
322
|
+
indent: undefined,
|
|
323
|
+
staticBase: null,
|
|
324
|
+
}).serializedString,
|
|
314
325
|
});
|
|
315
326
|
updateRenderProgress(true);
|
|
316
327
|
log_1.Log.infoAdvanced({ indent, logLevel }, chalk_1.chalk.blue(`${exists ? '○' : '+'} ${absoluteOutputFile}`));
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import type { Browser, BrowserExecutable, CancelSignal, ChromiumOptions, LogLevel, StillImageFormat } from '@remotion/renderer';
|
|
2
2
|
import type { JobProgressCallback } from '../preview-server/render-queue/job';
|
|
3
|
-
export declare const renderStillFlow: ({ remotionRoot, fullEntryPoint, entryPointReason, remainingArgs, browser, browserExecutable, chromiumOptions, envVariables, height,
|
|
3
|
+
export declare const renderStillFlow: ({ remotionRoot, fullEntryPoint, entryPointReason, remainingArgs, browser, browserExecutable, chromiumOptions, envVariables, height, serializedInputPropsWithCustomSchema, overwrite, port, publicDir, puppeteerTimeout, jpegQuality, scale, stillFrame, width, compositionIdFromUi, imageFormatFromUi, logLevel, onProgress, indentOutput, addCleanupCallback, cancelSignal, outputLocationFromUi, }: {
|
|
4
4
|
remotionRoot: string;
|
|
5
5
|
fullEntryPoint: string;
|
|
6
6
|
entryPointReason: string;
|
|
7
7
|
remainingArgs: string[];
|
|
8
|
-
|
|
8
|
+
serializedInputPropsWithCustomSchema: string;
|
|
9
9
|
envVariables: Record<string, string>;
|
|
10
10
|
jpegQuality: number;
|
|
11
11
|
browser: Browser;
|
|
@@ -22,7 +22,8 @@ const setup_cache_1 = require("../setup-cache");
|
|
|
22
22
|
const should_use_non_overlaying_logger_1 = require("../should-use-non-overlaying-logger");
|
|
23
23
|
const truthy_1 = require("../truthy");
|
|
24
24
|
const user_passed_output_location_1 = require("../user-passed-output-location");
|
|
25
|
-
const
|
|
25
|
+
const remotion_1 = require("remotion");
|
|
26
|
+
const renderStillFlow = async ({ remotionRoot, fullEntryPoint, entryPointReason, remainingArgs, browser, browserExecutable, chromiumOptions, envVariables, height, serializedInputPropsWithCustomSchema, overwrite, port, publicDir, puppeteerTimeout, jpegQuality, scale, stillFrame, width, compositionIdFromUi, imageFormatFromUi, logLevel, onProgress, indentOutput, addCleanupCallback, cancelSignal, outputLocationFromUi, }) => {
|
|
26
27
|
var _a, _b;
|
|
27
28
|
const downloads = [];
|
|
28
29
|
const aggregate = (0, progress_types_1.initialAggregateRenderProgress)();
|
|
@@ -75,7 +76,7 @@ const renderStillFlow = async ({ remotionRoot, fullEntryPoint, entryPointReason,
|
|
|
75
76
|
},
|
|
76
77
|
quietProgress: updatesDontOverwrite,
|
|
77
78
|
});
|
|
78
|
-
const server = renderer_1.RenderInternals.prepareServer({
|
|
79
|
+
const server = await renderer_1.RenderInternals.prepareServer({
|
|
79
80
|
concurrency: 1,
|
|
80
81
|
indent: indentOutput,
|
|
81
82
|
port,
|
|
@@ -83,7 +84,7 @@ const renderStillFlow = async ({ remotionRoot, fullEntryPoint, entryPointReason,
|
|
|
83
84
|
logLevel,
|
|
84
85
|
webpackConfigOrServeUrl: urlOrBundle,
|
|
85
86
|
});
|
|
86
|
-
addCleanupCallback(() => server.
|
|
87
|
+
addCleanupCallback(() => server.closeServer(false));
|
|
87
88
|
addCleanupCallback(() => cleanupBundle());
|
|
88
89
|
const puppeteerInstance = await browserInstance;
|
|
89
90
|
addCleanupCallback(() => puppeteerInstance.close(false, logLevel, indentOutput));
|
|
@@ -96,13 +97,13 @@ const renderStillFlow = async ({ remotionRoot, fullEntryPoint, entryPointReason,
|
|
|
96
97
|
chromiumOptions,
|
|
97
98
|
envVariables,
|
|
98
99
|
indent: indentOutput,
|
|
99
|
-
|
|
100
|
+
serializedInputPropsWithCustomSchema,
|
|
100
101
|
port,
|
|
101
102
|
puppeteerInstance,
|
|
102
103
|
serveUrlOrWebpackUrl: urlOrBundle,
|
|
103
104
|
timeoutInMilliseconds: puppeteerTimeout,
|
|
104
105
|
logLevel,
|
|
105
|
-
server
|
|
106
|
+
server,
|
|
106
107
|
});
|
|
107
108
|
const { format: imageFormat, source } = (0, determine_image_format_1.determineFinalStillImageFormat)({
|
|
108
109
|
cliFlag: (_a = parse_command_line_1.parsedCli['image-format']) !== null && _a !== void 0 ? _a : null,
|
|
@@ -165,7 +166,7 @@ const renderStillFlow = async ({ remotionRoot, fullEntryPoint, entryPointReason,
|
|
|
165
166
|
jpegQuality,
|
|
166
167
|
envVariables,
|
|
167
168
|
imageFormat,
|
|
168
|
-
|
|
169
|
+
serializedInputPropsWithCustomSchema,
|
|
169
170
|
chromiumOptions,
|
|
170
171
|
timeoutInMilliseconds: puppeteerTimeout,
|
|
171
172
|
scale,
|
|
@@ -179,6 +180,11 @@ const renderStillFlow = async ({ remotionRoot, fullEntryPoint, entryPointReason,
|
|
|
179
180
|
indent: indentOutput,
|
|
180
181
|
onBrowserLog: null,
|
|
181
182
|
logLevel,
|
|
183
|
+
serializedResolvedPropsWithCustomSchema: remotion_1.Internals.serializeJSONWithDate({
|
|
184
|
+
indent: undefined,
|
|
185
|
+
staticBase: null,
|
|
186
|
+
data: config.props,
|
|
187
|
+
}).serializedString,
|
|
182
188
|
});
|
|
183
189
|
aggregate.rendering = {
|
|
184
190
|
frames: 1,
|
package/dist/render.js
CHANGED
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.render = void 0;
|
|
4
4
|
// eslint-disable-next-line no-restricted-imports
|
|
5
|
+
const remotion_1 = require("remotion");
|
|
5
6
|
const cleanup_before_quit_1 = require("./cleanup-before-quit");
|
|
6
7
|
const config_1 = require("./config");
|
|
7
8
|
const convert_entry_point_to_serve_url_1 = require("./convert-entry-point-to-serve-url");
|
|
@@ -42,7 +43,11 @@ const render = async (remotionRoot, args) => {
|
|
|
42
43
|
shouldOutputImageSequence,
|
|
43
44
|
publicDir,
|
|
44
45
|
envVariables,
|
|
45
|
-
|
|
46
|
+
serializedInputPropsWithCustomSchema: remotion_1.Internals.serializeJSONWithDate({
|
|
47
|
+
indent: undefined,
|
|
48
|
+
staticBase: null,
|
|
49
|
+
data: inputProps,
|
|
50
|
+
}).serializedString,
|
|
46
51
|
puppeteerTimeout,
|
|
47
52
|
port,
|
|
48
53
|
height,
|
package/dist/still.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.still = void 0;
|
|
4
|
+
const remotion_1 = require("remotion");
|
|
4
5
|
const cleanup_before_quit_1 = require("./cleanup-before-quit");
|
|
5
6
|
const convert_entry_point_to_serve_url_1 = require("./convert-entry-point-to-serve-url");
|
|
6
7
|
const entry_point_1 = require("./entry-point");
|
|
@@ -36,7 +37,11 @@ const still = async (remotionRoot, args) => {
|
|
|
36
37
|
chromiumOptions,
|
|
37
38
|
envVariables,
|
|
38
39
|
height,
|
|
39
|
-
|
|
40
|
+
serializedInputPropsWithCustomSchema: remotion_1.Internals.serializeJSONWithDate({
|
|
41
|
+
data: inputProps,
|
|
42
|
+
indent: undefined,
|
|
43
|
+
staticBase: null,
|
|
44
|
+
}).serializedString,
|
|
40
45
|
overwrite,
|
|
41
46
|
port,
|
|
42
47
|
publicDir,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@remotion/cli",
|
|
3
|
-
"version": "4.0.
|
|
3
|
+
"version": "4.0.4",
|
|
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/
|
|
39
|
-
"@remotion/
|
|
40
|
-
"remotion": "4.0.
|
|
41
|
-
"@remotion/
|
|
42
|
-
"@remotion/
|
|
38
|
+
"@remotion/renderer": "4.0.4",
|
|
39
|
+
"@remotion/bundler": "4.0.4",
|
|
40
|
+
"remotion": "4.0.4",
|
|
41
|
+
"@remotion/player": "4.0.4",
|
|
42
|
+
"@remotion/media-utils": "4.0.4"
|
|
43
43
|
},
|
|
44
44
|
"peerDependencies": {
|
|
45
45
|
"react": ">=16.8.0",
|
|
@@ -65,8 +65,8 @@
|
|
|
65
65
|
"typescript": "4.9.5",
|
|
66
66
|
"vitest": "0.31.1",
|
|
67
67
|
"zod": "^3.21.4",
|
|
68
|
-
"@remotion/zod-types": "4.0.
|
|
69
|
-
"@remotion/tailwind": "4.0.
|
|
68
|
+
"@remotion/zod-types": "4.0.4",
|
|
69
|
+
"@remotion/tailwind": "4.0.4"
|
|
70
70
|
},
|
|
71
71
|
"keywords": [
|
|
72
72
|
"remotion",
|