@remotion/renderer 4.0.21 → 4.0.23
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/browser/Product.d.ts +16 -0
- package/dist/browser/Product.js +17 -0
- package/dist/browser/create-browser-fetcher.d.ts +17 -0
- package/dist/browser/create-browser-fetcher.js +58 -0
- package/dist/browser/revisions.d.ts +20 -0
- package/dist/browser/revisions.js +21 -0
- package/dist/calculate-sar-dar-pixels.d.ts +9 -0
- package/dist/calculate-sar-dar-pixels.js +19 -0
- package/dist/client.d.ts +155 -8
- package/dist/client.js +6 -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.d.ts +1 -1
- 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 +54 -29
- 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/logger.d.ts +1 -1
- package/dist/offthread-video-server.d.ts +2 -1
- package/dist/offthread-video-server.js +7 -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 +9 -3
- package/dist/render-media.js +12 -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 +4 -2
- package/dist/stitch-frames-to-video.js +4 -2
- 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 +7 -0
- package/dist/x264-preset.js +29 -0
- package/package.json +11 -12
|
@@ -100,7 +100,7 @@ const getAssetsData = async ({ assets, onDownload, fps, expectedFrames, logLevel
|
|
|
100
100
|
});
|
|
101
101
|
return outName;
|
|
102
102
|
};
|
|
103
|
-
const innerStitchFramesToVideo = async ({ assetsInfo, audioBitrate, audioCodec, cancelSignal, codec, crf, dir, enforceAudioTrack, ffmpegOverride, force, fps, height, indent, muted, onDownload, outputLocation, pixelFormat, preEncodedFileLocation, preferLossless, proResProfile, logLevel, videoBitrate, width, numberOfGifLoops, onProgress, }, remotionRoot) => {
|
|
103
|
+
const innerStitchFramesToVideo = async ({ assetsInfo, audioBitrate, audioCodec, cancelSignal, codec, crf, dir, enforceAudioTrack, ffmpegOverride, force, fps, height, indent, muted, onDownload, outputLocation, pixelFormat, preEncodedFileLocation, preferLossless, proResProfile, logLevel, videoBitrate, width, numberOfGifLoops, onProgress, x264Preset, }, remotionRoot) => {
|
|
104
104
|
var _a;
|
|
105
105
|
remotion_1.Internals.validateDimension(height, 'height', 'passed to `stitchFramesToVideo()`');
|
|
106
106
|
remotion_1.Internals.validateDimension(width, 'width', 'passed to `stitchFramesToVideo()`');
|
|
@@ -256,6 +256,7 @@ const innerStitchFramesToVideo = async ({ assetsInfo, audioBitrate, audioCodec,
|
|
|
256
256
|
codec,
|
|
257
257
|
}),
|
|
258
258
|
]),
|
|
259
|
+
x264Preset ? ['-preset', x264Preset] : null,
|
|
259
260
|
codec === 'h264' ? ['-movflags', 'faststart'] : null,
|
|
260
261
|
resolvedAudioCodec
|
|
261
262
|
? ['-c:a', (0, audio_codec_1.mapAudioCodecToFfmpegAudioCodecName)(resolvedAudioCodec)]
|
|
@@ -359,7 +360,7 @@ exports.internalStitchFramesToVideo = internalStitchFramesToVideo;
|
|
|
359
360
|
* @description Takes a series of images and audio information generated by renderFrames() and encodes it to a video.
|
|
360
361
|
* @see [Documentation](https://www.remotion.dev/docs/renderer/stitch-frames-to-video)
|
|
361
362
|
*/
|
|
362
|
-
const stitchFramesToVideo = ({ assetsInfo, force, fps, height, width, audioBitrate, audioCodec, cancelSignal, codec, crf, dir, enforceAudioTrack, ffmpegOverride, muted, numberOfGifLoops, onDownload, onProgress, outputLocation, pixelFormat, proResProfile, verbose, videoBitrate, }) => {
|
|
363
|
+
const stitchFramesToVideo = ({ assetsInfo, force, fps, height, width, audioBitrate, audioCodec, cancelSignal, codec, crf, dir, enforceAudioTrack, ffmpegOverride, muted, numberOfGifLoops, onDownload, onProgress, outputLocation, pixelFormat, proResProfile, verbose, videoBitrate, x264Preset, }) => {
|
|
363
364
|
return (0, exports.internalStitchFramesToVideo)({
|
|
364
365
|
assetsInfo,
|
|
365
366
|
audioBitrate: audioBitrate !== null && audioBitrate !== void 0 ? audioBitrate : null,
|
|
@@ -386,6 +387,7 @@ const stitchFramesToVideo = ({ assetsInfo, force, fps, height, width, audioBitra
|
|
|
386
387
|
width,
|
|
387
388
|
preEncodedFileLocation: null,
|
|
388
389
|
preferLossless: false,
|
|
390
|
+
x264Preset: x264Preset !== null && x264Preset !== void 0 ? x264Preset : null,
|
|
389
391
|
});
|
|
390
392
|
};
|
|
391
393
|
exports.stitchFramesToVideo = stitchFramesToVideo;
|
|
@@ -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;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { Codec } from './codec';
|
|
2
|
+
export declare const x264PresetOptions: readonly ["ultrafast", "superfast", "veryfast", "faster", "fast", "medium", "slow", "slower", "veryslow", "placebo"];
|
|
3
|
+
export type X264Preset = (typeof x264PresetOptions)[number];
|
|
4
|
+
export declare const validateSelectedCodecAndPresetCombination: ({ codec, x264Preset, }: {
|
|
5
|
+
codec: Codec;
|
|
6
|
+
x264Preset: X264Preset | undefined;
|
|
7
|
+
}) => void;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.validateSelectedCodecAndPresetCombination = exports.x264PresetOptions = void 0;
|
|
4
|
+
exports.x264PresetOptions = [
|
|
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, x264Preset, }) => {
|
|
17
|
+
if (typeof x264Preset !== 'undefined' &&
|
|
18
|
+
codec !== 'h264' &&
|
|
19
|
+
codec !== 'h264-mkv') {
|
|
20
|
+
throw new TypeError(`You have set a x264 preset but the codec is "${codec}". Set the codec to "h264" or remove the Preset profile.`);
|
|
21
|
+
}
|
|
22
|
+
if (x264Preset !== undefined &&
|
|
23
|
+
!exports.x264PresetOptions.includes(x264Preset)) {
|
|
24
|
+
throw new TypeError(`The Preset profile "${x264Preset}" is not valid. Valid options are ${exports.x264PresetOptions
|
|
25
|
+
.map((p) => `"${p}"`)
|
|
26
|
+
.join(', ')}`);
|
|
27
|
+
}
|
|
28
|
+
};
|
|
29
|
+
exports.validateSelectedCodecAndPresetCombination = validateSelectedCodecAndPresetCombination;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@remotion/renderer",
|
|
3
|
-
"version": "4.0.
|
|
3
|
+
"version": "4.0.23",
|
|
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.23"
|
|
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-darwin-
|
|
46
|
-
"@remotion/compositor-linux-
|
|
47
|
-
"@remotion/compositor-
|
|
48
|
-
"@remotion/compositor-
|
|
49
|
-
"@remotion/compositor-linux-
|
|
50
|
-
"@remotion/compositor-linux-x64-
|
|
43
|
+
"@remotion/compositor-darwin-x64": "4.0.23",
|
|
44
|
+
"@remotion/compositor-darwin-arm64": "4.0.23",
|
|
45
|
+
"@remotion/compositor-linux-x64-musl": "4.0.23",
|
|
46
|
+
"@remotion/compositor-win32-x64-msvc": "4.0.23",
|
|
47
|
+
"@remotion/compositor-linux-arm64-gnu": "4.0.23",
|
|
48
|
+
"@remotion/compositor-linux-arm64-musl": "4.0.23",
|
|
49
|
+
"@remotion/compositor-linux-x64-gnu": "4.0.23"
|
|
51
50
|
},
|
|
52
51
|
"keywords": [
|
|
53
52
|
"remotion",
|