@remotion/renderer 4.0.262 → 4.0.264

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/client.d.ts CHANGED
@@ -391,6 +391,24 @@ export declare const BrowserSafeApis: {
391
391
  };
392
392
  setConfig: (size: number | null) => void;
393
393
  };
394
+ offthreadVideoThreadsOption: {
395
+ name: string;
396
+ cliFlag: "offthreadvideo-video-threads";
397
+ description: () => import("react/jsx-runtime").JSX.Element;
398
+ ssrName: "offthreadVideoThreads";
399
+ docLink: string;
400
+ type: number | null;
401
+ getValue: ({ commandLine }: {
402
+ commandLine: Record<string, unknown>;
403
+ }) => {
404
+ source: string;
405
+ value: number;
406
+ } | {
407
+ source: string;
408
+ value: null;
409
+ };
410
+ setConfig: (size: number | null) => void;
411
+ };
394
412
  webhookCustomDataOption: {
395
413
  name: string;
396
414
  cliFlag: "webhook-custom-data";
@@ -888,6 +906,24 @@ export declare const BrowserSafeApis: {
888
906
  };
889
907
  setConfig: (size: number | null) => void;
890
908
  };
909
+ readonly offthreadVideoThreads: {
910
+ name: string;
911
+ cliFlag: "offthreadvideo-video-threads";
912
+ description: () => import("react/jsx-runtime").JSX.Element;
913
+ ssrName: "offthreadVideoThreads";
914
+ docLink: string;
915
+ type: number | null;
916
+ getValue: ({ commandLine }: {
917
+ commandLine: Record<string, unknown>;
918
+ }) => {
919
+ source: string;
920
+ value: number;
921
+ } | {
922
+ source: string;
923
+ value: null;
924
+ };
925
+ setConfig: (size: number | null) => void;
926
+ };
891
927
  readonly videoBitrate: {
892
928
  name: string;
893
929
  cliFlag: "video-bitrate";
@@ -1268,6 +1304,24 @@ export declare const BrowserSafeApis: {
1268
1304
  };
1269
1305
  setConfig: (size: number | null) => void;
1270
1306
  };
1307
+ readonly offthreadVideoThreads: {
1308
+ name: string;
1309
+ cliFlag: "offthreadvideo-video-threads";
1310
+ description: () => import("react/jsx-runtime").JSX.Element;
1311
+ ssrName: "offthreadVideoThreads";
1312
+ docLink: string;
1313
+ type: number | null;
1314
+ getValue: ({ commandLine }: {
1315
+ commandLine: Record<string, unknown>;
1316
+ }) => {
1317
+ source: string;
1318
+ value: number;
1319
+ } | {
1320
+ source: string;
1321
+ value: null;
1322
+ };
1323
+ setConfig: (size: number | null) => void;
1324
+ };
1271
1325
  readonly jpegQuality: {
1272
1326
  name: string;
1273
1327
  cliFlag: "jpeg-quality";
@@ -1373,6 +1427,24 @@ export declare const BrowserSafeApis: {
1373
1427
  };
1374
1428
  setConfig: (size: number | null) => void;
1375
1429
  };
1430
+ readonly offthreadVideoThreads: {
1431
+ name: string;
1432
+ cliFlag: "offthreadvideo-video-threads";
1433
+ description: () => import("react/jsx-runtime").JSX.Element;
1434
+ ssrName: "offthreadVideoThreads";
1435
+ docLink: string;
1436
+ type: number | null;
1437
+ getValue: ({ commandLine }: {
1438
+ commandLine: Record<string, unknown>;
1439
+ }) => {
1440
+ source: string;
1441
+ value: number;
1442
+ } | {
1443
+ source: string;
1444
+ value: null;
1445
+ };
1446
+ setConfig: (size: number | null) => void;
1447
+ };
1376
1448
  readonly logLevel: {
1377
1449
  cliFlag: "log";
1378
1450
  name: string;
@@ -1463,6 +1535,24 @@ export declare const BrowserSafeApis: {
1463
1535
  };
1464
1536
  setConfig: (size: number | null) => void;
1465
1537
  };
1538
+ readonly offthreadVideoThreads: {
1539
+ name: string;
1540
+ cliFlag: "offthreadvideo-video-threads";
1541
+ description: () => import("react/jsx-runtime").JSX.Element;
1542
+ ssrName: "offthreadVideoThreads";
1543
+ docLink: string;
1544
+ type: number | null;
1545
+ getValue: ({ commandLine }: {
1546
+ commandLine: Record<string, unknown>;
1547
+ }) => {
1548
+ source: string;
1549
+ value: number;
1550
+ } | {
1551
+ source: string;
1552
+ value: null;
1553
+ };
1554
+ setConfig: (size: number | null) => void;
1555
+ };
1466
1556
  readonly logLevel: {
1467
1557
  cliFlag: "log";
1468
1558
  name: string;
@@ -1571,6 +1661,24 @@ export declare const BrowserSafeApis: {
1571
1661
  };
1572
1662
  setConfig: (size: number | null) => void;
1573
1663
  };
1664
+ readonly offthreadVideoThreads: {
1665
+ name: string;
1666
+ cliFlag: "offthreadvideo-video-threads";
1667
+ description: () => import("react/jsx-runtime").JSX.Element;
1668
+ ssrName: "offthreadVideoThreads";
1669
+ docLink: string;
1670
+ type: number | null;
1671
+ getValue: ({ commandLine }: {
1672
+ commandLine: Record<string, unknown>;
1673
+ }) => {
1674
+ source: string;
1675
+ value: number;
1676
+ } | {
1677
+ source: string;
1678
+ value: null;
1679
+ };
1680
+ setConfig: (size: number | null) => void;
1681
+ };
1574
1682
  readonly jpegQuality: {
1575
1683
  name: string;
1576
1684
  cliFlag: "jpeg-quality";
@@ -1676,6 +1784,24 @@ export declare const BrowserSafeApis: {
1676
1784
  };
1677
1785
  setConfig: (size: number | null) => void;
1678
1786
  };
1787
+ readonly offthreadVideoThreads: {
1788
+ name: string;
1789
+ cliFlag: "offthreadvideo-video-threads";
1790
+ description: () => import("react/jsx-runtime").JSX.Element;
1791
+ ssrName: "offthreadVideoThreads";
1792
+ docLink: string;
1793
+ type: number | null;
1794
+ getValue: ({ commandLine }: {
1795
+ commandLine: Record<string, unknown>;
1796
+ }) => {
1797
+ source: string;
1798
+ value: number;
1799
+ } | {
1800
+ source: string;
1801
+ value: null;
1802
+ };
1803
+ setConfig: (size: number | null) => void;
1804
+ };
1679
1805
  readonly videoBitrate: {
1680
1806
  name: string;
1681
1807
  cliFlag: "video-bitrate";
@@ -1912,6 +2038,24 @@ export declare const BrowserSafeApis: {
1912
2038
  };
1913
2039
  setConfig: (size: number | null) => void;
1914
2040
  };
2041
+ readonly offthreadVideoThreads: {
2042
+ name: string;
2043
+ cliFlag: "offthreadvideo-video-threads";
2044
+ description: () => import("react/jsx-runtime").JSX.Element;
2045
+ ssrName: "offthreadVideoThreads";
2046
+ docLink: string;
2047
+ type: number | null;
2048
+ getValue: ({ commandLine }: {
2049
+ commandLine: Record<string, unknown>;
2050
+ }) => {
2051
+ source: string;
2052
+ value: number;
2053
+ } | {
2054
+ source: string;
2055
+ value: null;
2056
+ };
2057
+ setConfig: (size: number | null) => void;
2058
+ };
1915
2059
  readonly jpegQuality: {
1916
2060
  name: string;
1917
2061
  cliFlag: "jpeg-quality";
@@ -2025,6 +2169,24 @@ export declare const BrowserSafeApis: {
2025
2169
  };
2026
2170
  setConfig: (size: number | null) => void;
2027
2171
  };
2172
+ readonly offthreadVideoThreads: {
2173
+ name: string;
2174
+ cliFlag: "offthreadvideo-video-threads";
2175
+ description: () => import("react/jsx-runtime").JSX.Element;
2176
+ ssrName: "offthreadVideoThreads";
2177
+ docLink: string;
2178
+ type: number | null;
2179
+ getValue: ({ commandLine }: {
2180
+ commandLine: Record<string, unknown>;
2181
+ }) => {
2182
+ source: string;
2183
+ value: number;
2184
+ } | {
2185
+ source: string;
2186
+ value: null;
2187
+ };
2188
+ setConfig: (size: number | null) => void;
2189
+ };
2028
2190
  readonly logLevel: {
2029
2191
  cliFlag: "log";
2030
2192
  name: string;
@@ -2075,6 +2237,24 @@ export declare const BrowserSafeApis: {
2075
2237
  };
2076
2238
  setConfig: (size: number | null) => void;
2077
2239
  };
2240
+ readonly offthreadVideoThreads: {
2241
+ name: string;
2242
+ cliFlag: "offthreadvideo-video-threads";
2243
+ description: () => import("react/jsx-runtime").JSX.Element;
2244
+ ssrName: "offthreadVideoThreads";
2245
+ docLink: string;
2246
+ type: number | null;
2247
+ getValue: ({ commandLine }: {
2248
+ commandLine: Record<string, unknown>;
2249
+ }) => {
2250
+ source: string;
2251
+ value: number;
2252
+ } | {
2253
+ source: string;
2254
+ value: null;
2255
+ };
2256
+ setConfig: (size: number | null) => void;
2257
+ };
2078
2258
  readonly numberOfGifLoops: {
2079
2259
  name: string;
2080
2260
  cliFlag: "number-of-gif-loops";
@@ -2341,6 +2521,24 @@ export declare const BrowserSafeApis: {
2341
2521
  };
2342
2522
  setConfig: (size: number | null) => void;
2343
2523
  };
2524
+ readonly offthreadVideoThreads: {
2525
+ name: string;
2526
+ cliFlag: "offthreadvideo-video-threads";
2527
+ description: () => import("react/jsx-runtime").JSX.Element;
2528
+ ssrName: "offthreadVideoThreads";
2529
+ docLink: string;
2530
+ type: number | null;
2531
+ getValue: ({ commandLine }: {
2532
+ commandLine: Record<string, unknown>;
2533
+ }) => {
2534
+ source: string;
2535
+ value: number;
2536
+ } | {
2537
+ source: string;
2538
+ value: null;
2539
+ };
2540
+ setConfig: (size: number | null) => void;
2541
+ };
2344
2542
  readonly logLevel: {
2345
2543
  cliFlag: "log";
2346
2544
  name: string;
@@ -6,11 +6,12 @@ export type Compositor = {
6
6
  waitForDone: () => Promise<void>;
7
7
  pid: number | null;
8
8
  };
9
- export declare const startLongRunningCompositor: ({ maximumFrameCacheItemsInBytes, logLevel, indent, binariesDirectory, }: {
9
+ export declare const startLongRunningCompositor: ({ maximumFrameCacheItemsInBytes, logLevel, indent, binariesDirectory, extraThreads, }: {
10
10
  maximumFrameCacheItemsInBytes: number | null;
11
11
  logLevel: LogLevel;
12
12
  indent: boolean;
13
13
  binariesDirectory: string | null;
14
+ extraThreads: number;
14
15
  }) => Compositor;
15
16
  export declare const startCompositor: <T extends keyof CompositorCommand>({ type, payload, logLevel, indent, binariesDirectory, }: {
16
17
  type: T;
@@ -7,18 +7,17 @@ exports.startCompositor = exports.startLongRunningCompositor = void 0;
7
7
  const streaming_1 = require("@remotion/streaming");
8
8
  const node_child_process_1 = require("node:child_process");
9
9
  const node_path_1 = __importDefault(require("node:path"));
10
- const get_concurrency_1 = require("../get-concurrency");
11
10
  const log_level_1 = require("../log-level");
12
11
  const logger_1 = require("../logger");
13
- const compose_1 = require("./compose");
14
12
  const get_executable_path_1 = require("./get-executable-path");
15
13
  const make_file_executable_1 = require("./make-file-executable");
16
14
  const make_nonce_1 = require("./make-nonce");
17
- const startLongRunningCompositor = ({ maximumFrameCacheItemsInBytes, logLevel, indent, binariesDirectory, }) => {
15
+ const serialize_command_1 = require("./serialize-command");
16
+ const startLongRunningCompositor = ({ maximumFrameCacheItemsInBytes, logLevel, indent, binariesDirectory, extraThreads, }) => {
18
17
  return (0, exports.startCompositor)({
19
18
  type: 'StartLongRunningProcess',
20
19
  payload: {
21
- concurrency: (0, get_concurrency_1.resolveConcurrency)(null),
20
+ concurrency: extraThreads,
22
21
  maximum_frame_cache_size_in_bytes: maximumFrameCacheItemsInBytes,
23
22
  verbose: (0, log_level_1.isEqualOrBelowLogLevel)(logLevel, 'verbose'),
24
23
  },
@@ -37,7 +36,7 @@ const startCompositor = ({ type, payload, logLevel, indent, binariesDirectory =
37
36
  binariesDirectory,
38
37
  });
39
38
  (0, make_file_executable_1.makeFileExecutableIfItIsNot)(bin);
40
- const fullCommand = (0, compose_1.serializeCommand)(type, payload);
39
+ const fullCommand = (0, serialize_command_1.serializeCommand)(type, payload);
41
40
  const cwd = node_path_1.default.dirname(bin);
42
41
  const child = (0, node_child_process_1.spawn)(bin, [JSON.stringify(fullCommand)], {
43
42
  cwd,
@@ -96,7 +95,7 @@ const startCompositor = ({ type, payload, logLevel, indent, binariesDirectory =
96
95
  runningStatus = { type: 'quit-with-error', error: errorMessage, signal };
97
96
  const error = code === null
98
97
  ? new Error(`Compositor exited with signal ${signal}`)
99
- : new Error(`Compositor panicked with code ${code}: ${errorMessage}`);
98
+ : new Error(`Compositor exited with code ${code}: ${errorMessage}`);
100
99
  for (const waiter of waitersToKill) {
101
100
  waiter.reject(error);
102
101
  }
@@ -0,0 +1,2 @@
1
+ import type { CompositorCommand, CompositorCommandSerialized } from './payloads';
2
+ export declare const serializeCommand: <Type extends keyof CompositorCommand>(command: Type, params: CompositorCommand[Type]) => CompositorCommandSerialized<Type>;
@@ -0,0 +1,14 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.serializeCommand = void 0;
4
+ const make_nonce_1 = require("./make-nonce");
5
+ const serializeCommand = (command, params) => {
6
+ return {
7
+ nonce: (0, make_nonce_1.makeNonce)(),
8
+ payload: {
9
+ type: command,
10
+ params,
11
+ },
12
+ };
13
+ };
14
+ exports.serializeCommand = serializeCommand;
@@ -13,6 +13,7 @@ const extractAudio = async (options) => {
13
13
  logLevel: (_a = options === null || options === void 0 ? void 0 : options.logLevel) !== null && _a !== void 0 ? _a : 'info',
14
14
  indent: false,
15
15
  binariesDirectory: (_b = options.binariesDirectory) !== null && _b !== void 0 ? _b : null,
16
+ extraThreads: 0,
16
17
  });
17
18
  await compositor.executeCommand('ExtractAudio', {
18
19
  input_path: options.videoSource,
@@ -7,6 +7,7 @@ const browser_download_progress_bar_1 = require("./browser/browser-download-prog
7
7
  const handle_javascript_exception_1 = require("./error-handling/handle-javascript-exception");
8
8
  const find_closest_package_json_1 = require("./find-closest-package-json");
9
9
  const get_browser_instance_1 = require("./get-browser-instance");
10
+ const offthreadvideo_threads_1 = require("./options/offthreadvideo-threads");
10
11
  const prepare_server_1 = require("./prepare-server");
11
12
  const puppeteer_evaluate_1 = require("./puppeteer-evaluate");
12
13
  const seek_to_frame_1 = require("./seek-to-frame");
@@ -81,7 +82,7 @@ const innerGetCompositions = async ({ envVariables, serializedInputPropsWithCust
81
82
  };
82
83
  });
83
84
  };
84
- const internalGetCompositionsRaw = async ({ browserExecutable, chromiumOptions, envVariables, indent, serializedInputPropsWithCustomSchema, onBrowserLog, port, puppeteerInstance, serveUrlOrWebpackUrl, server, timeoutInMilliseconds, logLevel, offthreadVideoCacheSizeInBytes, binariesDirectory, onBrowserDownload, chromeMode, }) => {
85
+ const internalGetCompositionsRaw = async ({ browserExecutable, chromiumOptions, envVariables, indent, serializedInputPropsWithCustomSchema, onBrowserLog, port, puppeteerInstance, serveUrlOrWebpackUrl, server, timeoutInMilliseconds, logLevel, offthreadVideoCacheSizeInBytes, binariesDirectory, onBrowserDownload, chromeMode, offthreadVideoThreads, }) => {
85
86
  const { page, cleanupPage } = await (0, get_browser_instance_1.getPageAndCleanupFn)({
86
87
  passedInInstance: puppeteerInstance,
87
88
  browserExecutable,
@@ -105,7 +106,7 @@ const internalGetCompositionsRaw = async ({ browserExecutable, chromiumOptions,
105
106
  webpackConfigOrServeUrl: serveUrlOrWebpackUrl,
106
107
  port,
107
108
  remotionRoot: (0, find_closest_package_json_1.findRemotionRoot)(),
108
- concurrency: 1,
109
+ offthreadVideoThreads: offthreadVideoThreads !== null && offthreadVideoThreads !== void 0 ? offthreadVideoThreads : offthreadvideo_threads_1.DEFAULT_RENDER_FRAMES_OFFTHREAD_VIDEO_THREADS,
109
110
  logLevel,
110
111
  indent,
111
112
  offthreadVideoCacheSizeInBytes,
@@ -133,6 +134,7 @@ const internalGetCompositionsRaw = async ({ browserExecutable, chromiumOptions,
133
134
  binariesDirectory,
134
135
  onBrowserDownload,
135
136
  chromeMode,
137
+ offthreadVideoThreads,
136
138
  });
137
139
  })
138
140
  .then((comp) => {
@@ -157,7 +159,7 @@ const getCompositions = (serveUrlOrWebpackUrl, config) => {
157
159
  if (!serveUrlOrWebpackUrl) {
158
160
  throw new Error('No serve URL or webpack bundle directory was passed to getCompositions().');
159
161
  }
160
- const { browserExecutable, chromiumOptions, envVariables, inputProps, onBrowserLog, port, puppeteerInstance, timeoutInMilliseconds, logLevel: passedLogLevel, onBrowserDownload, binariesDirectory, offthreadVideoCacheSizeInBytes, chromeMode, } = config !== null && config !== void 0 ? config : {};
162
+ const { browserExecutable, chromiumOptions, envVariables, inputProps, onBrowserLog, port, puppeteerInstance, timeoutInMilliseconds, logLevel: passedLogLevel, onBrowserDownload, binariesDirectory, offthreadVideoCacheSizeInBytes, chromeMode, offthreadVideoThreads, } = config !== null && config !== void 0 ? config : {};
161
163
  const indent = false;
162
164
  const logLevel = passedLogLevel !== null && passedLogLevel !== void 0 ? passedLogLevel : 'info';
163
165
  return (0, exports.internalGetCompositions)({
@@ -185,6 +187,7 @@ const getCompositions = (serveUrlOrWebpackUrl, config) => {
185
187
  api: 'getCompositions()',
186
188
  }),
187
189
  chromeMode: chromeMode !== null && chromeMode !== void 0 ? chromeMode : 'headless-shell',
190
+ offthreadVideoThreads: offthreadVideoThreads !== null && offthreadVideoThreads !== void 0 ? offthreadVideoThreads : null,
188
191
  });
189
192
  };
190
193
  exports.getCompositions = getCompositions;
@@ -12,6 +12,7 @@ const getSilentParts = async ({ src, noiseThresholdInDecibels: passedNoiseThresh
12
12
  logLevel: logLevel !== null && logLevel !== void 0 ? logLevel : 'info',
13
13
  indent: false,
14
14
  binariesDirectory: binariesDirectory !== null && binariesDirectory !== void 0 ? binariesDirectory : null,
15
+ extraThreads: 0,
15
16
  });
16
17
  const minDurationInSeconds = passedMinDuration !== null && passedMinDuration !== void 0 ? passedMinDuration : 1;
17
18
  if (typeof minDurationInSeconds !== 'number') {
@@ -13,6 +13,7 @@ const getVideoMetadata = async (videoSource, options) => {
13
13
  logLevel: (_a = options === null || options === void 0 ? void 0 : options.logLevel) !== null && _a !== void 0 ? _a : 'info',
14
14
  indent: false,
15
15
  binariesDirectory: (_b = options === null || options === void 0 ? void 0 : options.binariesDirectory) !== null && _b !== void 0 ? _b : null,
16
+ extraThreads: 0,
16
17
  });
17
18
  const metadataResponse = await compositor.executeCommand('GetVideoMetadata', {
18
19
  src: (0, node_path_1.resolve)(process.cwd(), videoSource),
package/dist/index.d.ts CHANGED
@@ -54,7 +54,7 @@ export declare const RenderInternals: {
54
54
  port: number | null;
55
55
  downloadMap: import("./assets/download-map").DownloadMap;
56
56
  remotionRoot: string;
57
- concurrency: number;
57
+ offthreadVideoThreads: number;
58
58
  logLevel: import("./log-level").LogLevel;
59
59
  indent: boolean;
60
60
  offthreadVideoCacheSizeInBytes: number | null;
@@ -423,11 +423,11 @@ export declare const RenderInternals: {
423
423
  INDENT_TOKEN: string;
424
424
  isColorSupported: () => boolean;
425
425
  HeadlessBrowser: typeof HeadlessBrowser;
426
- prepareServer: ({ webpackConfigOrServeUrl, port, remotionRoot, concurrency, logLevel, indent, offthreadVideoCacheSizeInBytes, binariesDirectory, forceIPv4, }: {
426
+ prepareServer: ({ webpackConfigOrServeUrl, port, remotionRoot, offthreadVideoThreads, logLevel, indent, offthreadVideoCacheSizeInBytes, binariesDirectory, forceIPv4, }: {
427
427
  webpackConfigOrServeUrl: string;
428
428
  port: number | null;
429
429
  remotionRoot: string;
430
- concurrency: number;
430
+ offthreadVideoThreads: number;
431
431
  logLevel: import("./log-level").LogLevel;
432
432
  indent: boolean;
433
433
  offthreadVideoCacheSizeInBytes: number | null;
@@ -438,7 +438,7 @@ export declare const RenderInternals: {
438
438
  webpackConfigOrServeUrl: string;
439
439
  port: number | null;
440
440
  remotionRoot: string;
441
- concurrency: number;
441
+ offthreadVideoThreads: number;
442
442
  logLevel: import("./log-level").LogLevel;
443
443
  indent: boolean;
444
444
  offthreadVideoCacheSizeInBytes: number | null;
@@ -471,7 +471,6 @@ export declare const RenderInternals: {
471
471
  server: import("./prepare-server").RemotionServer | undefined;
472
472
  serveUrl: string;
473
473
  port: number | null;
474
- offthreadVideoCacheSizeInBytes: number | null;
475
474
  onArtifact: import("./render-frames").OnArtifact | null;
476
475
  } & import("./options/option").ToOptions<{
477
476
  readonly offthreadVideoCacheSizeInBytes: {
@@ -492,6 +491,24 @@ export declare const RenderInternals: {
492
491
  };
493
492
  setConfig: (size: number | null) => void;
494
493
  };
494
+ readonly offthreadVideoThreads: {
495
+ name: string;
496
+ cliFlag: "offthreadvideo-video-threads";
497
+ description: () => import("react/jsx-runtime").JSX.Element;
498
+ ssrName: "offthreadVideoThreads";
499
+ docLink: string;
500
+ type: number | null;
501
+ getValue: ({ commandLine }: {
502
+ commandLine: Record<string, unknown>;
503
+ }) => {
504
+ source: string;
505
+ value: number;
506
+ } | {
507
+ source: string;
508
+ value: null;
509
+ };
510
+ setConfig: (size: number | null) => void;
511
+ };
495
512
  readonly jpegQuality: {
496
513
  name: string;
497
514
  cliFlag: "jpeg-quality";
@@ -661,6 +678,24 @@ export declare const RenderInternals: {
661
678
  };
662
679
  setConfig: (size: number | null) => void;
663
680
  };
681
+ readonly offthreadVideoThreads: {
682
+ name: string;
683
+ cliFlag: "offthreadvideo-video-threads";
684
+ description: () => import("react/jsx-runtime").JSX.Element;
685
+ ssrName: "offthreadVideoThreads";
686
+ docLink: string;
687
+ type: number | null;
688
+ getValue: ({ commandLine }: {
689
+ commandLine: Record<string, unknown>;
690
+ }) => {
691
+ source: string;
692
+ value: number;
693
+ } | {
694
+ source: string;
695
+ value: null;
696
+ };
697
+ setConfig: (size: number | null) => void;
698
+ };
664
699
  readonly logLevel: {
665
700
  cliFlag: "log";
666
701
  name: string;
@@ -765,6 +800,24 @@ export declare const RenderInternals: {
765
800
  };
766
801
  setConfig: (size: number | null) => void;
767
802
  };
803
+ readonly offthreadVideoThreads: {
804
+ name: string;
805
+ cliFlag: "offthreadvideo-video-threads";
806
+ description: () => import("react/jsx-runtime").JSX.Element;
807
+ ssrName: "offthreadVideoThreads";
808
+ docLink: string;
809
+ type: number | null;
810
+ getValue: ({ commandLine }: {
811
+ commandLine: Record<string, unknown>;
812
+ }) => {
813
+ source: string;
814
+ value: number;
815
+ } | {
816
+ source: string;
817
+ value: null;
818
+ };
819
+ setConfig: (size: number | null) => void;
820
+ };
768
821
  readonly logLevel: {
769
822
  cliFlag: "log";
770
823
  name: string;
@@ -902,6 +955,24 @@ export declare const RenderInternals: {
902
955
  };
903
956
  setConfig: (size: number | null) => void;
904
957
  };
958
+ readonly offthreadVideoThreads: {
959
+ name: string;
960
+ cliFlag: "offthreadvideo-video-threads";
961
+ description: () => import("react/jsx-runtime").JSX.Element;
962
+ ssrName: "offthreadVideoThreads";
963
+ docLink: string;
964
+ type: number | null;
965
+ getValue: ({ commandLine }: {
966
+ commandLine: Record<string, unknown>;
967
+ }) => {
968
+ source: string;
969
+ value: number;
970
+ } | {
971
+ source: string;
972
+ value: null;
973
+ };
974
+ setConfig: (size: number | null) => void;
975
+ };
905
976
  readonly jpegQuality: {
906
977
  name: string;
907
978
  cliFlag: "jpeg-quality";
@@ -1077,4 +1148,5 @@ export declare const RenderInternals: {
1077
1148
  };
1078
1149
  }>) => Promise<import("./ensure-browser").BrowserStatus>;
1079
1150
  printUsefulErrorMessage: (err: Error, logLevel: import("./log-level").LogLevel, indent: boolean) => void;
1151
+ DEFAULT_RENDER_FRAMES_OFFTHREAD_VIDEO_THREADS: number;
1080
1152
  };
package/dist/index.js CHANGED
@@ -113,6 +113,7 @@ const codec_supports_media_1 = require("./codec-supports-media");
113
113
  const make_file_executable_1 = require("./compositor/make-file-executable");
114
114
  const ensure_browser_2 = require("./ensure-browser");
115
115
  const audio_codec_1 = require("./options/audio-codec");
116
+ const offthreadvideo_threads_1 = require("./options/offthreadvideo-threads");
116
117
  const print_useful_error_message_1 = require("./print-useful-error-message");
117
118
  const render_has_audio_1 = require("./render-has-audio");
118
119
  const to_megabytes_1 = require("./to-megabytes");
@@ -203,6 +204,7 @@ exports.RenderInternals = {
203
204
  toMegabytes: to_megabytes_1.toMegabytes,
204
205
  internalEnsureBrowser: ensure_browser_2.internalEnsureBrowser,
205
206
  printUsefulErrorMessage: print_useful_error_message_1.printUsefulErrorMessage,
207
+ DEFAULT_RENDER_FRAMES_OFFTHREAD_VIDEO_THREADS: offthreadvideo_threads_1.DEFAULT_RENDER_FRAMES_OFFTHREAD_VIDEO_THREADS,
206
208
  };
207
209
  // Warn of potential performance issues with Apple Silicon (M1 chip under Rosetta)
208
210
  (0, check_version_requirements_1.checkRuntimeVersion)('info', false);
@@ -8,10 +8,10 @@ export declare const extractUrlAndSourceFromUrl: (url: string) => {
8
8
  transparent: boolean;
9
9
  toneMapped: boolean;
10
10
  };
11
- export declare const startOffthreadVideoServer: ({ downloadMap, concurrency, logLevel, indent, offthreadVideoCacheSizeInBytes, binariesDirectory, }: {
11
+ export declare const startOffthreadVideoServer: ({ downloadMap, logLevel, indent, offthreadVideoCacheSizeInBytes, binariesDirectory, offthreadVideoThreads, }: {
12
12
  downloadMap: DownloadMap;
13
13
  offthreadVideoCacheSizeInBytes: number | null;
14
- concurrency: number;
14
+ offthreadVideoThreads: number;
15
15
  logLevel: LogLevel;
16
16
  indent: boolean;
17
17
  binariesDirectory: string | null;
@@ -36,12 +36,12 @@ const extractUrlAndSourceFromUrl = (url) => {
36
36
  };
37
37
  exports.extractUrlAndSourceFromUrl = extractUrlAndSourceFromUrl;
38
38
  const REQUEST_CLOSED_TOKEN = 'Request closed';
39
- const startOffthreadVideoServer = ({ downloadMap, concurrency, logLevel, indent, offthreadVideoCacheSizeInBytes, binariesDirectory, }) => {
39
+ const startOffthreadVideoServer = ({ downloadMap, logLevel, indent, offthreadVideoCacheSizeInBytes, binariesDirectory, offthreadVideoThreads, }) => {
40
40
  (0, offthreadvideo_cache_size_1.validateOffthreadVideoCacheSizeInBytes)(offthreadVideoCacheSizeInBytes);
41
41
  const compositor = (0, compositor_1.startCompositor)({
42
42
  type: 'StartLongRunningProcess',
43
43
  payload: {
44
- concurrency,
44
+ concurrency: offthreadVideoThreads,
45
45
  maximum_frame_cache_size_in_bytes: offthreadVideoCacheSizeInBytes,
46
46
  verbose: (0, log_level_1.isEqualOrBelowLogLevel)(logLevel, 'verbose'),
47
47
  },
@@ -168,6 +168,24 @@ export declare const allOptions: {
168
168
  };
169
169
  setConfig: (size: number | null) => void;
170
170
  };
171
+ offthreadVideoThreadsOption: {
172
+ name: string;
173
+ cliFlag: "offthreadvideo-video-threads";
174
+ description: () => import("react/jsx-runtime").JSX.Element;
175
+ ssrName: "offthreadVideoThreads";
176
+ docLink: string;
177
+ type: number | null;
178
+ getValue: ({ commandLine }: {
179
+ commandLine: Record<string, unknown>;
180
+ }) => {
181
+ source: string;
182
+ value: number;
183
+ } | {
184
+ source: string;
185
+ value: null;
186
+ };
187
+ setConfig: (size: number | null) => void;
188
+ };
171
189
  webhookCustomDataOption: {
172
190
  name: string;
173
191
  cliFlag: "webhook-custom-data";
@@ -27,6 +27,7 @@ const metadata_1 = require("./metadata");
27
27
  const mute_1 = require("./mute");
28
28
  const number_of_gif_loops_1 = require("./number-of-gif-loops");
29
29
  const offthreadvideo_cache_size_1 = require("./offthreadvideo-cache-size");
30
+ const offthreadvideo_threads_1 = require("./offthreadvideo-threads");
30
31
  const on_browser_download_1 = require("./on-browser-download");
31
32
  const overwrite_1 = require("./overwrite");
32
33
  const prefer_lossless_1 = require("./prefer-lossless");
@@ -52,6 +53,7 @@ exports.allOptions = {
52
53
  mutedOption: mute_1.mutedOption,
53
54
  videoCodecOption: video_codec_1.videoCodecOption,
54
55
  offthreadVideoCacheSizeInBytesOption: offthreadvideo_cache_size_1.offthreadVideoCacheSizeInBytesOption,
56
+ offthreadVideoThreadsOption: offthreadvideo_threads_1.offthreadVideoThreadsOption,
55
57
  webhookCustomDataOption: webhook_custom_data_1.webhookCustomDataOption,
56
58
  colorSpaceOption: color_space_1.colorSpaceOption,
57
59
  deleteAfterOption: delete_after_1.deleteAfterOption,