@remotion/renderer 4.0.113 → 4.0.115
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/check-apple-silicon.d.ts +3 -1
- package/dist/check-apple-silicon.js +32 -2
- package/dist/client.d.ts +779 -14
- package/dist/client.js +3 -1
- package/dist/combine-videos.js +1 -1
- package/dist/ffmpeg-args.d.ts +1 -1
- package/dist/get-extension-of-filename.js +2 -5
- package/dist/index.d.ts +50 -3
- package/dist/jpeg-quality.d.ts +1 -1
- package/dist/options/audio-bitrate.d.ts +10 -0
- package/dist/options/audio-bitrate.js +25 -2
- package/dist/options/beep-on-finish.d.ts +7 -0
- package/dist/options/beep-on-finish.js +24 -1
- package/dist/options/color-space.d.ts +7 -0
- package/dist/options/color-space.js +23 -0
- package/dist/options/crf.d.ts +9 -0
- package/dist/options/crf.js +33 -2
- package/dist/options/delete-after.d.ts +12 -1
- package/dist/options/delete-after.js +25 -2
- package/dist/options/enable-lambda-insights.d.ts +7 -0
- package/dist/options/enable-lambda-insights.js +24 -1
- package/dist/options/enable-multiprocess-on-linux.d.ts +7 -0
- package/dist/options/enable-multiprocess-on-linux.js +24 -1
- package/dist/options/encoding-buffer-size.d.ts +10 -0
- package/dist/options/encoding-buffer-size.js +28 -1
- package/dist/options/encoding-max-rate.d.ts +10 -0
- package/dist/options/encoding-max-rate.js +24 -1
- package/dist/options/enforce-audio.d.ts +7 -0
- package/dist/options/enforce-audio.js +25 -1
- package/dist/options/folder-expiry.d.ts +7 -0
- package/dist/options/folder-expiry.js +24 -1
- package/dist/options/gl.d.ts +16 -4
- package/dist/options/gl.js +35 -3
- package/dist/options/headless.d.ts +15 -0
- package/dist/options/headless.js +36 -0
- package/dist/options/index.d.ts +202 -10
- package/dist/options/index.js +5 -3
- package/dist/options/jpeg-quality.d.ts +9 -0
- package/dist/options/jpeg-quality.js +37 -2
- package/dist/options/log-level.d.ts +16 -0
- package/dist/options/log-level.js +32 -0
- package/dist/options/mute.d.ts +9 -2
- package/dist/options/mute.js +27 -3
- package/dist/options/number-of-gif-loops.d.ts +11 -0
- package/dist/options/number-of-gif-loops.js +31 -1
- package/dist/options/offthreadvideo-cache-size.d.ts +12 -1
- package/dist/options/offthreadvideo-cache-size.js +30 -3
- package/dist/options/option.d.ts +11 -3
- package/dist/options/options-map.d.ts +577 -3
- package/dist/options/options-map.js +46 -12
- package/dist/options/overwrite.d.ts +15 -0
- package/dist/options/overwrite.js +42 -0
- package/dist/options/repro.d.ts +11 -1
- package/dist/options/repro.js +25 -1
- package/dist/options/scale.d.ts +7 -0
- package/dist/options/scale.js +30 -1
- package/dist/options/timeout.d.ts +15 -0
- package/dist/options/timeout.js +44 -0
- package/dist/options/video-bitrate.d.ts +9 -2
- package/dist/options/video-bitrate.js +27 -4
- package/dist/options/video-codec.d.ts +16 -1
- package/dist/options/video-codec.js +81 -2
- package/dist/options/webhook-custom-data.d.ts +3 -1
- package/dist/options/webhook-custom-data.js +8 -1
- package/dist/options/x264-preset.d.ts +20 -3
- package/dist/options/x264-preset.js +47 -7
- package/dist/path-normalize.d.ts +1 -0
- package/dist/path-normalize.js +133 -0
- package/dist/prespawn-ffmpeg.d.ts +1 -1
- package/dist/render-frames.d.ts +1 -3
- package/dist/render-media.d.ts +0 -12
- package/dist/render-media.js +2 -2
- package/dist/render-still.d.ts +1 -3
- package/dist/select-composition.d.ts +2 -3
- package/dist/stitch-frames-to-video.d.ts +1 -1
- package/dist/stitch-frames-to-video.js +1 -1
- package/package.json +9 -9
- package/dist/does-have-m2-bug.d.ts +0 -3
- package/dist/does-have-m2-bug.js +0 -12
|
@@ -1,12 +1,47 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.jpegQualityOption = void 0;
|
|
3
|
+
exports.jpegQualityOption = exports.getJpegQuality = exports.setJpegQuality = void 0;
|
|
4
4
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
+
const jpeg_quality_1 = require("../jpeg-quality");
|
|
6
|
+
const defaultValue = jpeg_quality_1.DEFAULT_JPEG_QUALITY;
|
|
7
|
+
let quality = defaultValue;
|
|
8
|
+
const setJpegQuality = (q) => {
|
|
9
|
+
(0, jpeg_quality_1.validateJpegQuality)(q);
|
|
10
|
+
if (q === 0 || q === undefined) {
|
|
11
|
+
quality = defaultValue;
|
|
12
|
+
return;
|
|
13
|
+
}
|
|
14
|
+
quality = q;
|
|
15
|
+
};
|
|
16
|
+
exports.setJpegQuality = setJpegQuality;
|
|
17
|
+
const getJpegQuality = () => quality;
|
|
18
|
+
exports.getJpegQuality = getJpegQuality;
|
|
19
|
+
const cliFlag = 'jpeg-quality';
|
|
5
20
|
exports.jpegQualityOption = {
|
|
6
21
|
name: 'JPEG Quality',
|
|
7
|
-
cliFlag
|
|
22
|
+
cliFlag,
|
|
8
23
|
description: () => ((0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: "Sets the quality of the generated JPEG images. Must be an integer between 0 and 100. Default: 80." })),
|
|
9
24
|
ssrName: 'jpegQuality',
|
|
10
25
|
docLink: 'https://www.remotion.dev/docs/renderer/render-media#jpeg-quality',
|
|
11
26
|
type: 0,
|
|
27
|
+
setConfig: exports.setJpegQuality,
|
|
28
|
+
getValue: ({ commandLine }) => {
|
|
29
|
+
if (commandLine[cliFlag] !== undefined) {
|
|
30
|
+
(0, jpeg_quality_1.validateJpegQuality)(commandLine[cliFlag]);
|
|
31
|
+
return {
|
|
32
|
+
source: 'cli',
|
|
33
|
+
value: commandLine[cliFlag],
|
|
34
|
+
};
|
|
35
|
+
}
|
|
36
|
+
if (quality !== defaultValue) {
|
|
37
|
+
return {
|
|
38
|
+
source: 'config',
|
|
39
|
+
value: quality,
|
|
40
|
+
};
|
|
41
|
+
}
|
|
42
|
+
return {
|
|
43
|
+
source: 'default',
|
|
44
|
+
value: defaultValue,
|
|
45
|
+
};
|
|
46
|
+
},
|
|
12
47
|
};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { LogLevel } from '../log-level';
|
|
2
|
+
export declare const logLevelOption: {
|
|
3
|
+
cliFlag: "log";
|
|
4
|
+
name: string;
|
|
5
|
+
ssrName: string;
|
|
6
|
+
description: () => import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
docLink: string;
|
|
8
|
+
getValue: ({ commandLine }: {
|
|
9
|
+
commandLine: Record<string, unknown>;
|
|
10
|
+
}) => {
|
|
11
|
+
value: "verbose" | "info" | "warn" | "error";
|
|
12
|
+
source: string;
|
|
13
|
+
};
|
|
14
|
+
setConfig: (newLogLevel: LogLevel) => void;
|
|
15
|
+
type: "verbose" | "info" | "warn" | "error";
|
|
16
|
+
};
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.logLevelOption = void 0;
|
|
4
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
+
const log_level_1 = require("../log-level");
|
|
6
|
+
let logLevel = 'info';
|
|
7
|
+
const cliFlag = 'log';
|
|
8
|
+
exports.logLevelOption = {
|
|
9
|
+
cliFlag,
|
|
10
|
+
name: 'Log Level',
|
|
11
|
+
ssrName: 'logLevel',
|
|
12
|
+
description: () => ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: ["One of ", (0, jsx_runtime_1.jsx)("code", { children: "verbose" }), ", ", (0, jsx_runtime_1.jsx)("code", { children: "info" }), ", ", (0, jsx_runtime_1.jsx)("code", { children: "warn" }), ",", ' ', (0, jsx_runtime_1.jsx)("code", { children: "error" }), ". Determines how much is being logged to the console.", ' ', (0, jsx_runtime_1.jsx)("code", { children: "verbose" }), " will also log ", (0, jsx_runtime_1.jsx)("code", { children: "console.log" }), "'", "s from the browser. Default ", (0, jsx_runtime_1.jsx)("code", { children: "info" }), "."] })),
|
|
13
|
+
docLink: 'https://www.remotion.dev/docs/troubleshooting/debug-failed-render',
|
|
14
|
+
getValue: ({ commandLine }) => {
|
|
15
|
+
if (commandLine[cliFlag]) {
|
|
16
|
+
if (!(0, log_level_1.isValidLogLevel)(commandLine[cliFlag])) {
|
|
17
|
+
throw new Error(`Invalid \`--log\` value passed. Accepted values: ${log_level_1.logLevels
|
|
18
|
+
.map((l) => `'${l}'`)
|
|
19
|
+
.join(', ')}.`);
|
|
20
|
+
}
|
|
21
|
+
return { value: commandLine[cliFlag], source: 'cli' };
|
|
22
|
+
}
|
|
23
|
+
if (logLevel !== 'info') {
|
|
24
|
+
return { value: logLevel, source: 'config' };
|
|
25
|
+
}
|
|
26
|
+
return { value: 'info', source: 'default' };
|
|
27
|
+
},
|
|
28
|
+
setConfig: (newLogLevel) => {
|
|
29
|
+
logLevel = newLogLevel;
|
|
30
|
+
},
|
|
31
|
+
type: 'error',
|
|
32
|
+
};
|
package/dist/options/mute.d.ts
CHANGED
|
@@ -1,8 +1,15 @@
|
|
|
1
|
-
export declare const
|
|
1
|
+
export declare const mutedOption: {
|
|
2
2
|
name: string;
|
|
3
|
-
cliFlag:
|
|
3
|
+
cliFlag: "muted";
|
|
4
4
|
description: () => import("react/jsx-runtime").JSX.Element;
|
|
5
5
|
ssrName: string;
|
|
6
6
|
docLink: string;
|
|
7
7
|
type: boolean;
|
|
8
|
+
getValue: ({ commandLine }: {
|
|
9
|
+
commandLine: Record<string, unknown>;
|
|
10
|
+
}) => {
|
|
11
|
+
source: string;
|
|
12
|
+
value: boolean;
|
|
13
|
+
};
|
|
14
|
+
setConfig: () => void;
|
|
8
15
|
};
|
package/dist/options/mute.js
CHANGED
|
@@ -1,12 +1,36 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.mutedOption = void 0;
|
|
4
4
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
-
|
|
5
|
+
const DEFAULT_MUTED_STATE = false;
|
|
6
|
+
let mutedState = DEFAULT_MUTED_STATE;
|
|
7
|
+
const cliFlag = 'muted';
|
|
8
|
+
exports.mutedOption = {
|
|
6
9
|
name: 'Muted',
|
|
7
|
-
cliFlag
|
|
10
|
+
cliFlag,
|
|
8
11
|
description: () => (0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: "The Audio of the video will be omitted." }),
|
|
9
12
|
ssrName: 'muted',
|
|
10
13
|
docLink: 'https://www.remotion.dev/docs/using-audio/#muted-property',
|
|
11
14
|
type: false,
|
|
15
|
+
getValue: ({ commandLine }) => {
|
|
16
|
+
if (commandLine[cliFlag] !== undefined) {
|
|
17
|
+
return {
|
|
18
|
+
source: 'cli',
|
|
19
|
+
value: commandLine[cliFlag],
|
|
20
|
+
};
|
|
21
|
+
}
|
|
22
|
+
if (mutedState !== DEFAULT_MUTED_STATE) {
|
|
23
|
+
return {
|
|
24
|
+
source: 'config',
|
|
25
|
+
value: mutedState,
|
|
26
|
+
};
|
|
27
|
+
}
|
|
28
|
+
return {
|
|
29
|
+
source: 'config',
|
|
30
|
+
value: mutedState,
|
|
31
|
+
};
|
|
32
|
+
},
|
|
33
|
+
setConfig: () => {
|
|
34
|
+
mutedState = true;
|
|
35
|
+
},
|
|
12
36
|
};
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
export type NumberOfGifLoops = number | null;
|
|
1
2
|
export declare const numberOfGifLoopsOption: {
|
|
2
3
|
name: string;
|
|
3
4
|
cliFlag: "number-of-gif-loops";
|
|
@@ -5,4 +6,14 @@ export declare const numberOfGifLoopsOption: {
|
|
|
5
6
|
ssrName: "numberOfGifLoops";
|
|
6
7
|
docLink: string;
|
|
7
8
|
type: number | null;
|
|
9
|
+
getValue: ({ commandLine }: {
|
|
10
|
+
commandLine: Record<string, unknown>;
|
|
11
|
+
}) => {
|
|
12
|
+
value: number;
|
|
13
|
+
source: string;
|
|
14
|
+
} | {
|
|
15
|
+
value: null;
|
|
16
|
+
source: string;
|
|
17
|
+
};
|
|
18
|
+
setConfig: (newLoop: NumberOfGifLoops) => void;
|
|
8
19
|
};
|
|
@@ -2,13 +2,43 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.numberOfGifLoopsOption = void 0;
|
|
4
4
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
+
let currentLoop = null;
|
|
6
|
+
const validate = (newLoop) => {
|
|
7
|
+
if (newLoop !== null && typeof newLoop !== 'number') {
|
|
8
|
+
throw new Error('--number-of-gif-loops flag must be a number.');
|
|
9
|
+
}
|
|
10
|
+
};
|
|
11
|
+
const cliFlag = 'number-of-gif-loops';
|
|
5
12
|
exports.numberOfGifLoopsOption = {
|
|
6
13
|
name: 'Number of GIF loops',
|
|
7
|
-
cliFlag
|
|
14
|
+
cliFlag,
|
|
8
15
|
description: () => {
|
|
9
16
|
return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: ["Allows you to set the number of loops as follows:", (0, jsx_runtime_1.jsxs)("ul", { children: [(0, jsx_runtime_1.jsxs)("li", { children: [(0, jsx_runtime_1.jsx)("code", { children: "null" }), " (or omitting in the CLI) plays the GIF indefinitely."] }), (0, jsx_runtime_1.jsxs)("li", { children: [(0, jsx_runtime_1.jsx)("code", { children: "0" }), " disables looping"] }), (0, jsx_runtime_1.jsxs)("li", { children: [(0, jsx_runtime_1.jsx)("code", { children: "1" }), " loops the GIF once (plays twice in total)"] }), (0, jsx_runtime_1.jsxs)("li", { children: [(0, jsx_runtime_1.jsx)("code", { children: "2" }), " loops the GIF twice (plays three times in total) and so on."] })] })] }));
|
|
10
17
|
},
|
|
11
18
|
ssrName: 'numberOfGifLoops',
|
|
12
19
|
docLink: 'https://www.remotion.dev/docs/render-as-gif#changing-the-number-of-loops',
|
|
13
20
|
type: 0,
|
|
21
|
+
getValue: ({ commandLine }) => {
|
|
22
|
+
if (commandLine[cliFlag] !== undefined) {
|
|
23
|
+
validate(commandLine[cliFlag]);
|
|
24
|
+
return {
|
|
25
|
+
value: commandLine[cliFlag],
|
|
26
|
+
source: 'cli',
|
|
27
|
+
};
|
|
28
|
+
}
|
|
29
|
+
if (currentLoop !== null) {
|
|
30
|
+
return {
|
|
31
|
+
value: currentLoop,
|
|
32
|
+
source: 'config',
|
|
33
|
+
};
|
|
34
|
+
}
|
|
35
|
+
return {
|
|
36
|
+
value: null,
|
|
37
|
+
source: 'default',
|
|
38
|
+
};
|
|
39
|
+
},
|
|
40
|
+
setConfig: (newLoop) => {
|
|
41
|
+
validate(newLoop);
|
|
42
|
+
currentLoop = newLoop;
|
|
43
|
+
},
|
|
14
44
|
};
|
|
@@ -1,9 +1,20 @@
|
|
|
1
|
-
export declare const
|
|
1
|
+
export declare const getOffthreadVideoCacheSizeInBytes: () => number | null;
|
|
2
|
+
export declare const offthreadVideoCacheSizeInBytesOption: {
|
|
2
3
|
name: string;
|
|
3
4
|
cliFlag: "offthreadvideo-cache-size-in-bytes";
|
|
4
5
|
description: () => import("react/jsx-runtime").JSX.Element;
|
|
5
6
|
ssrName: "offthreadVideoCacheSizeInBytes";
|
|
6
7
|
docLink: string;
|
|
7
8
|
type: number | null;
|
|
9
|
+
getValue: ({ commandLine }: {
|
|
10
|
+
commandLine: Record<string, unknown>;
|
|
11
|
+
}) => {
|
|
12
|
+
source: string;
|
|
13
|
+
value: number;
|
|
14
|
+
} | {
|
|
15
|
+
source: string;
|
|
16
|
+
value: null;
|
|
17
|
+
};
|
|
18
|
+
setConfig: (size: number | null) => void;
|
|
8
19
|
};
|
|
9
20
|
export declare const validateOffthreadVideoCacheSizeInBytes: (option: unknown) => void;
|
|
@@ -1,14 +1,41 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.validateOffthreadVideoCacheSizeInBytes = exports.
|
|
3
|
+
exports.validateOffthreadVideoCacheSizeInBytes = exports.offthreadVideoCacheSizeInBytesOption = exports.getOffthreadVideoCacheSizeInBytes = void 0;
|
|
4
4
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
-
|
|
5
|
+
let offthreadVideoCacheSizeInBytes = null;
|
|
6
|
+
const getOffthreadVideoCacheSizeInBytes = () => {
|
|
7
|
+
return offthreadVideoCacheSizeInBytes;
|
|
8
|
+
};
|
|
9
|
+
exports.getOffthreadVideoCacheSizeInBytes = getOffthreadVideoCacheSizeInBytes;
|
|
10
|
+
const cliFlag = 'offthreadvideo-cache-size-in-bytes';
|
|
11
|
+
exports.offthreadVideoCacheSizeInBytesOption = {
|
|
6
12
|
name: 'OffthreadVideo cache size',
|
|
7
|
-
cliFlag
|
|
13
|
+
cliFlag,
|
|
8
14
|
description: () => ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: ["From v4.0, Remotion has a cache for", ' ', (0, jsx_runtime_1.jsx)("a", { href: "https://remotion.dev/docs/offthreadvideo", children: (0, jsx_runtime_1.jsx)("code", { children: "<OffthreadVideo>" }) }), ' ', "frames. The default is ", (0, jsx_runtime_1.jsx)("code", { children: "null" }), ", corresponding to half of the system memory available when the render starts.", (0, jsx_runtime_1.jsx)("br", {}), " This option allows to override the size of the cache. The higher it is, the faster the render will be, but the more memory will be used.", (0, jsx_runtime_1.jsx)("br", {}), "The used value will be printed when running in verbose mode.", (0, jsx_runtime_1.jsx)("br", {}), "Default: ", (0, jsx_runtime_1.jsx)("code", { children: "null" })] })),
|
|
9
15
|
ssrName: 'offthreadVideoCacheSizeInBytes',
|
|
10
16
|
docLink: 'https://www.remotion.dev/docs/offthreadvideo',
|
|
11
17
|
type: 0,
|
|
18
|
+
getValue: ({ commandLine }) => {
|
|
19
|
+
if (commandLine[cliFlag] !== undefined) {
|
|
20
|
+
return {
|
|
21
|
+
source: 'cli',
|
|
22
|
+
value: commandLine[cliFlag],
|
|
23
|
+
};
|
|
24
|
+
}
|
|
25
|
+
if (offthreadVideoCacheSizeInBytes !== null) {
|
|
26
|
+
return {
|
|
27
|
+
source: 'config',
|
|
28
|
+
value: offthreadVideoCacheSizeInBytes,
|
|
29
|
+
};
|
|
30
|
+
}
|
|
31
|
+
return {
|
|
32
|
+
source: 'default',
|
|
33
|
+
value: null,
|
|
34
|
+
};
|
|
35
|
+
},
|
|
36
|
+
setConfig: (size) => {
|
|
37
|
+
offthreadVideoCacheSizeInBytes = size !== null && size !== void 0 ? size : null;
|
|
38
|
+
},
|
|
12
39
|
};
|
|
13
40
|
const validateOffthreadVideoCacheSizeInBytes = (option) => {
|
|
14
41
|
if (option === undefined || option === null) {
|
package/dist/options/option.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type React from 'react';
|
|
2
|
+
import type { TypeOfOption } from '../client';
|
|
2
3
|
export type RemotionOption<SsrName extends string, Type> = {
|
|
3
4
|
name: string;
|
|
4
5
|
cliFlag: string;
|
|
@@ -6,8 +7,15 @@ export type RemotionOption<SsrName extends string, Type> = {
|
|
|
6
7
|
description: (mode: 'ssr' | 'cli') => React.ReactNode;
|
|
7
8
|
docLink: string;
|
|
8
9
|
type: Type;
|
|
10
|
+
getValue: (values: {
|
|
11
|
+
commandLine: Record<string, unknown>;
|
|
12
|
+
}, more?: any) => {
|
|
13
|
+
value: Type;
|
|
14
|
+
source: string;
|
|
15
|
+
};
|
|
16
|
+
setConfig: (value: Type) => void;
|
|
9
17
|
};
|
|
10
|
-
export type AnyRemotionOption = RemotionOption<string,
|
|
11
|
-
export type ToOptions<T extends Record<string, AnyRemotionOption
|
|
12
|
-
[K in keyof T]: T[K]
|
|
18
|
+
export type AnyRemotionOption<T> = RemotionOption<string, T>;
|
|
19
|
+
export type ToOptions<T extends Record<string, AnyRemotionOption<any>>> = {
|
|
20
|
+
[K in keyof T]: TypeOfOption<T[K]>;
|
|
13
21
|
};
|