@remotion/renderer 3.3.91 → 3.3.93
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/index.d.ts +1 -1
- package/dist/render-still.d.ts +2 -0
- package/dist/render-still.js +12 -1
- package/package.json +9 -9
- package/dist/browser/is-target-closed-err.d.ts +0 -1
- package/dist/browser/is-target-closed-err.js +0 -9
- package/dist/call-ffmpeg.d.ts +0 -14
- package/dist/call-ffmpeg.js +0 -37
- package/dist/compositor/compositor.d.ts +0 -12
- package/dist/compositor/compositor.js +0 -202
- package/dist/compositor/make-nonce.d.ts +0 -1
- package/dist/compositor/make-nonce.js +0 -8
- package/dist/jpeg-quality.d.ts +0 -1
- package/dist/jpeg-quality.js +0 -21
- package/dist/options/audio-bitrate.d.ts +0 -2
- package/dist/options/audio-bitrate.js +0 -11
- package/dist/options/crf.d.ts +0 -2
- package/dist/options/crf.js +0 -11
- package/dist/options/enforce-audio.d.ts +0 -2
- package/dist/options/enforce-audio.js +0 -11
- package/dist/options/jpeg-quality.d.ts +0 -2
- package/dist/options/jpeg-quality.js +0 -11
- package/dist/options/mute.d.ts +0 -2
- package/dist/options/mute.js +0 -11
- package/dist/options/option.d.ts +0 -8
- package/dist/options/option.js +0 -2
- package/dist/options/scale.d.ts +0 -2
- package/dist/options/scale.js +0 -11
- package/dist/options/video-bitrate.d.ts +0 -2
- package/dist/options/video-bitrate.js +0 -11
- package/dist/options/video-codec.d.ts +0 -2
- package/dist/options/video-codec.js +0 -11
package/dist/index.d.ts
CHANGED
|
@@ -129,7 +129,7 @@ export declare const RenderInternals: {
|
|
|
129
129
|
DEFAULT_CODEC: "h264" | "h265" | "vp8" | "vp9" | "mp3" | "aac" | "wav" | "prores" | "h264-mkv" | "gif";
|
|
130
130
|
isAudioCodec: (codec: "h264" | "h265" | "vp8" | "vp9" | "mp3" | "aac" | "wav" | "prores" | "h264-mkv" | "gif" | undefined) => boolean;
|
|
131
131
|
logLevels: readonly ["verbose", "info", "warn", "error"];
|
|
132
|
-
isEqualOrBelowLogLevel: (currentLevel: "
|
|
132
|
+
isEqualOrBelowLogLevel: (currentLevel: "error" | "verbose" | "info" | "warn", level: "error" | "verbose" | "info" | "warn") => boolean;
|
|
133
133
|
isValidLogLevel: (level: string) => boolean;
|
|
134
134
|
perf: typeof perf;
|
|
135
135
|
makeDownloadMap: () => import("./assets/download-map").DownloadMap;
|
package/dist/render-still.d.ts
CHANGED
|
@@ -3,6 +3,7 @@ import type { SmallTCompMetadata } from 'remotion';
|
|
|
3
3
|
import type { RenderMediaOnDownload } from './assets/download-and-map-assets-to-file';
|
|
4
4
|
import type { DownloadMap } from './assets/download-map';
|
|
5
5
|
import type { BrowserExecutable } from './browser-executable';
|
|
6
|
+
import type { BrowserLog } from './browser-log';
|
|
6
7
|
import type { Browser as PuppeteerBrowser } from './browser/Browser';
|
|
7
8
|
import type { FfmpegExecutable } from './ffmpeg-executable';
|
|
8
9
|
import type { StillImageFormat } from './image-format';
|
|
@@ -21,6 +22,7 @@ declare type InnerStillOptions = {
|
|
|
21
22
|
envVariables?: Record<string, string>;
|
|
22
23
|
overwrite?: boolean;
|
|
23
24
|
browserExecutable?: BrowserExecutable;
|
|
25
|
+
onBrowserLog?: (log: BrowserLog) => void;
|
|
24
26
|
timeoutInMilliseconds?: number;
|
|
25
27
|
chromiumOptions?: ChromiumOptions;
|
|
26
28
|
scale?: number;
|
package/dist/render-still.js
CHANGED
|
@@ -48,7 +48,7 @@ const set_props_and_env_1 = require("./set-props-and-env");
|
|
|
48
48
|
const take_frame_and_compose_1 = require("./take-frame-and-compose");
|
|
49
49
|
const validate_puppeteer_timeout_1 = require("./validate-puppeteer-timeout");
|
|
50
50
|
const validate_scale_1 = require("./validate-scale");
|
|
51
|
-
const innerRenderStill = async ({ composition, quality, imageFormat = 'png', serveUrl, puppeteerInstance, dumpBrowserLogs = false, onError, inputProps, envVariables, output, frame = 0, overwrite = true, browserExecutable, timeoutInMilliseconds, chromiumOptions, scale = 1, proxyPort, cancelSignal, downloadMap, }) => {
|
|
51
|
+
const innerRenderStill = async ({ composition, quality, imageFormat = 'png', serveUrl, puppeteerInstance, dumpBrowserLogs = false, onError, inputProps, envVariables, output, frame = 0, overwrite = true, browserExecutable, timeoutInMilliseconds, chromiumOptions, scale = 1, proxyPort, cancelSignal, downloadMap, onBrowserLog, }) => {
|
|
52
52
|
remotion_1.Internals.validateDimension(composition.height, 'height', 'in the `config` object passed to `renderStill()`');
|
|
53
53
|
remotion_1.Internals.validateDimension(composition.width, 'width', 'in the `config` object passed to `renderStill()`');
|
|
54
54
|
remotion_1.Internals.validateFps(composition.fps, 'in the `config` object of `renderStill()`', false);
|
|
@@ -108,8 +108,16 @@ const innerRenderStill = async ({ composition, quality, imageFormat = 'png', ser
|
|
|
108
108
|
onError: errorCallback,
|
|
109
109
|
frame: null,
|
|
110
110
|
});
|
|
111
|
+
const logCallback = (log) => {
|
|
112
|
+
onBrowserLog === null || onBrowserLog === void 0 ? void 0 : onBrowserLog({
|
|
113
|
+
stackTrace: log.stackTrace(),
|
|
114
|
+
text: log.text,
|
|
115
|
+
type: log.type,
|
|
116
|
+
});
|
|
117
|
+
};
|
|
111
118
|
const cleanup = async () => {
|
|
112
119
|
cleanUpJSException();
|
|
120
|
+
page.off('console', logCallback);
|
|
113
121
|
if (puppeteerInstance) {
|
|
114
122
|
await page.close();
|
|
115
123
|
}
|
|
@@ -122,6 +130,9 @@ const innerRenderStill = async ({ composition, quality, imageFormat = 'png', ser
|
|
|
122
130
|
cancelSignal === null || cancelSignal === void 0 ? void 0 : cancelSignal(() => {
|
|
123
131
|
cleanup();
|
|
124
132
|
});
|
|
133
|
+
if (onBrowserLog) {
|
|
134
|
+
page.on('console', logCallback);
|
|
135
|
+
}
|
|
125
136
|
await (0, set_props_and_env_1.setPropsAndEnv)({
|
|
126
137
|
inputProps,
|
|
127
138
|
envVariables,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@remotion/renderer",
|
|
3
|
-
"version": "3.3.
|
|
3
|
+
"version": "3.3.93",
|
|
4
4
|
"description": "Renderer for Remotion",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
"dependencies": {
|
|
17
17
|
"execa": "5.1.1",
|
|
18
18
|
"extract-zip": "2.0.1",
|
|
19
|
-
"remotion": "3.3.
|
|
19
|
+
"remotion": "3.3.93",
|
|
20
20
|
"source-map": "^0.8.0-beta.0",
|
|
21
21
|
"ws": "8.7.0"
|
|
22
22
|
},
|
|
@@ -41,13 +41,13 @@
|
|
|
41
41
|
"vitest": "0.24.3"
|
|
42
42
|
},
|
|
43
43
|
"optionalDependencies": {
|
|
44
|
-
"@remotion/compositor-darwin-arm64": "3.3.
|
|
45
|
-
"@remotion/compositor-darwin-x64": "3.3.
|
|
46
|
-
"@remotion/compositor-linux-arm64-gnu": "3.3.
|
|
47
|
-
"@remotion/compositor-linux-arm64-musl": "3.3.
|
|
48
|
-
"@remotion/compositor-linux-x64-gnu": "3.3.
|
|
49
|
-
"@remotion/compositor-linux-x64-musl": "3.3.
|
|
50
|
-
"@remotion/compositor-win32-x64-msvc": "3.3.
|
|
44
|
+
"@remotion/compositor-darwin-arm64": "3.3.93",
|
|
45
|
+
"@remotion/compositor-darwin-x64": "3.3.93",
|
|
46
|
+
"@remotion/compositor-linux-arm64-gnu": "3.3.93",
|
|
47
|
+
"@remotion/compositor-linux-arm64-musl": "3.3.93",
|
|
48
|
+
"@remotion/compositor-linux-x64-gnu": "3.3.93",
|
|
49
|
+
"@remotion/compositor-linux-x64-musl": "3.3.93",
|
|
50
|
+
"@remotion/compositor-win32-x64-msvc": "3.3.93"
|
|
51
51
|
},
|
|
52
52
|
"keywords": [
|
|
53
53
|
"remotion",
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const isTargetClosedErr: (error: Error | undefined) => boolean | undefined;
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.isTargetClosedErr = void 0;
|
|
4
|
-
const isTargetClosedErr = (error) => {
|
|
5
|
-
var _a, _b;
|
|
6
|
-
return (((_a = error === null || error === void 0 ? void 0 : error.message) === null || _a === void 0 ? void 0 : _a.includes('Target closed')) ||
|
|
7
|
-
((_b = error === null || error === void 0 ? void 0 : error.message) === null || _b === void 0 ? void 0 : _b.includes('Session closed')));
|
|
8
|
-
};
|
|
9
|
-
exports.isTargetClosedErr = isTargetClosedErr;
|
package/dist/call-ffmpeg.d.ts
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import execa from 'execa';
|
|
2
|
-
export declare const dynamicLibraryPathOptions: () => {
|
|
3
|
-
env: {
|
|
4
|
-
DYLD_LIBRARY_PATH: string;
|
|
5
|
-
RUST_BACKTRACE: string;
|
|
6
|
-
} | {
|
|
7
|
-
PATH: string;
|
|
8
|
-
RUST_BACKTRACE: string;
|
|
9
|
-
} | {
|
|
10
|
-
LD_LIBRARY_PATH: string;
|
|
11
|
-
RUST_BACKTRACE: string;
|
|
12
|
-
};
|
|
13
|
-
};
|
|
14
|
-
export declare const callFf: (bin: 'ffmpeg' | 'ffprobe', args: (string | null)[], options?: execa.Options<string>) => execa.ExecaChildProcess<string>;
|
package/dist/call-ffmpeg.js
DELETED
|
@@ -1,37 +0,0 @@
|
|
|
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.callFf = exports.dynamicLibraryPathOptions = void 0;
|
|
7
|
-
const execa_1 = __importDefault(require("execa"));
|
|
8
|
-
const path_1 = __importDefault(require("path"));
|
|
9
|
-
const get_executable_path_1 = require("./compositor/get-executable-path");
|
|
10
|
-
const truthy_1 = require("./truthy");
|
|
11
|
-
const dynamicLibraryPathOptions = () => {
|
|
12
|
-
const lib = path_1.default.join((0, get_executable_path_1.getExecutablePath)('ffmpeg-cwd'), 'remotion', 'lib');
|
|
13
|
-
return {
|
|
14
|
-
env: {
|
|
15
|
-
RUST_BACKTRACE: 'full',
|
|
16
|
-
...(process.platform === 'darwin'
|
|
17
|
-
? {
|
|
18
|
-
DYLD_LIBRARY_PATH: lib,
|
|
19
|
-
}
|
|
20
|
-
: process.platform === 'win32'
|
|
21
|
-
? {
|
|
22
|
-
PATH: `${process.env.PATH};${lib}`,
|
|
23
|
-
}
|
|
24
|
-
: {
|
|
25
|
-
LD_LIBRARY_PATH: lib,
|
|
26
|
-
}),
|
|
27
|
-
},
|
|
28
|
-
};
|
|
29
|
-
};
|
|
30
|
-
exports.dynamicLibraryPathOptions = dynamicLibraryPathOptions;
|
|
31
|
-
const callFf = (bin, args, options) => {
|
|
32
|
-
return (0, execa_1.default)((0, get_executable_path_1.getExecutablePath)(bin), args.filter(truthy_1.truthy), {
|
|
33
|
-
...(0, exports.dynamicLibraryPathOptions)(),
|
|
34
|
-
...options,
|
|
35
|
-
});
|
|
36
|
-
};
|
|
37
|
-
exports.callFf = callFf;
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
/// <reference types="node" />
|
|
2
|
-
import type { CompositorCommand } from './payloads';
|
|
3
|
-
declare type Compositor = {
|
|
4
|
-
finishCommands: () => void;
|
|
5
|
-
executeCommand: <T extends keyof CompositorCommand>(type: T, payload: CompositorCommand[T]) => Promise<Buffer>;
|
|
6
|
-
waitForDone: () => Promise<void>;
|
|
7
|
-
pid: number | null;
|
|
8
|
-
};
|
|
9
|
-
export declare const getIdealMaximumFrameCacheItems: () => number;
|
|
10
|
-
export declare const startLongRunningCompositor: (maximumFrameCacheItems: number, verbose: boolean) => Compositor;
|
|
11
|
-
export declare const startCompositor: <T extends keyof CompositorCommand>(type: T, payload: CompositorCommand[T]) => Compositor;
|
|
12
|
-
export {};
|
|
@@ -1,202 +0,0 @@
|
|
|
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.startCompositor = exports.startLongRunningCompositor = exports.getIdealMaximumFrameCacheItems = void 0;
|
|
7
|
-
const child_process_1 = require("child_process");
|
|
8
|
-
const os_1 = __importDefault(require("os"));
|
|
9
|
-
const call_ffmpeg_1 = require("../call-ffmpeg");
|
|
10
|
-
const get_concurrency_1 = require("../get-concurrency");
|
|
11
|
-
const compose_1 = require("./compose");
|
|
12
|
-
const get_executable_path_1 = require("./get-executable-path");
|
|
13
|
-
const make_nonce_1 = require("./make-nonce");
|
|
14
|
-
const getIdealMaximumFrameCacheItems = () => {
|
|
15
|
-
const freeMemory = os_1.default.freemem();
|
|
16
|
-
// Assuming 1 frame is approximately 6MB
|
|
17
|
-
// Assuming only half the available memory should be used
|
|
18
|
-
const max = Math.floor(freeMemory / (1024 * 1024 * 6));
|
|
19
|
-
// Never store more than 1000 frames
|
|
20
|
-
// But 100 is needed even if it's going to swap
|
|
21
|
-
return Math.max(100, Math.min(max, 1000));
|
|
22
|
-
};
|
|
23
|
-
exports.getIdealMaximumFrameCacheItems = getIdealMaximumFrameCacheItems;
|
|
24
|
-
const startLongRunningCompositor = (maximumFrameCacheItems, verbose) => {
|
|
25
|
-
return (0, exports.startCompositor)('StartLongRunningProcess', {
|
|
26
|
-
concurrency: (0, get_concurrency_1.getActualConcurrency)(null),
|
|
27
|
-
maximum_frame_cache_items: maximumFrameCacheItems,
|
|
28
|
-
verbose,
|
|
29
|
-
});
|
|
30
|
-
};
|
|
31
|
-
exports.startLongRunningCompositor = startLongRunningCompositor;
|
|
32
|
-
const startCompositor = (type, payload) => {
|
|
33
|
-
var _a;
|
|
34
|
-
const bin = (0, get_executable_path_1.getExecutablePath)('compositor');
|
|
35
|
-
const fullCommand = (0, compose_1.serializeCommand)(type, payload);
|
|
36
|
-
const child = (0, child_process_1.spawn)(bin, [JSON.stringify(fullCommand)], (0, call_ffmpeg_1.dynamicLibraryPathOptions)());
|
|
37
|
-
const stderrChunks = [];
|
|
38
|
-
let outputBuffer = Buffer.from('');
|
|
39
|
-
const separator = Buffer.from('remotion_buffer:');
|
|
40
|
-
const waiters = new Map();
|
|
41
|
-
const onMessage = (statusType, nonce, data) => {
|
|
42
|
-
if (nonce === '0') {
|
|
43
|
-
console.log(data.toString('utf8'));
|
|
44
|
-
}
|
|
45
|
-
if (waiters.has(nonce)) {
|
|
46
|
-
if (statusType === 'error') {
|
|
47
|
-
try {
|
|
48
|
-
const parsed = JSON.parse(data.toString('utf8'));
|
|
49
|
-
waiters.get(nonce).reject(new Error(`Compositor error: ${parsed.error}\n${parsed.backtrace}`));
|
|
50
|
-
}
|
|
51
|
-
catch (err) {
|
|
52
|
-
waiters.get(nonce).reject(new Error(data.toString('utf8')));
|
|
53
|
-
}
|
|
54
|
-
}
|
|
55
|
-
else {
|
|
56
|
-
waiters.get(nonce).resolve(data);
|
|
57
|
-
}
|
|
58
|
-
waiters.delete(nonce);
|
|
59
|
-
}
|
|
60
|
-
};
|
|
61
|
-
let quit = false;
|
|
62
|
-
let missingData = null;
|
|
63
|
-
const processInput = () => {
|
|
64
|
-
let separatorIndex = outputBuffer.indexOf(separator);
|
|
65
|
-
if (separatorIndex === -1) {
|
|
66
|
-
return;
|
|
67
|
-
}
|
|
68
|
-
separatorIndex += separator.length;
|
|
69
|
-
let nonceString = '';
|
|
70
|
-
let lengthString = '';
|
|
71
|
-
let statusString = '';
|
|
72
|
-
// Each message from Rust is prefixed with `remotion_buffer;{[nonce]}:{[length]}`
|
|
73
|
-
// Let's read the buffer to extract the nonce, and if the full length is available,
|
|
74
|
-
// we'll extract the data and pass it to the callback.
|
|
75
|
-
// eslint-disable-next-line no-constant-condition
|
|
76
|
-
while (true) {
|
|
77
|
-
const nextDigit = outputBuffer[separatorIndex];
|
|
78
|
-
// 0x3a is the character ":"
|
|
79
|
-
if (nextDigit === 0x3a) {
|
|
80
|
-
separatorIndex++;
|
|
81
|
-
break;
|
|
82
|
-
}
|
|
83
|
-
separatorIndex++;
|
|
84
|
-
nonceString += String.fromCharCode(nextDigit);
|
|
85
|
-
}
|
|
86
|
-
// eslint-disable-next-line no-constant-condition
|
|
87
|
-
while (true) {
|
|
88
|
-
const nextDigit = outputBuffer[separatorIndex];
|
|
89
|
-
if (nextDigit === 0x3a) {
|
|
90
|
-
separatorIndex++;
|
|
91
|
-
break;
|
|
92
|
-
}
|
|
93
|
-
separatorIndex++;
|
|
94
|
-
lengthString += String.fromCharCode(nextDigit);
|
|
95
|
-
}
|
|
96
|
-
// eslint-disable-next-line no-constant-condition
|
|
97
|
-
while (true) {
|
|
98
|
-
const nextDigit = outputBuffer[separatorIndex];
|
|
99
|
-
if (nextDigit === 0x3a) {
|
|
100
|
-
break;
|
|
101
|
-
}
|
|
102
|
-
separatorIndex++;
|
|
103
|
-
statusString += String.fromCharCode(nextDigit);
|
|
104
|
-
}
|
|
105
|
-
const length = Number(lengthString);
|
|
106
|
-
const status = Number(statusString);
|
|
107
|
-
const dataLength = outputBuffer.length - separatorIndex - 1;
|
|
108
|
-
if (dataLength < length) {
|
|
109
|
-
missingData = {
|
|
110
|
-
dataMissing: length - dataLength,
|
|
111
|
-
};
|
|
112
|
-
return;
|
|
113
|
-
}
|
|
114
|
-
const data = outputBuffer.subarray(separatorIndex + 1, separatorIndex + 1 + Number(lengthString));
|
|
115
|
-
onMessage(status === 1 ? 'error' : 'success', nonceString, data);
|
|
116
|
-
missingData = null;
|
|
117
|
-
outputBuffer = outputBuffer.subarray(separatorIndex + Number(lengthString) + 1);
|
|
118
|
-
processInput();
|
|
119
|
-
};
|
|
120
|
-
let unprocessedBuffers = [];
|
|
121
|
-
child.stdout.on('data', (data) => {
|
|
122
|
-
unprocessedBuffers.push(data);
|
|
123
|
-
const separatorIndex = data.indexOf(separator);
|
|
124
|
-
if (separatorIndex === -1) {
|
|
125
|
-
if (missingData) {
|
|
126
|
-
missingData.dataMissing -= data.length;
|
|
127
|
-
}
|
|
128
|
-
if (!missingData || missingData.dataMissing > 0) {
|
|
129
|
-
return;
|
|
130
|
-
}
|
|
131
|
-
}
|
|
132
|
-
unprocessedBuffers.unshift(outputBuffer);
|
|
133
|
-
outputBuffer = Buffer.concat(unprocessedBuffers);
|
|
134
|
-
unprocessedBuffers = [];
|
|
135
|
-
processInput();
|
|
136
|
-
});
|
|
137
|
-
child.stderr.on('data', (data) => {
|
|
138
|
-
stderrChunks.push(data);
|
|
139
|
-
});
|
|
140
|
-
let resolve = null;
|
|
141
|
-
let reject = null;
|
|
142
|
-
child.on('close', (code) => {
|
|
143
|
-
quit = true;
|
|
144
|
-
const waitersToKill = Array.from(waiters.values());
|
|
145
|
-
if (code === 0) {
|
|
146
|
-
resolve === null || resolve === void 0 ? void 0 : resolve();
|
|
147
|
-
for (const waiter of waitersToKill) {
|
|
148
|
-
waiter.reject(new Error(`Compositor already quit`));
|
|
149
|
-
}
|
|
150
|
-
waiters.clear();
|
|
151
|
-
}
|
|
152
|
-
else {
|
|
153
|
-
const error = new Error(`Compositor panicked: ${Buffer.concat(stderrChunks).toString('utf-8')}`);
|
|
154
|
-
for (const waiter of waitersToKill) {
|
|
155
|
-
waiter.reject(error);
|
|
156
|
-
}
|
|
157
|
-
waiters.clear();
|
|
158
|
-
reject === null || reject === void 0 ? void 0 : reject(error);
|
|
159
|
-
}
|
|
160
|
-
});
|
|
161
|
-
return {
|
|
162
|
-
waitForDone: () => {
|
|
163
|
-
return new Promise((res, rej) => {
|
|
164
|
-
if (quit) {
|
|
165
|
-
rej(new Error('Compositor already quit'));
|
|
166
|
-
return;
|
|
167
|
-
}
|
|
168
|
-
resolve = res;
|
|
169
|
-
reject = rej;
|
|
170
|
-
});
|
|
171
|
-
},
|
|
172
|
-
finishCommands: () => {
|
|
173
|
-
if (quit) {
|
|
174
|
-
throw new Error('Compositor already quit');
|
|
175
|
-
}
|
|
176
|
-
child.stdin.write('EOF\n');
|
|
177
|
-
},
|
|
178
|
-
executeCommand: (command, params) => {
|
|
179
|
-
if (quit) {
|
|
180
|
-
throw new Error('Compositor already quit');
|
|
181
|
-
}
|
|
182
|
-
return new Promise((_resolve, _reject) => {
|
|
183
|
-
const nonce = (0, make_nonce_1.makeNonce)();
|
|
184
|
-
const composed = {
|
|
185
|
-
nonce,
|
|
186
|
-
payload: {
|
|
187
|
-
type: command,
|
|
188
|
-
params,
|
|
189
|
-
},
|
|
190
|
-
};
|
|
191
|
-
// TODO: Should have a way to error out a single task
|
|
192
|
-
child.stdin.write(JSON.stringify(composed) + '\n');
|
|
193
|
-
waiters.set(nonce, {
|
|
194
|
-
resolve: _resolve,
|
|
195
|
-
reject: _reject,
|
|
196
|
-
});
|
|
197
|
-
});
|
|
198
|
-
},
|
|
199
|
-
pid: (_a = child.pid) !== null && _a !== void 0 ? _a : null,
|
|
200
|
-
};
|
|
201
|
-
};
|
|
202
|
-
exports.startCompositor = startCompositor;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const makeNonce: () => string;
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.makeNonce = void 0;
|
|
4
|
-
const makeNonce = () => {
|
|
5
|
-
return (Math.random().toString(36).substring(2, 15) +
|
|
6
|
-
Math.random().toString(36).substring(2, 15));
|
|
7
|
-
};
|
|
8
|
-
exports.makeNonce = makeNonce;
|
package/dist/jpeg-quality.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const validateJpegQuality: (q: number | undefined) => void;
|
package/dist/jpeg-quality.js
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.validateJpegQuality = void 0;
|
|
4
|
-
const validateJpegQuality = (q) => {
|
|
5
|
-
if (typeof q !== 'undefined' && typeof q !== 'number') {
|
|
6
|
-
throw new Error(`JPEG Quality option must be a number or undefined. Got ${typeof q} (${JSON.stringify(q)})`);
|
|
7
|
-
}
|
|
8
|
-
if (typeof q === 'undefined') {
|
|
9
|
-
return;
|
|
10
|
-
}
|
|
11
|
-
if (!Number.isFinite(q)) {
|
|
12
|
-
throw new RangeError(`JPEG Quality must be a finite number, but is ${q}`);
|
|
13
|
-
}
|
|
14
|
-
if (Number.isNaN(q)) {
|
|
15
|
-
throw new RangeError(`JPEG Quality is NaN, but must be a real number`);
|
|
16
|
-
}
|
|
17
|
-
if (q > 100 || q < 0) {
|
|
18
|
-
throw new RangeError('JPEG Quality option must be between 0 and 100.');
|
|
19
|
-
}
|
|
20
|
-
};
|
|
21
|
-
exports.validateJpegQuality = validateJpegQuality;
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.audioBitrateOption = void 0;
|
|
4
|
-
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
-
exports.audioBitrateOption = {
|
|
6
|
-
name: 'Audio Bitrate',
|
|
7
|
-
cliFlag: '--audio-bitrate',
|
|
8
|
-
description: ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: ["Specify the target bitrate for the generated video. The syntax for FFMPEGs", (0, jsx_runtime_1.jsx)("code", { children: "-b:a" }), " parameter should be used. FFMPEG may encode the video in a way that will not result in the exact audio bitrate specified. Example values: ", (0, jsx_runtime_1.jsx)("code", { children: "512K" }), " for 512 kbps, ", (0, jsx_runtime_1.jsx)("code", { children: "1M" }), " for 1 Mbps. Default: ", (0, jsx_runtime_1.jsx)("code", { children: "320k" })] })),
|
|
9
|
-
ssrName: 'audioBitrate',
|
|
10
|
-
docLink: 'https://www.remotion.dev/docs/renderer/render-media#audiobitrate-',
|
|
11
|
-
};
|
package/dist/options/crf.d.ts
DELETED
package/dist/options/crf.js
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.crfOption = void 0;
|
|
4
|
-
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
-
exports.crfOption = {
|
|
6
|
-
name: 'CRF',
|
|
7
|
-
cliFlag: '--crf',
|
|
8
|
-
description: ((0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: "No matter which codec you end up using, there's always a tradeoff between file size and video quality. You can control it by setting the so called CRF (Constant Rate Factor). The lower the number, the better the quality, the higher the number, the smaller the file is \u2013 of course at the cost of quality." })),
|
|
9
|
-
ssrName: 'crf',
|
|
10
|
-
docLink: 'https://www.remotion.dev/docs/encoding/#controlling-quality-using-the-crf-setting',
|
|
11
|
-
};
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.enforceAudioOption = void 0;
|
|
4
|
-
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
-
exports.enforceAudioOption = {
|
|
6
|
-
name: 'Enforce Audio Track',
|
|
7
|
-
cliFlag: '--enforce-audio-track',
|
|
8
|
-
description: ((0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: "Render a silent audio track if there would be none otherwise." })),
|
|
9
|
-
ssrName: 'enforceAudioTrack',
|
|
10
|
-
docLink: 'https://www.remotion.dev/docs/config#setenforceaudiotrack-',
|
|
11
|
-
};
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.jpegQualityOption = void 0;
|
|
4
|
-
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
-
exports.jpegQualityOption = {
|
|
6
|
-
name: 'JPEG Quality',
|
|
7
|
-
cliFlag: '--jpeg-quality',
|
|
8
|
-
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 is to leave it up to the browser, current default is 80." })),
|
|
9
|
-
ssrName: 'jpegQuality',
|
|
10
|
-
docLink: 'https://www.remotion.dev/docs/renderer/render-media#jpeg-quality',
|
|
11
|
-
};
|
package/dist/options/mute.d.ts
DELETED
package/dist/options/mute.js
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.muteOption = void 0;
|
|
4
|
-
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
-
exports.muteOption = {
|
|
6
|
-
name: 'Muted',
|
|
7
|
-
cliFlag: '--muted',
|
|
8
|
-
description: (0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: "The Audio of the video will be omitted." }),
|
|
9
|
-
ssrName: 'muted',
|
|
10
|
-
docLink: 'https://www.remotion.dev/docs/using-audio/#muted-property',
|
|
11
|
-
};
|
package/dist/options/option.d.ts
DELETED
package/dist/options/option.js
DELETED
package/dist/options/scale.d.ts
DELETED
package/dist/options/scale.js
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.scaleOption = void 0;
|
|
4
|
-
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
-
exports.scaleOption = {
|
|
6
|
-
name: 'Scale',
|
|
7
|
-
cliFlag: '--scale',
|
|
8
|
-
description: ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: ["Scales the output by a factor. For example, a 1280x720px frame will become a 1920x1080px frame with a scale factor of ", (0, jsx_runtime_1.jsx)("code", { children: "1.5" }), ". Vector elements like fonts and HTML markups will be rendered with extra details."] })),
|
|
9
|
-
ssrName: 'scale',
|
|
10
|
-
docLink: 'https://www.remotion.dev/docs/scaling',
|
|
11
|
-
};
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.videoBitrate = void 0;
|
|
4
|
-
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
-
exports.videoBitrate = {
|
|
6
|
-
name: 'Video Bitrate',
|
|
7
|
-
cliFlag: '--video-bitrate',
|
|
8
|
-
description: ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: ["Specify the target bitrate for the generated video. The syntax for FFMPEGs", (0, jsx_runtime_1.jsx)("code", { children: "-b:v" }), " parameter should be used. FFMPEG may encode the video in a way that will not result in the exact video bitrate specified. Example values: ", (0, jsx_runtime_1.jsx)("code", { children: "512K" }), " for 512 kbps, ", (0, jsx_runtime_1.jsx)("code", { children: "1M" }), " for 1 Mbps."] })),
|
|
9
|
-
ssrName: 'videoBitrate',
|
|
10
|
-
docLink: 'https://www.remotion.dev/docs/renderer/render-media#videobitrate-',
|
|
11
|
-
};
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.videoCodecOption = void 0;
|
|
4
|
-
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
-
exports.videoCodecOption = {
|
|
6
|
-
name: 'Codec',
|
|
7
|
-
cliFlag: '--codec',
|
|
8
|
-
description: ((0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: "Remotion supports 5 video codecs: h264 (default), h265, vp8, vp9 and prores. While H264 will work well in most cases, sometimes it's worth going for a different codec. Follow the link below for an overview." })),
|
|
9
|
-
ssrName: 'codec',
|
|
10
|
-
docLink: 'https://www.remotion.dev/docs/encoding/#choosing-a-codec',
|
|
11
|
-
};
|