@remotion/cli 4.1.0-alpha5 → 4.1.0-alpha8
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/codemods/stringify-with-path.js +3 -3
- package/dist/compositions.js +6 -1
- package/dist/config/log.d.ts +1 -1
- package/dist/editor/components/CanvasOrLoading.js +20 -1
- package/dist/editor/components/CopyButton.js +5 -2
- package/dist/editor/components/Editor.js +1 -3
- package/dist/editor/components/FramePersistor.d.ts +0 -2
- package/dist/editor/components/FramePersistor.js +4 -24
- package/dist/editor/components/InitialCompositionLoader.js +1 -22
- package/dist/editor/components/NewComposition/RemInput.d.ts +1 -1
- package/dist/editor/components/OpenEditorButton.js +5 -2
- package/dist/editor/components/QuickSwitcher/QuickSwitcherResult.js +3 -3
- package/dist/editor/components/RenderModal/DataEditor.js +3 -3
- package/dist/editor/components/RenderModal/RenderModal.js +5 -2
- package/dist/editor/components/RenderModal/RenderModalBasic.d.ts +2 -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/SchemaEditor/SchemaErrorMessages.js +1 -3
- package/dist/editor/components/RenderModal/SchemaEditor/ZodSwitch.js +0 -1
- package/dist/editor/components/RenderQueue/actions.d.ts +1 -1
- package/dist/editor/components/RenderQueue/actions.js +12 -4
- package/dist/editor/components/SetTimelineInOutProvider.js +5 -4
- package/dist/editor/components/SidebarRenderButton.js +3 -1
- package/dist/editor/components/Timeline/TimelineDragHandler.js +45 -19
- package/dist/editor/components/TimelineInOutToggle.d.ts +2 -1
- package/dist/editor/components/TimelineInOutToggle.js +82 -67
- package/dist/editor/helpers/is-composition-still.d.ts +1 -1
- package/dist/editor/helpers/is-current-selected-still.js +5 -6
- package/dist/editor/icons/keys.js +1 -0
- package/dist/editor/state/in-out.d.ts +3 -2
- package/dist/editor/state/in-out.js +22 -5
- package/dist/editor/state/marks.d.ts +3 -2
- package/dist/editor/state/marks.js +6 -6
- package/dist/error-with-stack-frame.d.ts +19 -0
- package/dist/error-with-stack-frame.js +81 -0
- 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/handle-common-errors.js +4 -0
- package/dist/handle-javascript-error.d.ts +20 -0
- package/dist/handle-javascript-error.js +81 -0
- package/dist/index.d.ts +3 -3
- package/dist/log.d.ts +3 -3
- package/dist/parse-command-line.js +1 -1
- package/dist/preview-server/error-overlay/remotion-overlay/Button.js +1 -0
- 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/open-directory-in-finder.js +11 -5
- 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/print-compositions.d.ts +2 -2
- 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/dist/symbolicate-error.d.ts +3 -0
- package/dist/symbolicate-error.js +24 -0
- package/dist/symbolicate-errors.d.ts +7 -0
- package/dist/symbolicate-errors.js +90 -0
- package/dist/symbolicate-stacktrace.d.ts +28 -0
- package/dist/symbolicate-stacktrace.js +135 -0
- package/dist/symbolicateable-error.d.ts +16 -0
- package/dist/symbolicateable-error.js +18 -0
- package/package.json +10 -10
|
@@ -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,
|
|
@@ -52,5 +52,9 @@ const handleCommonError = async (err, logLevel) => {
|
|
|
52
52
|
log_1.Log.info('💡 Remotion requires at least Libc 2.34.');
|
|
53
53
|
log_1.Log.info('💡 Get help for this issue: https://github.com/remotion-dev/remotion/issues/2439');
|
|
54
54
|
}
|
|
55
|
+
if (err.message.includes('EBADF')) {
|
|
56
|
+
log_1.Log.info('💡 This error might be fixed by changing your Node version:');
|
|
57
|
+
log_1.Log.info(' https://github.com/remotion-dev/remotion/issues/2452');
|
|
58
|
+
}
|
|
55
59
|
};
|
|
56
60
|
exports.handleCommonError = handleCommonError;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import type { Page } from '../browser/BrowserPage';
|
|
2
|
+
import type { SymbolicatedStackFrame } from '../symbolicate-stacktrace';
|
|
3
|
+
export declare class ErrorWithStackFrame extends Error {
|
|
4
|
+
symbolicatedStackFrames: SymbolicatedStackFrame[] | null;
|
|
5
|
+
frame: number | null;
|
|
6
|
+
name: string;
|
|
7
|
+
delayRenderCall: SymbolicatedStackFrame[] | null;
|
|
8
|
+
constructor({ message, symbolicatedStackFrames, frame, name, delayRenderCall, }: {
|
|
9
|
+
message: string;
|
|
10
|
+
symbolicatedStackFrames: SymbolicatedStackFrame[] | null;
|
|
11
|
+
frame: number | null;
|
|
12
|
+
name: string;
|
|
13
|
+
delayRenderCall: SymbolicatedStackFrame[] | null;
|
|
14
|
+
});
|
|
15
|
+
}
|
|
16
|
+
export declare const handleJavascriptException: ({ page, onError, frame, }: {
|
|
17
|
+
page: Page;
|
|
18
|
+
frame: number | null;
|
|
19
|
+
onError: (err: Error) => void;
|
|
20
|
+
}) => () => void;
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.handleJavascriptException = exports.ErrorWithStackFrame = void 0;
|
|
4
|
+
const remotion_1 = require("remotion");
|
|
5
|
+
const symbolicateable_error_1 = require("./symbolicateable-error");
|
|
6
|
+
const log_1 = require("./log");
|
|
7
|
+
class ErrorWithStackFrame extends Error {
|
|
8
|
+
constructor({ message, symbolicatedStackFrames, frame, name, delayRenderCall, }) {
|
|
9
|
+
super(message);
|
|
10
|
+
this.symbolicatedStackFrames = symbolicatedStackFrames;
|
|
11
|
+
this.frame = frame;
|
|
12
|
+
this.name = name;
|
|
13
|
+
this.delayRenderCall = delayRenderCall;
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
exports.ErrorWithStackFrame = ErrorWithStackFrame;
|
|
17
|
+
const cleanUpErrorMessage = (exception) => {
|
|
18
|
+
var _a, _b, _c, _d;
|
|
19
|
+
let errorMessage = (_a = exception.exceptionDetails.exception) === null || _a === void 0 ? void 0 : _a.description;
|
|
20
|
+
if (!errorMessage) {
|
|
21
|
+
return null;
|
|
22
|
+
}
|
|
23
|
+
const errorType = (_b = exception.exceptionDetails.exception) === null || _b === void 0 ? void 0 : _b.className;
|
|
24
|
+
const prefix = `${errorType}: `;
|
|
25
|
+
if (errorMessage.startsWith(prefix)) {
|
|
26
|
+
errorMessage = errorMessage.substring(prefix.length);
|
|
27
|
+
}
|
|
28
|
+
const frames = (_d = (_c = exception.exceptionDetails.stackTrace) === null || _c === void 0 ? void 0 : _c.callFrames.length) !== null && _d !== void 0 ? _d : 0;
|
|
29
|
+
const split = errorMessage.split('\n');
|
|
30
|
+
return split.slice(0, Math.max(1, split.length - frames)).join('\n');
|
|
31
|
+
};
|
|
32
|
+
const removeDelayRenderStack = (message) => {
|
|
33
|
+
const index = message.indexOf(remotion_1.Internals.DELAY_RENDER_CALLSTACK_TOKEN);
|
|
34
|
+
if (index === -1) {
|
|
35
|
+
return message;
|
|
36
|
+
}
|
|
37
|
+
return message.substring(0, index);
|
|
38
|
+
};
|
|
39
|
+
const callFrameToStackFrame = (callFrame) => {
|
|
40
|
+
return {
|
|
41
|
+
columnNumber: callFrame.columnNumber,
|
|
42
|
+
fileName: callFrame.url,
|
|
43
|
+
functionName: callFrame.functionName,
|
|
44
|
+
lineNumber: callFrame.lineNumber,
|
|
45
|
+
};
|
|
46
|
+
};
|
|
47
|
+
const handleJavascriptException = ({ page, onError, frame, }) => {
|
|
48
|
+
const client = page._client();
|
|
49
|
+
const handler = (exception) => {
|
|
50
|
+
var _a, _b, _c;
|
|
51
|
+
const rawErrorMessage = (_a = exception.exceptionDetails.exception) === null || _a === void 0 ? void 0 : _a.description;
|
|
52
|
+
const cleanErrorMessage = cleanUpErrorMessage(exception);
|
|
53
|
+
if (!cleanErrorMessage) {
|
|
54
|
+
log_1.Log.error(exception);
|
|
55
|
+
const err = new Error(rawErrorMessage);
|
|
56
|
+
err.stack = rawErrorMessage;
|
|
57
|
+
onError(err);
|
|
58
|
+
return;
|
|
59
|
+
}
|
|
60
|
+
if (!exception.exceptionDetails.stackTrace) {
|
|
61
|
+
const err = new Error(removeDelayRenderStack(cleanErrorMessage));
|
|
62
|
+
err.stack = rawErrorMessage;
|
|
63
|
+
onError(err);
|
|
64
|
+
return;
|
|
65
|
+
}
|
|
66
|
+
const errorType = (_b = exception.exceptionDetails.exception) === null || _b === void 0 ? void 0 : _b.className;
|
|
67
|
+
const symbolicatedErr = new symbolicateable_error_1.SymbolicateableError({
|
|
68
|
+
message: removeDelayRenderStack(cleanErrorMessage),
|
|
69
|
+
stackFrame: exception.exceptionDetails.stackTrace.callFrames.map((f) => callFrameToStackFrame(f)),
|
|
70
|
+
frame,
|
|
71
|
+
name: errorType,
|
|
72
|
+
stack: (_c = exception.exceptionDetails.exception) === null || _c === void 0 ? void 0 : _c.description,
|
|
73
|
+
});
|
|
74
|
+
onError(symbolicatedErr);
|
|
75
|
+
};
|
|
76
|
+
client.on('Runtime.exceptionThrown', handler);
|
|
77
|
+
return () => {
|
|
78
|
+
client.off('Runtime.exceptionThrown', handler);
|
|
79
|
+
};
|
|
80
|
+
};
|
|
81
|
+
exports.handleJavascriptException = handleJavascriptException;
|
package/dist/index.d.ts
CHANGED
|
@@ -202,7 +202,7 @@ export declare const CliInternals: {
|
|
|
202
202
|
codec: import("@remotion/renderer").CodecOrUndefined;
|
|
203
203
|
uiImageFormat: "none" | "png" | "jpeg" | null;
|
|
204
204
|
}) => "none" | "png" | "jpeg";
|
|
205
|
-
printCompositions: (compositions: import("remotion").
|
|
205
|
+
printCompositions: (compositions: import("remotion").VideoConfig[]) => void;
|
|
206
206
|
getFinalOutputCodec: ({ cliFlag, configFile, downloadName, outName, uiCodec, }: {
|
|
207
207
|
cliFlag: import("@remotion/renderer").CodecOrUndefined;
|
|
208
208
|
outName: string | null;
|
|
@@ -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;
|
package/dist/log.d.ts
CHANGED
|
@@ -2,19 +2,19 @@ export declare const Log: {
|
|
|
2
2
|
verbose: (message?: any, ...optionalParams: any[]) => void;
|
|
3
3
|
verboseAdvanced: (options: {
|
|
4
4
|
indent: boolean;
|
|
5
|
-
logLevel: "
|
|
5
|
+
logLevel: "error" | "verbose" | "info" | "warn";
|
|
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: "error" | "verbose" | "info" | "warn";
|
|
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: "error" | "verbose" | "info" | "warn";
|
|
18
18
|
}, message?: any, ...optionalParams: any[]) => void;
|
|
19
19
|
error: (message?: any, ...optionalParams: any[]) => void;
|
|
20
20
|
};
|
|
@@ -88,7 +88,7 @@ const parseCommandLine = () => {
|
|
|
88
88
|
config_1.ConfigInternals.setStillFrame(Number(exports.parsedCli.frame));
|
|
89
89
|
}
|
|
90
90
|
if (exports.parsedCli.png) {
|
|
91
|
-
throw new Error('The --png flag has been
|
|
91
|
+
throw new Error('The --png flag has been removed. Use --sequence --image-format=png from now on.');
|
|
92
92
|
}
|
|
93
93
|
if (exports.parsedCli.sequence) {
|
|
94
94
|
config_1.Config.setImageSequence(true);
|
|
@@ -13,6 +13,7 @@ const button = {
|
|
|
13
13
|
fontSize: 14,
|
|
14
14
|
color: 'white',
|
|
15
15
|
flexDirection: 'row',
|
|
16
|
+
display: 'flex',
|
|
16
17
|
};
|
|
17
18
|
const ButtonRefForwardFunction = ({ children, onClick, title, disabled, style, id, autoFocus, buttonContainerStyle, }, ref) => {
|
|
18
19
|
const combined = (0, react_1.useMemo)(() => {
|
|
@@ -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
|
};
|
|
@@ -14,11 +14,17 @@ const openDirectoryInFinder = (dirToOpen, allowedDirectory) => {
|
|
|
14
14
|
if (relativeToProcessCwd.startsWith('..')) {
|
|
15
15
|
throw new Error(`Not allowed to open ${relativeToProcessCwd}`);
|
|
16
16
|
}
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
17
|
+
if ((0, node_os_1.platform)() === 'win32') {
|
|
18
|
+
return new Promise((resolve, reject) => {
|
|
19
|
+
(0, node_child_process_1.exec)(`start ${dirToOpen}`, (error) => {
|
|
20
|
+
if (error) {
|
|
21
|
+
reject(error);
|
|
22
|
+
}
|
|
23
|
+
resolve();
|
|
24
|
+
});
|
|
25
|
+
});
|
|
26
|
+
}
|
|
27
|
+
const command = (0, node_os_1.platform)() === 'darwin' ? 'open' : 'xdg-open';
|
|
22
28
|
const p = (0, node_child_process_1.spawn)(command, [(0, node_os_1.platform)() === 'darwin' ? '-R' : null, dirToOpen].filter(truthy_1.truthy));
|
|
23
29
|
const stderrChunks = [];
|
|
24
30
|
p.stderr.on('data', (d) => stderrChunks.push(d));
|
|
@@ -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,2 +1,2 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
export declare const printCompositions: (compositions:
|
|
1
|
+
import type { VideoConfig } from 'remotion';
|
|
2
|
+
export declare const printCompositions: (compositions: VideoConfig[]) => void;
|
|
@@ -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,
|