@remotion/renderer 4.0.22 → 4.0.24
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/.prettierignore +2 -0
- package/dist/assets/get-video-stream-duration.d.ts +9 -0
- package/dist/assets/get-video-stream-duration.js +71 -0
- package/dist/audio-codec.d.ts +3 -3
- package/dist/calculate-sar-dar-pixels.d.ts +9 -0
- package/dist/calculate-sar-dar-pixels.js +19 -0
- package/dist/client.d.ts +154 -8
- package/dist/client.js +4 -0
- package/dist/codec.d.ts +1 -1
- package/dist/compositor/compositor.d.ts +2 -2
- package/dist/compositor/compositor.js +22 -19
- package/dist/compositor/payloads.d.ts +2 -2
- package/dist/copy-to-clipboard.js +1 -1
- package/dist/create-ffmpeg-complex-filter.d.ts +4 -1
- package/dist/determine-resize-params.d.ts +4 -0
- package/dist/determine-resize-params.js +10 -0
- package/dist/determine-vcodec-ffmpeg-flags.d.ts +2 -0
- package/dist/determine-vcodec-ffmpeg-flags.js +13 -0
- package/dist/ensure-ffmpeg.d.ts +18 -0
- package/dist/ensure-ffmpeg.js +58 -0
- package/dist/ensure-presentation-timestamp.d.ts +15 -0
- package/dist/ensure-presentation-timestamp.js +88 -0
- package/dist/extract-frame-from-video.d.ts +16 -0
- package/dist/extract-frame-from-video.js +191 -0
- package/dist/ffmpeg-executable.d.ts +1 -0
- package/dist/ffmpeg-executable.js +2 -0
- package/dist/ffmpeg-flags.d.ts +31 -0
- package/dist/ffmpeg-flags.js +245 -0
- package/dist/file-extensions.d.ts +1 -1
- package/dist/format-logs.js +3 -1
- package/dist/frame-to-ffmpeg-timestamp.d.ts +1 -0
- package/dist/frame-to-ffmpeg-timestamp.js +8 -0
- package/dist/get-can-extract-frames-fast.d.ts +14 -0
- package/dist/get-can-extract-frames-fast.js +71 -0
- package/dist/get-compositions.d.ts +5 -2
- package/dist/get-compositions.js +4 -1
- package/dist/get-extension-from-codec.js +1 -2
- package/dist/get-frame-of-video-slow.d.ts +17 -0
- package/dist/get-frame-of-video-slow.js +72 -0
- package/dist/get-silent-parts.js +1 -1
- package/dist/get-video-info.d.ts +8 -0
- package/dist/get-video-info.js +59 -0
- package/dist/get-video-metadata.js +1 -1
- package/dist/image-format.d.ts +2 -2
- package/dist/index.d.ts +38 -14
- package/dist/is-beyond-last-frame.d.ts +3 -0
- package/dist/is-beyond-last-frame.js +12 -0
- package/dist/last-frame-from-video-cache.d.ts +17 -0
- package/dist/last-frame-from-video-cache.js +55 -0
- package/dist/legacy-webpack-config.d.ts +9 -0
- package/dist/legacy-webpack-config.js +13 -0
- package/dist/log-level.d.ts +1 -1
- package/dist/offthread-video-server.d.ts +2 -1
- package/dist/offthread-video-server.js +4 -2
- package/dist/open-browser.d.ts +1 -1
- package/dist/options/audio-bitrate.d.ts +8 -2
- package/dist/options/audio-bitrate.js +1 -0
- package/dist/options/crf.d.ts +8 -2
- package/dist/options/crf.js +1 -0
- package/dist/options/enforce-audio.d.ts +8 -2
- package/dist/options/enforce-audio.js +1 -0
- package/dist/options/jpeg-quality.d.ts +8 -2
- package/dist/options/jpeg-quality.js +1 -0
- package/dist/options/mute.d.ts +8 -2
- package/dist/options/mute.js +1 -0
- package/dist/options/offthreadvideo-cache-size.d.ts +9 -0
- package/dist/options/offthreadvideo-cache-size.js +33 -0
- package/dist/options/option.d.ts +7 -2
- package/dist/options/options-map.d.ts +82 -0
- package/dist/options/options-map.js +16 -0
- package/dist/options/scale.d.ts +8 -2
- package/dist/options/scale.js +1 -0
- package/dist/options/video-bitrate.d.ts +8 -2
- package/dist/options/video-bitrate.js +1 -0
- package/dist/options/video-codec.d.ts +8 -2
- package/dist/options/video-codec.js +1 -0
- package/dist/pixel-format.d.ts +1 -1
- package/dist/prepare-server.d.ts +2 -1
- package/dist/prepare-server.js +3 -1
- package/dist/prores-profile.d.ts +1 -1
- package/dist/provide-screenshot.d.ts +0 -1
- package/dist/puppeteer-screenshot.d.ts +0 -1
- package/dist/quality.d.ts +1 -0
- package/dist/quality.js +21 -0
- package/dist/render-frames.d.ts +5 -2
- package/dist/render-frames.js +4 -2
- package/dist/render-media.d.ts +6 -3
- package/dist/render-media.js +5 -2
- package/dist/render-still.d.ts +5 -1
- package/dist/render-still.js +3 -1
- package/dist/screenshot-dom-element.d.ts +0 -1
- package/dist/screenshot-task.d.ts +0 -1
- package/dist/select-composition.d.ts +4 -1
- package/dist/select-composition.js +5 -1
- package/dist/serve-static.d.ts +1 -0
- package/dist/serve-static.js +1 -0
- package/dist/stitch-frames-to-video.d.ts +0 -1
- package/dist/take-frame-and-compose.d.ts +0 -1
- package/dist/try-to-extract-frame-of-video-fast.d.ts +12 -0
- package/dist/try-to-extract-frame-of-video-fast.js +55 -0
- package/dist/validate-ffmpeg.d.ts +7 -0
- package/dist/validate-ffmpeg.js +77 -0
- package/dist/validate-opengl-renderer.d.ts +1 -1
- package/dist/warn-about-ffmpeg-version.d.ts +5 -0
- package/dist/warn-about-ffmpeg-version.js +37 -0
- package/dist/x264-preset.d.ts +1 -1
- package/package.json +11 -12
- package/dist/presets-profile.d.ts +0 -7
- package/dist/presets-profile.js +0 -27
|
@@ -4,6 +4,8 @@ import type { BrowserLog } from './browser-log';
|
|
|
4
4
|
import type { HeadlessBrowser } from './browser/Browser';
|
|
5
5
|
import { type LogLevel } from './log-level';
|
|
6
6
|
import type { ChromiumOptions } from './open-browser';
|
|
7
|
+
import type { ToOptions } from './options/option';
|
|
8
|
+
import type { optionsMap } from './options/options-map';
|
|
7
9
|
import type { RemotionServer } from './prepare-server';
|
|
8
10
|
type InternalSelectCompositionsConfig = {
|
|
9
11
|
serializedInputPropsWithCustomSchema: string;
|
|
@@ -19,7 +21,7 @@ type InternalSelectCompositionsConfig = {
|
|
|
19
21
|
logLevel: LogLevel;
|
|
20
22
|
serveUrl: string;
|
|
21
23
|
id: string;
|
|
22
|
-
}
|
|
24
|
+
} & ToOptions<typeof optionsMap.renderStill>;
|
|
23
25
|
export type SelectCompositionOptions = {
|
|
24
26
|
inputProps?: Record<string, unknown> | null;
|
|
25
27
|
envVariables?: Record<string, string>;
|
|
@@ -30,6 +32,7 @@ export type SelectCompositionOptions = {
|
|
|
30
32
|
chromiumOptions?: ChromiumOptions;
|
|
31
33
|
port?: number | null;
|
|
32
34
|
verbose?: boolean;
|
|
35
|
+
offthreadVideoCacheSizeInBytes?: number | null;
|
|
33
36
|
serveUrl: string;
|
|
34
37
|
id: string;
|
|
35
38
|
};
|
|
@@ -84,7 +84,7 @@ const innerSelectComposition = async ({ page, onBrowserLog, serializedInputProps
|
|
|
84
84
|
};
|
|
85
85
|
const internalSelectComposition = async (options) => {
|
|
86
86
|
const cleanup = [];
|
|
87
|
-
const { puppeteerInstance, browserExecutable, chromiumOptions, serveUrl: serveUrlOrWebpackUrl, logLevel, indent, port, envVariables, id, serializedInputPropsWithCustomSchema, onBrowserLog, server, timeoutInMilliseconds, } = options;
|
|
87
|
+
const { puppeteerInstance, browserExecutable, chromiumOptions, serveUrl: serveUrlOrWebpackUrl, logLevel, indent, port, envVariables, id, serializedInputPropsWithCustomSchema, onBrowserLog, server, timeoutInMilliseconds, offthreadVideoCacheSizeInBytes, } = options;
|
|
88
88
|
const { page, cleanup: cleanupPage } = await (0, get_browser_instance_1.getPageAndCleanupFn)({
|
|
89
89
|
passedInInstance: puppeteerInstance,
|
|
90
90
|
browserExecutable,
|
|
@@ -109,6 +109,7 @@ const internalSelectComposition = async (options) => {
|
|
|
109
109
|
concurrency: 1,
|
|
110
110
|
logLevel,
|
|
111
111
|
indent,
|
|
112
|
+
offthreadVideoCacheSizeInBytes,
|
|
112
113
|
}, {
|
|
113
114
|
onDownload: () => undefined,
|
|
114
115
|
onError,
|
|
@@ -131,6 +132,7 @@ const internalSelectComposition = async (options) => {
|
|
|
131
132
|
indent,
|
|
132
133
|
puppeteerInstance,
|
|
133
134
|
server,
|
|
135
|
+
offthreadVideoCacheSizeInBytes,
|
|
134
136
|
});
|
|
135
137
|
})
|
|
136
138
|
.then((data) => {
|
|
@@ -152,6 +154,7 @@ exports.internalSelectComposition = internalSelectComposition;
|
|
|
152
154
|
* @see [Documentation](https://www.remotion.dev/docs/renderer/select-composition)
|
|
153
155
|
*/
|
|
154
156
|
const selectComposition = async (options) => {
|
|
157
|
+
var _a;
|
|
155
158
|
const { id, serveUrl, browserExecutable, chromiumOptions, envVariables, inputProps, onBrowserLog, port, puppeteerInstance, timeoutInMilliseconds, verbose, } = options;
|
|
156
159
|
const data = await (0, exports.internalSelectComposition)({
|
|
157
160
|
id,
|
|
@@ -171,6 +174,7 @@ const selectComposition = async (options) => {
|
|
|
171
174
|
logLevel: verbose ? 'verbose' : 'info',
|
|
172
175
|
indent: false,
|
|
173
176
|
server: undefined,
|
|
177
|
+
offthreadVideoCacheSizeInBytes: (_a = options.offthreadVideoCacheSizeInBytes) !== null && _a !== void 0 ? _a : null,
|
|
174
178
|
});
|
|
175
179
|
return data.metadata;
|
|
176
180
|
};
|
package/dist/serve-static.d.ts
CHANGED
package/dist/serve-static.js
CHANGED
|
@@ -14,6 +14,7 @@ const serveStatic = async (path, options) => {
|
|
|
14
14
|
concurrency: options.concurrency,
|
|
15
15
|
logLevel: options.logLevel,
|
|
16
16
|
indent: options.indent,
|
|
17
|
+
offthreadVideoCacheSizeInBytes: options.offthreadVideoCacheSizeInBytes,
|
|
17
18
|
});
|
|
18
19
|
const connections = {};
|
|
19
20
|
const server = node_http_1.default.createServer((request, response) => {
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { OffthreadVideoImageFormat } from 'remotion';
|
|
2
|
+
import type { NeedsResize, SpecialVCodecForTransparency } from './assets/download-map';
|
|
3
|
+
import type { FfmpegExecutable } from './ffmpeg-executable';
|
|
4
|
+
export declare const tryToExtractFrameOfVideoFast: ({ ffmpegExecutable, remotionRoot, specialVCodecForTransparency, imageFormat, needsResize, src, actualOffset, }: {
|
|
5
|
+
ffmpegExecutable: FfmpegExecutable;
|
|
6
|
+
remotionRoot: string;
|
|
7
|
+
imageFormat: OffthreadVideoImageFormat;
|
|
8
|
+
needsResize: NeedsResize;
|
|
9
|
+
src: string;
|
|
10
|
+
specialVCodecForTransparency: SpecialVCodecForTransparency;
|
|
11
|
+
actualOffset: string;
|
|
12
|
+
}) => Promise<readonly [string, Buffer]>;
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.tryToExtractFrameOfVideoFast = void 0;
|
|
7
|
+
const execa_1 = __importDefault(require("execa"));
|
|
8
|
+
const determine_resize_params_1 = require("./determine-resize-params");
|
|
9
|
+
const determine_vcodec_ffmpeg_flags_1 = require("./determine-vcodec-ffmpeg-flags");
|
|
10
|
+
const ffmpeg_flags_1 = require("./ffmpeg-flags");
|
|
11
|
+
const truthy_1 = require("./truthy");
|
|
12
|
+
const tryToExtractFrameOfVideoFast = async ({ ffmpegExecutable, remotionRoot, specialVCodecForTransparency, imageFormat, needsResize, src, actualOffset, }) => {
|
|
13
|
+
const { stdout, stderr } = (0, execa_1.default)(await (0, ffmpeg_flags_1.getExecutableBinary)(ffmpegExecutable, remotionRoot, 'ffmpeg'), [
|
|
14
|
+
'-ss',
|
|
15
|
+
actualOffset,
|
|
16
|
+
...(0, determine_vcodec_ffmpeg_flags_1.determineVcodecFfmpegFlags)(specialVCodecForTransparency),
|
|
17
|
+
'-i',
|
|
18
|
+
src,
|
|
19
|
+
'-frames:v',
|
|
20
|
+
'1',
|
|
21
|
+
'-c:v',
|
|
22
|
+
imageFormat === 'jpeg' ? 'mjpeg' : 'png',
|
|
23
|
+
'-f',
|
|
24
|
+
'image2pipe',
|
|
25
|
+
...(0, determine_resize_params_1.determineResizeParams)(needsResize),
|
|
26
|
+
'-',
|
|
27
|
+
].filter(truthy_1.truthy));
|
|
28
|
+
if (!stderr) {
|
|
29
|
+
throw new Error('unexpectedly did not get stderr');
|
|
30
|
+
}
|
|
31
|
+
if (!stdout) {
|
|
32
|
+
throw new Error('unexpectedly did not get stdout');
|
|
33
|
+
}
|
|
34
|
+
const stderrChunks = [];
|
|
35
|
+
const stdoutChunks = [];
|
|
36
|
+
const stdErrString = new Promise((resolve, reject) => {
|
|
37
|
+
stderr.on('data', (d) => stderrChunks.push(d));
|
|
38
|
+
stderr.on('error', (err) => reject(err));
|
|
39
|
+
stderr.on('end', () => resolve(Buffer.concat(stderrChunks).toString('utf-8')));
|
|
40
|
+
});
|
|
41
|
+
const stdoutChunk = new Promise((resolve, reject) => {
|
|
42
|
+
stdout.on('data', (d) => {
|
|
43
|
+
stdoutChunks.push(d);
|
|
44
|
+
});
|
|
45
|
+
stdout.on('error', (err) => {
|
|
46
|
+
reject(err);
|
|
47
|
+
});
|
|
48
|
+
stdout.on('end', () => {
|
|
49
|
+
resolve(Buffer.concat(stdoutChunks));
|
|
50
|
+
});
|
|
51
|
+
});
|
|
52
|
+
const [stdErr, stdoutBuffer] = await Promise.all([stdErrString, stdoutChunk]);
|
|
53
|
+
return [stdErr, stdoutBuffer];
|
|
54
|
+
};
|
|
55
|
+
exports.tryToExtractFrameOfVideoFast = tryToExtractFrameOfVideoFast;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export declare const customExecutableExists: (localExecutable: string) => boolean;
|
|
2
|
+
export declare const binaryExists: (name: 'ffmpeg' | 'ffprobe') => boolean;
|
|
3
|
+
export declare const checkAndValidateFfmpegVersion: (options: {
|
|
4
|
+
ffmpegExecutable: string | null;
|
|
5
|
+
remotionRoot: string;
|
|
6
|
+
}) => Promise<void>;
|
|
7
|
+
export declare const validateFfmpeg: (customFfmpegBinary: string | null, remotionRoot: string, binary: 'ffmpeg' | 'ffprobe') => Promise<void>;
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.validateFfmpeg = exports.checkAndValidateFfmpegVersion = exports.binaryExists = exports.customExecutableExists = void 0;
|
|
7
|
+
const execa_1 = __importDefault(require("execa"));
|
|
8
|
+
const fs_1 = require("fs");
|
|
9
|
+
const os_1 = __importDefault(require("os"));
|
|
10
|
+
const ffmpeg_flags_1 = require("./ffmpeg-flags");
|
|
11
|
+
const warn_about_ffmpeg_version_1 = require("./warn-about-ffmpeg-version");
|
|
12
|
+
const existsMap = {};
|
|
13
|
+
const customExecutableExists = (localExecutable) => {
|
|
14
|
+
try {
|
|
15
|
+
(0, fs_1.statSync)(localExecutable);
|
|
16
|
+
existsMap[localExecutable] = true;
|
|
17
|
+
}
|
|
18
|
+
catch (err) {
|
|
19
|
+
existsMap[localExecutable] = false;
|
|
20
|
+
}
|
|
21
|
+
return existsMap[localExecutable];
|
|
22
|
+
};
|
|
23
|
+
exports.customExecutableExists = customExecutableExists;
|
|
24
|
+
const binaryExists = (name) => {
|
|
25
|
+
if (typeof existsMap[name] !== 'undefined') {
|
|
26
|
+
return existsMap[name];
|
|
27
|
+
}
|
|
28
|
+
const isWin = os_1.default.platform() === 'win32';
|
|
29
|
+
const where = isWin ? 'where' : 'which';
|
|
30
|
+
try {
|
|
31
|
+
execa_1.default.sync(where, [name]);
|
|
32
|
+
existsMap[name] = true;
|
|
33
|
+
return true;
|
|
34
|
+
}
|
|
35
|
+
catch (err) {
|
|
36
|
+
existsMap[name] = false;
|
|
37
|
+
return false;
|
|
38
|
+
}
|
|
39
|
+
};
|
|
40
|
+
exports.binaryExists = binaryExists;
|
|
41
|
+
const checkAndValidateFfmpegVersion = async (options) => {
|
|
42
|
+
const ffmpegVersion = await (0, ffmpeg_flags_1.getFfmpegVersion)({
|
|
43
|
+
ffmpegExecutable: options.ffmpegExecutable,
|
|
44
|
+
remotionRoot: options.remotionRoot,
|
|
45
|
+
});
|
|
46
|
+
const buildConf = await (0, ffmpeg_flags_1.getFfmpegBuildInfo)({
|
|
47
|
+
ffmpegExecutable: options.ffmpegExecutable,
|
|
48
|
+
remotionRoot: options.remotionRoot,
|
|
49
|
+
});
|
|
50
|
+
(0, warn_about_ffmpeg_version_1.warnAboutFfmpegVersion)({ ffmpegVersion, buildConf });
|
|
51
|
+
};
|
|
52
|
+
exports.checkAndValidateFfmpegVersion = checkAndValidateFfmpegVersion;
|
|
53
|
+
const validateFfmpeg = async (customFfmpegBinary, remotionRoot, binary) => {
|
|
54
|
+
const ffmpegExists = (0, exports.binaryExists)(binary);
|
|
55
|
+
if (ffmpegExists) {
|
|
56
|
+
return;
|
|
57
|
+
}
|
|
58
|
+
if (customFfmpegBinary) {
|
|
59
|
+
if (!(0, exports.customExecutableExists)(customFfmpegBinary)) {
|
|
60
|
+
throw new Error('Custom FFmpeg executable not found: ' + customFfmpegBinary);
|
|
61
|
+
}
|
|
62
|
+
return;
|
|
63
|
+
}
|
|
64
|
+
if (process.platform === 'linux' && (0, fs_1.existsSync)(ffmpeg_flags_1.lambdaFfmpegPaths[binary])) {
|
|
65
|
+
return;
|
|
66
|
+
}
|
|
67
|
+
if ((0, ffmpeg_flags_1.ffmpegInNodeModules)(remotionRoot, binary)) {
|
|
68
|
+
return;
|
|
69
|
+
}
|
|
70
|
+
const binaryUrl = (0, ffmpeg_flags_1.getBinaryDownloadUrl)(binary);
|
|
71
|
+
if (binaryUrl) {
|
|
72
|
+
await (0, ffmpeg_flags_1.downloadBinary)(remotionRoot, binaryUrl.url, binary);
|
|
73
|
+
return (0, exports.validateFfmpeg)(customFfmpegBinary, remotionRoot, binary);
|
|
74
|
+
}
|
|
75
|
+
throw new Error(`${binary} could not be installed automatically. Your architecture and OS combination (os = ${os_1.default.platform()}, arch = ${process.arch}) is not supported. Please install ${binary} manually and add "${binary}" to your PATH.`);
|
|
76
|
+
};
|
|
77
|
+
exports.validateFfmpeg = validateFfmpeg;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
export declare const validOpenGlRenderers: readonly ["swangle", "angle", "egl", "swiftshader"];
|
|
2
|
-
export type OpenGlRenderer = typeof validOpenGlRenderers[number];
|
|
2
|
+
export type OpenGlRenderer = (typeof validOpenGlRenderers)[number];
|
|
3
3
|
export declare const DEFAULT_OPENGL_RENDERER: OpenGlRenderer | null;
|
|
4
4
|
export declare const validateOpenGlRenderer: (option: OpenGlRenderer | null) => OpenGlRenderer | null;
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.warnAboutFfmpegVersion = void 0;
|
|
4
|
+
const printMessage = (ffmpegVersion) => {
|
|
5
|
+
console.warn('⚠️Old FFMPEG version detected: ' + ffmpegVersion.join('.'));
|
|
6
|
+
console.warn(' For audio support, you need at least version 4.1.0.');
|
|
7
|
+
console.warn(' Upgrade FFMPEG to get rid of this warning.');
|
|
8
|
+
};
|
|
9
|
+
const printBuildConfMessage = () => {
|
|
10
|
+
console.error('⚠️ Unsupported FFMPEG version detected.');
|
|
11
|
+
console.error(" Your version doesn't support the -buildconf flag");
|
|
12
|
+
console.error(' Audio will not be supported and you may experience other issues.');
|
|
13
|
+
console.error(' Upgrade FFMPEG to at least v4.1.0 to get rid of this warning.');
|
|
14
|
+
};
|
|
15
|
+
const warnAboutFfmpegVersion = ({ ffmpegVersion, buildConf, }) => {
|
|
16
|
+
if (buildConf === null) {
|
|
17
|
+
printBuildConfMessage();
|
|
18
|
+
return;
|
|
19
|
+
}
|
|
20
|
+
if (ffmpegVersion === null) {
|
|
21
|
+
return null;
|
|
22
|
+
}
|
|
23
|
+
const [major, minor] = ffmpegVersion;
|
|
24
|
+
// 3.x and below definitely is too old
|
|
25
|
+
if (major < 4) {
|
|
26
|
+
printMessage(ffmpegVersion);
|
|
27
|
+
return;
|
|
28
|
+
}
|
|
29
|
+
// 5.x will be all good
|
|
30
|
+
if (major > 4) {
|
|
31
|
+
return;
|
|
32
|
+
}
|
|
33
|
+
if (minor < 1) {
|
|
34
|
+
printMessage(ffmpegVersion);
|
|
35
|
+
}
|
|
36
|
+
};
|
|
37
|
+
exports.warnAboutFfmpegVersion = warnAboutFfmpegVersion;
|
package/dist/x264-preset.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { Codec } from './codec';
|
|
2
2
|
export declare const x264PresetOptions: readonly ["ultrafast", "superfast", "veryfast", "faster", "fast", "medium", "slow", "slower", "veryslow", "placebo"];
|
|
3
|
-
export type X264Preset = typeof x264PresetOptions[number];
|
|
3
|
+
export type X264Preset = (typeof x264PresetOptions)[number];
|
|
4
4
|
export declare const validateSelectedCodecAndPresetCombination: ({ codec, x264Preset, }: {
|
|
5
5
|
codec: Codec;
|
|
6
6
|
x264Preset: X264Preset | undefined;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@remotion/renderer",
|
|
3
|
-
"version": "4.0.
|
|
3
|
+
"version": "4.0.24",
|
|
4
4
|
"description": "Renderer for Remotion",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
"extract-zip": "2.0.1",
|
|
19
19
|
"source-map": "^0.8.0-beta.0",
|
|
20
20
|
"ws": "8.7.0",
|
|
21
|
-
"remotion": "4.0.
|
|
21
|
+
"remotion": "4.0.24"
|
|
22
22
|
},
|
|
23
23
|
"peerDependencies": {
|
|
24
24
|
"react": ">=16.8.0",
|
|
@@ -33,21 +33,20 @@
|
|
|
33
33
|
"@types/react": "18.0.26",
|
|
34
34
|
"@types/react-dom": "18.0.10",
|
|
35
35
|
"eslint": "8.42.0",
|
|
36
|
-
"prettier": "
|
|
36
|
+
"prettier": "3.0.2",
|
|
37
37
|
"prettier-plugin-organize-imports": "^3.2.2",
|
|
38
38
|
"react": "18.0.0",
|
|
39
39
|
"react-dom": "18.0.0",
|
|
40
|
-
"vitest": "0.31.1"
|
|
41
|
-
"zod": "^3.21.4"
|
|
40
|
+
"vitest": "0.31.1"
|
|
42
41
|
},
|
|
43
42
|
"optionalDependencies": {
|
|
44
|
-
"@remotion/compositor-darwin-
|
|
45
|
-
"@remotion/compositor-
|
|
46
|
-
"@remotion/compositor-
|
|
47
|
-
"@remotion/compositor-linux-arm64-musl": "4.0.
|
|
48
|
-
"@remotion/compositor-linux-x64-gnu": "4.0.
|
|
49
|
-
"@remotion/compositor-linux-x64-musl": "4.0.
|
|
50
|
-
"@remotion/compositor-win32-x64-msvc": "4.0.
|
|
43
|
+
"@remotion/compositor-darwin-arm64": "4.0.24",
|
|
44
|
+
"@remotion/compositor-darwin-x64": "4.0.24",
|
|
45
|
+
"@remotion/compositor-linux-arm64-gnu": "4.0.24",
|
|
46
|
+
"@remotion/compositor-linux-arm64-musl": "4.0.24",
|
|
47
|
+
"@remotion/compositor-linux-x64-gnu": "4.0.24",
|
|
48
|
+
"@remotion/compositor-linux-x64-musl": "4.0.24",
|
|
49
|
+
"@remotion/compositor-win32-x64-msvc": "4.0.24"
|
|
51
50
|
},
|
|
52
51
|
"keywords": [
|
|
53
52
|
"remotion",
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import type { Codec } from './codec';
|
|
2
|
-
export declare const presetsProfileOptions: readonly ["ultrafast", "superfast", "veryfast", "faster", "fast", "medium", "slow", "slower", "veryslow", "placebo"];
|
|
3
|
-
export type PresetsProfile = typeof presetsProfileOptions[number];
|
|
4
|
-
export declare const validateSelectedCodecAndPresetCombination: ({ codec, presetsProfile, }: {
|
|
5
|
-
codec: Codec;
|
|
6
|
-
presetsProfile: PresetsProfile | undefined;
|
|
7
|
-
}) => void;
|
package/dist/presets-profile.js
DELETED
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.validateSelectedCodecAndPresetCombination = exports.presetsProfileOptions = void 0;
|
|
4
|
-
exports.presetsProfileOptions = [
|
|
5
|
-
'ultrafast',
|
|
6
|
-
'superfast',
|
|
7
|
-
'veryfast',
|
|
8
|
-
'faster',
|
|
9
|
-
'fast',
|
|
10
|
-
'medium',
|
|
11
|
-
'slow',
|
|
12
|
-
'slower',
|
|
13
|
-
'veryslow',
|
|
14
|
-
'placebo',
|
|
15
|
-
];
|
|
16
|
-
const validateSelectedCodecAndPresetCombination = ({ codec, presetsProfile, }) => {
|
|
17
|
-
if (typeof presetsProfile !== 'undefined' && codec !== 'h264') {
|
|
18
|
-
throw new TypeError(`You have set a Preset profile but the codec is "${codec}". Set the codec to "h264" or remove the Preset profile.`);
|
|
19
|
-
}
|
|
20
|
-
if (presetsProfile !== undefined &&
|
|
21
|
-
!exports.presetsProfileOptions.includes(presetsProfile)) {
|
|
22
|
-
throw new TypeError(`The Preset profile "${presetsProfile}" is not valid. Valid options are ${exports.presetsProfileOptions
|
|
23
|
-
.map((p) => `"${p}"`)
|
|
24
|
-
.join(', ')}`);
|
|
25
|
-
}
|
|
26
|
-
};
|
|
27
|
-
exports.validateSelectedCodecAndPresetCombination = validateSelectedCodecAndPresetCombination;
|