@remotion/renderer 4.0.119 → 4.0.120

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 (58) hide show
  1. package/dist/assets/get-audio-channels.d.ts +8 -2
  2. package/dist/assets/get-audio-channels.js +18 -6
  3. package/dist/call-ffmpeg.d.ts +4 -3
  4. package/dist/call-ffmpeg.js +14 -4
  5. package/dist/client.d.ts +94 -4
  6. package/dist/combine-videos.d.ts +1 -0
  7. package/dist/combine-videos.js +2 -1
  8. package/dist/compositor/compose.d.ts +1 -1
  9. package/dist/compositor/compose.js +7 -2
  10. package/dist/compositor/compositor.d.ts +9 -2
  11. package/dist/compositor/compositor.js +19 -8
  12. package/dist/compositor/get-executable-path.d.ts +6 -1
  13. package/dist/compositor/get-executable-path.js +2 -2
  14. package/dist/copy-to-clipboard.d.ts +1 -1
  15. package/dist/copy-to-clipboard.js +2 -1
  16. package/dist/create-ffmpeg-complex-filter.d.ts +4 -1
  17. package/dist/create-silent-audio.d.ts +2 -1
  18. package/dist/create-silent-audio.js +2 -1
  19. package/dist/extract-audio.d.ts +1 -0
  20. package/dist/extract-audio.js +2 -1
  21. package/dist/get-compositions.js +5 -2
  22. package/dist/get-silent-parts.d.ts +2 -1
  23. package/dist/get-silent-parts.js +2 -1
  24. package/dist/get-video-metadata.d.ts +1 -0
  25. package/dist/get-video-metadata.js +2 -1
  26. package/dist/guess-extension-for-media.d.ts +2 -1
  27. package/dist/guess-extension-for-media.js +2 -1
  28. package/dist/index.d.ts +64 -11
  29. package/dist/merge-audio-track.d.ts +1 -0
  30. package/dist/merge-audio-track.js +11 -2
  31. package/dist/offthread-video-server.d.ts +2 -1
  32. package/dist/offthread-video-server.js +12 -6
  33. package/dist/options/binaries-directory.d.ts +15 -0
  34. package/dist/options/binaries-directory.js +35 -0
  35. package/dist/options/gl.d.ts +3 -3
  36. package/dist/options/index.d.ts +19 -4
  37. package/dist/options/index.js +2 -0
  38. package/dist/options/option.d.ts +1 -1
  39. package/dist/options/options-map.d.ts +75 -0
  40. package/dist/options/options-map.js +6 -0
  41. package/dist/prepare-server.d.ts +2 -1
  42. package/dist/prepare-server.js +3 -1
  43. package/dist/preprocess-audio-track.d.ts +1 -0
  44. package/dist/preprocess-audio-track.js +9 -3
  45. package/dist/prespawn-ffmpeg.d.ts +1 -0
  46. package/dist/prespawn-ffmpeg.js +1 -0
  47. package/dist/render-frames.js +5 -2
  48. package/dist/render-media.d.ts +3 -1
  49. package/dist/render-media.js +7 -2
  50. package/dist/render-still.js +3 -1
  51. package/dist/select-composition.d.ts +1 -1
  52. package/dist/select-composition.js +5 -2
  53. package/dist/serve-static.d.ts +1 -0
  54. package/dist/serve-static.js +1 -0
  55. package/dist/stitch-frames-to-video.d.ts +3 -1
  56. package/dist/stitch-frames-to-video.js +9 -3
  57. package/dist/take-frame-and-compose.d.ts +0 -1
  58. package/package.json +9 -9
@@ -1,4 +1,10 @@
1
1
  import type { LogLevel } from '../log-level';
2
2
  import type { AudioChannelsAndDurationResultCache, DownloadMap } from './download-map';
3
- export declare const getAudioChannelsAndDurationWithoutCache: (src: string, indent: boolean, logLevel: LogLevel) => Promise<AudioChannelsAndDurationResultCache>;
4
- export declare const getAudioChannelsAndDuration: (downloadMap: DownloadMap, src: string, indent: boolean, logLevel: LogLevel) => Promise<AudioChannelsAndDurationResultCache>;
3
+ export declare const getAudioChannelsAndDurationWithoutCache: (src: string, indent: boolean, logLevel: LogLevel, binariesDirectory: string | null) => Promise<AudioChannelsAndDurationResultCache>;
4
+ export declare const getAudioChannelsAndDuration: ({ downloadMap, src, indent, logLevel, binariesDirectory, }: {
5
+ downloadMap: DownloadMap;
6
+ src: string;
7
+ indent: boolean;
8
+ logLevel: LogLevel;
9
+ binariesDirectory: string | null;
10
+ }) => Promise<AudioChannelsAndDurationResultCache>;
@@ -4,7 +4,7 @@ exports.getAudioChannelsAndDuration = exports.getAudioChannelsAndDurationWithout
4
4
  const call_ffmpeg_1 = require("../call-ffmpeg");
5
5
  const p_limit_1 = require("../p-limit");
6
6
  const limit = (0, p_limit_1.pLimit)(1);
7
- const getAudioChannelsAndDurationWithoutCache = async (src, indent, logLevel) => {
7
+ const getAudioChannelsAndDurationWithoutCache = async (src, indent, logLevel, binariesDirectory) => {
8
8
  const args = [
9
9
  ['-v', 'error'],
10
10
  ['-show_entries', 'stream=channels:format=duration'],
@@ -13,7 +13,13 @@ const getAudioChannelsAndDurationWithoutCache = async (src, indent, logLevel) =>
13
13
  ]
14
14
  .reduce((acc, val) => acc.concat(val), [])
15
15
  .filter(Boolean);
16
- const task = await (0, call_ffmpeg_1.callFf)({ bin: 'ffprobe', args, indent, logLevel });
16
+ const task = await (0, call_ffmpeg_1.callFf)({
17
+ bin: 'ffprobe',
18
+ args,
19
+ indent,
20
+ logLevel,
21
+ binariesDirectory,
22
+ });
17
23
  const channels = task.stdout.match(/channels=([0-9]+)/);
18
24
  const duration = task.stdout.match(/duration=([0-9.]+)/);
19
25
  const result = {
@@ -23,15 +29,21 @@ const getAudioChannelsAndDurationWithoutCache = async (src, indent, logLevel) =>
23
29
  return result;
24
30
  };
25
31
  exports.getAudioChannelsAndDurationWithoutCache = getAudioChannelsAndDurationWithoutCache;
26
- async function getAudioChannelsAndDurationUnlimited(downloadMap, src, indent, logLevel) {
32
+ async function getAudioChannelsAndDurationUnlimited({ downloadMap, src, indent, logLevel, binariesDirectory, }) {
27
33
  if (downloadMap.durationOfAssetCache[src]) {
28
34
  return downloadMap.durationOfAssetCache[src];
29
35
  }
30
- const result = await (0, exports.getAudioChannelsAndDurationWithoutCache)(src, indent, logLevel);
36
+ const result = await (0, exports.getAudioChannelsAndDurationWithoutCache)(src, indent, logLevel, binariesDirectory);
31
37
  downloadMap.durationOfAssetCache[src] = result;
32
38
  return result;
33
39
  }
34
- const getAudioChannelsAndDuration = (downloadMap, src, indent, logLevel) => {
35
- return limit(() => getAudioChannelsAndDurationUnlimited(downloadMap, src, indent, logLevel));
40
+ const getAudioChannelsAndDuration = ({ downloadMap, src, indent, logLevel, binariesDirectory, }) => {
41
+ return limit(() => getAudioChannelsAndDurationUnlimited({
42
+ downloadMap,
43
+ src,
44
+ indent,
45
+ logLevel,
46
+ binariesDirectory,
47
+ }));
36
48
  };
37
49
  exports.getAudioChannelsAndDuration = getAudioChannelsAndDuration;
@@ -1,18 +1,19 @@
1
- /// <reference types="node" />
2
1
  import execa from 'execa';
3
2
  import type { SpawnOptionsWithoutStdio } from 'node:child_process';
4
3
  import type { LogLevel } from './log-level';
5
- export declare const callFf: ({ args, bin, indent, logLevel, options, }: {
4
+ export declare const callFf: ({ args, bin, indent, logLevel, options, binariesDirectory, }: {
6
5
  bin: 'ffmpeg' | 'ffprobe';
7
6
  args: (string | null)[];
8
7
  indent: boolean;
9
8
  logLevel: LogLevel;
9
+ binariesDirectory: string | null;
10
10
  options?: execa.Options<string> | undefined;
11
11
  }) => execa.ExecaChildProcess<string>;
12
- export declare const callFfNative: ({ args, bin, indent, logLevel, options, }: {
12
+ export declare const callFfNative: ({ args, bin, indent, logLevel, options, binariesDirectory, }: {
13
13
  bin: 'ffmpeg' | 'ffprobe';
14
14
  args: (string | null)[];
15
15
  indent: boolean;
16
16
  logLevel: LogLevel;
17
+ binariesDirectory: string | null;
17
18
  options?: SpawnOptionsWithoutStdio | undefined;
18
19
  }) => import("child_process").ChildProcessWithoutNullStreams;
@@ -10,8 +10,13 @@ const node_fs_1 = require("node:fs");
10
10
  const path_1 = __importDefault(require("path"));
11
11
  const get_executable_path_1 = require("./compositor/get-executable-path");
12
12
  const truthy_1 = require("./truthy");
13
- const callFf = ({ args, bin, indent, logLevel, options, }) => {
14
- const executablePath = (0, get_executable_path_1.getExecutablePath)(bin, indent, logLevel);
13
+ const callFf = ({ args, bin, indent, logLevel, options, binariesDirectory, }) => {
14
+ const executablePath = (0, get_executable_path_1.getExecutablePath)({
15
+ type: bin,
16
+ indent,
17
+ logLevel,
18
+ binariesDirectory,
19
+ });
15
20
  if (!process.env.READ_ONLY_FS) {
16
21
  (0, node_fs_1.chmodSync)(executablePath, 0o755);
17
22
  }
@@ -21,8 +26,13 @@ const callFf = ({ args, bin, indent, logLevel, options, }) => {
21
26
  });
22
27
  };
23
28
  exports.callFf = callFf;
24
- const callFfNative = ({ args, bin, indent, logLevel, options, }) => {
25
- const executablePath = (0, get_executable_path_1.getExecutablePath)(bin, indent, logLevel);
29
+ const callFfNative = ({ args, bin, indent, logLevel, options, binariesDirectory, }) => {
30
+ const executablePath = (0, get_executable_path_1.getExecutablePath)({
31
+ type: bin,
32
+ indent,
33
+ logLevel,
34
+ binariesDirectory,
35
+ });
26
36
  if (!process.env.READ_ONLY_FS) {
27
37
  (0, node_fs_1.chmodSync)(executablePath, 0o755);
28
38
  }
package/dist/client.d.ts CHANGED
@@ -350,7 +350,7 @@ export declare const BrowserSafeApis: {
350
350
  webhookCustomDataOption: {
351
351
  name: string;
352
352
  cliFlag: "webhook-custom-data";
353
- description: (type: "ssr" | "cli") => import("react/jsx-runtime").JSX.Element;
353
+ description: (type: "cli" | "ssr") => import("react/jsx-runtime").JSX.Element;
354
354
  ssrName: "customData";
355
355
  docLink: string;
356
356
  type: Record<string, unknown> | null;
@@ -424,19 +424,19 @@ export declare const BrowserSafeApis: {
424
424
  cliFlag: "gl";
425
425
  docLink: string;
426
426
  name: string;
427
- type: "angle" | "swangle" | "egl" | "swiftshader" | "vulkan" | "angle-egl" | null;
427
+ type: "swangle" | "angle" | "egl" | "swiftshader" | "vulkan" | "angle-egl" | null;
428
428
  ssrName: string;
429
429
  description: () => import("react/jsx-runtime").JSX.Element;
430
430
  getValue: ({ commandLine }: {
431
431
  commandLine: Record<string, unknown>;
432
432
  }) => {
433
- value: "angle" | "swangle" | "egl" | "swiftshader" | "vulkan" | "angle-egl";
433
+ value: "swangle" | "angle" | "egl" | "swiftshader" | "vulkan" | "angle-egl";
434
434
  source: string;
435
435
  } | {
436
436
  value: null;
437
437
  source: string;
438
438
  };
439
- setConfig: (value: "angle" | "swangle" | "egl" | "swiftshader" | "vulkan" | "angle-egl" | null) => void;
439
+ setConfig: (value: "swangle" | "angle" | "egl" | "swiftshader" | "vulkan" | "angle-egl" | null) => void;
440
440
  };
441
441
  enableLambdaInsights: {
442
442
  name: string;
@@ -615,6 +615,21 @@ export declare const BrowserSafeApis: {
615
615
  };
616
616
  setConfig: (value: boolean) => void;
617
617
  };
618
+ binariesDirectoryOption: {
619
+ name: string;
620
+ cliFlag: "binaries-directory";
621
+ description: () => import("react/jsx-runtime").JSX.Element;
622
+ ssrName: "binariesDirectory";
623
+ docLink: string;
624
+ type: string | null;
625
+ getValue: ({ commandLine }: {
626
+ commandLine: Record<string, unknown>;
627
+ }) => {
628
+ source: string;
629
+ value: string | null;
630
+ };
631
+ setConfig: (value: string | null) => void;
632
+ };
618
633
  };
619
634
  validColorSpaces: readonly ["default", "bt709", "bt2020-ncl"];
620
635
  optionsMap: {
@@ -853,6 +868,21 @@ export declare const BrowserSafeApis: {
853
868
  };
854
869
  setConfig: (value: number) => void;
855
870
  };
871
+ readonly binariesDirectory: {
872
+ name: string;
873
+ cliFlag: "binaries-directory";
874
+ description: () => import("react/jsx-runtime").JSX.Element;
875
+ ssrName: "binariesDirectory";
876
+ docLink: string;
877
+ type: string | null;
878
+ getValue: ({ commandLine }: {
879
+ commandLine: Record<string, unknown>;
880
+ }) => {
881
+ source: string;
882
+ value: string | null;
883
+ };
884
+ setConfig: (value: string | null) => void;
885
+ };
856
886
  };
857
887
  readonly renderStill: {
858
888
  readonly offthreadVideoCacheSizeInBytes: {
@@ -918,6 +948,21 @@ export declare const BrowserSafeApis: {
918
948
  };
919
949
  setConfig: (value: number) => void;
920
950
  };
951
+ readonly binariesDirectory: {
952
+ name: string;
953
+ cliFlag: "binaries-directory";
954
+ description: () => import("react/jsx-runtime").JSX.Element;
955
+ ssrName: "binariesDirectory";
956
+ docLink: string;
957
+ type: string | null;
958
+ getValue: ({ commandLine }: {
959
+ commandLine: Record<string, unknown>;
960
+ }) => {
961
+ source: string;
962
+ value: string | null;
963
+ };
964
+ setConfig: (value: string | null) => void;
965
+ };
921
966
  };
922
967
  readonly getCompositions: {
923
968
  readonly offthreadVideoCacheSizeInBytes: {
@@ -968,6 +1013,21 @@ export declare const BrowserSafeApis: {
968
1013
  };
969
1014
  setConfig: (value: number) => void;
970
1015
  };
1016
+ readonly binariesDirectory: {
1017
+ name: string;
1018
+ cliFlag: "binaries-directory";
1019
+ description: () => import("react/jsx-runtime").JSX.Element;
1020
+ ssrName: "binariesDirectory";
1021
+ docLink: string;
1022
+ type: string | null;
1023
+ getValue: ({ commandLine }: {
1024
+ commandLine: Record<string, unknown>;
1025
+ }) => {
1026
+ source: string;
1027
+ value: string | null;
1028
+ };
1029
+ setConfig: (value: string | null) => void;
1030
+ };
971
1031
  };
972
1032
  readonly selectComposition: {
973
1033
  readonly offthreadVideoCacheSizeInBytes: {
@@ -1018,6 +1078,21 @@ export declare const BrowserSafeApis: {
1018
1078
  };
1019
1079
  setConfig: (value: number) => void;
1020
1080
  };
1081
+ readonly binariesDirectory: {
1082
+ name: string;
1083
+ cliFlag: "binaries-directory";
1084
+ description: () => import("react/jsx-runtime").JSX.Element;
1085
+ ssrName: "binariesDirectory";
1086
+ docLink: string;
1087
+ type: string | null;
1088
+ getValue: ({ commandLine }: {
1089
+ commandLine: Record<string, unknown>;
1090
+ }) => {
1091
+ source: string;
1092
+ value: string | null;
1093
+ };
1094
+ setConfig: (value: string | null) => void;
1095
+ };
1021
1096
  };
1022
1097
  readonly renderFrames: {
1023
1098
  readonly offthreadVideoCacheSizeInBytes: {
@@ -1083,6 +1158,21 @@ export declare const BrowserSafeApis: {
1083
1158
  };
1084
1159
  setConfig: (value: number) => void;
1085
1160
  };
1161
+ readonly binariesDirectory: {
1162
+ name: string;
1163
+ cliFlag: "binaries-directory";
1164
+ description: () => import("react/jsx-runtime").JSX.Element;
1165
+ ssrName: "binariesDirectory";
1166
+ docLink: string;
1167
+ type: string | null;
1168
+ getValue: ({ commandLine }: {
1169
+ commandLine: Record<string, unknown>;
1170
+ }) => {
1171
+ source: string;
1172
+ value: string | null;
1173
+ };
1174
+ setConfig: (value: string | null) => void;
1175
+ };
1086
1176
  };
1087
1177
  readonly renderMediaOnLambda: {
1088
1178
  readonly offthreadVideoCacheSizeInBytes: {
@@ -14,6 +14,7 @@ type Options = {
14
14
  audioBitrate: string | null;
15
15
  indent: boolean;
16
16
  logLevel: LogLevel;
17
+ binariesDirectory: string | null;
17
18
  };
18
19
  export declare const combineVideos: (options: Options) => Promise<void>;
19
20
  export {};
@@ -14,7 +14,7 @@ const parse_ffmpeg_progress_1 = require("./parse-ffmpeg-progress");
14
14
  const truthy_1 = require("./truthy");
15
15
  const combineVideos = async (options) => {
16
16
  var _a;
17
- const { files, filelistDir, output, onProgress, numberOfFrames, codec, fps, numberOfGifLoops, audioCodec, audioBitrate, indent, logLevel, } = options;
17
+ const { files, filelistDir, output, onProgress, numberOfFrames, codec, fps, numberOfGifLoops, audioCodec, audioBitrate, indent, logLevel, binariesDirectory, } = options;
18
18
  const fileList = files.map((p) => `file '${p}'`).join('\n');
19
19
  const fileListTxt = (0, node_path_1.join)(filelistDir, 'files.txt');
20
20
  (0, node_fs_1.writeFileSync)(fileListTxt, fileList);
@@ -56,6 +56,7 @@ const combineVideos = async (options) => {
56
56
  args: command,
57
57
  indent: options.indent,
58
58
  logLevel: options.logLevel,
59
+ binariesDirectory,
59
60
  });
60
61
  (_a = task.stderr) === null || _a === void 0 ? void 0 : _a.on('data', (data) => {
61
62
  if (onProgress) {
@@ -23,5 +23,5 @@ export declare const compose: ({ height, width, layers, output, downloadMap, ima
23
23
  } & {
24
24
  downloadMap: DownloadMap;
25
25
  }) => Promise<void>;
26
- export declare const callCompositor: (payload: string, indent: boolean, logLevel: LogLevel) => Promise<void>;
26
+ export declare const callCompositor: (payload: string, indent: boolean, logLevel: LogLevel, binariesDirectory: string | null) => Promise<void>;
27
27
  export {};
@@ -51,9 +51,14 @@ const compose = async ({ height, width, layers, output, downloadMap, imageFormat
51
51
  downloadMap.compositorCache[hash] = output;
52
52
  };
53
53
  exports.compose = compose;
54
- const callCompositor = (payload, indent, logLevel) => {
54
+ const callCompositor = (payload, indent, logLevel, binariesDirectory) => {
55
55
  return new Promise((resolve, reject) => {
56
- const execPath = (0, get_executable_path_1.getExecutablePath)('compositor', indent, logLevel);
56
+ const execPath = (0, get_executable_path_1.getExecutablePath)({
57
+ type: 'compositor',
58
+ indent,
59
+ logLevel,
60
+ binariesDirectory,
61
+ });
57
62
  if (!process.env.READ_ONLY_FS) {
58
63
  (0, node_fs_1.chmodSync)(execPath, 0o755);
59
64
  }
@@ -7,9 +7,16 @@ export type Compositor = {
7
7
  waitForDone: () => Promise<void>;
8
8
  pid: number | null;
9
9
  };
10
- export declare const startLongRunningCompositor: ({ maximumFrameCacheItemsInBytes, logLevel, indent, }: {
10
+ export declare const startLongRunningCompositor: ({ maximumFrameCacheItemsInBytes, logLevel, indent, binariesDirectory, }: {
11
11
  maximumFrameCacheItemsInBytes: number | null;
12
12
  logLevel: LogLevel;
13
13
  indent: boolean;
14
+ binariesDirectory: string | null;
15
+ }) => Compositor;
16
+ export declare const startCompositor: <T extends keyof CompositorCommand>({ type, payload, logLevel, indent, binariesDirectory, }: {
17
+ type: T;
18
+ payload: CompositorCommand[T];
19
+ logLevel: LogLevel;
20
+ indent: boolean;
21
+ binariesDirectory: string | null;
14
22
  }) => Compositor;
15
- export declare const startCompositor: <T extends keyof CompositorCommand>(type: T, payload: CompositorCommand[T], logLevel: LogLevel, indent: boolean) => Compositor;
@@ -13,17 +13,28 @@ const logger_1 = require("../logger");
13
13
  const compose_1 = require("./compose");
14
14
  const get_executable_path_1 = require("./get-executable-path");
15
15
  const make_nonce_1 = require("./make-nonce");
16
- const startLongRunningCompositor = ({ maximumFrameCacheItemsInBytes, logLevel, indent, }) => {
17
- return (0, exports.startCompositor)('StartLongRunningProcess', {
18
- concurrency: (0, get_concurrency_1.getActualConcurrency)(null),
19
- maximum_frame_cache_size_in_bytes: maximumFrameCacheItemsInBytes,
20
- verbose: (0, log_level_1.isEqualOrBelowLogLevel)(logLevel, 'verbose'),
21
- }, logLevel, indent);
16
+ const startLongRunningCompositor = ({ maximumFrameCacheItemsInBytes, logLevel, indent, binariesDirectory, }) => {
17
+ return (0, exports.startCompositor)({
18
+ type: 'StartLongRunningProcess',
19
+ payload: {
20
+ concurrency: (0, get_concurrency_1.getActualConcurrency)(null),
21
+ maximum_frame_cache_size_in_bytes: maximumFrameCacheItemsInBytes,
22
+ verbose: (0, log_level_1.isEqualOrBelowLogLevel)(logLevel, 'verbose'),
23
+ },
24
+ logLevel,
25
+ indent,
26
+ binariesDirectory,
27
+ });
22
28
  };
23
29
  exports.startLongRunningCompositor = startLongRunningCompositor;
24
- const startCompositor = (type, payload, logLevel, indent) => {
30
+ const startCompositor = ({ type, payload, logLevel, indent, binariesDirectory = null, }) => {
25
31
  var _a;
26
- const bin = (0, get_executable_path_1.getExecutablePath)('compositor', indent, logLevel);
32
+ const bin = (0, get_executable_path_1.getExecutablePath)({
33
+ type: 'compositor',
34
+ indent,
35
+ logLevel,
36
+ binariesDirectory,
37
+ });
27
38
  if (!process.env.READ_ONLY_FS) {
28
39
  (0, node_fs_1.chmodSync)(bin, 0o755);
29
40
  }
@@ -3,5 +3,10 @@ export declare function isMusl({ indent, logLevel, }: {
3
3
  indent: boolean;
4
4
  logLevel: LogLevel;
5
5
  }): boolean;
6
- export declare const getExecutablePath: (type: 'compositor' | 'ffmpeg' | 'ffprobe', indent: boolean, logLevel: LogLevel) => string;
6
+ export declare const getExecutablePath: ({ indent, logLevel, type, binariesDirectory, }: {
7
+ type: 'compositor' | 'ffmpeg' | 'ffprobe';
8
+ indent: boolean;
9
+ logLevel: LogLevel;
10
+ binariesDirectory: string | null;
11
+ }) => string;
7
12
  export declare const getExecutableDir: (indent: boolean, logLevel: LogLevel) => string;
@@ -22,8 +22,8 @@ function isMusl({ indent, logLevel, }) {
22
22
  return !glibcVersionRuntime;
23
23
  }
24
24
  exports.isMusl = isMusl;
25
- const getExecutablePath = (type, indent, logLevel) => {
26
- const base = (0, exports.getExecutableDir)(indent, logLevel);
25
+ const getExecutablePath = ({ indent, logLevel, type, binariesDirectory, }) => {
26
+ const base = binariesDirectory !== null && binariesDirectory !== void 0 ? binariesDirectory : (0, exports.getExecutableDir)(indent, logLevel);
27
27
  switch (type) {
28
28
  case 'compositor':
29
29
  if (process.platform === 'win32') {
@@ -1,2 +1,2 @@
1
1
  import type { LogLevel } from './log-level';
2
- export declare const copyImageToClipboard: (src: string, logLevel: LogLevel) => Promise<void>;
2
+ export declare const copyImageToClipboard: (src: string, logLevel: LogLevel, binariesDirectory: string | null) => Promise<void>;
@@ -2,11 +2,12 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.copyImageToClipboard = void 0;
4
4
  const compositor_1 = require("./compositor/compositor");
5
- const copyImageToClipboard = async (src, logLevel) => {
5
+ const copyImageToClipboard = async (src, logLevel, binariesDirectory) => {
6
6
  const compositor = (0, compositor_1.startLongRunningCompositor)({
7
7
  maximumFrameCacheItemsInBytes: null,
8
8
  logLevel,
9
9
  indent: false,
10
+ binariesDirectory,
10
11
  });
11
12
  await compositor.executeCommand('CopyImageToClipboard', {
12
13
  src,
@@ -4,6 +4,9 @@ export declare const createFfmpegComplexFilter: ({ filters, downloadMap, }: {
4
4
  filters: PreprocessedAudioTrack[];
5
5
  downloadMap: DownloadMap;
6
6
  }) => Promise<{
7
- complexFilterFlag: [string, string] | null;
7
+ complexFilterFlag: [
8
+ string,
9
+ string
10
+ ] | null;
8
11
  cleanup: () => void;
9
12
  }>;
@@ -1,7 +1,8 @@
1
1
  import type { LogLevel } from './log-level';
2
- export declare const createSilentAudio: ({ numberOfSeconds, outName, indent, logLevel, }: {
2
+ export declare const createSilentAudio: ({ numberOfSeconds, outName, indent, logLevel, binariesDirectory, }: {
3
3
  numberOfSeconds: number;
4
4
  outName: string;
5
5
  indent: boolean;
6
6
  logLevel: LogLevel;
7
+ binariesDirectory: string | null;
7
8
  }) => Promise<void>;
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.createSilentAudio = void 0;
4
4
  const call_ffmpeg_1 = require("./call-ffmpeg");
5
5
  const sample_rate_1 = require("./sample-rate");
6
- const createSilentAudio = async ({ numberOfSeconds, outName, indent, logLevel, }) => {
6
+ const createSilentAudio = async ({ numberOfSeconds, outName, indent, logLevel, binariesDirectory, }) => {
7
7
  await (0, call_ffmpeg_1.callFf)({
8
8
  bin: 'ffmpeg',
9
9
  args: [
@@ -21,6 +21,7 @@ const createSilentAudio = async ({ numberOfSeconds, outName, indent, logLevel, }
21
21
  ],
22
22
  indent,
23
23
  logLevel,
24
+ binariesDirectory,
24
25
  });
25
26
  };
26
27
  exports.createSilentAudio = createSilentAudio;
@@ -3,4 +3,5 @@ export declare const extractAudio: (options: {
3
3
  videoSource: string;
4
4
  audioOutput: string;
5
5
  logLevel?: LogLevel;
6
+ binariesDirectory?: string | null;
6
7
  }) => Promise<void>;
@@ -3,11 +3,12 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.extractAudio = void 0;
4
4
  const compositor_1 = require("./compositor/compositor");
5
5
  const extractAudio = async (options) => {
6
- var _a;
6
+ var _a, _b;
7
7
  const compositor = (0, compositor_1.startLongRunningCompositor)({
8
8
  maximumFrameCacheItemsInBytes: null,
9
9
  logLevel: (_a = options === null || options === void 0 ? void 0 : options.logLevel) !== null && _a !== void 0 ? _a : 'info',
10
10
  indent: false,
11
+ binariesDirectory: (_b = options.binariesDirectory) !== null && _b !== void 0 ? _b : null,
11
12
  });
12
13
  await compositor.executeCommand('ExtractAudio', {
13
14
  input_path: options.videoSource,
@@ -79,7 +79,7 @@ const innerGetCompositions = async ({ envVariables, serializedInputPropsWithCust
79
79
  };
80
80
  });
81
81
  };
82
- const internalGetCompositionsRaw = async ({ browserExecutable, chromiumOptions, envVariables, indent, serializedInputPropsWithCustomSchema, onBrowserLog, port, puppeteerInstance, serveUrlOrWebpackUrl, server, timeoutInMilliseconds, logLevel, offthreadVideoCacheSizeInBytes, }) => {
82
+ const internalGetCompositionsRaw = async ({ browserExecutable, chromiumOptions, envVariables, indent, serializedInputPropsWithCustomSchema, onBrowserLog, port, puppeteerInstance, serveUrlOrWebpackUrl, server, timeoutInMilliseconds, logLevel, offthreadVideoCacheSizeInBytes, binariesDirectory, }) => {
83
83
  const { page, cleanup: cleanupPage } = await (0, get_browser_instance_1.getPageAndCleanupFn)({
84
84
  passedInInstance: puppeteerInstance,
85
85
  browserExecutable,
@@ -104,6 +104,7 @@ const internalGetCompositionsRaw = async ({ browserExecutable, chromiumOptions,
104
104
  logLevel,
105
105
  indent,
106
106
  offthreadVideoCacheSizeInBytes,
107
+ binariesDirectory,
107
108
  }, {
108
109
  onDownload: () => undefined,
109
110
  onError,
@@ -124,6 +125,7 @@ const internalGetCompositionsRaw = async ({ browserExecutable, chromiumOptions,
124
125
  indent,
125
126
  logLevel,
126
127
  offthreadVideoCacheSizeInBytes,
128
+ binariesDirectory,
127
129
  });
128
130
  })
129
131
  .then((comp) => {
@@ -145,7 +147,7 @@ exports.internalGetCompositions = (0, wrap_with_error_handling_1.wrapWithErrorHa
145
147
  * @see [Documentation](https://www.remotion.dev/docs/renderer/get-compositions)
146
148
  */
147
149
  const getCompositions = (serveUrlOrWebpackUrl, config) => {
148
- var _a;
150
+ var _a, _b;
149
151
  if (!serveUrlOrWebpackUrl) {
150
152
  throw new Error('No serve URL or webpack bundle directory was passed to getCompositions().');
151
153
  }
@@ -168,6 +170,7 @@ const getCompositions = (serveUrlOrWebpackUrl, config) => {
168
170
  timeoutInMilliseconds: timeoutInMilliseconds !== null && timeoutInMilliseconds !== void 0 ? timeoutInMilliseconds : TimeoutSettings_1.DEFAULT_TIMEOUT,
169
171
  logLevel: logLevel !== null && logLevel !== void 0 ? logLevel : 'info',
170
172
  offthreadVideoCacheSizeInBytes: (_a = config === null || config === void 0 ? void 0 : config.offthreadVideoCacheSizeInBytes) !== null && _a !== void 0 ? _a : null,
173
+ binariesDirectory: (_b = config === null || config === void 0 ? void 0 : config.binariesDirectory) !== null && _b !== void 0 ? _b : null,
171
174
  });
172
175
  };
173
176
  exports.getCompositions = getCompositions;
@@ -1,8 +1,9 @@
1
1
  import type { GetSilentPartsResponse } from './compositor/payloads';
2
2
  import type { LogLevel } from './log-level';
3
- export declare const getSilentParts: ({ src, noiseThresholdInDecibels: passedNoiseThresholdInDecibels, minDurationInSeconds: passedMinDuration, logLevel, }: {
3
+ export declare const getSilentParts: ({ src, noiseThresholdInDecibels: passedNoiseThresholdInDecibels, minDurationInSeconds: passedMinDuration, logLevel, binariesDirectory, }: {
4
4
  src: string;
5
5
  minDurationInSeconds?: number | undefined;
6
6
  logLevel?: "verbose" | "info" | "warn" | "error" | undefined;
7
7
  noiseThresholdInDecibels?: number | undefined;
8
+ binariesDirectory?: string | null | undefined;
8
9
  }) => Promise<GetSilentPartsResponse>;
@@ -2,11 +2,12 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.getSilentParts = void 0;
4
4
  const compositor_1 = require("./compositor/compositor");
5
- const getSilentParts = async ({ src, noiseThresholdInDecibels: passedNoiseThresholdInDecibels, minDurationInSeconds: passedMinDuration, logLevel, }) => {
5
+ const getSilentParts = async ({ src, noiseThresholdInDecibels: passedNoiseThresholdInDecibels, minDurationInSeconds: passedMinDuration, logLevel, binariesDirectory, }) => {
6
6
  const compositor = (0, compositor_1.startLongRunningCompositor)({
7
7
  maximumFrameCacheItemsInBytes: null,
8
8
  logLevel: logLevel !== null && logLevel !== void 0 ? logLevel : 'info',
9
9
  indent: false,
10
+ binariesDirectory: binariesDirectory !== null && binariesDirectory !== void 0 ? binariesDirectory : null,
10
11
  });
11
12
  const minDurationInSeconds = passedMinDuration !== null && passedMinDuration !== void 0 ? passedMinDuration : 1;
12
13
  if (typeof minDurationInSeconds !== 'number') {
@@ -3,4 +3,5 @@ import type { LogLevel } from './log-level';
3
3
  export { VideoMetadata } from './compositor/payloads';
4
4
  export declare const getVideoMetadata: (videoSource: string, options?: {
5
5
  logLevel?: LogLevel;
6
+ binariesDirectory?: string | null;
6
7
  }) => Promise<VideoMetadata>;
@@ -3,11 +3,12 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.getVideoMetadata = void 0;
4
4
  const compositor_1 = require("./compositor/compositor");
5
5
  const getVideoMetadata = async (videoSource, options) => {
6
- var _a;
6
+ var _a, _b;
7
7
  const compositor = (0, compositor_1.startLongRunningCompositor)({
8
8
  maximumFrameCacheItemsInBytes: null,
9
9
  logLevel: (_a = options === null || options === void 0 ? void 0 : options.logLevel) !== null && _a !== void 0 ? _a : 'info',
10
10
  indent: false,
11
+ binariesDirectory: (_b = options === null || options === void 0 ? void 0 : options.binariesDirectory) !== null && _b !== void 0 ? _b : null,
11
12
  });
12
13
  const metadataResponse = await compositor.executeCommand('GetVideoMetadata', {
13
14
  src: videoSource,
@@ -1,6 +1,7 @@
1
1
  import type { LogLevel } from './log-level';
2
- export declare const guessExtensionForVideo: ({ src, indent, logLevel, }: {
2
+ export declare const guessExtensionForVideo: ({ src, indent, logLevel, binariesDirectory, }: {
3
3
  src: string;
4
4
  indent: boolean;
5
5
  logLevel: LogLevel;
6
+ binariesDirectory: string | null;
6
7
  }) => Promise<"mp3" | "wav" | "mp4" | "webm">;
@@ -2,12 +2,13 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.guessExtensionForVideo = void 0;
4
4
  const call_ffmpeg_1 = require("./call-ffmpeg");
5
- const guessExtensionForVideo = async ({ src, indent, logLevel, }) => {
5
+ const guessExtensionForVideo = async ({ src, indent, logLevel, binariesDirectory, }) => {
6
6
  const { stderr } = await (0, call_ffmpeg_1.callFf)({
7
7
  bin: 'ffprobe',
8
8
  args: [src],
9
9
  indent,
10
10
  logLevel,
11
+ binariesDirectory,
11
12
  });
12
13
  if (stderr.includes('Audio: mp3,')) {
13
14
  return 'mp3';