@remotion/renderer 4.0.424 → 4.0.426
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/client.d.ts +500 -0
- package/dist/esm/client.mjs +1888 -534
- package/dist/esm/index.mjs +12 -7
- package/dist/index.d.ts +4 -1
- package/dist/options/browser-executable.d.ts +17 -0
- package/dist/options/browser-executable.js +36 -0
- package/dist/options/browser.d.ts +19 -0
- package/dist/options/browser.js +30 -0
- package/dist/options/bundle-cache.d.ts +16 -0
- package/dist/options/bundle-cache.js +34 -0
- package/dist/options/concurrency.d.ts +17 -0
- package/dist/options/concurrency.js +61 -0
- package/dist/options/config.d.ts +19 -0
- package/dist/options/config.js +29 -0
- package/dist/options/disable-web-security.d.ts +16 -0
- package/dist/options/disable-web-security.js +36 -0
- package/dist/options/env-file.d.ts +19 -0
- package/dist/options/env-file.js +38 -0
- package/dist/options/every-nth-frame.d.ts +16 -0
- package/dist/options/every-nth-frame.js +42 -0
- package/dist/options/experimental-client-side-rendering.js +2 -3
- package/dist/options/frames.d.ts +17 -0
- package/dist/options/frames.js +83 -0
- package/dist/options/ignore-certificate-errors.d.ts +16 -0
- package/dist/options/ignore-certificate-errors.js +36 -0
- package/dist/options/image-format-option.d.ts +18 -0
- package/dist/options/image-format-option.js +33 -0
- package/dist/options/image-sequence.d.ts +16 -0
- package/dist/options/image-sequence.js +30 -0
- package/dist/options/index.d.ts +499 -0
- package/dist/options/index.js +56 -0
- package/dist/options/no-open.d.ts +19 -0
- package/dist/options/no-open.js +30 -0
- package/dist/options/out-dir.d.ts +19 -0
- package/dist/options/out-dir.js +41 -0
- package/dist/options/override-duration.d.ts +19 -0
- package/dist/options/override-duration.js +46 -0
- package/dist/options/override-fps.d.ts +19 -0
- package/dist/options/override-fps.js +40 -0
- package/dist/options/override-height.d.ts +19 -0
- package/dist/options/override-height.js +40 -0
- package/dist/options/override-width.d.ts +19 -0
- package/dist/options/override-width.js +40 -0
- package/dist/options/package-manager.d.ts +19 -0
- package/dist/options/package-manager.js +47 -0
- package/dist/options/pixel-format.d.ts +16 -0
- package/dist/options/pixel-format.js +41 -0
- package/dist/options/port.d.ts +19 -0
- package/dist/options/port.js +36 -0
- package/dist/options/private-license-key.d.ts +15 -0
- package/dist/options/private-license-key.js +35 -0
- package/dist/options/props.d.ts +19 -0
- package/dist/options/props.js +33 -0
- package/dist/options/prores-profile.d.ts +20 -0
- package/dist/options/prores-profile.js +48 -0
- package/dist/options/rspack.d.ts +16 -0
- package/dist/options/rspack.js +31 -0
- package/dist/options/runs.d.ts +16 -0
- package/dist/options/runs.js +37 -0
- package/dist/options/still-frame.d.ts +19 -0
- package/dist/options/still-frame.js +51 -0
- package/dist/options/user-agent.d.ts +19 -0
- package/dist/options/user-agent.js +36 -0
- package/dist/options/version-flag.d.ts +19 -0
- package/dist/options/version-flag.js +29 -0
- package/dist/options/webpack-poll.d.ts +19 -0
- package/dist/options/webpack-poll.js +43 -0
- package/dist/prespawn-ffmpeg.d.ts +1 -0
- package/dist/prespawn-ffmpeg.js +4 -3
- package/dist/render-frames.d.ts +43 -3
- package/dist/render-media.d.ts +4 -2
- package/dist/render-media.js +4 -2
- package/dist/render-still.d.ts +1 -0
- package/dist/render-still.js +5 -1
- package/dist/select-composition.d.ts +25 -3
- package/package.json +14 -14
package/dist/esm/index.mjs
CHANGED
|
@@ -20134,11 +20134,12 @@ var prespawnFfmpeg = (options) => {
|
|
|
20134
20134
|
let exitCode = {
|
|
20135
20135
|
type: "running"
|
|
20136
20136
|
};
|
|
20137
|
-
task.on("exit", (code) => {
|
|
20138
|
-
if (typeof code === "number" && code > 0) {
|
|
20137
|
+
task.on("exit", (code, signal) => {
|
|
20138
|
+
if (typeof code === "number" && code > 0 || signal) {
|
|
20139
20139
|
exitCode = {
|
|
20140
20140
|
type: "quit-with-error",
|
|
20141
|
-
exitCode: code,
|
|
20141
|
+
exitCode: code ?? 1,
|
|
20142
|
+
signal: signal ?? null,
|
|
20142
20143
|
stderr: ffmpegOutput
|
|
20143
20144
|
};
|
|
20144
20145
|
} else {
|
|
@@ -21962,10 +21963,10 @@ var internalRenderMediaRaw = ({
|
|
|
21962
21963
|
const id = startPerfMeasure("piping");
|
|
21963
21964
|
const exitStatus = preStitcher?.getExitStatus();
|
|
21964
21965
|
if (exitStatus?.type === "quit-successfully") {
|
|
21965
|
-
throw new Error(`FFmpeg already quit while trying to pipe frame ${frame} to it. Stderr: ${exitStatus.stderr}
|
|
21966
|
+
throw new Error(`FFmpeg already quit while trying to pipe frame ${frame} to it. Stderr: ${exitStatus.stderr}`);
|
|
21966
21967
|
}
|
|
21967
21968
|
if (exitStatus?.type === "quit-with-error") {
|
|
21968
|
-
throw new Error(`FFmpeg quit with code ${exitStatus.exitCode} while piping frame ${frame}. Stderr: ${exitStatus.stderr}
|
|
21969
|
+
throw new Error(`FFmpeg quit with code ${exitStatus.exitCode}${exitStatus.signal ? ` (signal ${exitStatus.signal})` : ""} while piping frame ${frame}. Stderr: ${exitStatus.stderr}`);
|
|
21969
21970
|
}
|
|
21970
21971
|
stitcherFfmpeg?.stdin?.write(buffer);
|
|
21971
21972
|
stopPerfMeasure(id);
|
|
@@ -22064,7 +22065,8 @@ var internalRenderMediaRaw = ({
|
|
|
22064
22065
|
slowestFrames.sort((a, b) => b.time - a.time);
|
|
22065
22066
|
const result = {
|
|
22066
22067
|
buffer,
|
|
22067
|
-
slowestFrames
|
|
22068
|
+
slowestFrames,
|
|
22069
|
+
contentType: mimeLookup("file." + getFileExtensionFromCodec(codec, audioCodec)) || "application/octet-stream"
|
|
22068
22070
|
};
|
|
22069
22071
|
const sendTelemetryAndResolve = () => {
|
|
22070
22072
|
if (licenseKey === null) {
|
|
@@ -22497,7 +22499,10 @@ var innerRenderStill = async ({
|
|
|
22497
22499
|
onArtifact?.(artifact);
|
|
22498
22500
|
}
|
|
22499
22501
|
await cleanup();
|
|
22500
|
-
return {
|
|
22502
|
+
return {
|
|
22503
|
+
buffer: output ? null : buffer,
|
|
22504
|
+
contentType: mimeLookup("file." + imageFormat) || "application/octet-stream"
|
|
22505
|
+
};
|
|
22501
22506
|
};
|
|
22502
22507
|
var internalRenderStillRaw = (options) => {
|
|
22503
22508
|
const cleanup = [];
|
package/dist/index.d.ts
CHANGED
|
@@ -30,6 +30,7 @@ export { openBrowser } from './open-browser';
|
|
|
30
30
|
export type { ChromiumOptions } from './open-browser';
|
|
31
31
|
export { ChromeMode } from './options/chrome-mode';
|
|
32
32
|
export { ColorSpace } from './options/color-space';
|
|
33
|
+
export type { Concurrency } from './options/concurrency';
|
|
33
34
|
export type { DeleteAfter } from './options/delete-after';
|
|
34
35
|
export { OpenGlRenderer } from './options/gl';
|
|
35
36
|
export { NumberOfGifLoops } from './options/number-of-gif-loops';
|
|
@@ -39,7 +40,7 @@ export { X264Preset } from './options/x264-preset';
|
|
|
39
40
|
export { PixelFormat } from './pixel-format';
|
|
40
41
|
export { RemotionServer } from './prepare-server';
|
|
41
42
|
export { OnArtifact, RenderFramesOptions, renderFrames } from './render-frames';
|
|
42
|
-
export { InternalRenderMediaOptions, RenderMediaOnProgress, RenderMediaOptions, SlowFrame, StitchingState, renderMedia, } from './render-media';
|
|
43
|
+
export { InternalRenderMediaOptions, RenderMediaOnProgress, RenderMediaOptions, RenderMediaProgress, SlowFrame, StitchingState, renderMedia, } from './render-media';
|
|
43
44
|
export { RenderStillOptions, renderStill } from './render-still';
|
|
44
45
|
export { SelectCompositionOptions, selectComposition, } from './select-composition';
|
|
45
46
|
export { EmittedArtifact } from './serialize-artifact';
|
|
@@ -651,6 +652,7 @@ export declare const RenderInternals: {
|
|
|
651
652
|
};
|
|
652
653
|
}, "apiKey">>) => Promise<{
|
|
653
654
|
buffer: Buffer | null;
|
|
655
|
+
contentType: string;
|
|
654
656
|
}>;
|
|
655
657
|
internalOpenBrowser: ({ browser, browserExecutable, chromiumOptions, forceDeviceScaleFactor, indent, viewport, logLevel, onBrowserDownload, chromeMode, }: {
|
|
656
658
|
browserExecutable: string | null;
|
|
@@ -1218,6 +1220,7 @@ export declare const RenderInternals: {
|
|
|
1218
1220
|
internalRenderMedia: (args_0: import("./render-media").InternalRenderMediaOptions) => Promise<{
|
|
1219
1221
|
buffer: Buffer | null;
|
|
1220
1222
|
slowestFrames: import("./render-media").SlowFrame[];
|
|
1223
|
+
contentType: string;
|
|
1221
1224
|
}>;
|
|
1222
1225
|
validOpenGlRenderers: readonly ["swangle", "angle", "egl", "swiftshader", "vulkan", "angle-egl"];
|
|
1223
1226
|
isIpV6Supported: (flattened: import("os").NetworkInterfaceInfo[]) => boolean;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { BrowserExecutable } from '../browser-executable';
|
|
2
|
+
export declare const browserExecutableOption: {
|
|
3
|
+
name: string;
|
|
4
|
+
cliFlag: "browser-executable";
|
|
5
|
+
description: () => import("react/jsx-runtime").JSX.Element;
|
|
6
|
+
ssrName: "browserExecutable";
|
|
7
|
+
docLink: string;
|
|
8
|
+
type: BrowserExecutable;
|
|
9
|
+
getValue: ({ commandLine }: {
|
|
10
|
+
commandLine: Record<string, unknown>;
|
|
11
|
+
}) => {
|
|
12
|
+
source: string;
|
|
13
|
+
value: BrowserExecutable;
|
|
14
|
+
};
|
|
15
|
+
setConfig: (value: BrowserExecutable) => void;
|
|
16
|
+
id: "browser-executable";
|
|
17
|
+
};
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.browserExecutableOption = void 0;
|
|
4
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
+
let currentBrowserExecutablePath = null;
|
|
6
|
+
const cliFlag = 'browser-executable';
|
|
7
|
+
exports.browserExecutableOption = {
|
|
8
|
+
name: 'Browser executable',
|
|
9
|
+
cliFlag,
|
|
10
|
+
description: () => (jsx_runtime_1.jsx(jsx_runtime_1.Fragment, { children: "Set a custom Chrome or Chromium executable path. By default Remotion will try to find an existing version of Chrome on your system and if not found, it will download one. This flag is useful if you don't have Chrome installed in a standard location and you want to prevent downloading an additional browser or need support for the H264 codec." })),
|
|
11
|
+
ssrName: 'browserExecutable',
|
|
12
|
+
docLink: 'https://www.remotion.dev/docs/config#setbrowserexecutable',
|
|
13
|
+
type: null,
|
|
14
|
+
getValue: ({ commandLine }) => {
|
|
15
|
+
if (commandLine[cliFlag] !== undefined) {
|
|
16
|
+
return {
|
|
17
|
+
source: 'cli',
|
|
18
|
+
value: commandLine[cliFlag],
|
|
19
|
+
};
|
|
20
|
+
}
|
|
21
|
+
if (currentBrowserExecutablePath !== null) {
|
|
22
|
+
return {
|
|
23
|
+
source: 'config',
|
|
24
|
+
value: currentBrowserExecutablePath,
|
|
25
|
+
};
|
|
26
|
+
}
|
|
27
|
+
return {
|
|
28
|
+
source: 'default',
|
|
29
|
+
value: null,
|
|
30
|
+
};
|
|
31
|
+
},
|
|
32
|
+
setConfig: (value) => {
|
|
33
|
+
currentBrowserExecutablePath = value;
|
|
34
|
+
},
|
|
35
|
+
id: cliFlag,
|
|
36
|
+
};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
export declare const browserOption: {
|
|
2
|
+
name: string;
|
|
3
|
+
cliFlag: "browser";
|
|
4
|
+
description: () => import("react/jsx-runtime").JSX.Element;
|
|
5
|
+
ssrName: null;
|
|
6
|
+
docLink: string;
|
|
7
|
+
getValue: ({ commandLine }: {
|
|
8
|
+
commandLine: Record<string, unknown>;
|
|
9
|
+
}) => {
|
|
10
|
+
source: string;
|
|
11
|
+
value: string;
|
|
12
|
+
} | {
|
|
13
|
+
source: string;
|
|
14
|
+
value: null;
|
|
15
|
+
};
|
|
16
|
+
setConfig: () => never;
|
|
17
|
+
type: string | null;
|
|
18
|
+
id: "browser";
|
|
19
|
+
};
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.browserOption = void 0;
|
|
4
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
+
const cliFlag = 'browser';
|
|
6
|
+
exports.browserOption = {
|
|
7
|
+
name: 'Browser',
|
|
8
|
+
cliFlag,
|
|
9
|
+
description: () => (jsx_runtime_1.jsxs(jsx_runtime_1.Fragment, { children: ["Specify the browser which should be used for opening a tab. The default browser will be used by default. Pass an absolute path or", ' ', jsx_runtime_1.jsx("code", { children: "\"chrome\"" }),
|
|
10
|
+
" to use Chrome. If Chrome is selected as the browser and you are on macOS, Remotion will try to reuse an existing tab."] })),
|
|
11
|
+
ssrName: null,
|
|
12
|
+
docLink: 'https://www.remotion.dev/docs/cli/studio#--browser',
|
|
13
|
+
getValue: ({ commandLine }) => {
|
|
14
|
+
if (commandLine[cliFlag] !== undefined) {
|
|
15
|
+
return {
|
|
16
|
+
source: 'cli',
|
|
17
|
+
value: commandLine[cliFlag],
|
|
18
|
+
};
|
|
19
|
+
}
|
|
20
|
+
return {
|
|
21
|
+
source: 'default',
|
|
22
|
+
value: null,
|
|
23
|
+
};
|
|
24
|
+
},
|
|
25
|
+
setConfig: () => {
|
|
26
|
+
throw new Error('setBrowser is not supported. Pass --browser via the CLI instead.');
|
|
27
|
+
},
|
|
28
|
+
type: '',
|
|
29
|
+
id: cliFlag,
|
|
30
|
+
};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export declare const bundleCacheOption: {
|
|
2
|
+
name: string;
|
|
3
|
+
cliFlag: "bundle-cache";
|
|
4
|
+
description: () => import("react/jsx-runtime").JSX.Element;
|
|
5
|
+
ssrName: null;
|
|
6
|
+
docLink: string;
|
|
7
|
+
getValue: ({ commandLine }: {
|
|
8
|
+
commandLine: Record<string, unknown>;
|
|
9
|
+
}) => {
|
|
10
|
+
source: string;
|
|
11
|
+
value: boolean;
|
|
12
|
+
};
|
|
13
|
+
setConfig: (value: boolean) => void;
|
|
14
|
+
type: boolean;
|
|
15
|
+
id: "bundle-cache";
|
|
16
|
+
};
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.bundleCacheOption = void 0;
|
|
4
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
+
const cliFlag = 'bundle-cache';
|
|
6
|
+
let cachingEnabled = true;
|
|
7
|
+
exports.bundleCacheOption = {
|
|
8
|
+
name: 'Webpack Bundle Caching',
|
|
9
|
+
cliFlag,
|
|
10
|
+
description: () => (jsx_runtime_1.jsxs(jsx_runtime_1.Fragment, { children: ["Enable or disable Webpack caching. This flag is enabled by default, use", ' ', jsx_runtime_1.jsx("code", { children: "--bundle-cache=false" }),
|
|
11
|
+
" to disable caching."] })),
|
|
12
|
+
ssrName: null,
|
|
13
|
+
docLink: 'https://www.remotion.dev/docs/config#setcachingenabled',
|
|
14
|
+
getValue: ({ commandLine }) => {
|
|
15
|
+
if (commandLine[cliFlag] !== undefined && commandLine[cliFlag] !== null) {
|
|
16
|
+
return {
|
|
17
|
+
source: 'cli',
|
|
18
|
+
value: Boolean(commandLine[cliFlag]),
|
|
19
|
+
};
|
|
20
|
+
}
|
|
21
|
+
return {
|
|
22
|
+
source: cachingEnabled ? 'default' : 'config',
|
|
23
|
+
value: cachingEnabled,
|
|
24
|
+
};
|
|
25
|
+
},
|
|
26
|
+
setConfig: (value) => {
|
|
27
|
+
if (typeof value !== 'boolean') {
|
|
28
|
+
throw new TypeError(`Value for "${cliFlag}" must be a boolean, but got ${typeof value}.`);
|
|
29
|
+
}
|
|
30
|
+
cachingEnabled = value;
|
|
31
|
+
},
|
|
32
|
+
type: true,
|
|
33
|
+
id: cliFlag,
|
|
34
|
+
};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
export type Concurrency = number | string | null;
|
|
2
|
+
export declare const concurrencyOption: {
|
|
3
|
+
name: string;
|
|
4
|
+
cliFlag: "concurrency";
|
|
5
|
+
description: () => import("react/jsx-runtime").JSX.Element;
|
|
6
|
+
ssrName: "concurrency";
|
|
7
|
+
docLink: string;
|
|
8
|
+
type: Concurrency;
|
|
9
|
+
getValue: ({ commandLine }: {
|
|
10
|
+
commandLine: Record<string, unknown>;
|
|
11
|
+
}) => {
|
|
12
|
+
source: string;
|
|
13
|
+
value: Concurrency;
|
|
14
|
+
};
|
|
15
|
+
setConfig: (value: Concurrency) => void;
|
|
16
|
+
id: "concurrency";
|
|
17
|
+
};
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.concurrencyOption = void 0;
|
|
4
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
+
let currentConcurrency = null;
|
|
6
|
+
const cliFlag = 'concurrency';
|
|
7
|
+
// Browser-safe validation that does not pull in Node.js modules
|
|
8
|
+
// (validate-concurrency.ts imports node:child_process via get-cpu-count.ts)
|
|
9
|
+
const validateConcurrencyValue = (value, setting) => {
|
|
10
|
+
if (typeof value === 'undefined' || value === null) {
|
|
11
|
+
return;
|
|
12
|
+
}
|
|
13
|
+
if (typeof value !== 'number' && typeof value !== 'string') {
|
|
14
|
+
throw new Error(setting + ' must a number or a string but is ' + value);
|
|
15
|
+
}
|
|
16
|
+
if (typeof value === 'number') {
|
|
17
|
+
if (value % 1 !== 0) {
|
|
18
|
+
throw new Error(setting + ' must be an integer, but is ' + value);
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
else if (!/^\d+(\.\d+)?%$/.test(value)) {
|
|
22
|
+
throw new Error(`${setting} must be a number or percentage, but is ${JSON.stringify(value)}`);
|
|
23
|
+
}
|
|
24
|
+
};
|
|
25
|
+
exports.concurrencyOption = {
|
|
26
|
+
name: 'Concurrency',
|
|
27
|
+
cliFlag,
|
|
28
|
+
description: () => (jsx_runtime_1.jsxs(jsx_runtime_1.Fragment, { children: ["How many CPU threads to use. Minimum 1. The maximum is the amount of threads you have (In Node.JS ",
|
|
29
|
+
jsx_runtime_1.jsx("code", { children: "os.cpus().length" }),
|
|
30
|
+
"). You can also provide a percentage value (e.g. ",
|
|
31
|
+
jsx_runtime_1.jsx("code", { children: "50%" }),
|
|
32
|
+
")."] })),
|
|
33
|
+
ssrName: 'concurrency',
|
|
34
|
+
docLink: 'https://www.remotion.dev/docs/config#setconcurrency',
|
|
35
|
+
type: null,
|
|
36
|
+
getValue: ({ commandLine }) => {
|
|
37
|
+
if (commandLine[cliFlag] !== undefined) {
|
|
38
|
+
const value = commandLine[cliFlag];
|
|
39
|
+
validateConcurrencyValue(value, 'concurrency');
|
|
40
|
+
return {
|
|
41
|
+
source: 'cli',
|
|
42
|
+
value,
|
|
43
|
+
};
|
|
44
|
+
}
|
|
45
|
+
if (currentConcurrency !== null) {
|
|
46
|
+
return {
|
|
47
|
+
source: 'config',
|
|
48
|
+
value: currentConcurrency,
|
|
49
|
+
};
|
|
50
|
+
}
|
|
51
|
+
return {
|
|
52
|
+
source: 'default',
|
|
53
|
+
value: null,
|
|
54
|
+
};
|
|
55
|
+
},
|
|
56
|
+
setConfig: (value) => {
|
|
57
|
+
validateConcurrencyValue(value, 'Config.setConcurrency');
|
|
58
|
+
currentConcurrency = value;
|
|
59
|
+
},
|
|
60
|
+
id: cliFlag,
|
|
61
|
+
};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
export declare const configOption: {
|
|
2
|
+
name: string;
|
|
3
|
+
cliFlag: "config";
|
|
4
|
+
description: () => import("react/jsx-runtime").JSX.Element;
|
|
5
|
+
ssrName: null;
|
|
6
|
+
docLink: string;
|
|
7
|
+
getValue: ({ commandLine }: {
|
|
8
|
+
commandLine: Record<string, unknown>;
|
|
9
|
+
}) => {
|
|
10
|
+
source: string;
|
|
11
|
+
value: string;
|
|
12
|
+
} | {
|
|
13
|
+
source: string;
|
|
14
|
+
value: null;
|
|
15
|
+
};
|
|
16
|
+
setConfig: () => never;
|
|
17
|
+
type: string | null;
|
|
18
|
+
id: "config";
|
|
19
|
+
};
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.configOption = void 0;
|
|
4
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
+
const cliFlag = 'config';
|
|
6
|
+
exports.configOption = {
|
|
7
|
+
name: 'Config file',
|
|
8
|
+
cliFlag,
|
|
9
|
+
description: () => jsx_runtime_1.jsx(jsx_runtime_1.Fragment, { children: "Specify a location for the Remotion config file." }),
|
|
10
|
+
ssrName: null,
|
|
11
|
+
docLink: 'https://www.remotion.dev/docs/config',
|
|
12
|
+
getValue: ({ commandLine }) => {
|
|
13
|
+
if (commandLine[cliFlag] !== undefined) {
|
|
14
|
+
return {
|
|
15
|
+
source: 'cli',
|
|
16
|
+
value: commandLine[cliFlag],
|
|
17
|
+
};
|
|
18
|
+
}
|
|
19
|
+
return {
|
|
20
|
+
source: 'default',
|
|
21
|
+
value: null,
|
|
22
|
+
};
|
|
23
|
+
},
|
|
24
|
+
setConfig: () => {
|
|
25
|
+
throw new Error('setConfig is not supported. Pass --config via the CLI instead.');
|
|
26
|
+
},
|
|
27
|
+
type: '',
|
|
28
|
+
id: cliFlag,
|
|
29
|
+
};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export declare const disableWebSecurityOption: {
|
|
2
|
+
name: string;
|
|
3
|
+
cliFlag: "disable-web-security";
|
|
4
|
+
description: () => import("react/jsx-runtime").JSX.Element;
|
|
5
|
+
ssrName: "disableWebSecurity";
|
|
6
|
+
docLink: string;
|
|
7
|
+
type: boolean;
|
|
8
|
+
getValue: ({ commandLine }: {
|
|
9
|
+
commandLine: Record<string, unknown>;
|
|
10
|
+
}) => {
|
|
11
|
+
source: string;
|
|
12
|
+
value: boolean;
|
|
13
|
+
};
|
|
14
|
+
setConfig: (value: boolean) => void;
|
|
15
|
+
id: "disable-web-security";
|
|
16
|
+
};
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.disableWebSecurityOption = void 0;
|
|
4
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
+
let disableWebSecurity = false;
|
|
6
|
+
const cliFlag = 'disable-web-security';
|
|
7
|
+
exports.disableWebSecurityOption = {
|
|
8
|
+
name: 'Disable web security',
|
|
9
|
+
cliFlag,
|
|
10
|
+
description: () => (jsx_runtime_1.jsx(jsx_runtime_1.Fragment, { children: "This will most notably disable CORS in Chrome among other security features." })),
|
|
11
|
+
ssrName: 'disableWebSecurity',
|
|
12
|
+
docLink: 'https://www.remotion.dev/docs/chromium-flags#--disable-web-security',
|
|
13
|
+
type: false,
|
|
14
|
+
getValue: ({ commandLine }) => {
|
|
15
|
+
if (commandLine[cliFlag] !== undefined) {
|
|
16
|
+
return {
|
|
17
|
+
source: 'cli',
|
|
18
|
+
value: Boolean(commandLine[cliFlag]),
|
|
19
|
+
};
|
|
20
|
+
}
|
|
21
|
+
if (disableWebSecurity) {
|
|
22
|
+
return {
|
|
23
|
+
source: 'config',
|
|
24
|
+
value: disableWebSecurity,
|
|
25
|
+
};
|
|
26
|
+
}
|
|
27
|
+
return {
|
|
28
|
+
source: 'default',
|
|
29
|
+
value: false,
|
|
30
|
+
};
|
|
31
|
+
},
|
|
32
|
+
setConfig: (value) => {
|
|
33
|
+
disableWebSecurity = value;
|
|
34
|
+
},
|
|
35
|
+
id: cliFlag,
|
|
36
|
+
};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
export declare const envFileOption: {
|
|
2
|
+
name: string;
|
|
3
|
+
cliFlag: "env-file";
|
|
4
|
+
description: () => import("react/jsx-runtime").JSX.Element;
|
|
5
|
+
ssrName: null;
|
|
6
|
+
docLink: string;
|
|
7
|
+
getValue: ({ commandLine }: {
|
|
8
|
+
commandLine: Record<string, unknown>;
|
|
9
|
+
}) => {
|
|
10
|
+
source: string;
|
|
11
|
+
value: string;
|
|
12
|
+
} | {
|
|
13
|
+
source: string;
|
|
14
|
+
value: null;
|
|
15
|
+
};
|
|
16
|
+
setConfig: (value: string | null) => void;
|
|
17
|
+
type: string | null;
|
|
18
|
+
id: "env-file";
|
|
19
|
+
};
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.envFileOption = void 0;
|
|
4
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
+
const cliFlag = 'env-file';
|
|
6
|
+
let envFileLocation = null;
|
|
7
|
+
exports.envFileOption = {
|
|
8
|
+
name: 'Env File',
|
|
9
|
+
cliFlag,
|
|
10
|
+
description: () => (jsx_runtime_1.jsxs(jsx_runtime_1.Fragment, { children: ["Specify a location for a dotenv file. Default ",
|
|
11
|
+
jsx_runtime_1.jsx("code", { children: ".env" }),
|
|
12
|
+
"."] })),
|
|
13
|
+
ssrName: null,
|
|
14
|
+
docLink: 'https://www.remotion.dev/docs/cli/render#--env-file',
|
|
15
|
+
getValue: ({ commandLine }) => {
|
|
16
|
+
if (commandLine[cliFlag] !== undefined) {
|
|
17
|
+
return {
|
|
18
|
+
source: 'cli',
|
|
19
|
+
value: commandLine[cliFlag],
|
|
20
|
+
};
|
|
21
|
+
}
|
|
22
|
+
if (envFileLocation !== null) {
|
|
23
|
+
return {
|
|
24
|
+
source: 'config',
|
|
25
|
+
value: envFileLocation,
|
|
26
|
+
};
|
|
27
|
+
}
|
|
28
|
+
return {
|
|
29
|
+
source: 'default',
|
|
30
|
+
value: null,
|
|
31
|
+
};
|
|
32
|
+
},
|
|
33
|
+
setConfig: (value) => {
|
|
34
|
+
envFileLocation = value;
|
|
35
|
+
},
|
|
36
|
+
type: '',
|
|
37
|
+
id: cliFlag,
|
|
38
|
+
};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export declare const everyNthFrameOption: {
|
|
2
|
+
name: string;
|
|
3
|
+
cliFlag: "every-nth-frame";
|
|
4
|
+
description: () => import("react/jsx-runtime").JSX.Element;
|
|
5
|
+
ssrName: "everyNthFrame";
|
|
6
|
+
docLink: string;
|
|
7
|
+
type: number;
|
|
8
|
+
getValue: ({ commandLine }: {
|
|
9
|
+
commandLine: Record<string, unknown>;
|
|
10
|
+
}) => {
|
|
11
|
+
source: string;
|
|
12
|
+
value: number;
|
|
13
|
+
};
|
|
14
|
+
setConfig: (value: number) => void;
|
|
15
|
+
id: "every-nth-frame";
|
|
16
|
+
};
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.everyNthFrameOption = void 0;
|
|
4
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
+
const DEFAULT_EVERY_NTH_FRAME = 1;
|
|
6
|
+
let everyNthFrame = DEFAULT_EVERY_NTH_FRAME;
|
|
7
|
+
const cliFlag = 'every-nth-frame';
|
|
8
|
+
exports.everyNthFrameOption = {
|
|
9
|
+
name: 'Every nth frame',
|
|
10
|
+
cliFlag,
|
|
11
|
+
description: () => (jsx_runtime_1.jsxs(jsx_runtime_1.Fragment, { children: ["This option may only be set when rendering GIFs. It determines how many frames are rendered, while the other ones get skipped in order to lower the FPS of the GIF. For example, if the ",
|
|
12
|
+
jsx_runtime_1.jsx("code", { children: "fps" }),
|
|
13
|
+
" is 30, and", ' ', jsx_runtime_1.jsx("code", { children: "everyNthFrame" }),
|
|
14
|
+
" is 2, the FPS of the GIF is ",
|
|
15
|
+
jsx_runtime_1.jsx("code", { children: "15" }),
|
|
16
|
+
"."] })),
|
|
17
|
+
ssrName: 'everyNthFrame',
|
|
18
|
+
docLink: 'https://www.remotion.dev/docs/config#seteverynthframe',
|
|
19
|
+
type: DEFAULT_EVERY_NTH_FRAME,
|
|
20
|
+
getValue: ({ commandLine }) => {
|
|
21
|
+
if (commandLine[cliFlag] !== undefined) {
|
|
22
|
+
return {
|
|
23
|
+
source: 'cli',
|
|
24
|
+
value: commandLine[cliFlag],
|
|
25
|
+
};
|
|
26
|
+
}
|
|
27
|
+
if (everyNthFrame !== DEFAULT_EVERY_NTH_FRAME) {
|
|
28
|
+
return {
|
|
29
|
+
source: 'config',
|
|
30
|
+
value: everyNthFrame,
|
|
31
|
+
};
|
|
32
|
+
}
|
|
33
|
+
return {
|
|
34
|
+
source: 'default',
|
|
35
|
+
value: DEFAULT_EVERY_NTH_FRAME,
|
|
36
|
+
};
|
|
37
|
+
},
|
|
38
|
+
setConfig: (value) => {
|
|
39
|
+
everyNthFrame = value;
|
|
40
|
+
},
|
|
41
|
+
id: cliFlag,
|
|
42
|
+
};
|
|
@@ -12,10 +12,9 @@ exports.experimentalClientSideRenderingOption = {
|
|
|
12
12
|
docLink: 'https://www.remotion.dev/docs/client-side-rendering',
|
|
13
13
|
type: false,
|
|
14
14
|
getValue: ({ commandLine }) => {
|
|
15
|
-
if (commandLine[cliFlag] !==
|
|
16
|
-
experimentalClientSideRenderingEnabled = true;
|
|
15
|
+
if (commandLine[cliFlag] !== null) {
|
|
17
16
|
return {
|
|
18
|
-
value:
|
|
17
|
+
value: commandLine[cliFlag],
|
|
19
18
|
source: 'cli',
|
|
20
19
|
};
|
|
21
20
|
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { FrameRange } from '../frame-range';
|
|
2
|
+
export declare const framesOption: {
|
|
3
|
+
name: string;
|
|
4
|
+
cliFlag: "frames";
|
|
5
|
+
description: () => import("react/jsx-runtime").JSX.Element;
|
|
6
|
+
ssrName: "frameRange";
|
|
7
|
+
docLink: string;
|
|
8
|
+
type: FrameRange | null;
|
|
9
|
+
getValue: ({ commandLine }: {
|
|
10
|
+
commandLine: Record<string, unknown>;
|
|
11
|
+
}) => {
|
|
12
|
+
source: string;
|
|
13
|
+
value: FrameRange | null;
|
|
14
|
+
};
|
|
15
|
+
setConfig: (value: FrameRange | null) => void;
|
|
16
|
+
id: "frames";
|
|
17
|
+
};
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.framesOption = void 0;
|
|
4
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
+
const frame_range_1 = require("../frame-range");
|
|
6
|
+
const cliFlag = 'frames';
|
|
7
|
+
let frameRange = null;
|
|
8
|
+
const parseFrameRangeFromCli = (newFrameRange) => {
|
|
9
|
+
if (typeof newFrameRange === 'number') {
|
|
10
|
+
if (newFrameRange < 0) {
|
|
11
|
+
return [0, Math.abs(newFrameRange)];
|
|
12
|
+
}
|
|
13
|
+
return newFrameRange;
|
|
14
|
+
}
|
|
15
|
+
if (typeof newFrameRange === 'string') {
|
|
16
|
+
if (newFrameRange.trim() === '') {
|
|
17
|
+
throw new Error('--frames flag must be a single number, or 2 numbers separated by `-`');
|
|
18
|
+
}
|
|
19
|
+
const parts = newFrameRange.split('-');
|
|
20
|
+
if (parts.length > 2 || parts.length <= 0) {
|
|
21
|
+
throw new Error(`--frames flag must be a number or 2 numbers separated by '-', instead got ${parts.length} numbers`);
|
|
22
|
+
}
|
|
23
|
+
if (parts.length === 1) {
|
|
24
|
+
const value = Number(parts[0]);
|
|
25
|
+
if (isNaN(value)) {
|
|
26
|
+
throw new Error('--frames flag must be a single number, or 2 numbers separated by `-`');
|
|
27
|
+
}
|
|
28
|
+
return value;
|
|
29
|
+
}
|
|
30
|
+
const [firstPart, secondPart] = parts;
|
|
31
|
+
if (secondPart === '' && firstPart !== '') {
|
|
32
|
+
const start = Number(firstPart);
|
|
33
|
+
if (isNaN(start)) {
|
|
34
|
+
throw new Error('--frames flag must be a single number, or 2 numbers separated by `-`');
|
|
35
|
+
}
|
|
36
|
+
return [start, null];
|
|
37
|
+
}
|
|
38
|
+
const parsed = parts.map((f) => Number(f));
|
|
39
|
+
const [first, second] = parsed;
|
|
40
|
+
for (const value of parsed) {
|
|
41
|
+
if (isNaN(value)) {
|
|
42
|
+
throw new Error('--frames flag must be a single number, or 2 numbers separated by `-`');
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
if (second < first) {
|
|
46
|
+
throw new Error('The second number of the --frames flag number should be greater or equal than first number');
|
|
47
|
+
}
|
|
48
|
+
return [first, second];
|
|
49
|
+
}
|
|
50
|
+
throw new Error('--frames flag must be a single number, or 2 numbers separated by `-`');
|
|
51
|
+
};
|
|
52
|
+
exports.framesOption = {
|
|
53
|
+
name: 'Frame Range',
|
|
54
|
+
cliFlag,
|
|
55
|
+
description: () => (jsx_runtime_1.jsxs(jsx_runtime_1.Fragment, { children: ["Render a subset of a video. Pass a single number to render a still, or a range (e.g. ",
|
|
56
|
+
jsx_runtime_1.jsx("code", { children: "0-9" }),
|
|
57
|
+
") to render a subset of frames. Pass", ' ', jsx_runtime_1.jsx("code", { children: "100-" }),
|
|
58
|
+
" to render from frame 100 to the end."] })),
|
|
59
|
+
ssrName: 'frameRange',
|
|
60
|
+
docLink: 'https://www.remotion.dev/docs/config#setframerange',
|
|
61
|
+
type: null,
|
|
62
|
+
getValue: ({ commandLine }) => {
|
|
63
|
+
if (commandLine[cliFlag] !== undefined) {
|
|
64
|
+
const value = parseFrameRangeFromCli(commandLine[cliFlag]);
|
|
65
|
+
(0, frame_range_1.validateFrameRange)(value);
|
|
66
|
+
return {
|
|
67
|
+
source: 'cli',
|
|
68
|
+
value,
|
|
69
|
+
};
|
|
70
|
+
}
|
|
71
|
+
return {
|
|
72
|
+
source: 'config',
|
|
73
|
+
value: frameRange,
|
|
74
|
+
};
|
|
75
|
+
},
|
|
76
|
+
setConfig: (value) => {
|
|
77
|
+
if (value !== null) {
|
|
78
|
+
(0, frame_range_1.validateFrameRange)(value);
|
|
79
|
+
}
|
|
80
|
+
frameRange = value;
|
|
81
|
+
},
|
|
82
|
+
id: cliFlag,
|
|
83
|
+
};
|