@remotion/renderer 4.0.25 → 4.0.26
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 +1 -0
- package/dist/get-compositions.d.ts +1 -1
- package/dist/get-compositions.js +3 -2
- package/dist/get-extension-from-codec.d.ts +2 -2
- package/dist/get-silent-parts.d.ts +1 -1
- package/dist/index.d.ts +25 -23
- package/dist/logger.d.ts +1 -1
- package/dist/options/audio-bitrate.d.ts +1 -0
- package/dist/options/crf.d.ts +1 -0
- package/dist/options/enforce-audio.d.ts +1 -0
- package/dist/options/jpeg-quality.d.ts +1 -0
- package/dist/options/mute.d.ts +1 -0
- package/dist/options/offthreadvideo-cache-size.d.ts +1 -0
- package/dist/options/options-map.d.ts +1 -0
- package/dist/options/scale.d.ts +1 -0
- package/dist/options/video-bitrate.d.ts +1 -0
- package/dist/options/video-codec.d.ts +1 -0
- package/dist/options/webhook-custom-data.d.ts +1 -0
- package/dist/provide-screenshot.d.ts +1 -0
- package/dist/puppeteer-screenshot.d.ts +1 -0
- package/dist/render-frames.d.ts +1 -1
- package/dist/render-frames.js +3 -2
- package/dist/render-media.d.ts +1 -1
- package/dist/render-media.js +3 -2
- package/dist/render-still.js +3 -2
- package/dist/screenshot-dom-element.d.ts +1 -0
- package/dist/screenshot-task.d.ts +1 -0
- package/dist/select-composition.d.ts +1 -0
- package/dist/select-composition.js +5 -3
- package/dist/stitch-frames-to-video.d.ts +1 -0
- package/dist/take-frame-and-compose.d.ts +1 -0
- package/dist/validate-output-filename.d.ts +1 -1
- package/package.json +9 -9
- package/pure.d.ts +1 -0
- package/pure.js +1 -0
- package/dist/presets-profile.d.ts +0 -7
- package/dist/presets-profile.js +0 -27
package/dist/client.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
1
2
|
export declare const BrowserSafeApis: {
|
|
2
3
|
getFileExtensionFromCodec: <T extends "h264" | "h265" | "vp8" | "vp9" | "mp3" | "aac" | "wav" | "prores" | "h264-mkv" | "gif">(codec: T, audioCodec: "mp3" | "aac" | "pcm-16" | "opus" | null) => import("./file-extensions").FileExtension;
|
|
3
4
|
validCodecs: readonly ["h264", "h265", "vp8", "vp9", "mp3", "aac", "wav", "prores", "h264-mkv", "gif"];
|
|
@@ -33,7 +33,7 @@ export type GetCompositionsOptions = {
|
|
|
33
33
|
logLevel?: LogLevel;
|
|
34
34
|
offthreadVideoCacheSizeInBytes?: number | null;
|
|
35
35
|
};
|
|
36
|
-
export declare const internalGetCompositions: (
|
|
36
|
+
export declare const internalGetCompositions: (args_0: InternalGetCompositionsOptions) => Promise<VideoConfig[]>;
|
|
37
37
|
/**
|
|
38
38
|
* @description Gets the compositions defined in a Remotion project based on a Webpack bundle.
|
|
39
39
|
* @see [Documentation](https://www.remotion.dev/docs/renderer/get-compositions)
|
package/dist/get-compositions.js
CHANGED
|
@@ -12,6 +12,7 @@ const puppeteer_evaluate_1 = require("./puppeteer-evaluate");
|
|
|
12
12
|
const seek_to_frame_1 = require("./seek-to-frame");
|
|
13
13
|
const set_props_and_env_1 = require("./set-props-and-env");
|
|
14
14
|
const validate_puppeteer_timeout_1 = require("./validate-puppeteer-timeout");
|
|
15
|
+
const wrap_with_error_handling_1 = require("./wrap-with-error-handling");
|
|
15
16
|
const innerGetCompositions = async ({ envVariables, serializedInputPropsWithCustomSchema, onBrowserLog, page, proxyPort, serveUrl, timeoutInMilliseconds, indent, logLevel, }) => {
|
|
16
17
|
if (onBrowserLog) {
|
|
17
18
|
page.on('console', (log) => {
|
|
@@ -70,7 +71,7 @@ const innerGetCompositions = async ({ envVariables, serializedInputPropsWithCust
|
|
|
70
71
|
};
|
|
71
72
|
});
|
|
72
73
|
};
|
|
73
|
-
const
|
|
74
|
+
const internalGetCompositionsRaw = async ({ browserExecutable, chromiumOptions, envVariables, indent, serializedInputPropsWithCustomSchema, onBrowserLog, port, puppeteerInstance, serveUrlOrWebpackUrl, server, timeoutInMilliseconds, logLevel, offthreadVideoCacheSizeInBytes, }) => {
|
|
74
75
|
const { page, cleanup: cleanupPage } = await (0, get_browser_instance_1.getPageAndCleanupFn)({
|
|
75
76
|
passedInInstance: puppeteerInstance,
|
|
76
77
|
browserExecutable,
|
|
@@ -128,7 +129,7 @@ const internalGetCompositions = async ({ browserExecutable, chromiumOptions, env
|
|
|
128
129
|
});
|
|
129
130
|
});
|
|
130
131
|
};
|
|
131
|
-
exports.internalGetCompositions =
|
|
132
|
+
exports.internalGetCompositions = (0, wrap_with_error_handling_1.wrapWithErrorHandling)(internalGetCompositionsRaw);
|
|
132
133
|
/**
|
|
133
134
|
* @description Gets the compositions defined in a Remotion project based on a Webpack bundle.
|
|
134
135
|
* @see [Documentation](https://www.remotion.dev/docs/renderer/get-compositions)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { AudioCodec } from './audio-codec';
|
|
2
2
|
import type { Codec } from './codec';
|
|
3
3
|
import type { FileExtension } from './file-extensions';
|
|
4
|
-
export declare const getFileExtensionFromCodec: <T extends "h264" | "h265" | "vp8" | "vp9" | "
|
|
5
|
-
export declare const makeFileExtensionMap: () => Record<string, ("h264" | "h265" | "vp8" | "vp9" | "
|
|
4
|
+
export declare const getFileExtensionFromCodec: <T extends "h264" | "h265" | "vp8" | "vp9" | "mp3" | "aac" | "wav" | "prores" | "h264-mkv" | "gif">(codec: T, audioCodec: AudioCodec | null) => FileExtension;
|
|
5
|
+
export declare const makeFileExtensionMap: () => Record<string, ("h264" | "h265" | "vp8" | "vp9" | "mp3" | "aac" | "wav" | "prores" | "h264-mkv" | "gif")[]>;
|
|
6
6
|
export declare const defaultCodecsForFileExtension: Record<FileExtension, Codec>;
|
|
@@ -3,6 +3,6 @@ import type { LogLevel } from './log-level';
|
|
|
3
3
|
export declare const getSilentParts: ({ src, noiseThresholdInDecibels: passedNoiseThresholdInDecibels, minDurationInSeconds: passedMinDuration, logLevel, }: {
|
|
4
4
|
src: string;
|
|
5
5
|
minDurationInSeconds?: number | undefined;
|
|
6
|
-
logLevel?: "
|
|
6
|
+
logLevel?: "error" | "verbose" | "info" | "warn" | undefined;
|
|
7
7
|
noiseThresholdInDecibels?: number | undefined;
|
|
8
8
|
}) => Promise<GetSilentPartsResponse>;
|
package/dist/index.d.ts
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
/// <reference types="node" />
|
|
2
|
+
/// <reference types="react" />
|
|
1
3
|
import execa from 'execa';
|
|
2
4
|
import { HeadlessBrowser } from './browser/Browser';
|
|
3
5
|
import { SymbolicateableError } from './error-handling/symbolicateable-error';
|
|
@@ -45,7 +47,7 @@ export declare const RenderInternals: {
|
|
|
45
47
|
downloadMap: import("./assets/download-map").DownloadMap;
|
|
46
48
|
remotionRoot: string;
|
|
47
49
|
concurrency: number;
|
|
48
|
-
logLevel: "
|
|
50
|
+
logLevel: "error" | "verbose" | "info" | "warn";
|
|
49
51
|
indent: boolean;
|
|
50
52
|
offthreadVideoCacheSizeInBytes: number | null;
|
|
51
53
|
}) => Promise<{
|
|
@@ -116,8 +118,8 @@ export declare const RenderInternals: {
|
|
|
116
118
|
validPixelFormats: readonly ["yuv420p", "yuva420p", "yuv422p", "yuv444p", "yuv420p10le", "yuv422p10le", "yuv444p10le", "yuva444p10le"];
|
|
117
119
|
DEFAULT_BROWSER: "chrome";
|
|
118
120
|
validateFrameRange: (frameRange: import("./frame-range").FrameRange | null) => void;
|
|
119
|
-
DEFAULT_OPENGL_RENDERER: "
|
|
120
|
-
validateOpenGlRenderer: (option: "
|
|
121
|
+
DEFAULT_OPENGL_RENDERER: "angle" | "swangle" | "egl" | "swiftshader" | null;
|
|
122
|
+
validateOpenGlRenderer: (option: "angle" | "swangle" | "egl" | "swiftshader" | null) => "angle" | "swangle" | "egl" | "swiftshader" | null;
|
|
121
123
|
validCodecs: readonly ["h264", "h265", "vp8", "vp9", "mp3", "aac", "wav", "prores", "h264-mkv", "gif"];
|
|
122
124
|
DEFAULT_PIXEL_FORMAT: "yuv420p" | "yuva420p" | "yuv422p" | "yuv444p" | "yuv420p10le" | "yuv422p10le" | "yuv444p10le" | "yuva444p10le";
|
|
123
125
|
validateJpegQuality: (q: number | undefined) => void;
|
|
@@ -125,7 +127,7 @@ export declare const RenderInternals: {
|
|
|
125
127
|
DEFAULT_CODEC: "h264" | "h265" | "vp8" | "vp9" | "mp3" | "aac" | "wav" | "prores" | "h264-mkv" | "gif";
|
|
126
128
|
isAudioCodec: (codec: "h264" | "h265" | "vp8" | "vp9" | "mp3" | "aac" | "wav" | "prores" | "h264-mkv" | "gif" | undefined) => boolean;
|
|
127
129
|
logLevels: readonly ["verbose", "info", "warn", "error"];
|
|
128
|
-
isEqualOrBelowLogLevel: (currentLevel: "
|
|
130
|
+
isEqualOrBelowLogLevel: (currentLevel: "error" | "verbose" | "info" | "warn", level: "error" | "verbose" | "info" | "warn") => boolean;
|
|
129
131
|
isValidLogLevel: (level: string) => boolean;
|
|
130
132
|
perf: typeof perf;
|
|
131
133
|
convertToPositiveFrameIndex: ({ frame, durationInFrames, }: {
|
|
@@ -305,8 +307,8 @@ export declare const RenderInternals: {
|
|
|
305
307
|
};
|
|
306
308
|
validStillImageFormats: readonly ["png", "jpeg", "pdf", "webp"];
|
|
307
309
|
validVideoImageFormats: readonly ["png", "jpeg", "none"];
|
|
308
|
-
DEFAULT_STILL_IMAGE_FORMAT: "
|
|
309
|
-
DEFAULT_VIDEO_IMAGE_FORMAT: "
|
|
310
|
+
DEFAULT_STILL_IMAGE_FORMAT: "jpeg" | "png" | "webp" | "pdf";
|
|
311
|
+
DEFAULT_VIDEO_IMAGE_FORMAT: "jpeg" | "png" | "none";
|
|
310
312
|
DEFAULT_JPEG_QUALITY: number;
|
|
311
313
|
chalk: {
|
|
312
314
|
enabled: () => boolean;
|
|
@@ -362,30 +364,30 @@ export declare const RenderInternals: {
|
|
|
362
364
|
verbose: (message?: any, ...optionalParams: any[]) => void;
|
|
363
365
|
verboseAdvanced: (options: {
|
|
364
366
|
indent: boolean;
|
|
365
|
-
logLevel: "
|
|
367
|
+
logLevel: "error" | "verbose" | "info" | "warn";
|
|
366
368
|
} & {
|
|
367
369
|
tag?: string | undefined;
|
|
368
370
|
}, message?: any, ...optionalParams: any[]) => void;
|
|
369
371
|
info: (message?: any, ...optionalParams: any[]) => void;
|
|
370
372
|
infoAdvanced: (options: {
|
|
371
373
|
indent: boolean;
|
|
372
|
-
logLevel: "
|
|
374
|
+
logLevel: "error" | "verbose" | "info" | "warn";
|
|
373
375
|
}, message?: any, ...optionalParams: any[]) => void;
|
|
374
376
|
warn: (message?: any, ...optionalParams: any[]) => void;
|
|
375
377
|
warnAdvanced: (options: {
|
|
376
378
|
indent: boolean;
|
|
377
|
-
logLevel: "
|
|
379
|
+
logLevel: "error" | "verbose" | "info" | "warn";
|
|
378
380
|
}, message?: any, ...optionalParams: any[]) => void;
|
|
379
381
|
error: (message?: any, ...optionalParams: any[]) => void;
|
|
380
382
|
errorAdvanced: (options: {
|
|
381
383
|
indent: boolean;
|
|
382
|
-
logLevel: "
|
|
384
|
+
logLevel: "error" | "verbose" | "info" | "warn";
|
|
383
385
|
} & {
|
|
384
386
|
tag?: string | undefined;
|
|
385
387
|
}, message?: any, ...optionalParams: any[]) => void;
|
|
386
388
|
};
|
|
387
|
-
getLogLevel: () => "
|
|
388
|
-
setLogLevel: (newLogLevel: "
|
|
389
|
+
getLogLevel: () => "error" | "verbose" | "info" | "warn";
|
|
390
|
+
setLogLevel: (newLogLevel: "error" | "verbose" | "info" | "warn") => void;
|
|
389
391
|
INDENT_TOKEN: string;
|
|
390
392
|
isColorSupported: () => boolean;
|
|
391
393
|
HeadlessBrowser: typeof HeadlessBrowser;
|
|
@@ -394,7 +396,7 @@ export declare const RenderInternals: {
|
|
|
394
396
|
port: number | null;
|
|
395
397
|
remotionRoot: string;
|
|
396
398
|
concurrency: number;
|
|
397
|
-
logLevel: "
|
|
399
|
+
logLevel: "error" | "verbose" | "info" | "warn";
|
|
398
400
|
indent: boolean;
|
|
399
401
|
offthreadVideoCacheSizeInBytes: number | null;
|
|
400
402
|
}) => Promise<import("./prepare-server").RemotionServer>;
|
|
@@ -403,7 +405,7 @@ export declare const RenderInternals: {
|
|
|
403
405
|
port: number | null;
|
|
404
406
|
remotionRoot: string;
|
|
405
407
|
concurrency: number;
|
|
406
|
-
logLevel: "
|
|
408
|
+
logLevel: "error" | "verbose" | "info" | "warn";
|
|
407
409
|
indent: boolean;
|
|
408
410
|
offthreadVideoCacheSizeInBytes: number | null;
|
|
409
411
|
}, { onDownload, onError, }: {
|
|
@@ -419,7 +421,7 @@ export declare const RenderInternals: {
|
|
|
419
421
|
frame: number;
|
|
420
422
|
serializedInputPropsWithCustomSchema: string;
|
|
421
423
|
serializedResolvedPropsWithCustomSchema: string;
|
|
422
|
-
imageFormat: "
|
|
424
|
+
imageFormat: "jpeg" | "png" | "webp" | "pdf";
|
|
423
425
|
jpegQuality: number;
|
|
424
426
|
puppeteerInstance: HeadlessBrowser | null;
|
|
425
427
|
envVariables: Record<string, string>;
|
|
@@ -433,7 +435,7 @@ export declare const RenderInternals: {
|
|
|
433
435
|
cancelSignal: import("./make-cancel-signal").CancelSignal | null;
|
|
434
436
|
indent: boolean;
|
|
435
437
|
server: import("./prepare-server").RemotionServer | undefined;
|
|
436
|
-
logLevel: "
|
|
438
|
+
logLevel: "error" | "verbose" | "info" | "warn";
|
|
437
439
|
serveUrl: string;
|
|
438
440
|
port: number | null;
|
|
439
441
|
offthreadVideoCacheSizeInBytes: number | null;
|
|
@@ -454,7 +456,7 @@ export declare const RenderInternals: {
|
|
|
454
456
|
viewport: import("./browser/PuppeteerViewport").Viewport | null;
|
|
455
457
|
indent: boolean;
|
|
456
458
|
browser: "chrome";
|
|
457
|
-
logLevel: "
|
|
459
|
+
logLevel: "error" | "verbose" | "info" | "warn";
|
|
458
460
|
}) => Promise<HeadlessBrowser>;
|
|
459
461
|
internalSelectComposition: (options: {
|
|
460
462
|
serializedInputPropsWithCustomSchema: string;
|
|
@@ -467,7 +469,7 @@ export declare const RenderInternals: {
|
|
|
467
469
|
port: number | null;
|
|
468
470
|
indent: boolean;
|
|
469
471
|
server: import("./prepare-server").RemotionServer | undefined;
|
|
470
|
-
logLevel: "
|
|
472
|
+
logLevel: "error" | "verbose" | "info" | "warn";
|
|
471
473
|
serveUrl: string;
|
|
472
474
|
id: string;
|
|
473
475
|
} & import("./options/option").ToOptions<readonly [{
|
|
@@ -481,7 +483,7 @@ export declare const RenderInternals: {
|
|
|
481
483
|
metadata: import("remotion").VideoConfig;
|
|
482
484
|
propsSize: number;
|
|
483
485
|
}>;
|
|
484
|
-
internalGetCompositions: (
|
|
486
|
+
internalGetCompositions: (args_0: {
|
|
485
487
|
serializedInputPropsWithCustomSchema: string;
|
|
486
488
|
envVariables: Record<string, string>;
|
|
487
489
|
puppeteerInstance: HeadlessBrowser | undefined;
|
|
@@ -492,7 +494,7 @@ export declare const RenderInternals: {
|
|
|
492
494
|
port: number | null;
|
|
493
495
|
server: import("./prepare-server").RemotionServer | undefined;
|
|
494
496
|
indent: boolean;
|
|
495
|
-
logLevel: "
|
|
497
|
+
logLevel: "error" | "verbose" | "info" | "warn";
|
|
496
498
|
serveUrlOrWebpackUrl: string;
|
|
497
499
|
} & import("./options/option").ToOptions<readonly [{
|
|
498
500
|
name: string;
|
|
@@ -502,11 +504,11 @@ export declare const RenderInternals: {
|
|
|
502
504
|
docLink: string;
|
|
503
505
|
type: number | null;
|
|
504
506
|
}]>) => Promise<import("remotion").VideoConfig[]>;
|
|
505
|
-
internalRenderFrames: (
|
|
506
|
-
internalRenderMedia: (
|
|
507
|
+
internalRenderFrames: (args_0: import("./render-frames").InternalRenderFramesOptions) => Promise<import("./types").RenderFramesOutput>;
|
|
508
|
+
internalRenderMedia: (args_0: import("./render-media").InternalRenderMediaOptions) => Promise<{
|
|
507
509
|
buffer: Buffer | null;
|
|
508
510
|
slowestFrames: import("./render-media").SlowFrame[];
|
|
509
511
|
}>;
|
|
510
512
|
validOpenGlRenderers: readonly ["swangle", "angle", "egl", "swiftshader"];
|
|
511
|
-
copyImageToClipboard: (src: string, logLevel: "
|
|
513
|
+
copyImageToClipboard: (src: string, logLevel: "error" | "verbose" | "info" | "warn") => Promise<void>;
|
|
512
514
|
};
|
package/dist/logger.d.ts
CHANGED
|
@@ -19,6 +19,6 @@ export declare const Log: {
|
|
|
19
19
|
error: (message?: any, ...optionalParams: any[]) => void;
|
|
20
20
|
errorAdvanced: (options: VerboseLogOptions, message?: any, ...optionalParams: any[]) => void;
|
|
21
21
|
};
|
|
22
|
-
export declare const getLogLevel: () => "
|
|
22
|
+
export declare const getLogLevel: () => "error" | "verbose" | "info" | "warn";
|
|
23
23
|
export declare const setLogLevel: (newLogLevel: LogLevel) => void;
|
|
24
24
|
export {};
|
package/dist/options/crf.d.ts
CHANGED
package/dist/options/mute.d.ts
CHANGED
package/dist/options/scale.d.ts
CHANGED
package/dist/render-frames.d.ts
CHANGED
|
@@ -81,7 +81,7 @@ export type RenderFramesOptions = {
|
|
|
81
81
|
serveUrl: string;
|
|
82
82
|
offthreadVideoCacheSizeInBytes?: number | null;
|
|
83
83
|
};
|
|
84
|
-
export declare const internalRenderFrames: (
|
|
84
|
+
export declare const internalRenderFrames: (args_0: InternalRenderFramesOptions) => Promise<RenderFramesOutput>;
|
|
85
85
|
/**
|
|
86
86
|
* @description Renders a series of images using Puppeteer and computes information for mixing audio.
|
|
87
87
|
* @see [Documentation](https://www.remotion.dev/docs/renderer/render-frames)
|
package/dist/render-frames.js
CHANGED
|
@@ -35,6 +35,7 @@ const take_frame_and_compose_1 = require("./take-frame-and-compose");
|
|
|
35
35
|
const truthy_1 = require("./truthy");
|
|
36
36
|
const validate_1 = require("./validate");
|
|
37
37
|
const validate_scale_1 = require("./validate-scale");
|
|
38
|
+
const wrap_with_error_handling_1 = require("./wrap-with-error-handling");
|
|
38
39
|
const MAX_RETRIES_PER_FRAME = 1;
|
|
39
40
|
const innerRenderFrames = async ({ onFrameUpdate, outputDir, onStart, serializedInputPropsWithCustomSchema, serializedResolvedPropsWithCustomSchema, jpegQuality, imageFormat, frameRange, onError, envVariables, onBrowserLog, onFrameBuffer, onDownload, pagesArray, serveUrl, composition, timeoutInMilliseconds, scale, actualConcurrency, everyNthFrame, proxyPort, cancelSignal, downloadMap, muted, makeBrowser, browserReplacer, compositor, sourcemapContext, logLevel, indent, }) => {
|
|
40
41
|
if (outputDir) {
|
|
@@ -300,7 +301,7 @@ const innerRenderFrames = async ({ onFrameUpdate, outputDir, onStart, serialized
|
|
|
300
301
|
await Promise.all(downloadPromises);
|
|
301
302
|
return result;
|
|
302
303
|
};
|
|
303
|
-
const
|
|
304
|
+
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, }) => {
|
|
304
305
|
(0, validate_1.validateDimension)(composition.height, 'height', 'in the `config` object passed to `renderFrames()`');
|
|
305
306
|
(0, validate_1.validateDimension)(composition.width, 'width', 'in the `config` object passed to `renderFrames()`');
|
|
306
307
|
(0, validate_1.validateFps)(composition.fps, 'in the `config` object of `renderFrames()`', false);
|
|
@@ -421,7 +422,7 @@ const internalRenderFrames = ({ browserExecutable, cancelSignal, chromiumOptions
|
|
|
421
422
|
});
|
|
422
423
|
});
|
|
423
424
|
};
|
|
424
|
-
exports.internalRenderFrames =
|
|
425
|
+
exports.internalRenderFrames = (0, wrap_with_error_handling_1.wrapWithErrorHandling)(internalRenderFramesRaw);
|
|
425
426
|
/**
|
|
426
427
|
* @description Renders a series of images using Puppeteer and computes information for mixing audio.
|
|
427
428
|
* @see [Documentation](https://www.remotion.dev/docs/renderer/render-frames)
|
package/dist/render-media.d.ts
CHANGED
|
@@ -131,7 +131,7 @@ type RenderMediaResult = {
|
|
|
131
131
|
buffer: Buffer | null;
|
|
132
132
|
slowestFrames: SlowFrame[];
|
|
133
133
|
};
|
|
134
|
-
export declare const internalRenderMedia: (
|
|
134
|
+
export declare const internalRenderMedia: (args_0: InternalRenderMediaOptions) => Promise<RenderMediaResult>;
|
|
135
135
|
/**
|
|
136
136
|
*
|
|
137
137
|
* @description Render a video from a composition
|
package/dist/render-media.js
CHANGED
|
@@ -43,9 +43,10 @@ const validate_number_of_gif_loops_1 = require("./validate-number-of-gif-loops")
|
|
|
43
43
|
const validate_output_filename_1 = require("./validate-output-filename");
|
|
44
44
|
const validate_scale_1 = require("./validate-scale");
|
|
45
45
|
const validate_videobitrate_1 = require("./validate-videobitrate");
|
|
46
|
+
const wrap_with_error_handling_1 = require("./wrap-with-error-handling");
|
|
46
47
|
const x264_preset_1 = require("./x264-preset");
|
|
47
48
|
const SLOWEST_FRAME_COUNT = 10;
|
|
48
|
-
const
|
|
49
|
+
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, audioCodec, concurrency, disallowParallelEncoding, everyNthFrame, imageFormat: provisionalImageFormat, indent, jpegQuality, numberOfGifLoops, onCtrlCExit, preferLossless, serveUrl, server: reusedServer, logLevel, serializedResolvedPropsWithCustomSchema, offthreadVideoCacheSizeInBytes, }) => {
|
|
49
50
|
(0, jpeg_quality_1.validateJpegQuality)(jpegQuality);
|
|
50
51
|
(0, crf_1.validateQualitySettings)({ crf, codec, videoBitrate });
|
|
51
52
|
(0, validate_videobitrate_1.validateBitrate)(audioBitrate, 'audioBitrate');
|
|
@@ -414,7 +415,7 @@ const internalRenderMedia = ({ proResProfile, x264Preset, crf, composition, seri
|
|
|
414
415
|
}),
|
|
415
416
|
]);
|
|
416
417
|
};
|
|
417
|
-
exports.internalRenderMedia =
|
|
418
|
+
exports.internalRenderMedia = (0, wrap_with_error_handling_1.wrapWithErrorHandling)(internalRenderMediaRaw);
|
|
418
419
|
/**
|
|
419
420
|
*
|
|
420
421
|
* @description Render a video from a composition
|
package/dist/render-still.js
CHANGED
|
@@ -50,6 +50,7 @@ const take_frame_and_compose_1 = require("./take-frame-and-compose");
|
|
|
50
50
|
const validate_1 = require("./validate");
|
|
51
51
|
const validate_puppeteer_timeout_1 = require("./validate-puppeteer-timeout");
|
|
52
52
|
const validate_scale_1 = require("./validate-scale");
|
|
53
|
+
const wrap_with_error_handling_1 = require("./wrap-with-error-handling");
|
|
53
54
|
const innerRenderStill = async ({ composition, imageFormat = image_format_1.DEFAULT_STILL_IMAGE_FORMAT, serveUrl, puppeteerInstance, onError, serializedInputPropsWithCustomSchema, envVariables, output, frame = 0, overwrite, browserExecutable, timeoutInMilliseconds, chromiumOptions, scale, proxyPort, cancelSignal, jpegQuality, onBrowserLog, compositor, sourceMapContext, downloadMap, logLevel, indent, serializedResolvedPropsWithCustomSchema, }) => {
|
|
54
55
|
(0, validate_1.validateDimension)(composition.height, 'height', 'in the `config` object passed to `renderStill()`');
|
|
55
56
|
(0, validate_1.validateDimension)(composition.width, 'width', 'in the `config` object passed to `renderStill()`');
|
|
@@ -194,7 +195,7 @@ const innerRenderStill = async ({ composition, imageFormat = image_format_1.DEFA
|
|
|
194
195
|
await cleanup();
|
|
195
196
|
return { buffer: output ? null : buffer };
|
|
196
197
|
};
|
|
197
|
-
const
|
|
198
|
+
const internalRenderStillRaw = (options) => {
|
|
198
199
|
const cleanup = [];
|
|
199
200
|
const happyPath = new Promise((resolve, reject) => {
|
|
200
201
|
const onError = (err) => reject(err);
|
|
@@ -241,7 +242,7 @@ const internalRenderStill = (options) => {
|
|
|
241
242
|
}),
|
|
242
243
|
]);
|
|
243
244
|
};
|
|
244
|
-
exports.internalRenderStill =
|
|
245
|
+
exports.internalRenderStill = (0, wrap_with_error_handling_1.wrapWithErrorHandling)(internalRenderStillRaw);
|
|
245
246
|
/**
|
|
246
247
|
*
|
|
247
248
|
* @description Render a still frame from a composition
|
|
@@ -40,6 +40,7 @@ type InternalReturnType = {
|
|
|
40
40
|
metadata: VideoConfig;
|
|
41
41
|
propsSize: number;
|
|
42
42
|
};
|
|
43
|
+
export declare const internalSelectCompositionRaw: (options: InternalSelectCompositionsConfig) => Promise<InternalReturnType>;
|
|
43
44
|
export declare const internalSelectComposition: (options: InternalSelectCompositionsConfig) => Promise<InternalReturnType>;
|
|
44
45
|
/**
|
|
45
46
|
* @description Gets a composition defined in a Remotion project based on a Webpack bundle.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.selectComposition = exports.internalSelectComposition = void 0;
|
|
3
|
+
exports.selectComposition = exports.internalSelectComposition = exports.internalSelectCompositionRaw = void 0;
|
|
4
4
|
const remotion_1 = require("remotion");
|
|
5
5
|
const TimeoutSettings_1 = require("./browser/TimeoutSettings");
|
|
6
6
|
const handle_javascript_exception_1 = require("./error-handling/handle-javascript-exception");
|
|
@@ -12,6 +12,7 @@ const puppeteer_evaluate_1 = require("./puppeteer-evaluate");
|
|
|
12
12
|
const seek_to_frame_1 = require("./seek-to-frame");
|
|
13
13
|
const set_props_and_env_1 = require("./set-props-and-env");
|
|
14
14
|
const validate_puppeteer_timeout_1 = require("./validate-puppeteer-timeout");
|
|
15
|
+
const wrap_with_error_handling_1 = require("./wrap-with-error-handling");
|
|
15
16
|
const innerSelectComposition = async ({ page, onBrowserLog, serializedInputPropsWithCustomSchema, envVariables, serveUrl, timeoutInMilliseconds, port, id, indent, logLevel, }) => {
|
|
16
17
|
if (onBrowserLog) {
|
|
17
18
|
page.on('console', (log) => {
|
|
@@ -82,7 +83,7 @@ const innerSelectComposition = async ({ page, onBrowserLog, serializedInputProps
|
|
|
82
83
|
propsSize: size,
|
|
83
84
|
};
|
|
84
85
|
};
|
|
85
|
-
const
|
|
86
|
+
const internalSelectCompositionRaw = async (options) => {
|
|
86
87
|
const cleanup = [];
|
|
87
88
|
const { puppeteerInstance, browserExecutable, chromiumOptions, serveUrl: serveUrlOrWebpackUrl, logLevel, indent, port, envVariables, id, serializedInputPropsWithCustomSchema, onBrowserLog, server, timeoutInMilliseconds, offthreadVideoCacheSizeInBytes, } = options;
|
|
88
89
|
const { page, cleanup: cleanupPage } = await (0, get_browser_instance_1.getPageAndCleanupFn)({
|
|
@@ -148,7 +149,8 @@ const internalSelectComposition = async (options) => {
|
|
|
148
149
|
});
|
|
149
150
|
});
|
|
150
151
|
};
|
|
151
|
-
exports.
|
|
152
|
+
exports.internalSelectCompositionRaw = internalSelectCompositionRaw;
|
|
153
|
+
exports.internalSelectComposition = (0, wrap_with_error_handling_1.wrapWithErrorHandling)(exports.internalSelectCompositionRaw);
|
|
152
154
|
/**
|
|
153
155
|
* @description Gets a composition defined in a Remotion project based on a Webpack bundle.
|
|
154
156
|
* @see [Documentation](https://www.remotion.dev/docs/renderer/select-composition)
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { AudioCodec } from './audio-codec';
|
|
2
|
-
export declare const validateOutputFilename: <T extends "h264" | "h265" | "vp8" | "vp9" | "
|
|
2
|
+
export declare const validateOutputFilename: <T extends "h264" | "h265" | "vp8" | "vp9" | "mp3" | "aac" | "wav" | "prores" | "h264-mkv" | "gif">({ codec, audioCodec, extension, preferLossless, }: {
|
|
3
3
|
codec: T;
|
|
4
4
|
audioCodec: AudioCodec | null;
|
|
5
5
|
extension: string;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@remotion/renderer",
|
|
3
|
-
"version": "4.0.
|
|
3
|
+
"version": "4.0.26",
|
|
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.
|
|
21
|
+
"remotion": "4.0.26"
|
|
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-
|
|
44
|
-
"@remotion/compositor-
|
|
45
|
-
"@remotion/compositor-linux-
|
|
46
|
-
"@remotion/compositor-linux-
|
|
47
|
-
"@remotion/compositor-linux-
|
|
48
|
-
"@remotion/compositor-
|
|
49
|
-
"@remotion/compositor-
|
|
43
|
+
"@remotion/compositor-darwin-x64": "4.0.26",
|
|
44
|
+
"@remotion/compositor-linux-arm64-gnu": "4.0.26",
|
|
45
|
+
"@remotion/compositor-linux-x64-gnu": "4.0.26",
|
|
46
|
+
"@remotion/compositor-linux-arm64-musl": "4.0.26",
|
|
47
|
+
"@remotion/compositor-linux-x64-musl": "4.0.26",
|
|
48
|
+
"@remotion/compositor-darwin-arm64": "4.0.26",
|
|
49
|
+
"@remotion/compositor-win32-x64-msvc": "4.0.26"
|
|
50
50
|
},
|
|
51
51
|
"keywords": [
|
|
52
52
|
"remotion",
|
package/pure.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './dist/pure';
|
package/pure.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
module.exports = require('./dist/pure');
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import type { Codec } from './codec';
|
|
2
|
-
export declare const x264PresetOptions: readonly ["ultrafast", "superfast", "veryfast", "faster", "fast", "medium", "slow", "slower", "veryslow", "placebo"];
|
|
3
|
-
export type x264Preset = typeof x264PresetOptions[number];
|
|
4
|
-
export declare const validateSelectedCodecAndPresetCombination: ({ codec, x264Preset, }: {
|
|
5
|
-
codec: Codec;
|
|
6
|
-
x264Preset: "ultrafast" | "superfast" | "veryfast" | "faster" | "fast" | "medium" | "slow" | "slower" | "veryslow" | "placebo" | undefined;
|
|
7
|
-
}) => void;
|
package/dist/presets-profile.js
DELETED
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.validateSelectedCodecAndPresetCombination = exports.x264PresetOptions = void 0;
|
|
4
|
-
exports.x264PresetOptions = [
|
|
5
|
-
'ultrafast',
|
|
6
|
-
'superfast',
|
|
7
|
-
'veryfast',
|
|
8
|
-
'faster',
|
|
9
|
-
'fast',
|
|
10
|
-
'medium',
|
|
11
|
-
'slow',
|
|
12
|
-
'slower',
|
|
13
|
-
'veryslow',
|
|
14
|
-
'placebo',
|
|
15
|
-
];
|
|
16
|
-
const validateSelectedCodecAndPresetCombination = ({ codec, x264Preset, }) => {
|
|
17
|
-
if (typeof x264Preset !== 'undefined' && codec !== 'h264') {
|
|
18
|
-
throw new TypeError(`You have set a Preset profile but the codec is "${codec}". Set the codec to "h264" or remove the Preset profile.`);
|
|
19
|
-
}
|
|
20
|
-
if (x264Preset !== undefined &&
|
|
21
|
-
!exports.x264PresetOptions.includes(x264Preset)) {
|
|
22
|
-
throw new TypeError(`The Preset profile "${x264Preset}" is not valid. Valid options are ${exports.x264PresetOptions
|
|
23
|
-
.map((p) => `"${p}"`)
|
|
24
|
-
.join(', ')}`);
|
|
25
|
-
}
|
|
26
|
-
};
|
|
27
|
-
exports.validateSelectedCodecAndPresetCombination = validateSelectedCodecAndPresetCombination;
|