@remotion/renderer 4.0.143 → 4.0.144

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/LICENSE.md CHANGED
@@ -1,5 +1,9 @@
1
1
  # Remotion License
2
2
 
3
+ In Remotion 5.0, the license will slightly change. [View the changes here](https://github.com/remotion-dev/remotion/pull/3750).
4
+
5
+ ---
6
+
3
7
  Depending on the type of your legal entity, you are granted permission to use Remotion for your project. Individuals and small companies are allowed to use Remotion to create videos for free (even commercial), while a company license is required for for-profit organizations of a certain size. This two-tier system was designed to ensure funding for this project while still allowing the source code to be available and the program to be free for most. Read below for the exact terms of use.
4
8
 
5
9
  - [Free license](#free-license)
@@ -4,9 +4,6 @@ export declare const createFfmpegComplexFilter: ({ filters, downloadMap, }: {
4
4
  filters: PreprocessedAudioTrack[];
5
5
  downloadMap: DownloadMap;
6
6
  }) => Promise<{
7
- complexFilterFlag: [
8
- string,
9
- string
10
- ] | null;
7
+ complexFilterFlag: [string, string] | null;
11
8
  cleanup: () => void;
12
9
  }>;
@@ -21,5 +21,11 @@ export type EnsureBrowserOptions = Partial<{
21
21
  browserExecutable: BrowserExecutable;
22
22
  } & ToOptions<typeof BrowserSafeApis.optionsMap.ensureBrowser>>;
23
23
  export declare const internalEnsureBrowser: ({ indent, logLevel, browserExecutable, onBrowserDownload, }: InternalEnsureBrowserOptions) => Promise<BrowserStatus>;
24
+ /**
25
+ * Ensures a browser is locally installed so a Remotion render can be executed. This function manages the browser's download or validates existing browser paths.
26
+ * @see [Documentation](https://remotion.dev/docs/renderer/ensure-browser)
27
+ * @param {EnsureBrowserOptions} [options] Configuration options which may include a `browserExecutable` path, `logLevel` settings, and `onBrowserDownload` function to manage download specifics and progression.
28
+ * @returns {Promise<void>} A promise that resolves when the browser is prepared with no explicit return value.
29
+ */
24
30
  export declare const ensureBrowser: (options?: EnsureBrowserOptions) => Promise<BrowserStatus>;
25
31
  export {};
@@ -35,6 +35,12 @@ const getBrowserStatus = (browserExecutable) => {
35
35
  }
36
36
  return { type: 'no-browser' };
37
37
  };
38
+ /**
39
+ * Ensures a browser is locally installed so a Remotion render can be executed. This function manages the browser's download or validates existing browser paths.
40
+ * @see [Documentation](https://remotion.dev/docs/renderer/ensure-browser)
41
+ * @param {EnsureBrowserOptions} [options] Configuration options which may include a `browserExecutable` path, `logLevel` settings, and `onBrowserDownload` function to manage download specifics and progression.
42
+ * @returns {Promise<void>} A promise that resolves when the browser is prepared with no explicit return value.
43
+ */
38
44
  const ensureBrowser = (options) => {
39
45
  var _a, _b, _c, _d;
40
46
  const indent = false;
@@ -1,4 +1,13 @@
1
1
  import type { LogLevel } from './log-level';
2
+ /**
3
+ * @description Extracts the audio from a video source and saves it at the specified output path without changing the audio format.
4
+ * @see [Documentation](https://remotion.dev/docs/renderer/extract-audio)
5
+ * @param options.videoSource The path to the video source from which the audio will be extracted.
6
+ * @param options.audioOutput The path where the extracted audio will be saved. Must use the correct file extension which matches the audio codec.
7
+ * @param options.logLevel The level of logging desired (optional).
8
+ * @param options.binariesDirectory The directory for binary dependencies (optional).
9
+ * @returns {Promise<void>} Resolves once the audio extraction is complete.
10
+ */
2
11
  export declare const extractAudio: (options: {
3
12
  videoSource: string;
4
13
  audioOutput: string;
@@ -2,6 +2,15 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.extractAudio = void 0;
4
4
  const compositor_1 = require("./compositor/compositor");
5
+ /**
6
+ * @description Extracts the audio from a video source and saves it at the specified output path without changing the audio format.
7
+ * @see [Documentation](https://remotion.dev/docs/renderer/extract-audio)
8
+ * @param options.videoSource The path to the video source from which the audio will be extracted.
9
+ * @param options.audioOutput The path where the extracted audio will be saved. Must use the correct file extension which matches the audio codec.
10
+ * @param options.logLevel The level of logging desired (optional).
11
+ * @param options.binariesDirectory The directory for binary dependencies (optional).
12
+ * @returns {Promise<void>} Resolves once the audio extraction is complete.
13
+ */
5
14
  const extractAudio = async (options) => {
6
15
  var _a, _b;
7
16
  const compositor = (0, compositor_1.startLongRunningCompositor)({
@@ -30,7 +30,10 @@ export type GetCompositionsOptions = RequiredInputPropsInV5 & {
30
30
  export declare const internalGetCompositions: (args_0: InternalGetCompositionsOptions) => Promise<VideoConfig[]>;
31
31
  /**
32
32
  * @description Gets the compositions defined in a Remotion project based on a Webpack bundle.
33
- * @see [Documentation](https://www.remotion.dev/docs/renderer/get-compositions)
33
+ * @see [Documentation](https://remotion.dev/docs/get-compositions)
34
+ * @param serveUrlOrWebpackUrl URL pointing to the Remotion Bundle.
35
+ * @param {GetCompositionsOptions} [config] Optional configurations for getting composition details.
36
+ * @returns {Promise<VideoConfig[]>} Returns a promise that resolves to an array of available compositions.
34
37
  */
35
38
  export declare const getCompositions: (serveUrlOrWebpackUrl: string, config?: GetCompositionsOptions) => Promise<VideoConfig[]>;
36
39
  export {};
@@ -148,7 +148,10 @@ const internalGetCompositionsRaw = async ({ browserExecutable, chromiumOptions,
148
148
  exports.internalGetCompositions = (0, wrap_with_error_handling_1.wrapWithErrorHandling)(internalGetCompositionsRaw);
149
149
  /**
150
150
  * @description Gets the compositions defined in a Remotion project based on a Webpack bundle.
151
- * @see [Documentation](https://www.remotion.dev/docs/renderer/get-compositions)
151
+ * @see [Documentation](https://remotion.dev/docs/get-compositions)
152
+ * @param serveUrlOrWebpackUrl URL pointing to the Remotion Bundle.
153
+ * @param {GetCompositionsOptions} [config] Optional configurations for getting composition details.
154
+ * @returns {Promise<VideoConfig[]>} Returns a promise that resolves to an array of available compositions.
152
155
  */
153
156
  const getCompositions = (serveUrlOrWebpackUrl, config) => {
154
157
  if (!serveUrlOrWebpackUrl) {
@@ -1,6 +1,18 @@
1
1
  import type { GetSilentPartsResponse, SilentPart } from './compositor/payloads';
2
2
  import type { LogLevel } from './log-level';
3
3
  export type { SilentPart };
4
+ /**
5
+ * Analyzes the silent parts of a video or audio file and returns both the silent and audible segments.
6
+ * @description Uses thresholds defined for noise and duration to identify silent stretches in a media file.
7
+ * @see [Documentation](https://remotion.dev/docs/renderer/get-silent-parts)
8
+ * @param {Object} params Configuration parameters for determining silent parts
9
+ * @param {string} params.src The path to the local video or audio file
10
+ * @param {number} [params.noiseThresholdInDecibels=-20] The decibel level below which sound is considered silent
11
+ * @param {number} [params.minDurationInSeconds=1] The minimum duration (in seconds) to consider a silence as significant
12
+ * @param {string|null} [params.binariesDirectory] Optional directory path for external binaries
13
+ * @param {LogLevel} [params.logLevel] The logging level to be used (debug, verbose, info, warn, error)
14
+ * @returns {Promise<GetSilentPartsResponse>} An object containing arrays of silent and audible parts, along with the overall duration
15
+ */
4
16
  export declare const getSilentParts: ({ src, noiseThresholdInDecibels: passedNoiseThresholdInDecibels, minDurationInSeconds: passedMinDuration, logLevel, binariesDirectory, }: {
5
17
  src: string;
6
18
  minDurationInSeconds?: number | undefined;
@@ -2,6 +2,18 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.getSilentParts = void 0;
4
4
  const compositor_1 = require("./compositor/compositor");
5
+ /**
6
+ * Analyzes the silent parts of a video or audio file and returns both the silent and audible segments.
7
+ * @description Uses thresholds defined for noise and duration to identify silent stretches in a media file.
8
+ * @see [Documentation](https://remotion.dev/docs/renderer/get-silent-parts)
9
+ * @param {Object} params Configuration parameters for determining silent parts
10
+ * @param {string} params.src The path to the local video or audio file
11
+ * @param {number} [params.noiseThresholdInDecibels=-20] The decibel level below which sound is considered silent
12
+ * @param {number} [params.minDurationInSeconds=1] The minimum duration (in seconds) to consider a silence as significant
13
+ * @param {string|null} [params.binariesDirectory] Optional directory path for external binaries
14
+ * @param {LogLevel} [params.logLevel] The logging level to be used (debug, verbose, info, warn, error)
15
+ * @returns {Promise<GetSilentPartsResponse>} An object containing arrays of silent and audible parts, along with the overall duration
16
+ */
5
17
  const getSilentParts = async ({ src, noiseThresholdInDecibels: passedNoiseThresholdInDecibels, minDurationInSeconds: passedMinDuration, logLevel, binariesDirectory, }) => {
6
18
  const compositor = (0, compositor_1.startLongRunningCompositor)({
7
19
  maximumFrameCacheItemsInBytes: null,
@@ -1,11 +1,11 @@
1
1
  /// <reference types="node" />
2
- /// <reference types="node" />
3
2
  /// <reference types="bun-types" />
4
3
  /// <reference types="node" />
5
4
  /// <reference types="node" />
6
5
  /// <reference types="node" />
7
6
  /// <reference types="bun-types" />
8
7
  /// <reference types="bun-types" />
8
+ /// <reference types="node" />
9
9
  import type { NetworkInterfaceInfo } from 'os';
10
10
  import os from 'os';
11
11
  type PortConfig = {
@@ -86,5 +86,7 @@ export declare const internalRenderFrames: (args_0: InternalRenderFramesOptions)
86
86
  /**
87
87
  * @description Renders a series of images using Puppeteer and computes information for mixing audio.
88
88
  * @see [Documentation](https://www.remotion.dev/docs/renderer/render-frames)
89
+ * @param {RenderFramesOptions} options Configuration options for rendering frames.
90
+ * @returns {Promise<RenderFramesOutput>} Information about the rendered frames and assets.
89
91
  */
90
92
  export declare const renderFrames: (options: RenderFramesOptions) => Promise<RenderFramesOutput>;
@@ -518,6 +518,8 @@ exports.internalRenderFrames = (0, wrap_with_error_handling_1.wrapWithErrorHandl
518
518
  /**
519
519
  * @description Renders a series of images using Puppeteer and computes information for mixing audio.
520
520
  * @see [Documentation](https://www.remotion.dev/docs/renderer/render-frames)
521
+ * @param {RenderFramesOptions} options Configuration options for rendering frames.
522
+ * @returns {Promise<RenderFramesOutput>} Information about the rendered frames and assets.
521
523
  */
522
524
  const renderFrames = (options) => {
523
525
  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: passedLogLevel, offthreadVideoCacheSizeInBytes, binariesDirectory, onBrowserDownload, } = options;
@@ -125,9 +125,11 @@ type RenderMediaResult = {
125
125
  };
126
126
  export declare const internalRenderMedia: (args_0: InternalRenderMediaOptions) => Promise<RenderMediaResult>;
127
127
  /**
128
+ * Render a video from a composition. You can specify various options such as the codec, output location, input properties, and more.
129
+ * @see [Documentation](https://remotion.dev/docs/renderer/render-media)
130
+ * @param {RenderMediaOptions} options Configuration options for rendering the media.
131
+ * @returns {Promise<RenderMediaResult>} A promise that resolves to the rendering result, including a buffer and information about the slowest frames.
128
132
  *
129
- * @description Render a video from a composition
130
- * @see [Documentation](https://www.remotion.dev/docs/renderer/render-media)
131
133
  */
132
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: passedLogLevel, offthreadVideoCacheSizeInBytes, colorSpace, repro, binariesDirectory, separateAudioTo, forSeamlessAacConcatenation, onBrowserDownload, }: RenderMediaOptions) => Promise<RenderMediaResult>;
133
135
  export {};
@@ -482,9 +482,11 @@ const internalRenderMediaRaw = ({ proResProfile, x264Preset, crf, composition, s
482
482
  };
483
483
  exports.internalRenderMedia = (0, wrap_with_error_handling_1.wrapWithErrorHandling)(internalRenderMediaRaw);
484
484
  /**
485
+ * Render a video from a composition. You can specify various options such as the codec, output location, input properties, and more.
486
+ * @see [Documentation](https://remotion.dev/docs/renderer/render-media)
487
+ * @param {RenderMediaOptions} options Configuration options for rendering the media.
488
+ * @returns {Promise<RenderMediaResult>} A promise that resolves to the rendering result, including a buffer and information about the slowest frames.
485
489
  *
486
- * @description Render a video from a composition
487
- * @see [Documentation](https://www.remotion.dev/docs/renderer/render-media)
488
490
  */
489
491
  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: passedLogLevel, offthreadVideoCacheSizeInBytes, colorSpace, repro, binariesDirectory, separateAudioTo, forSeamlessAacConcatenation, onBrowserDownload, }) => {
490
492
  var _a, _b;
@@ -68,9 +68,10 @@ type RenderStillReturnValue = {
68
68
  };
69
69
  export declare const internalRenderStill: (options: InternalRenderStillOptions) => Promise<RenderStillReturnValue>;
70
70
  /**
71
- *
72
- * @description Render a still frame from a composition
73
- * @see [Documentation](https://www.remotion.dev/docs/renderer/render-still)
71
+ * @description Renders a single frame to an image and writes it to the specified output location.
72
+ * @see [Documentation](https://remotion.dev/docs/renderer/render-still)
73
+ * @param {RenderStillOptions} options Configuration options for rendering the still image
74
+ * @returns {Promise<RenderStillReturnValue>} A promise that resolves to an object with a buffer key containing the image data if no output path is defined, otherwise null.
74
75
  */
75
76
  export declare const renderStill: (options: RenderStillOptions) => Promise<RenderStillReturnValue>;
76
77
  export {};
@@ -256,9 +256,10 @@ const internalRenderStillRaw = (options) => {
256
256
  };
257
257
  exports.internalRenderStill = (0, wrap_with_error_handling_1.wrapWithErrorHandling)(internalRenderStillRaw);
258
258
  /**
259
- *
260
- * @description Render a still frame from a composition
261
- * @see [Documentation](https://www.remotion.dev/docs/renderer/render-still)
259
+ * @description Renders a single frame to an image and writes it to the specified output location.
260
+ * @see [Documentation](https://remotion.dev/docs/renderer/render-still)
261
+ * @param {RenderStillOptions} options Configuration options for rendering the still image
262
+ * @returns {Promise<RenderStillReturnValue>} A promise that resolves to an object with a buffer key containing the image data if no output path is defined, otherwise null.
262
263
  */
263
264
  const renderStill = (options) => {
264
265
  var _a, _b;
@@ -73,8 +73,10 @@ export type StitchFramesToVideoOptions = {
73
73
  } & Partial<ToOptions<typeof optionsMap.stitchFramesToVideo>>;
74
74
  export declare const internalStitchFramesToVideo: (options: InternalStitchFramesToVideoOptions) => Promise<Buffer | null>;
75
75
  /**
76
- * @description Takes a series of images and audio information generated by renderFrames() and encodes it to a video.
76
+ * Takes a series of images and audio information generated by renderFrames() and encodes it to a video.
77
77
  * @see [Documentation](https://www.remotion.dev/docs/renderer/stitch-frames-to-video)
78
+ * @param {StitchFramesToVideoOptions} options The configuration options for stitching frames into a video
79
+ * @returns {Promise<Buffer | null>} A promise that resolves with the video buffer or null if the output was written to a file
78
80
  */
79
81
  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, separateAudioTo, }: StitchFramesToVideoOptions) => Promise<Buffer | null>;
80
82
  export {};
@@ -292,8 +292,10 @@ const internalStitchFramesToVideo = async (options) => {
292
292
  };
293
293
  exports.internalStitchFramesToVideo = internalStitchFramesToVideo;
294
294
  /**
295
- * @description Takes a series of images and audio information generated by renderFrames() and encodes it to a video.
295
+ * Takes a series of images and audio information generated by renderFrames() and encodes it to a video.
296
296
  * @see [Documentation](https://www.remotion.dev/docs/renderer/stitch-frames-to-video)
297
+ * @param {StitchFramesToVideoOptions} options The configuration options for stitching frames into a video
298
+ * @returns {Promise<Buffer | null>} A promise that resolves with the video buffer or null if the output was written to a file
297
299
  */
298
300
  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, separateAudioTo, }) => {
299
301
  return (0, exports.internalStitchFramesToVideo)({
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@remotion/renderer",
3
- "version": "4.0.143",
3
+ "version": "4.0.144",
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.143"
21
+ "remotion": "4.0.144"
22
22
  },
23
23
  "peerDependencies": {
24
24
  "react": ">=16.8.0",
@@ -43,13 +43,13 @@
43
43
  "@types/ws": "8.5.10"
44
44
  },
45
45
  "optionalDependencies": {
46
- "@remotion/compositor-darwin-arm64": "4.0.143",
47
- "@remotion/compositor-darwin-x64": "4.0.143",
48
- "@remotion/compositor-linux-arm64-gnu": "4.0.143",
49
- "@remotion/compositor-linux-arm64-musl": "4.0.143",
50
- "@remotion/compositor-linux-x64-gnu": "4.0.143",
51
- "@remotion/compositor-linux-x64-musl": "4.0.143",
52
- "@remotion/compositor-win32-x64-msvc": "4.0.143"
46
+ "@remotion/compositor-darwin-arm64": "4.0.144",
47
+ "@remotion/compositor-darwin-x64": "4.0.144",
48
+ "@remotion/compositor-linux-arm64-gnu": "4.0.144",
49
+ "@remotion/compositor-linux-arm64-musl": "4.0.144",
50
+ "@remotion/compositor-linux-x64-gnu": "4.0.144",
51
+ "@remotion/compositor-linux-x64-musl": "4.0.144",
52
+ "@remotion/compositor-win32-x64-msvc": "4.0.144"
53
53
  },
54
54
  "keywords": [
55
55
  "remotion",