@remotion/renderer 3.3.87 → 3.3.89

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.
Files changed (39) hide show
  1. package/dist/assets/download-file.d.ts +3 -2
  2. package/dist/assets/download-file.js +16 -1
  3. package/dist/browser/BrowserFetcher.d.ts +15 -63
  4. package/dist/browser/BrowserFetcher.js +125 -213
  5. package/dist/browser/Launcher.js +2 -7
  6. package/dist/browser/PuppeteerNode.d.ts +0 -3
  7. package/dist/browser/PuppeteerNode.js +0 -5
  8. package/dist/browser/create-browser-fetcher.js +34 -48
  9. package/dist/browser/is-target-closed-err.d.ts +1 -0
  10. package/dist/browser/is-target-closed-err.js +9 -0
  11. package/dist/call-ffmpeg.d.ts +14 -0
  12. package/dist/call-ffmpeg.js +37 -0
  13. package/dist/compositor/compositor.d.ts +12 -0
  14. package/dist/compositor/compositor.js +202 -0
  15. package/dist/compositor/make-nonce.d.ts +1 -0
  16. package/dist/compositor/make-nonce.js +8 -0
  17. package/dist/get-local-browser-executable.js +3 -12
  18. package/dist/index.d.ts +2 -2
  19. package/dist/jpeg-quality.d.ts +1 -0
  20. package/dist/jpeg-quality.js +21 -0
  21. package/dist/options/audio-bitrate.d.ts +2 -0
  22. package/dist/options/audio-bitrate.js +11 -0
  23. package/dist/options/crf.d.ts +2 -0
  24. package/dist/options/crf.js +11 -0
  25. package/dist/options/enforce-audio.d.ts +2 -0
  26. package/dist/options/enforce-audio.js +11 -0
  27. package/dist/options/jpeg-quality.d.ts +2 -0
  28. package/dist/options/jpeg-quality.js +11 -0
  29. package/dist/options/mute.d.ts +2 -0
  30. package/dist/options/mute.js +11 -0
  31. package/dist/options/option.d.ts +8 -0
  32. package/dist/options/option.js +2 -0
  33. package/dist/options/scale.d.ts +2 -0
  34. package/dist/options/scale.js +11 -0
  35. package/dist/options/video-bitrate.d.ts +2 -0
  36. package/dist/options/video-bitrate.js +11 -0
  37. package/dist/options/video-codec.d.ts +2 -0
  38. package/dist/options/video-codec.js +11 -0
  39. package/package.json +9 -9
@@ -16,62 +16,48 @@
16
16
  */
17
17
  Object.defineProperty(exports, "__esModule", { value: true });
18
18
  exports.downloadBrowser = void 0;
19
- const node_1 = require("./node");
19
+ const BrowserFetcher_1 = require("./BrowserFetcher");
20
20
  const revisions_1 = require("./revisions");
21
21
  const supportedProducts = {
22
22
  chrome: 'Chromium',
23
23
  firefox: 'Firefox Nightly',
24
24
  };
25
- async function downloadBrowser(product) {
26
- const browserFetcher = node_1.puppeteer.createBrowserFetcher({
27
- product,
28
- path: null,
29
- platform: null,
30
- });
31
- const revision = await getRevision();
32
- await fetchBinary(revision);
33
- function getRevision() {
34
- if (product === 'chrome') {
35
- return revisions_1.PUPPETEER_REVISIONS.chromium;
36
- }
37
- throw new Error(`Unsupported product ${product}`);
25
+ function getRevision(product) {
26
+ if (product === 'chrome') {
27
+ return revisions_1.PUPPETEER_REVISIONS.chromium;
38
28
  }
39
- function fetchBinary(_revision) {
40
- const revisionInfo = browserFetcher.revisionInfo(_revision);
41
- // Do nothing if the revision is already downloaded.
42
- if (revisionInfo.local) {
43
- console.log(`${supportedProducts[product]} is already in ${revisionInfo.folderPath}; skipping download.`);
44
- return;
45
- }
46
- function onSuccess(localRevisions) {
47
- console.log(`${supportedProducts[product]} (${revisionInfo.revision}) downloaded to ${revisionInfo.folderPath}`);
48
- localRevisions = localRevisions.filter((__revision) => {
49
- return __revision !== revisionInfo.revision;
50
- });
51
- const cleanupOldVersions = localRevisions.map((__revision) => {
52
- return browserFetcher.remove(__revision);
53
- });
54
- Promise.all([...cleanupOldVersions]);
55
- }
56
- function onError(error) {
57
- console.error(`ERROR: Failed to set up ${supportedProducts[product]} r${_revision}! Set "PUPPETEER_SKIP_DOWNLOAD" env variable to skip download.`);
58
- console.error(error);
59
- process.exit(1);
60
- }
61
- function onProgress(downloadedBytes, totalBytes) {
62
- console.log('Downloading', supportedProducts[product], toMegabytes(downloadedBytes) + '/' + toMegabytes(totalBytes));
63
- }
64
- return browserFetcher
65
- .download(revisionInfo.revision, onProgress)
66
- .then(() => {
67
- return browserFetcher.localRevisions();
29
+ throw new Error(`Unsupported product ${product}`);
30
+ }
31
+ async function downloadBrowser(product) {
32
+ const revision = getRevision(product);
33
+ const revisionInfo = (0, BrowserFetcher_1.getRevisionInfo)(revision, product);
34
+ try {
35
+ await (0, BrowserFetcher_1.download)({
36
+ revision: revisionInfo.revision,
37
+ progressCallback: (downloadedBytes, totalBytes) => {
38
+ console.log('Downloading', supportedProducts[product], toMegabytes(downloadedBytes) + '/' + toMegabytes(totalBytes));
39
+ },
40
+ product,
41
+ platform: (0, BrowserFetcher_1.getPlatform)(product),
42
+ downloadHost: (0, BrowserFetcher_1.getDownloadHost)(product),
43
+ downloadsFolder: (0, BrowserFetcher_1.getDownloadsFolder)(product),
44
+ });
45
+ const _localRevisions = await (0, BrowserFetcher_1.localRevisions)((0, BrowserFetcher_1.getDownloadsFolder)(product), product, (0, BrowserFetcher_1.getPlatform)(product));
46
+ console.log(`${supportedProducts[product]} (${revisionInfo.revision}) downloaded to ${revisionInfo.folderPath}`);
47
+ await Promise.all(_localRevisions
48
+ .filter((__revision) => {
49
+ return __revision !== revisionInfo.revision;
68
50
  })
69
- .then(onSuccess)
70
- .catch(onError);
51
+ .map((__revision) => {
52
+ return (0, BrowserFetcher_1.removeBrowser)(__revision, (0, BrowserFetcher_1.getFolderPath)(revision, (0, BrowserFetcher_1.getDownloadsFolder)(product), (0, BrowserFetcher_1.getPlatform)(product)));
53
+ }));
71
54
  }
72
- function toMegabytes(bytes) {
73
- const mb = bytes / 1024 / 1024;
74
- return `${Math.round(mb * 10) / 10} Mb`;
55
+ catch (err) {
56
+ throw new Error(`Failed to set up ${supportedProducts[product]} r${revision}! Set "PUPPETEER_SKIP_DOWNLOAD" env variable to skip download.`);
75
57
  }
76
58
  }
77
59
  exports.downloadBrowser = downloadBrowser;
60
+ function toMegabytes(bytes) {
61
+ const mb = bytes / 1024 / 1024;
62
+ return `${Math.round(mb * 10) / 10} Mb`;
63
+ }
@@ -0,0 +1 @@
1
+ export declare const isTargetClosedErr: (error: Error | undefined) => boolean | undefined;
@@ -0,0 +1,9 @@
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;
@@ -0,0 +1,14 @@
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>;
@@ -0,0 +1,37 @@
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;
@@ -0,0 +1,12 @@
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 {};
@@ -0,0 +1,202 @@
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;
@@ -0,0 +1 @@
1
+ export declare const makeNonce: () => string;
@@ -0,0 +1,8 @@
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;
@@ -5,8 +5,8 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.getLocalBrowserExecutable = exports.ensureLocalBrowser = void 0;
7
7
  const fs_1 = __importDefault(require("fs"));
8
+ const BrowserFetcher_1 = require("./browser/BrowserFetcher");
8
9
  const create_browser_fetcher_1 = require("./browser/create-browser-fetcher");
9
- const node_1 = require("./browser/node");
10
10
  const revisions_1 = require("./browser/revisions");
11
11
  const getSearchPathsForProduct = (product) => {
12
12
  var _a;
@@ -44,15 +44,6 @@ const getLocalBrowser = (product) => {
44
44
  }
45
45
  return null;
46
46
  };
47
- const getBrowserRevision = (product) => {
48
- const browserFetcher = node_1.puppeteer.createBrowserFetcher({
49
- product,
50
- path: null,
51
- platform: null,
52
- });
53
- const revisionInfo = browserFetcher.revisionInfo(revisions_1.PUPPETEER_REVISIONS.chromium);
54
- return revisionInfo;
55
- };
56
47
  const getBrowserStatus = (product, browserExecutablePath) => {
57
48
  if (browserExecutablePath) {
58
49
  if (!fs_1.default.existsSync(browserExecutablePath)) {
@@ -64,8 +55,8 @@ const getBrowserStatus = (product, browserExecutablePath) => {
64
55
  if (localBrowser !== null) {
65
56
  return { path: localBrowser, type: 'local-browser' };
66
57
  }
67
- const revision = getBrowserRevision(product);
68
- if (revision.local !== null && fs_1.default.existsSync(revision.executablePath)) {
58
+ const revision = (0, BrowserFetcher_1.getRevisionInfo)(revisions_1.PUPPETEER_REVISIONS.chromium, product);
59
+ if (revision.local && fs_1.default.existsSync(revision.executablePath)) {
69
60
  return { path: revision.executablePath, type: 'local-puppeteer-browser' };
70
61
  }
71
62
  return { type: 'no-browser' };
package/dist/index.d.ts CHANGED
@@ -69,7 +69,7 @@ export declare const RenderInternals: {
69
69
  ensureOutputDirectory: (outputLocation: string) => void;
70
70
  getRealFrameRange: (durationInFrames: number, frameRange: import("./frame-range").FrameRange | null) => [number, number];
71
71
  validatePuppeteerTimeout: (timeoutInMilliseconds: unknown) => void;
72
- downloadFile: ({ onProgress, url, to: toFn, }: {
72
+ downloadFile: (options: {
73
73
  url: string;
74
74
  to: (contentDisposition: string | null, contentType: string | null) => string;
75
75
  onProgress: ((progress: {
@@ -77,7 +77,7 @@ export declare const RenderInternals: {
77
77
  downloaded: number;
78
78
  totalSize: number | null;
79
79
  }) => void) | undefined;
80
- }) => Promise<{
80
+ }, retries?: number) => Promise<{
81
81
  sizeInBytes: number;
82
82
  to: string;
83
83
  }>;
@@ -0,0 +1 @@
1
+ export declare const validateJpegQuality: (q: number | undefined) => void;
@@ -0,0 +1,21 @@
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;
@@ -0,0 +1,2 @@
1
+ import type { RemotionOption } from './option';
2
+ export declare const audioBitrateOption: RemotionOption;
@@ -0,0 +1,11 @@
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
+ };
@@ -0,0 +1,2 @@
1
+ import type { RemotionOption } from './option';
2
+ export declare const crfOption: RemotionOption;
@@ -0,0 +1,11 @@
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
+ };
@@ -0,0 +1,2 @@
1
+ import type { RemotionOption } from './option';
2
+ export declare const enforceAudioOption: RemotionOption;
@@ -0,0 +1,11 @@
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
+ };
@@ -0,0 +1,2 @@
1
+ import type { RemotionOption } from './option';
2
+ export declare const jpegQualityOption: RemotionOption;
@@ -0,0 +1,11 @@
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
+ };
@@ -0,0 +1,2 @@
1
+ import type { RemotionOption } from './option';
2
+ export declare const muteOption: RemotionOption;
@@ -0,0 +1,11 @@
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
+ };
@@ -0,0 +1,8 @@
1
+ import type React from 'react';
2
+ export declare type RemotionOption = {
3
+ name: string;
4
+ cliFlag: string;
5
+ ssrName: string;
6
+ description: React.ReactNode;
7
+ docLink: string;
8
+ };
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,2 @@
1
+ import type { RemotionOption } from './option';
2
+ export declare const scaleOption: RemotionOption;
@@ -0,0 +1,11 @@
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
+ };
@@ -0,0 +1,2 @@
1
+ import type { RemotionOption } from './option';
2
+ export declare const videoBitrate: RemotionOption;
@@ -0,0 +1,11 @@
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
+ };
@@ -0,0 +1,2 @@
1
+ import type { RemotionOption } from './option';
2
+ export declare const videoCodecOption: RemotionOption;
@@ -0,0 +1,11 @@
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
+ };