@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
@@ -70,6 +70,7 @@ const prespawnFfmpeg = (options) => {
70
70
  args: finalFfmpegString,
71
71
  indent: options.indent,
72
72
  logLevel: options.logLevel,
73
+ binariesDirectory: options.binariesDirectory,
73
74
  });
74
75
  options.signal(() => {
75
76
  task.kill();
@@ -310,7 +310,7 @@ const innerRenderFrames = async ({ onFrameUpdate, outputDir, onStart, serialized
310
310
  await Promise.all(downloadPromises);
311
311
  return result;
312
312
  };
313
- const internalRenderFramesRaw = ({ browserExecutable, cancelSignal, chromiumOptions, composition, concurrency, envVariables, everyNthFrame, frameRange, imageFormat, indent, jpegQuality, muted, onBrowserLog, onDownload, onFrameBuffer, onFrameUpdate, onStart, outputDir, port, puppeteerInstance, scale, server, timeoutInMilliseconds, logLevel, webpackBundleOrServeUrl, serializedInputPropsWithCustomSchema, serializedResolvedPropsWithCustomSchema, offthreadVideoCacheSizeInBytes, parallelEncodingEnabled, }) => {
313
+ const internalRenderFramesRaw = ({ browserExecutable, cancelSignal, chromiumOptions, composition, concurrency, envVariables, everyNthFrame, frameRange, imageFormat, indent, jpegQuality, muted, onBrowserLog, onDownload, onFrameBuffer, onFrameUpdate, onStart, outputDir, port, puppeteerInstance, scale, server, timeoutInMilliseconds, logLevel, webpackBundleOrServeUrl, serializedInputPropsWithCustomSchema, serializedResolvedPropsWithCustomSchema, offthreadVideoCacheSizeInBytes, parallelEncodingEnabled, binariesDirectory, }) => {
314
314
  (0, validate_1.validateDimension)(composition.height, 'height', 'in the `config` object passed to `renderFrames()`');
315
315
  (0, validate_1.validateDimension)(composition.width, 'width', 'in the `config` object passed to `renderFrames()`');
316
316
  (0, validate_1.validateFps)(composition.fps, 'in the `config` object of `renderFrames()`', false);
@@ -352,6 +352,7 @@ const internalRenderFramesRaw = ({ browserExecutable, cancelSignal, chromiumOpti
352
352
  logLevel,
353
353
  indent,
354
354
  offthreadVideoCacheSizeInBytes,
355
+ binariesDirectory,
355
356
  }, {
356
357
  onDownload,
357
358
  onError,
@@ -397,6 +398,7 @@ const internalRenderFramesRaw = ({ browserExecutable, cancelSignal, chromiumOpti
397
398
  serializedInputPropsWithCustomSchema,
398
399
  serializedResolvedPropsWithCustomSchema,
399
400
  parallelEncodingEnabled,
401
+ binariesDirectory,
400
402
  });
401
403
  }),
402
404
  ])
@@ -440,7 +442,7 @@ exports.internalRenderFrames = (0, wrap_with_error_handling_1.wrapWithErrorHandl
440
442
  * @see [Documentation](https://www.remotion.dev/docs/renderer/render-frames)
441
443
  */
442
444
  const renderFrames = (options) => {
443
- const { composition, inputProps, onFrameUpdate, onStart, outputDir, serveUrl, browserExecutable, cancelSignal, chromiumOptions, concurrency, dumpBrowserLogs, envVariables, everyNthFrame, frameRange, imageFormat, jpegQuality, muted, onBrowserLog, onDownload, onFrameBuffer, port, puppeteerInstance, scale, timeoutInMilliseconds, verbose, quality, logLevel, offthreadVideoCacheSizeInBytes, } = options;
445
+ const { composition, inputProps, onFrameUpdate, onStart, outputDir, serveUrl, browserExecutable, cancelSignal, chromiumOptions, concurrency, dumpBrowserLogs, envVariables, everyNthFrame, frameRange, imageFormat, jpegQuality, muted, onBrowserLog, onDownload, onFrameBuffer, port, puppeteerInstance, scale, timeoutInMilliseconds, verbose, quality, logLevel, offthreadVideoCacheSizeInBytes, binariesDirectory, } = options;
444
446
  if (!composition) {
445
447
  throw new Error('No `composition` option has been specified for renderFrames()');
446
448
  }
@@ -488,6 +490,7 @@ const renderFrames = (options) => {
488
490
  server: undefined,
489
491
  offthreadVideoCacheSizeInBytes: offthreadVideoCacheSizeInBytes !== null && offthreadVideoCacheSizeInBytes !== void 0 ? offthreadVideoCacheSizeInBytes : null,
490
492
  parallelEncodingEnabled: false,
493
+ binariesDirectory: binariesDirectory !== null && binariesDirectory !== void 0 ? binariesDirectory : null,
491
494
  });
492
495
  };
493
496
  exports.renderFrames = renderFrames;
@@ -66,6 +66,7 @@ export type InternalRenderMediaOptions = {
66
66
  serveUrl: string;
67
67
  concurrency: number | string | null;
68
68
  finishRenderProgress: () => void;
69
+ binariesDirectory: string | null;
69
70
  } & MoreRenderMediaOptions;
70
71
  type Prettify<T> = {
71
72
  [K in keyof T]: T[K];
@@ -118,6 +119,7 @@ export type RenderMediaOptions = Prettify<{
118
119
  concurrency?: number | string | null;
119
120
  colorSpace?: ColorSpace;
120
121
  repro?: boolean;
122
+ binariesDirectory?: string | null;
121
123
  }> & Partial<MoreRenderMediaOptions>;
122
124
  type RenderMediaResult = {
123
125
  buffer: Buffer | null;
@@ -129,5 +131,5 @@ export declare const internalRenderMedia: (args_0: InternalRenderMediaOptions) =
129
131
  * @description Render a video from a composition
130
132
  * @see [Documentation](https://www.remotion.dev/docs/renderer/render-media)
131
133
  */
132
- export declare const renderMedia: ({ proResProfile, x264Preset, crf, composition, inputProps, pixelFormat, codec, envVariables, frameRange, puppeteerInstance, outputLocation, onProgress, overwrite, onDownload, onBrowserLog, onStart, timeoutInMilliseconds, chromiumOptions, scale, browserExecutable, port, cancelSignal, muted, enforceAudioTrack, ffmpegOverride, audioBitrate, videoBitrate, encodingMaxRate, encodingBufferSize, audioCodec, jpegQuality, concurrency, serveUrl, disallowParallelEncoding, everyNthFrame, imageFormat, numberOfGifLoops, dumpBrowserLogs, preferLossless, verbose, quality, logLevel, offthreadVideoCacheSizeInBytes, colorSpace, repro, }: RenderMediaOptions) => Promise<RenderMediaResult>;
134
+ export declare const renderMedia: ({ proResProfile, x264Preset, crf, composition, inputProps, pixelFormat, codec, envVariables, frameRange, puppeteerInstance, outputLocation, onProgress, overwrite, onDownload, onBrowserLog, onStart, timeoutInMilliseconds, chromiumOptions, scale, browserExecutable, port, cancelSignal, muted, enforceAudioTrack, ffmpegOverride, audioBitrate, videoBitrate, encodingMaxRate, encodingBufferSize, audioCodec, jpegQuality, concurrency, serveUrl, disallowParallelEncoding, everyNthFrame, imageFormat, numberOfGifLoops, dumpBrowserLogs, preferLossless, verbose, quality, logLevel, offthreadVideoCacheSizeInBytes, colorSpace, repro, binariesDirectory, }: RenderMediaOptions) => Promise<RenderMediaResult>;
133
135
  export {};
@@ -47,7 +47,7 @@ const validate_scale_1 = require("./validate-scale");
47
47
  const validate_videobitrate_1 = require("./validate-videobitrate");
48
48
  const wrap_with_error_handling_1 = require("./wrap-with-error-handling");
49
49
  const SLOWEST_FRAME_COUNT = 10;
50
- const internalRenderMediaRaw = ({ proResProfile, x264Preset, crf, composition, serializedInputPropsWithCustomSchema, pixelFormat, codec, envVariables, frameRange, puppeteerInstance, outputLocation, onProgress, overwrite, onDownload, onBrowserLog, onStart, timeoutInMilliseconds, chromiumOptions, scale, browserExecutable, port, cancelSignal, muted, enforceAudioTrack, ffmpegOverride, audioBitrate, videoBitrate, encodingMaxRate, encodingBufferSize, audioCodec, concurrency, disallowParallelEncoding, everyNthFrame, imageFormat: provisionalImageFormat, indent, jpegQuality, numberOfGifLoops, onCtrlCExit, preferLossless, serveUrl, server: reusedServer, logLevel, serializedResolvedPropsWithCustomSchema, offthreadVideoCacheSizeInBytes, colorSpace, repro, finishRenderProgress, }) => {
50
+ const internalRenderMediaRaw = ({ proResProfile, x264Preset, crf, composition, serializedInputPropsWithCustomSchema, pixelFormat, codec, envVariables, frameRange, puppeteerInstance, outputLocation, onProgress, overwrite, onDownload, onBrowserLog, onStart, timeoutInMilliseconds, chromiumOptions, scale, browserExecutable, port, cancelSignal, muted, enforceAudioTrack, ffmpegOverride, audioBitrate, videoBitrate, encodingMaxRate, encodingBufferSize, audioCodec, concurrency, disallowParallelEncoding, everyNthFrame, imageFormat: provisionalImageFormat, indent, jpegQuality, numberOfGifLoops, onCtrlCExit, preferLossless, serveUrl, server: reusedServer, logLevel, serializedResolvedPropsWithCustomSchema, offthreadVideoCacheSizeInBytes, colorSpace, repro, finishRenderProgress, binariesDirectory, }) => {
51
51
  if (repro) {
52
52
  (0, repro_1.enableRepro)({
53
53
  serveUrl,
@@ -215,6 +215,7 @@ const internalRenderMediaRaw = ({ proResProfile, x264Preset, crf, composition, s
215
215
  indent,
216
216
  x264Preset: x264Preset !== null && x264Preset !== void 0 ? x264Preset : null,
217
217
  colorSpace,
218
+ binariesDirectory,
218
219
  });
219
220
  stitcherFfmpeg = preStitcher.task;
220
221
  }
@@ -270,6 +271,7 @@ const internalRenderMediaRaw = ({ proResProfile, x264Preset, crf, composition, s
270
271
  logLevel,
271
272
  webpackConfigOrServeUrl: serveUrl,
272
273
  offthreadVideoCacheSizeInBytes: offthreadVideoCacheSizeInBytes !== null && offthreadVideoCacheSizeInBytes !== void 0 ? offthreadVideoCacheSizeInBytes : null,
274
+ binariesDirectory,
273
275
  }, {
274
276
  onDownload,
275
277
  onError: (err) => reject(err),
@@ -335,6 +337,7 @@ const internalRenderMediaRaw = ({ proResProfile, x264Preset, crf, composition, s
335
337
  serializedResolvedPropsWithCustomSchema,
336
338
  offthreadVideoCacheSizeInBytes,
337
339
  parallelEncodingEnabled: parallelEncoding,
340
+ binariesDirectory,
338
341
  });
339
342
  return renderFramesProc;
340
343
  })
@@ -392,6 +395,7 @@ const internalRenderMediaRaw = ({ proResProfile, x264Preset, crf, composition, s
392
395
  audioCodec,
393
396
  x264Preset: x264Preset !== null && x264Preset !== void 0 ? x264Preset : null,
394
397
  colorSpace,
398
+ binariesDirectory,
395
399
  }),
396
400
  stitchStart,
397
401
  ]);
@@ -475,7 +479,7 @@ exports.internalRenderMedia = (0, wrap_with_error_handling_1.wrapWithErrorHandli
475
479
  * @description Render a video from a composition
476
480
  * @see [Documentation](https://www.remotion.dev/docs/renderer/render-media)
477
481
  */
478
- const renderMedia = ({ proResProfile, x264Preset, crf, composition, inputProps, pixelFormat, codec, envVariables, frameRange, puppeteerInstance, outputLocation, onProgress, overwrite, onDownload, onBrowserLog, onStart, timeoutInMilliseconds, chromiumOptions, scale, browserExecutable, port, cancelSignal, muted, enforceAudioTrack, ffmpegOverride, audioBitrate, videoBitrate, encodingMaxRate, encodingBufferSize, audioCodec, jpegQuality, concurrency, serveUrl, disallowParallelEncoding, everyNthFrame, imageFormat, numberOfGifLoops, dumpBrowserLogs, preferLossless, verbose, quality, logLevel, offthreadVideoCacheSizeInBytes, colorSpace, repro, }) => {
482
+ const renderMedia = ({ proResProfile, x264Preset, crf, composition, inputProps, pixelFormat, codec, envVariables, frameRange, puppeteerInstance, outputLocation, onProgress, overwrite, onDownload, onBrowserLog, onStart, timeoutInMilliseconds, chromiumOptions, scale, browserExecutable, port, cancelSignal, muted, enforceAudioTrack, ffmpegOverride, audioBitrate, videoBitrate, encodingMaxRate, encodingBufferSize, audioCodec, jpegQuality, concurrency, serveUrl, disallowParallelEncoding, everyNthFrame, imageFormat, numberOfGifLoops, dumpBrowserLogs, preferLossless, verbose, quality, logLevel, offthreadVideoCacheSizeInBytes, colorSpace, repro, binariesDirectory, }) => {
479
483
  var _a, _b;
480
484
  if (quality !== undefined) {
481
485
  console.warn(`The "quality" option has been renamed. Please use "jpegQuality" instead.`);
@@ -536,6 +540,7 @@ const renderMedia = ({ proResProfile, x264Preset, crf, composition, inputProps,
536
540
  colorSpace: colorSpace !== null && colorSpace !== void 0 ? colorSpace : 'default',
537
541
  repro: repro !== null && repro !== void 0 ? repro : false,
538
542
  finishRenderProgress: () => undefined,
543
+ binariesDirectory: binariesDirectory !== null && binariesDirectory !== void 0 ? binariesDirectory : null,
539
544
  });
540
545
  };
541
546
  exports.renderMedia = renderMedia;
@@ -212,6 +212,7 @@ const internalRenderStillRaw = (options) => {
212
212
  logLevel: options.logLevel,
213
213
  indent: options.indent,
214
214
  offthreadVideoCacheSizeInBytes: options.offthreadVideoCacheSizeInBytes,
215
+ binariesDirectory: options.binariesDirectory,
215
216
  }, {
216
217
  onDownload: options.onDownload,
217
218
  onError,
@@ -257,7 +258,7 @@ exports.internalRenderStill = (0, wrap_with_error_handling_1.wrapWithErrorHandli
257
258
  */
258
259
  const renderStill = (options) => {
259
260
  var _a, _b;
260
- const { composition, serveUrl, browserExecutable, cancelSignal, chromiumOptions, dumpBrowserLogs, envVariables, frame, imageFormat, inputProps, jpegQuality, onBrowserLog, onDownload, output, overwrite, port, puppeteerInstance, scale, timeoutInMilliseconds, verbose, quality, offthreadVideoCacheSizeInBytes, logLevel, } = options;
261
+ const { composition, serveUrl, browserExecutable, cancelSignal, chromiumOptions, dumpBrowserLogs, envVariables, frame, imageFormat, inputProps, jpegQuality, onBrowserLog, onDownload, output, overwrite, port, puppeteerInstance, scale, timeoutInMilliseconds, verbose, quality, offthreadVideoCacheSizeInBytes, logLevel, binariesDirectory, } = options;
261
262
  if (typeof jpegQuality !== 'undefined' && imageFormat !== 'jpeg') {
262
263
  throw new Error("You can only pass the `quality` option if `imageFormat` is 'jpeg'.");
263
264
  }
@@ -296,6 +297,7 @@ const renderStill = (options) => {
296
297
  data: (_b = composition.props) !== null && _b !== void 0 ? _b : {},
297
298
  }).serializedString,
298
299
  offthreadVideoCacheSizeInBytes: offthreadVideoCacheSizeInBytes !== null && offthreadVideoCacheSizeInBytes !== void 0 ? offthreadVideoCacheSizeInBytes : null,
300
+ binariesDirectory: binariesDirectory !== null && binariesDirectory !== void 0 ? binariesDirectory : null,
299
301
  });
300
302
  };
301
303
  exports.renderStill = renderStill;
@@ -33,7 +33,7 @@ export type SelectCompositionOptions = {
33
33
  verbose?: boolean;
34
34
  serveUrl: string;
35
35
  id: string;
36
- } & Partial<ToOptions<typeof optionsMap.renderStill>>;
36
+ } & Partial<ToOptions<typeof optionsMap.selectComposition>>;
37
37
  type InternalReturnType = {
38
38
  metadata: VideoConfig;
39
39
  propsSize: number;
@@ -94,7 +94,7 @@ const innerSelectComposition = async ({ page, onBrowserLog, serializedInputProps
94
94
  };
95
95
  const internalSelectCompositionRaw = async (options) => {
96
96
  const cleanup = [];
97
- const { puppeteerInstance, browserExecutable, chromiumOptions, serveUrl: serveUrlOrWebpackUrl, logLevel, indent, port, envVariables, id, serializedInputPropsWithCustomSchema, onBrowserLog, server, timeoutInMilliseconds, offthreadVideoCacheSizeInBytes, } = options;
97
+ const { puppeteerInstance, browserExecutable, chromiumOptions, serveUrl: serveUrlOrWebpackUrl, logLevel, indent, port, envVariables, id, serializedInputPropsWithCustomSchema, onBrowserLog, server, timeoutInMilliseconds, offthreadVideoCacheSizeInBytes, binariesDirectory, } = options;
98
98
  const { page, cleanup: cleanupPage } = await (0, get_browser_instance_1.getPageAndCleanupFn)({
99
99
  passedInInstance: puppeteerInstance,
100
100
  browserExecutable,
@@ -119,6 +119,7 @@ const internalSelectCompositionRaw = async (options) => {
119
119
  logLevel,
120
120
  indent,
121
121
  offthreadVideoCacheSizeInBytes,
122
+ binariesDirectory,
122
123
  }, {
123
124
  onDownload: () => undefined,
124
125
  onError,
@@ -142,6 +143,7 @@ const internalSelectCompositionRaw = async (options) => {
142
143
  puppeteerInstance,
143
144
  server,
144
145
  offthreadVideoCacheSizeInBytes,
146
+ binariesDirectory,
145
147
  });
146
148
  })
147
149
  .then((data) => {
@@ -168,7 +170,7 @@ exports.internalSelectComposition = (0, wrap_with_error_handling_1.wrapWithError
168
170
  * @see [Documentation](https://www.remotion.dev/docs/renderer/select-composition)
169
171
  */
170
172
  const selectComposition = async (options) => {
171
- const { id, serveUrl, browserExecutable, chromiumOptions, envVariables, inputProps, onBrowserLog, port, puppeteerInstance, timeoutInMilliseconds, verbose, logLevel, offthreadVideoCacheSizeInBytes, } = options;
173
+ const { id, serveUrl, browserExecutable, chromiumOptions, envVariables, inputProps, onBrowserLog, port, puppeteerInstance, timeoutInMilliseconds, verbose, logLevel, offthreadVideoCacheSizeInBytes, binariesDirectory, } = options;
172
174
  const data = await (0, exports.internalSelectComposition)({
173
175
  id,
174
176
  serveUrl,
@@ -188,6 +190,7 @@ const selectComposition = async (options) => {
188
190
  indent: false,
189
191
  server: undefined,
190
192
  offthreadVideoCacheSizeInBytes: offthreadVideoCacheSizeInBytes !== null && offthreadVideoCacheSizeInBytes !== void 0 ? offthreadVideoCacheSizeInBytes : null,
193
+ binariesDirectory: binariesDirectory !== null && binariesDirectory !== void 0 ? binariesDirectory : null,
191
194
  });
192
195
  return data.metadata;
193
196
  };
@@ -9,6 +9,7 @@ export declare const serveStatic: (path: string | null, options: {
9
9
  logLevel: LogLevel;
10
10
  indent: boolean;
11
11
  offthreadVideoCacheSizeInBytes: number | null;
12
+ binariesDirectory: string | null;
12
13
  }) => Promise<{
13
14
  port: number;
14
15
  close: () => Promise<void>;
@@ -16,6 +16,7 @@ const serveStatic = async (path, options) => {
16
16
  logLevel: options.logLevel,
17
17
  indent: options.indent,
18
18
  offthreadVideoCacheSizeInBytes: options.offthreadVideoCacheSizeInBytes,
19
+ binariesDirectory: options.binariesDirectory,
19
20
  });
20
21
  const connections = {};
21
22
  const server = node_http_1.default.createServer((request, response) => {
@@ -38,6 +38,7 @@ type InternalStitchFramesToVideoOptions = {
38
38
  enforceAudioTrack: boolean;
39
39
  ffmpegOverride: null | FfmpegOverrideFn;
40
40
  colorSpace: ColorSpace;
41
+ binariesDirectory: string | null;
41
42
  };
42
43
  export type StitchFramesToVideoOptions = {
43
44
  audioBitrate?: string | null;
@@ -65,11 +66,12 @@ export type StitchFramesToVideoOptions = {
65
66
  ffmpegOverride?: FfmpegOverrideFn;
66
67
  x264Preset?: X264Preset | null;
67
68
  colorSpace?: ColorSpace;
69
+ binariesDirectory?: string | null;
68
70
  };
69
71
  export declare const internalStitchFramesToVideo: (options: InternalStitchFramesToVideoOptions) => Promise<Buffer | null>;
70
72
  /**
71
73
  * @description Takes a series of images and audio information generated by renderFrames() and encodes it to a video.
72
74
  * @see [Documentation](https://www.remotion.dev/docs/renderer/stitch-frames-to-video)
73
75
  */
74
- export declare const stitchFramesToVideo: ({ assetsInfo, force, fps, height, width, audioBitrate, audioCodec, cancelSignal, codec, crf, enforceAudioTrack, ffmpegOverride, muted, numberOfGifLoops, onDownload, onProgress, outputLocation, pixelFormat, proResProfile, verbose, videoBitrate, encodingMaxRate, encodingBufferSize, x264Preset, colorSpace, }: StitchFramesToVideoOptions) => Promise<Buffer | null>;
76
+ export declare const stitchFramesToVideo: ({ assetsInfo, force, fps, height, width, audioBitrate, audioCodec, cancelSignal, codec, crf, enforceAudioTrack, ffmpegOverride, muted, numberOfGifLoops, onDownload, onProgress, outputLocation, pixelFormat, proResProfile, verbose, videoBitrate, encodingMaxRate, encodingBufferSize, x264Preset, colorSpace, binariesDirectory, }: StitchFramesToVideoOptions) => Promise<Buffer | null>;
75
77
  export {};
@@ -34,7 +34,7 @@ const truthy_1 = require("./truthy");
34
34
  const validate_1 = require("./validate");
35
35
  const validate_even_dimensions_with_codec_1 = require("./validate-even-dimensions-with-codec");
36
36
  const validate_videobitrate_1 = require("./validate-videobitrate");
37
- const getAssetsData = async ({ assets, onDownload, fps, expectedFrames, logLevel, onProgress, downloadMap, remotionRoot, indent, }) => {
37
+ const getAssetsData = async ({ assets, onDownload, fps, expectedFrames, logLevel, onProgress, downloadMap, remotionRoot, indent, binariesDirectory, }) => {
38
38
  const fileUrlAssets = await (0, convert_assets_to_file_urls_1.convertAssetsToFileUrls)({
39
39
  assets,
40
40
  onDownload: onDownload !== null && onDownload !== void 0 ? onDownload : (() => () => undefined),
@@ -59,6 +59,7 @@ const getAssetsData = async ({ assets, onDownload, fps, expectedFrames, logLevel
59
59
  downloadMap,
60
60
  indent,
61
61
  logLevel,
62
+ binariesDirectory,
62
63
  });
63
64
  preprocessProgress[index] = 1;
64
65
  updateProgress();
@@ -73,6 +74,7 @@ const getAssetsData = async ({ assets, onDownload, fps, expectedFrames, logLevel
73
74
  remotionRoot,
74
75
  indent,
75
76
  logLevel,
77
+ binariesDirectory,
76
78
  });
77
79
  onProgress(1);
78
80
  (0, delete_directory_1.deleteDirectory)(downloadMap.audioMixing);
@@ -81,7 +83,7 @@ const getAssetsData = async ({ assets, onDownload, fps, expectedFrames, logLevel
81
83
  });
82
84
  return outName;
83
85
  };
84
- const innerStitchFramesToVideo = async ({ assetsInfo, audioBitrate, audioCodec, cancelSignal, codec, crf, enforceAudioTrack, ffmpegOverride, force, fps, height, indent, muted, onDownload, outputLocation, pixelFormat, preEncodedFileLocation, preferLossless, proResProfile, logLevel, videoBitrate, encodingMaxRate, encodingBufferSize, width, numberOfGifLoops, onProgress, x264Preset, colorSpace, }, remotionRoot) => {
86
+ const innerStitchFramesToVideo = async ({ assetsInfo, audioBitrate, audioCodec, cancelSignal, codec, crf, enforceAudioTrack, ffmpegOverride, force, fps, height, indent, muted, onDownload, outputLocation, pixelFormat, preEncodedFileLocation, preferLossless, proResProfile, logLevel, videoBitrate, encodingMaxRate, encodingBufferSize, width, numberOfGifLoops, onProgress, x264Preset, colorSpace, binariesDirectory, }, remotionRoot) => {
85
87
  var _a;
86
88
  (0, validate_1.validateDimension)(height, 'height', 'passed to `stitchFramesToVideo()`');
87
89
  (0, validate_1.validateDimension)(width, 'width', 'passed to `stitchFramesToVideo()`');
@@ -167,6 +169,7 @@ const innerStitchFramesToVideo = async ({ assetsInfo, audioBitrate, audioCodec,
167
169
  downloadMap: assetsInfo.downloadMap,
168
170
  remotionRoot,
169
171
  indent,
172
+ binariesDirectory,
170
173
  })
171
174
  : null;
172
175
  if (mediaSupport.audio && !mediaSupport.video) {
@@ -187,6 +190,7 @@ const innerStitchFramesToVideo = async ({ assetsInfo, audioBitrate, audioCodec,
187
190
  ].filter(no_react_1.NoReactInternals.truthy),
188
191
  indent,
189
192
  logLevel,
193
+ binariesDirectory,
190
194
  });
191
195
  cancelSignal === null || cancelSignal === void 0 ? void 0 : cancelSignal(() => {
192
196
  ffmpegTask.kill();
@@ -273,6 +277,7 @@ const innerStitchFramesToVideo = async ({ assetsInfo, audioBitrate, audioCodec,
273
277
  args: finalFfmpegString,
274
278
  indent,
275
279
  logLevel,
280
+ binariesDirectory,
276
281
  });
277
282
  cancelSignal === null || cancelSignal === void 0 ? void 0 : cancelSignal(() => {
278
283
  task.kill();
@@ -345,7 +350,7 @@ exports.internalStitchFramesToVideo = internalStitchFramesToVideo;
345
350
  * @description Takes a series of images and audio information generated by renderFrames() and encodes it to a video.
346
351
  * @see [Documentation](https://www.remotion.dev/docs/renderer/stitch-frames-to-video)
347
352
  */
348
- const stitchFramesToVideo = ({ assetsInfo, force, fps, height, width, audioBitrate, audioCodec, cancelSignal, codec, crf, enforceAudioTrack, ffmpegOverride, muted, numberOfGifLoops, onDownload, onProgress, outputLocation, pixelFormat, proResProfile, verbose, videoBitrate, encodingMaxRate, encodingBufferSize, x264Preset, colorSpace, }) => {
353
+ const stitchFramesToVideo = ({ assetsInfo, force, fps, height, width, audioBitrate, audioCodec, cancelSignal, codec, crf, enforceAudioTrack, ffmpegOverride, muted, numberOfGifLoops, onDownload, onProgress, outputLocation, pixelFormat, proResProfile, verbose, videoBitrate, encodingMaxRate, encodingBufferSize, x264Preset, colorSpace, binariesDirectory, }) => {
349
354
  return (0, exports.internalStitchFramesToVideo)({
350
355
  assetsInfo,
351
356
  audioBitrate: audioBitrate !== null && audioBitrate !== void 0 ? audioBitrate : null,
@@ -375,6 +380,7 @@ const stitchFramesToVideo = ({ assetsInfo, force, fps, height, width, audioBitra
375
380
  preferLossless: false,
376
381
  x264Preset: x264Preset !== null && x264Preset !== void 0 ? x264Preset : null,
377
382
  colorSpace: colorSpace !== null && colorSpace !== void 0 ? colorSpace : 'default',
383
+ binariesDirectory: binariesDirectory !== null && binariesDirectory !== void 0 ? binariesDirectory : null,
378
384
  });
379
385
  };
380
386
  exports.stitchFramesToVideo = stitchFramesToVideo;
@@ -1,4 +1,3 @@
1
- /// <reference types="node" />
2
1
  import type { TRenderAsset } from 'remotion/no-react';
3
2
  import type { DownloadMap } from './assets/download-map';
4
3
  import type { Page } from './browser/BrowserPage';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@remotion/renderer",
3
- "version": "4.0.119",
3
+ "version": "4.0.120",
4
4
  "description": "Renderer for Remotion",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -18,7 +18,7 @@
18
18
  "extract-zip": "2.0.1",
19
19
  "source-map": "^0.8.0-beta.0",
20
20
  "ws": "8.7.0",
21
- "remotion": "4.0.119"
21
+ "remotion": "4.0.120"
22
22
  },
23
23
  "peerDependencies": {
24
24
  "react": ">=16.8.0",
@@ -40,13 +40,13 @@
40
40
  "vitest": "0.31.1"
41
41
  },
42
42
  "optionalDependencies": {
43
- "@remotion/compositor-darwin-arm64": "4.0.119",
44
- "@remotion/compositor-linux-arm64-musl": "4.0.119",
45
- "@remotion/compositor-darwin-x64": "4.0.119",
46
- "@remotion/compositor-linux-arm64-gnu": "4.0.119",
47
- "@remotion/compositor-linux-x64-musl": "4.0.119",
48
- "@remotion/compositor-win32-x64-msvc": "4.0.119",
49
- "@remotion/compositor-linux-x64-gnu": "4.0.119"
43
+ "@remotion/compositor-darwin-arm64": "4.0.120",
44
+ "@remotion/compositor-darwin-x64": "4.0.120",
45
+ "@remotion/compositor-linux-arm64-musl": "4.0.120",
46
+ "@remotion/compositor-linux-arm64-gnu": "4.0.120",
47
+ "@remotion/compositor-linux-x64-gnu": "4.0.120",
48
+ "@remotion/compositor-linux-x64-musl": "4.0.120",
49
+ "@remotion/compositor-win32-x64-msvc": "4.0.120"
50
50
  },
51
51
  "keywords": [
52
52
  "remotion",