@remotion/renderer 4.0.425 → 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 +289 -0
- package/dist/esm/client.mjs +1426 -619
- package/dist/esm/index.mjs +12 -7
- package/dist/index.d.ts +3 -1
- 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.js +22 -1
- package/dist/options/config.d.ts +19 -0
- package/dist/options/config.js +29 -0
- package/dist/options/env-file.d.ts +19 -0
- package/dist/options/env-file.js +38 -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/image-sequence.d.ts +16 -0
- package/dist/options/image-sequence.js +30 -0
- package/dist/options/index.d.ts +289 -0
- package/dist/options/index.js +32 -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/package-manager.d.ts +19 -0
- package/dist/options/package-manager.js +47 -0
- package/dist/options/port.d.ts +19 -0
- package/dist/options/port.js +36 -0
- package/dist/options/props.d.ts +19 -0
- package/dist/options/props.js +33 -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/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 +13 -13
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.propsOption = void 0;
|
|
4
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
+
const cliFlag = 'props';
|
|
6
|
+
exports.propsOption = {
|
|
7
|
+
name: 'Input Props',
|
|
8
|
+
cliFlag,
|
|
9
|
+
description: () => (jsx_runtime_1.jsxs(jsx_runtime_1.Fragment, { children: ["Input Props to pass to the selected composition of your video. Must be a serialized JSON string (",
|
|
10
|
+
jsx_runtime_1.jsxs("code", { children: ["--props='", '{', "\"hello\": \"world\"", '}', "'"] }),
|
|
11
|
+
") or a path to a JSON file (",
|
|
12
|
+
jsx_runtime_1.jsx("code", { children: "./path/to/props.json" }),
|
|
13
|
+
")."] })),
|
|
14
|
+
ssrName: null,
|
|
15
|
+
docLink: 'https://www.remotion.dev/docs/passing-props#passing-input-props-in-the-cli',
|
|
16
|
+
getValue: ({ commandLine }) => {
|
|
17
|
+
if (commandLine[cliFlag] !== undefined) {
|
|
18
|
+
return {
|
|
19
|
+
source: 'cli',
|
|
20
|
+
value: commandLine[cliFlag],
|
|
21
|
+
};
|
|
22
|
+
}
|
|
23
|
+
return {
|
|
24
|
+
source: 'default',
|
|
25
|
+
value: null,
|
|
26
|
+
};
|
|
27
|
+
},
|
|
28
|
+
setConfig: () => {
|
|
29
|
+
throw new Error('setProps is not supported. Pass --props via the CLI instead.');
|
|
30
|
+
},
|
|
31
|
+
type: '',
|
|
32
|
+
id: cliFlag,
|
|
33
|
+
};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export declare const rspackOption: {
|
|
2
|
+
name: string;
|
|
3
|
+
cliFlag: "experimental-rspack";
|
|
4
|
+
description: () => import("react/jsx-runtime").JSX.Element;
|
|
5
|
+
ssrName: null;
|
|
6
|
+
docLink: null;
|
|
7
|
+
type: boolean;
|
|
8
|
+
getValue: ({ commandLine }: {
|
|
9
|
+
commandLine: Record<string, unknown>;
|
|
10
|
+
}) => {
|
|
11
|
+
value: boolean;
|
|
12
|
+
source: string;
|
|
13
|
+
};
|
|
14
|
+
setConfig(value: boolean): void;
|
|
15
|
+
id: "experimental-rspack";
|
|
16
|
+
};
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.rspackOption = void 0;
|
|
4
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
+
let rspackEnabled = false;
|
|
6
|
+
const cliFlag = 'experimental-rspack';
|
|
7
|
+
exports.rspackOption = {
|
|
8
|
+
name: 'Experimental Rspack',
|
|
9
|
+
cliFlag,
|
|
10
|
+
description: () => (jsx_runtime_1.jsx(jsx_runtime_1.Fragment, { children: "Uses Rspack instead of Webpack as the bundler for the Studio or bundle." })),
|
|
11
|
+
ssrName: null,
|
|
12
|
+
docLink: null,
|
|
13
|
+
type: false,
|
|
14
|
+
getValue: ({ commandLine }) => {
|
|
15
|
+
if (commandLine[cliFlag] !== undefined) {
|
|
16
|
+
rspackEnabled = true;
|
|
17
|
+
return {
|
|
18
|
+
value: commandLine[cliFlag],
|
|
19
|
+
source: 'cli',
|
|
20
|
+
};
|
|
21
|
+
}
|
|
22
|
+
return {
|
|
23
|
+
value: rspackEnabled,
|
|
24
|
+
source: 'config',
|
|
25
|
+
};
|
|
26
|
+
},
|
|
27
|
+
setConfig(value) {
|
|
28
|
+
rspackEnabled = value;
|
|
29
|
+
},
|
|
30
|
+
id: cliFlag,
|
|
31
|
+
};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export declare const runsOption: {
|
|
2
|
+
name: string;
|
|
3
|
+
cliFlag: "runs";
|
|
4
|
+
description: () => import("react/jsx-runtime").JSX.Element;
|
|
5
|
+
ssrName: null;
|
|
6
|
+
docLink: string;
|
|
7
|
+
type: number;
|
|
8
|
+
getValue: ({ commandLine }: {
|
|
9
|
+
commandLine: Record<string, unknown>;
|
|
10
|
+
}) => {
|
|
11
|
+
value: number;
|
|
12
|
+
source: string;
|
|
13
|
+
};
|
|
14
|
+
setConfig: (value: number) => void;
|
|
15
|
+
id: "runs";
|
|
16
|
+
};
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.runsOption = void 0;
|
|
4
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
+
const DEFAULT_RUNS = 3;
|
|
6
|
+
let currentRuns = DEFAULT_RUNS;
|
|
7
|
+
const cliFlag = 'runs';
|
|
8
|
+
exports.runsOption = {
|
|
9
|
+
name: 'Benchmark runs',
|
|
10
|
+
cliFlag,
|
|
11
|
+
description: () => (jsx_runtime_1.jsxs(jsx_runtime_1.Fragment, { children: ["Specify how many times the video should be rendered during a benchmark. Default ",
|
|
12
|
+
jsx_runtime_1.jsx("code", { children: DEFAULT_RUNS }),
|
|
13
|
+
"."] })),
|
|
14
|
+
ssrName: null,
|
|
15
|
+
docLink: 'https://www.remotion.dev/docs/cli/benchmark#--runs',
|
|
16
|
+
type: DEFAULT_RUNS,
|
|
17
|
+
getValue: ({ commandLine }) => {
|
|
18
|
+
if (commandLine[cliFlag] !== undefined) {
|
|
19
|
+
const value = Number(commandLine[cliFlag]);
|
|
20
|
+
if (isNaN(value) || value < 1) {
|
|
21
|
+
throw new Error(`--runs must be a positive number, but got ${commandLine[cliFlag]}`);
|
|
22
|
+
}
|
|
23
|
+
return { value, source: 'cli' };
|
|
24
|
+
}
|
|
25
|
+
if (currentRuns !== DEFAULT_RUNS) {
|
|
26
|
+
return { value: currentRuns, source: 'config' };
|
|
27
|
+
}
|
|
28
|
+
return { value: DEFAULT_RUNS, source: 'default' };
|
|
29
|
+
},
|
|
30
|
+
setConfig: (value) => {
|
|
31
|
+
if (typeof value !== 'number' || isNaN(value) || value < 1) {
|
|
32
|
+
throw new Error(`Runs must be a positive number, but got ${value}`);
|
|
33
|
+
}
|
|
34
|
+
currentRuns = value;
|
|
35
|
+
},
|
|
36
|
+
id: cliFlag,
|
|
37
|
+
};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
export declare const stillFrameOption: {
|
|
2
|
+
name: string;
|
|
3
|
+
cliFlag: "frame";
|
|
4
|
+
description: () => import("react/jsx-runtime").JSX.Element;
|
|
5
|
+
ssrName: "frame";
|
|
6
|
+
docLink: string;
|
|
7
|
+
getValue: ({ commandLine }: {
|
|
8
|
+
commandLine: Record<string, unknown>;
|
|
9
|
+
}) => {
|
|
10
|
+
source: string;
|
|
11
|
+
value: number;
|
|
12
|
+
} | {
|
|
13
|
+
source: string;
|
|
14
|
+
value: null;
|
|
15
|
+
};
|
|
16
|
+
setConfig: (value: number | null) => void;
|
|
17
|
+
type: number | null;
|
|
18
|
+
id: "frame";
|
|
19
|
+
};
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.stillFrameOption = void 0;
|
|
4
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
+
const no_react_1 = require("remotion/no-react");
|
|
6
|
+
const cliFlag = 'frame';
|
|
7
|
+
let currentFrame = null;
|
|
8
|
+
const validate = (frame) => {
|
|
9
|
+
no_react_1.NoReactInternals.validateFrame({
|
|
10
|
+
frame,
|
|
11
|
+
durationInFrames: Infinity,
|
|
12
|
+
allowFloats: false,
|
|
13
|
+
});
|
|
14
|
+
};
|
|
15
|
+
exports.stillFrameOption = {
|
|
16
|
+
name: 'Frame',
|
|
17
|
+
cliFlag,
|
|
18
|
+
description: () => (jsx_runtime_1.jsxs(jsx_runtime_1.Fragment, { children: ["Which frame should be rendered when rendering a still. Default", ' ', jsx_runtime_1.jsx("code", { children: "0" }),
|
|
19
|
+
". From v3.2.27, negative values are allowed, with", ' ', jsx_runtime_1.jsx("code", { children: "-1" }),
|
|
20
|
+
" being the last frame."] })),
|
|
21
|
+
ssrName: 'frame',
|
|
22
|
+
docLink: 'https://www.remotion.dev/docs/cli/still#--frame',
|
|
23
|
+
getValue: ({ commandLine }) => {
|
|
24
|
+
if (commandLine[cliFlag] !== undefined) {
|
|
25
|
+
const frame = Number(commandLine[cliFlag]);
|
|
26
|
+
validate(frame);
|
|
27
|
+
return {
|
|
28
|
+
source: 'cli',
|
|
29
|
+
value: frame,
|
|
30
|
+
};
|
|
31
|
+
}
|
|
32
|
+
if (currentFrame !== null) {
|
|
33
|
+
return {
|
|
34
|
+
source: 'config',
|
|
35
|
+
value: currentFrame,
|
|
36
|
+
};
|
|
37
|
+
}
|
|
38
|
+
return {
|
|
39
|
+
source: 'default',
|
|
40
|
+
value: null,
|
|
41
|
+
};
|
|
42
|
+
},
|
|
43
|
+
setConfig: (value) => {
|
|
44
|
+
if (value !== null) {
|
|
45
|
+
validate(value);
|
|
46
|
+
}
|
|
47
|
+
currentFrame = value;
|
|
48
|
+
},
|
|
49
|
+
type: 0,
|
|
50
|
+
id: cliFlag,
|
|
51
|
+
};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
export declare const versionFlagOption: {
|
|
2
|
+
name: string;
|
|
3
|
+
cliFlag: "version";
|
|
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: "version";
|
|
19
|
+
};
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.versionFlagOption = void 0;
|
|
4
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
+
const cliFlag = 'version';
|
|
6
|
+
exports.versionFlagOption = {
|
|
7
|
+
name: 'Version',
|
|
8
|
+
cliFlag,
|
|
9
|
+
description: () => (jsx_runtime_1.jsx(jsx_runtime_1.Fragment, { children: "Install a specific version. Also enables downgrading to an older version." })),
|
|
10
|
+
ssrName: null,
|
|
11
|
+
docLink: 'https://www.remotion.dev/docs/cli/upgrade#--version',
|
|
12
|
+
getValue: ({ commandLine }) => {
|
|
13
|
+
if (commandLine[cliFlag] !== undefined) {
|
|
14
|
+
return {
|
|
15
|
+
source: 'cli',
|
|
16
|
+
value: String(commandLine[cliFlag]),
|
|
17
|
+
};
|
|
18
|
+
}
|
|
19
|
+
return {
|
|
20
|
+
source: 'default',
|
|
21
|
+
value: null,
|
|
22
|
+
};
|
|
23
|
+
},
|
|
24
|
+
setConfig: () => {
|
|
25
|
+
throw new Error('Cannot set version via config file');
|
|
26
|
+
},
|
|
27
|
+
type: '',
|
|
28
|
+
id: cliFlag,
|
|
29
|
+
};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
export declare const webpackPollOption: {
|
|
2
|
+
name: string;
|
|
3
|
+
cliFlag: "webpack-poll";
|
|
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: number;
|
|
12
|
+
} | {
|
|
13
|
+
source: string;
|
|
14
|
+
value: null;
|
|
15
|
+
};
|
|
16
|
+
setConfig: (value: number | null) => void;
|
|
17
|
+
type: number | null;
|
|
18
|
+
id: "webpack-poll";
|
|
19
|
+
};
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.webpackPollOption = void 0;
|
|
4
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
+
const cliFlag = 'webpack-poll';
|
|
6
|
+
let webpackPolling = null;
|
|
7
|
+
exports.webpackPollOption = {
|
|
8
|
+
name: 'Webpack Polling',
|
|
9
|
+
cliFlag,
|
|
10
|
+
description: () => (jsx_runtime_1.jsx(jsx_runtime_1.Fragment, { children: "Enables Webpack polling instead of the file system event listeners for hot reloading. This is useful if you are inside a virtual machine or have a remote file system. Pass a value in milliseconds." })),
|
|
11
|
+
ssrName: null,
|
|
12
|
+
docLink: 'https://www.remotion.dev/docs/config#setwebpackpollinginmilliseconds',
|
|
13
|
+
getValue: ({ commandLine }) => {
|
|
14
|
+
if (commandLine[cliFlag] !== undefined) {
|
|
15
|
+
const val = commandLine[cliFlag];
|
|
16
|
+
if (typeof val !== 'number') {
|
|
17
|
+
throw new TypeError(`Webpack polling must be a number, got ${JSON.stringify(val)}`);
|
|
18
|
+
}
|
|
19
|
+
return {
|
|
20
|
+
source: 'cli',
|
|
21
|
+
value: val,
|
|
22
|
+
};
|
|
23
|
+
}
|
|
24
|
+
if (webpackPolling !== null) {
|
|
25
|
+
return {
|
|
26
|
+
source: 'config',
|
|
27
|
+
value: webpackPolling,
|
|
28
|
+
};
|
|
29
|
+
}
|
|
30
|
+
return {
|
|
31
|
+
source: 'default',
|
|
32
|
+
value: null,
|
|
33
|
+
};
|
|
34
|
+
},
|
|
35
|
+
setConfig: (value) => {
|
|
36
|
+
if (typeof value !== 'number' && value !== null) {
|
|
37
|
+
throw new TypeError(`Polling must be a number or null, got ${JSON.stringify(value)} instead.`);
|
|
38
|
+
}
|
|
39
|
+
webpackPolling = value;
|
|
40
|
+
},
|
|
41
|
+
type: 0,
|
|
42
|
+
id: cliFlag,
|
|
43
|
+
};
|
package/dist/prespawn-ffmpeg.js
CHANGED
|
@@ -93,11 +93,12 @@ const prespawnFfmpeg = (options) => {
|
|
|
93
93
|
let exitCode = {
|
|
94
94
|
type: 'running',
|
|
95
95
|
};
|
|
96
|
-
task.on('exit', (code) => {
|
|
97
|
-
if (typeof code === 'number' && code > 0) {
|
|
96
|
+
task.on('exit', (code, signal) => {
|
|
97
|
+
if ((typeof code === 'number' && code > 0) || signal) {
|
|
98
98
|
exitCode = {
|
|
99
99
|
type: 'quit-with-error',
|
|
100
|
-
exitCode: code,
|
|
100
|
+
exitCode: code !== null && code !== void 0 ? code : 1,
|
|
101
|
+
signal: signal !== null && signal !== void 0 ? signal : null,
|
|
101
102
|
stderr: ffmpegOutput,
|
|
102
103
|
};
|
|
103
104
|
}
|
package/dist/render-frames.d.ts
CHANGED
|
@@ -55,7 +55,10 @@ export type FrameAndAssets = {
|
|
|
55
55
|
artifactAssets: ArtifactWithoutContent[];
|
|
56
56
|
inlineAudioAssets: InlineAudioAsset[];
|
|
57
57
|
};
|
|
58
|
-
|
|
58
|
+
type Prettify<T> = {
|
|
59
|
+
[K in keyof T]: T[K];
|
|
60
|
+
} & {};
|
|
61
|
+
export type RenderFramesOptions = Prettify<{
|
|
59
62
|
onStart: (data: OnStartData) => void;
|
|
60
63
|
onFrameUpdate: (framesRendered: number, frameIndex: number, timeToRenderInMilliseconds: number) => void;
|
|
61
64
|
outputDir: string | null;
|
|
@@ -91,7 +94,44 @@ export type RenderFramesOptions = {
|
|
|
91
94
|
concurrency?: number | string | null;
|
|
92
95
|
onArtifact?: OnArtifact | null;
|
|
93
96
|
serveUrl: string;
|
|
94
|
-
} & Partial<ToOptions<typeof optionsMap.renderFrames
|
|
97
|
+
} & Partial<ToOptions<typeof optionsMap.renderFrames>>>;
|
|
95
98
|
export declare const internalRenderFrames: (args_0: InternalRenderFramesOptions) => Promise<RenderFramesOutput>;
|
|
96
|
-
export declare const renderFrames: (options:
|
|
99
|
+
export declare const renderFrames: (options: {
|
|
100
|
+
readonly mediaCacheSizeInBytes?: number | null | undefined;
|
|
101
|
+
readonly forSeamlessAacConcatenation?: boolean | undefined;
|
|
102
|
+
readonly offthreadVideoCacheSizeInBytes?: number | null | undefined;
|
|
103
|
+
readonly offthreadVideoThreads?: number | null | undefined;
|
|
104
|
+
readonly jpegQuality?: number | undefined;
|
|
105
|
+
readonly logLevel?: "error" | "info" | "trace" | "verbose" | "warn" | undefined;
|
|
106
|
+
readonly binariesDirectory?: string | null | undefined;
|
|
107
|
+
readonly onBrowserDownload?: import(".").OnBrowserDownload | undefined;
|
|
108
|
+
readonly chromeMode?: "chrome-for-testing" | "headless-shell" | undefined;
|
|
109
|
+
readonly imageSequencePattern?: string | null | undefined;
|
|
110
|
+
onStart: (data: OnStartData) => void;
|
|
111
|
+
onFrameUpdate: (framesRendered: number, frameIndex: number, timeToRenderInMilliseconds: number) => void;
|
|
112
|
+
outputDir: string | null;
|
|
113
|
+
inputProps: Record<string, unknown>;
|
|
114
|
+
envVariables?: Record<string, string> | undefined;
|
|
115
|
+
imageFormat?: "jpeg" | "none" | "png" | undefined;
|
|
116
|
+
quality?: undefined;
|
|
117
|
+
frameRange?: FrameRange | null | undefined;
|
|
118
|
+
everyNthFrame?: number | undefined;
|
|
119
|
+
dumpBrowserLogs?: boolean | undefined;
|
|
120
|
+
verbose?: boolean | undefined;
|
|
121
|
+
puppeteerInstance?: HeadlessBrowser | undefined;
|
|
122
|
+
browserExecutable?: BrowserExecutable | undefined;
|
|
123
|
+
onBrowserLog?: ((log: BrowserLog) => void) | undefined;
|
|
124
|
+
onFrameBuffer?: ((buffer: Buffer, frame: number) => void) | undefined;
|
|
125
|
+
onDownload?: RenderMediaOnDownload | undefined;
|
|
126
|
+
timeoutInMilliseconds?: number | undefined;
|
|
127
|
+
chromiumOptions?: ChromiumOptions | undefined;
|
|
128
|
+
scale?: number | undefined;
|
|
129
|
+
port?: number | null | undefined;
|
|
130
|
+
cancelSignal?: CancelSignal | undefined;
|
|
131
|
+
composition: VideoConfig;
|
|
132
|
+
muted?: boolean | undefined;
|
|
133
|
+
concurrency?: string | number | null | undefined;
|
|
134
|
+
onArtifact?: OnArtifact | null | undefined;
|
|
135
|
+
serveUrl: string;
|
|
136
|
+
}) => Promise<RenderFramesOutput>;
|
|
97
137
|
export {};
|
package/dist/render-media.d.ts
CHANGED
|
@@ -25,7 +25,7 @@ export type SlowFrame = {
|
|
|
25
25
|
frame: number;
|
|
26
26
|
time: number;
|
|
27
27
|
};
|
|
28
|
-
export type
|
|
28
|
+
export type RenderMediaProgress = {
|
|
29
29
|
renderedFrames: number;
|
|
30
30
|
encodedFrames: number;
|
|
31
31
|
encodedDoneIn: number | null;
|
|
@@ -33,7 +33,8 @@ export type RenderMediaOnProgress = (progress: {
|
|
|
33
33
|
renderEstimatedTime: number;
|
|
34
34
|
progress: number;
|
|
35
35
|
stitchStage: StitchingState;
|
|
36
|
-
}
|
|
36
|
+
};
|
|
37
|
+
export type RenderMediaOnProgress = (progress: RenderMediaProgress) => void;
|
|
37
38
|
type MoreRenderMediaOptions = ToOptions<typeof optionsMap.renderMedia>;
|
|
38
39
|
type EitherApiKeyOrLicenseKey = true extends typeof NoReactInternals.ENABLE_V5_BREAKING_CHANGES ? {
|
|
39
40
|
licenseKey: string | null;
|
|
@@ -144,6 +145,7 @@ export type RenderMediaOptions = Prettify<{
|
|
|
144
145
|
type RenderMediaResult = {
|
|
145
146
|
buffer: Buffer | null;
|
|
146
147
|
slowestFrames: SlowFrame[];
|
|
148
|
+
contentType: string;
|
|
147
149
|
};
|
|
148
150
|
export declare const internalRenderMedia: (args_0: InternalRenderMediaOptions) => Promise<RenderMediaResult>;
|
|
149
151
|
export declare const renderMedia: ({ proResProfile, x264Preset, crf, composition, inputProps, pixelFormat, codec, envVariables, frameRange, puppeteerInstance, outputLocation, onProgress, overwrite, onDownload, onBrowserLog, onStart, timeoutInMilliseconds, chromiumOptions, scale, browserExecutable, port, cancelSignal, muted, enforceAudioTrack, ffmpegOverride, audioBitrate, videoBitrate, encodingMaxRate, encodingBufferSize, audioCodec, jpegQuality, concurrency, serveUrl, disallowParallelEncoding, everyNthFrame, imageFormat, numberOfGifLoops, dumpBrowserLogs, preferLossless, verbose, quality, logLevel: passedLogLevel, offthreadVideoCacheSizeInBytes, colorSpace, repro, binariesDirectory, separateAudioTo, forSeamlessAacConcatenation, onBrowserDownload, onArtifact, metadata, hardwareAcceleration, chromeMode, offthreadVideoThreads, compositionStart, mediaCacheSizeInBytes, isProduction, ...apiKeyOrLicenseKey }: RenderMediaOptions) => Promise<RenderMediaResult>;
|
package/dist/render-media.js
CHANGED
|
@@ -29,6 +29,7 @@ const is_audio_codec_1 = require("./is-audio-codec");
|
|
|
29
29
|
const jpeg_quality_1 = require("./jpeg-quality");
|
|
30
30
|
const logger_1 = require("./logger");
|
|
31
31
|
const make_cancel_signal_1 = require("./make-cancel-signal");
|
|
32
|
+
const mime_types_1 = require("./mime-types");
|
|
32
33
|
const color_space_1 = require("./options/color-space");
|
|
33
34
|
const offthreadvideo_threads_1 = require("./options/offthreadvideo-threads");
|
|
34
35
|
const x264_preset_1 = require("./options/x264-preset");
|
|
@@ -358,10 +359,10 @@ const internalRenderMediaRaw = ({ proResProfile, x264Preset, crf, composition: c
|
|
|
358
359
|
const id = (0, perf_1.startPerfMeasure)('piping');
|
|
359
360
|
const exitStatus = preStitcher === null || preStitcher === void 0 ? void 0 : preStitcher.getExitStatus();
|
|
360
361
|
if ((exitStatus === null || exitStatus === void 0 ? void 0 : exitStatus.type) === 'quit-successfully') {
|
|
361
|
-
throw new Error(`FFmpeg already quit while trying to pipe frame ${frame} to it. Stderr: ${exitStatus.stderr}
|
|
362
|
+
throw new Error(`FFmpeg already quit while trying to pipe frame ${frame} to it. Stderr: ${exitStatus.stderr}`);
|
|
362
363
|
}
|
|
363
364
|
if ((exitStatus === null || exitStatus === void 0 ? void 0 : exitStatus.type) === 'quit-with-error') {
|
|
364
|
-
throw new Error(`FFmpeg quit with code ${exitStatus.exitCode} while piping frame ${frame}. Stderr: ${exitStatus.stderr}
|
|
365
|
+
throw new Error(`FFmpeg quit with code ${exitStatus.exitCode}${exitStatus.signal ? ` (signal ${exitStatus.signal})` : ''} while piping frame ${frame}. Stderr: ${exitStatus.stderr}`);
|
|
365
366
|
}
|
|
366
367
|
(_a = stitcherFfmpeg === null || stitcherFfmpeg === void 0 ? void 0 : stitcherFfmpeg.stdin) === null || _a === void 0 ? void 0 : _a.write(buffer);
|
|
367
368
|
(0, perf_1.stopPerfMeasure)(id);
|
|
@@ -468,6 +469,7 @@ const internalRenderMediaRaw = ({ proResProfile, x264Preset, crf, composition: c
|
|
|
468
469
|
const result = {
|
|
469
470
|
buffer,
|
|
470
471
|
slowestFrames,
|
|
472
|
+
contentType: (0, mime_types_1.mimeLookup)('file.' + (0, get_extension_from_codec_1.getFileExtensionFromCodec)(codec, audioCodec)) || 'application/octet-stream',
|
|
471
473
|
};
|
|
472
474
|
const sendTelemetryAndResolve = () => {
|
|
473
475
|
if (licenseKey === null) {
|
package/dist/render-still.d.ts
CHANGED
|
@@ -75,6 +75,7 @@ export type RenderStillOptions = {
|
|
|
75
75
|
};
|
|
76
76
|
type RenderStillReturnValue = {
|
|
77
77
|
buffer: Buffer | null;
|
|
78
|
+
contentType: string;
|
|
78
79
|
};
|
|
79
80
|
export declare const internalRenderStill: (options: InternalRenderStillOptions) => Promise<RenderStillReturnValue>;
|
|
80
81
|
export declare const renderStill: (options: RenderStillOptions) => Promise<RenderStillReturnValue>;
|
package/dist/render-still.js
CHANGED
|
@@ -56,6 +56,7 @@ const jpeg_quality_1 = require("./jpeg-quality");
|
|
|
56
56
|
const logger_1 = require("./logger");
|
|
57
57
|
const make_cancel_signal_1 = require("./make-cancel-signal");
|
|
58
58
|
const get_available_memory_1 = require("./memory/get-available-memory");
|
|
59
|
+
const mime_types_1 = require("./mime-types");
|
|
59
60
|
const open_browser_1 = require("./open-browser");
|
|
60
61
|
const overwrite_1 = require("./overwrite");
|
|
61
62
|
const prepare_server_1 = require("./prepare-server");
|
|
@@ -246,7 +247,10 @@ const innerRenderStill = async ({ composition, imageFormat = image_format_1.DEFA
|
|
|
246
247
|
onArtifact === null || onArtifact === void 0 ? void 0 : onArtifact(artifact);
|
|
247
248
|
}
|
|
248
249
|
await cleanup();
|
|
249
|
-
return {
|
|
250
|
+
return {
|
|
251
|
+
buffer: output ? null : buffer,
|
|
252
|
+
contentType: (0, mime_types_1.mimeLookup)('file.' + imageFormat) || 'application/octet-stream',
|
|
253
|
+
};
|
|
250
254
|
};
|
|
251
255
|
const internalRenderStillRaw = (options) => {
|
|
252
256
|
const cleanup = [];
|
|
@@ -21,7 +21,10 @@ type InternalSelectCompositionsConfig = {
|
|
|
21
21
|
id: string;
|
|
22
22
|
onServeUrlVisited: () => void;
|
|
23
23
|
} & ToOptions<typeof optionsMap.selectComposition>;
|
|
24
|
-
|
|
24
|
+
type Prettify<T> = {
|
|
25
|
+
[K in keyof T]: T[K];
|
|
26
|
+
} & {};
|
|
27
|
+
export type SelectCompositionOptions = Prettify<RequiredInputPropsInV5 & {
|
|
25
28
|
envVariables?: Record<string, string>;
|
|
26
29
|
puppeteerInstance?: HeadlessBrowser;
|
|
27
30
|
onBrowserLog?: (log: BrowserLog) => void;
|
|
@@ -34,12 +37,31 @@ export type SelectCompositionOptions = RequiredInputPropsInV5 & {
|
|
|
34
37
|
verbose?: boolean;
|
|
35
38
|
serveUrl: string;
|
|
36
39
|
id: string;
|
|
37
|
-
} & Partial<ToOptions<typeof optionsMap.selectComposition
|
|
40
|
+
} & Partial<ToOptions<typeof optionsMap.selectComposition>>>;
|
|
38
41
|
type InternalReturnType = {
|
|
39
42
|
metadata: VideoConfig;
|
|
40
43
|
propsSize: number;
|
|
41
44
|
};
|
|
42
45
|
export declare const internalSelectCompositionRaw: (options: InternalSelectCompositionsConfig) => Promise<InternalReturnType>;
|
|
43
46
|
export declare const internalSelectComposition: (options: InternalSelectCompositionsConfig) => Promise<InternalReturnType>;
|
|
44
|
-
export declare const selectComposition: (options:
|
|
47
|
+
export declare const selectComposition: (options: {
|
|
48
|
+
readonly mediaCacheSizeInBytes?: number | null | undefined;
|
|
49
|
+
readonly offthreadVideoCacheSizeInBytes?: number | null | undefined;
|
|
50
|
+
readonly offthreadVideoThreads?: number | null | undefined;
|
|
51
|
+
readonly logLevel?: "error" | "info" | "trace" | "verbose" | "warn" | undefined;
|
|
52
|
+
readonly timeoutInMilliseconds?: number | undefined;
|
|
53
|
+
readonly binariesDirectory?: string | null | undefined;
|
|
54
|
+
readonly onBrowserDownload?: import(".").OnBrowserDownload | undefined;
|
|
55
|
+
readonly chromeMode?: "chrome-for-testing" | "headless-shell" | undefined;
|
|
56
|
+
inputProps?: Record<string, unknown> | undefined;
|
|
57
|
+
envVariables?: Record<string, string> | undefined;
|
|
58
|
+
puppeteerInstance?: HeadlessBrowser | undefined;
|
|
59
|
+
onBrowserLog?: ((log: BrowserLog) => void) | undefined;
|
|
60
|
+
browserExecutable?: BrowserExecutable | undefined;
|
|
61
|
+
chromiumOptions?: ChromiumOptions | undefined;
|
|
62
|
+
port?: number | null | undefined;
|
|
63
|
+
verbose?: boolean | undefined;
|
|
64
|
+
serveUrl: string;
|
|
65
|
+
id: string;
|
|
66
|
+
}) => Promise<VideoConfig>;
|
|
45
67
|
export {};
|
package/package.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"url": "https://github.com/remotion-dev/remotion/tree/main/packages/renderer"
|
|
4
4
|
},
|
|
5
5
|
"name": "@remotion/renderer",
|
|
6
|
-
"version": "4.0.
|
|
6
|
+
"version": "4.0.426",
|
|
7
7
|
"description": "Render Remotion videos using Node.js or Bun",
|
|
8
8
|
"main": "dist/index.js",
|
|
9
9
|
"types": "dist/index.d.ts",
|
|
@@ -23,11 +23,11 @@
|
|
|
23
23
|
"dependencies": {
|
|
24
24
|
"execa": "5.1.1",
|
|
25
25
|
"extract-zip": "2.0.1",
|
|
26
|
-
"remotion": "4.0.
|
|
27
|
-
"@remotion/streaming": "4.0.
|
|
26
|
+
"remotion": "4.0.426",
|
|
27
|
+
"@remotion/streaming": "4.0.426",
|
|
28
28
|
"source-map": "^0.8.0-beta.0",
|
|
29
29
|
"ws": "8.17.1",
|
|
30
|
-
"@remotion/licensing": "4.0.
|
|
30
|
+
"@remotion/licensing": "4.0.426"
|
|
31
31
|
},
|
|
32
32
|
"peerDependencies": {
|
|
33
33
|
"react": ">=16.8.0",
|
|
@@ -41,19 +41,19 @@
|
|
|
41
41
|
"react-dom": "19.2.3",
|
|
42
42
|
"@typescript/native-preview": "7.0.0-dev.20260217.1",
|
|
43
43
|
"@types/ws": "8.5.10",
|
|
44
|
-
"@remotion/example-videos": "4.0.
|
|
45
|
-
"@remotion/eslint-config-internal": "4.0.
|
|
44
|
+
"@remotion/example-videos": "4.0.426",
|
|
45
|
+
"@remotion/eslint-config-internal": "4.0.426",
|
|
46
46
|
"eslint": "9.19.0",
|
|
47
47
|
"@types/node": "20.12.14"
|
|
48
48
|
},
|
|
49
49
|
"optionalDependencies": {
|
|
50
|
-
"@remotion/compositor-darwin-arm64": "4.0.
|
|
51
|
-
"@remotion/compositor-darwin-x64": "4.0.
|
|
52
|
-
"@remotion/compositor-linux-arm64-gnu": "4.0.
|
|
53
|
-
"@remotion/compositor-linux-arm64-musl": "4.0.
|
|
54
|
-
"@remotion/compositor-linux-x64-gnu": "4.0.
|
|
55
|
-
"@remotion/compositor-linux-x64-musl": "4.0.
|
|
56
|
-
"@remotion/compositor-win32-x64-msvc": "4.0.
|
|
50
|
+
"@remotion/compositor-darwin-arm64": "4.0.426",
|
|
51
|
+
"@remotion/compositor-darwin-x64": "4.0.426",
|
|
52
|
+
"@remotion/compositor-linux-arm64-gnu": "4.0.426",
|
|
53
|
+
"@remotion/compositor-linux-arm64-musl": "4.0.426",
|
|
54
|
+
"@remotion/compositor-linux-x64-gnu": "4.0.426",
|
|
55
|
+
"@remotion/compositor-linux-x64-musl": "4.0.426",
|
|
56
|
+
"@remotion/compositor-win32-x64-msvc": "4.0.426"
|
|
57
57
|
},
|
|
58
58
|
"keywords": [
|
|
59
59
|
"remotion",
|