@remotion/renderer 4.0.424 → 4.0.426
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 +500 -0
- package/dist/esm/client.mjs +1888 -534
- package/dist/esm/index.mjs +12 -7
- package/dist/index.d.ts +4 -1
- package/dist/options/browser-executable.d.ts +17 -0
- package/dist/options/browser-executable.js +36 -0
- package/dist/options/browser.d.ts +19 -0
- package/dist/options/browser.js +30 -0
- package/dist/options/bundle-cache.d.ts +16 -0
- package/dist/options/bundle-cache.js +34 -0
- package/dist/options/concurrency.d.ts +17 -0
- package/dist/options/concurrency.js +61 -0
- package/dist/options/config.d.ts +19 -0
- package/dist/options/config.js +29 -0
- package/dist/options/disable-web-security.d.ts +16 -0
- package/dist/options/disable-web-security.js +36 -0
- package/dist/options/env-file.d.ts +19 -0
- package/dist/options/env-file.js +38 -0
- package/dist/options/every-nth-frame.d.ts +16 -0
- package/dist/options/every-nth-frame.js +42 -0
- package/dist/options/experimental-client-side-rendering.js +2 -3
- package/dist/options/frames.d.ts +17 -0
- package/dist/options/frames.js +83 -0
- package/dist/options/ignore-certificate-errors.d.ts +16 -0
- package/dist/options/ignore-certificate-errors.js +36 -0
- package/dist/options/image-format-option.d.ts +18 -0
- package/dist/options/image-format-option.js +33 -0
- package/dist/options/image-sequence.d.ts +16 -0
- package/dist/options/image-sequence.js +30 -0
- package/dist/options/index.d.ts +499 -0
- package/dist/options/index.js +56 -0
- package/dist/options/no-open.d.ts +19 -0
- package/dist/options/no-open.js +30 -0
- package/dist/options/out-dir.d.ts +19 -0
- package/dist/options/out-dir.js +41 -0
- package/dist/options/override-duration.d.ts +19 -0
- package/dist/options/override-duration.js +46 -0
- package/dist/options/override-fps.d.ts +19 -0
- package/dist/options/override-fps.js +40 -0
- package/dist/options/override-height.d.ts +19 -0
- package/dist/options/override-height.js +40 -0
- package/dist/options/override-width.d.ts +19 -0
- package/dist/options/override-width.js +40 -0
- package/dist/options/package-manager.d.ts +19 -0
- package/dist/options/package-manager.js +47 -0
- package/dist/options/pixel-format.d.ts +16 -0
- package/dist/options/pixel-format.js +41 -0
- package/dist/options/port.d.ts +19 -0
- package/dist/options/port.js +36 -0
- package/dist/options/private-license-key.d.ts +15 -0
- package/dist/options/private-license-key.js +35 -0
- package/dist/options/props.d.ts +19 -0
- package/dist/options/props.js +33 -0
- package/dist/options/prores-profile.d.ts +20 -0
- package/dist/options/prores-profile.js +48 -0
- package/dist/options/rspack.d.ts +16 -0
- package/dist/options/rspack.js +31 -0
- package/dist/options/runs.d.ts +16 -0
- package/dist/options/runs.js +37 -0
- package/dist/options/still-frame.d.ts +19 -0
- package/dist/options/still-frame.js +51 -0
- package/dist/options/user-agent.d.ts +19 -0
- package/dist/options/user-agent.js +36 -0
- package/dist/options/version-flag.d.ts +19 -0
- package/dist/options/version-flag.js +29 -0
- package/dist/options/webpack-poll.d.ts +19 -0
- package/dist/options/webpack-poll.js +43 -0
- package/dist/prespawn-ffmpeg.d.ts +1 -0
- package/dist/prespawn-ffmpeg.js +4 -3
- package/dist/render-frames.d.ts +43 -3
- package/dist/render-media.d.ts +4 -2
- package/dist/render-media.js +4 -2
- package/dist/render-still.d.ts +1 -0
- package/dist/render-still.js +5 -1
- package/dist/select-composition.d.ts +25 -3
- package/package.json +14 -14
package/dist/render-media.d.ts
CHANGED
|
@@ -25,7 +25,7 @@ export type SlowFrame = {
|
|
|
25
25
|
frame: number;
|
|
26
26
|
time: number;
|
|
27
27
|
};
|
|
28
|
-
export type
|
|
28
|
+
export type RenderMediaProgress = {
|
|
29
29
|
renderedFrames: number;
|
|
30
30
|
encodedFrames: number;
|
|
31
31
|
encodedDoneIn: number | null;
|
|
@@ -33,7 +33,8 @@ export type RenderMediaOnProgress = (progress: {
|
|
|
33
33
|
renderEstimatedTime: number;
|
|
34
34
|
progress: number;
|
|
35
35
|
stitchStage: StitchingState;
|
|
36
|
-
}
|
|
36
|
+
};
|
|
37
|
+
export type RenderMediaOnProgress = (progress: RenderMediaProgress) => void;
|
|
37
38
|
type MoreRenderMediaOptions = ToOptions<typeof optionsMap.renderMedia>;
|
|
38
39
|
type EitherApiKeyOrLicenseKey = true extends typeof NoReactInternals.ENABLE_V5_BREAKING_CHANGES ? {
|
|
39
40
|
licenseKey: string | null;
|
|
@@ -144,6 +145,7 @@ export type RenderMediaOptions = Prettify<{
|
|
|
144
145
|
type RenderMediaResult = {
|
|
145
146
|
buffer: Buffer | null;
|
|
146
147
|
slowestFrames: SlowFrame[];
|
|
148
|
+
contentType: string;
|
|
147
149
|
};
|
|
148
150
|
export declare const internalRenderMedia: (args_0: InternalRenderMediaOptions) => Promise<RenderMediaResult>;
|
|
149
151
|
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, onArtifact, metadata, hardwareAcceleration, chromeMode, offthreadVideoThreads, compositionStart, mediaCacheSizeInBytes, isProduction, ...apiKeyOrLicenseKey }: RenderMediaOptions) => Promise<RenderMediaResult>;
|
package/dist/render-media.js
CHANGED
|
@@ -29,6 +29,7 @@ const is_audio_codec_1 = require("./is-audio-codec");
|
|
|
29
29
|
const jpeg_quality_1 = require("./jpeg-quality");
|
|
30
30
|
const logger_1 = require("./logger");
|
|
31
31
|
const make_cancel_signal_1 = require("./make-cancel-signal");
|
|
32
|
+
const mime_types_1 = require("./mime-types");
|
|
32
33
|
const color_space_1 = require("./options/color-space");
|
|
33
34
|
const offthreadvideo_threads_1 = require("./options/offthreadvideo-threads");
|
|
34
35
|
const x264_preset_1 = require("./options/x264-preset");
|
|
@@ -358,10 +359,10 @@ const internalRenderMediaRaw = ({ proResProfile, x264Preset, crf, composition: c
|
|
|
358
359
|
const id = (0, perf_1.startPerfMeasure)('piping');
|
|
359
360
|
const exitStatus = preStitcher === null || preStitcher === void 0 ? void 0 : preStitcher.getExitStatus();
|
|
360
361
|
if ((exitStatus === null || exitStatus === void 0 ? void 0 : exitStatus.type) === 'quit-successfully') {
|
|
361
|
-
throw new Error(`FFmpeg already quit while trying to pipe frame ${frame} to it. Stderr: ${exitStatus.stderr}
|
|
362
|
+
throw new Error(`FFmpeg already quit while trying to pipe frame ${frame} to it. Stderr: ${exitStatus.stderr}`);
|
|
362
363
|
}
|
|
363
364
|
if ((exitStatus === null || exitStatus === void 0 ? void 0 : exitStatus.type) === 'quit-with-error') {
|
|
364
|
-
throw new Error(`FFmpeg quit with code ${exitStatus.exitCode} while piping frame ${frame}. Stderr: ${exitStatus.stderr}
|
|
365
|
+
throw new Error(`FFmpeg quit with code ${exitStatus.exitCode}${exitStatus.signal ? ` (signal ${exitStatus.signal})` : ''} while piping frame ${frame}. Stderr: ${exitStatus.stderr}`);
|
|
365
366
|
}
|
|
366
367
|
(_a = stitcherFfmpeg === null || stitcherFfmpeg === void 0 ? void 0 : stitcherFfmpeg.stdin) === null || _a === void 0 ? void 0 : _a.write(buffer);
|
|
367
368
|
(0, perf_1.stopPerfMeasure)(id);
|
|
@@ -468,6 +469,7 @@ const internalRenderMediaRaw = ({ proResProfile, x264Preset, crf, composition: c
|
|
|
468
469
|
const result = {
|
|
469
470
|
buffer,
|
|
470
471
|
slowestFrames,
|
|
472
|
+
contentType: (0, mime_types_1.mimeLookup)('file.' + (0, get_extension_from_codec_1.getFileExtensionFromCodec)(codec, audioCodec)) || 'application/octet-stream',
|
|
471
473
|
};
|
|
472
474
|
const sendTelemetryAndResolve = () => {
|
|
473
475
|
if (licenseKey === null) {
|
package/dist/render-still.d.ts
CHANGED
|
@@ -75,6 +75,7 @@ export type RenderStillOptions = {
|
|
|
75
75
|
};
|
|
76
76
|
type RenderStillReturnValue = {
|
|
77
77
|
buffer: Buffer | null;
|
|
78
|
+
contentType: string;
|
|
78
79
|
};
|
|
79
80
|
export declare const internalRenderStill: (options: InternalRenderStillOptions) => Promise<RenderStillReturnValue>;
|
|
80
81
|
export declare const renderStill: (options: RenderStillOptions) => Promise<RenderStillReturnValue>;
|
package/dist/render-still.js
CHANGED
|
@@ -56,6 +56,7 @@ const jpeg_quality_1 = require("./jpeg-quality");
|
|
|
56
56
|
const logger_1 = require("./logger");
|
|
57
57
|
const make_cancel_signal_1 = require("./make-cancel-signal");
|
|
58
58
|
const get_available_memory_1 = require("./memory/get-available-memory");
|
|
59
|
+
const mime_types_1 = require("./mime-types");
|
|
59
60
|
const open_browser_1 = require("./open-browser");
|
|
60
61
|
const overwrite_1 = require("./overwrite");
|
|
61
62
|
const prepare_server_1 = require("./prepare-server");
|
|
@@ -246,7 +247,10 @@ const innerRenderStill = async ({ composition, imageFormat = image_format_1.DEFA
|
|
|
246
247
|
onArtifact === null || onArtifact === void 0 ? void 0 : onArtifact(artifact);
|
|
247
248
|
}
|
|
248
249
|
await cleanup();
|
|
249
|
-
return {
|
|
250
|
+
return {
|
|
251
|
+
buffer: output ? null : buffer,
|
|
252
|
+
contentType: (0, mime_types_1.mimeLookup)('file.' + imageFormat) || 'application/octet-stream',
|
|
253
|
+
};
|
|
250
254
|
};
|
|
251
255
|
const internalRenderStillRaw = (options) => {
|
|
252
256
|
const cleanup = [];
|
|
@@ -21,7 +21,10 @@ type InternalSelectCompositionsConfig = {
|
|
|
21
21
|
id: string;
|
|
22
22
|
onServeUrlVisited: () => void;
|
|
23
23
|
} & ToOptions<typeof optionsMap.selectComposition>;
|
|
24
|
-
|
|
24
|
+
type Prettify<T> = {
|
|
25
|
+
[K in keyof T]: T[K];
|
|
26
|
+
} & {};
|
|
27
|
+
export type SelectCompositionOptions = Prettify<RequiredInputPropsInV5 & {
|
|
25
28
|
envVariables?: Record<string, string>;
|
|
26
29
|
puppeteerInstance?: HeadlessBrowser;
|
|
27
30
|
onBrowserLog?: (log: BrowserLog) => void;
|
|
@@ -34,12 +37,31 @@ export type SelectCompositionOptions = RequiredInputPropsInV5 & {
|
|
|
34
37
|
verbose?: boolean;
|
|
35
38
|
serveUrl: string;
|
|
36
39
|
id: string;
|
|
37
|
-
} & Partial<ToOptions<typeof optionsMap.selectComposition
|
|
40
|
+
} & Partial<ToOptions<typeof optionsMap.selectComposition>>>;
|
|
38
41
|
type InternalReturnType = {
|
|
39
42
|
metadata: VideoConfig;
|
|
40
43
|
propsSize: number;
|
|
41
44
|
};
|
|
42
45
|
export declare const internalSelectCompositionRaw: (options: InternalSelectCompositionsConfig) => Promise<InternalReturnType>;
|
|
43
46
|
export declare const internalSelectComposition: (options: InternalSelectCompositionsConfig) => Promise<InternalReturnType>;
|
|
44
|
-
export declare const selectComposition: (options:
|
|
47
|
+
export declare const selectComposition: (options: {
|
|
48
|
+
readonly mediaCacheSizeInBytes?: number | null | undefined;
|
|
49
|
+
readonly offthreadVideoCacheSizeInBytes?: number | null | undefined;
|
|
50
|
+
readonly offthreadVideoThreads?: number | null | undefined;
|
|
51
|
+
readonly logLevel?: "error" | "info" | "trace" | "verbose" | "warn" | undefined;
|
|
52
|
+
readonly timeoutInMilliseconds?: number | undefined;
|
|
53
|
+
readonly binariesDirectory?: string | null | undefined;
|
|
54
|
+
readonly onBrowserDownload?: import(".").OnBrowserDownload | undefined;
|
|
55
|
+
readonly chromeMode?: "chrome-for-testing" | "headless-shell" | undefined;
|
|
56
|
+
inputProps?: Record<string, unknown> | undefined;
|
|
57
|
+
envVariables?: Record<string, string> | undefined;
|
|
58
|
+
puppeteerInstance?: HeadlessBrowser | undefined;
|
|
59
|
+
onBrowserLog?: ((log: BrowserLog) => void) | undefined;
|
|
60
|
+
browserExecutable?: BrowserExecutable | undefined;
|
|
61
|
+
chromiumOptions?: ChromiumOptions | undefined;
|
|
62
|
+
port?: number | null | undefined;
|
|
63
|
+
verbose?: boolean | undefined;
|
|
64
|
+
serveUrl: string;
|
|
65
|
+
id: string;
|
|
66
|
+
}) => Promise<VideoConfig>;
|
|
45
67
|
export {};
|
package/package.json
CHANGED
|
@@ -3,13 +3,13 @@
|
|
|
3
3
|
"url": "https://github.com/remotion-dev/remotion/tree/main/packages/renderer"
|
|
4
4
|
},
|
|
5
5
|
"name": "@remotion/renderer",
|
|
6
|
-
"version": "4.0.
|
|
6
|
+
"version": "4.0.426",
|
|
7
7
|
"description": "Render Remotion videos using Node.js or Bun",
|
|
8
8
|
"main": "dist/index.js",
|
|
9
9
|
"types": "dist/index.d.ts",
|
|
10
10
|
"sideEffects": false,
|
|
11
11
|
"scripts": {
|
|
12
|
-
"formatting": "prettier
|
|
12
|
+
"formatting": "prettier src --check",
|
|
13
13
|
"lint": "eslint src",
|
|
14
14
|
"test": "bun test src",
|
|
15
15
|
"watch": "tsgo -w",
|
|
@@ -23,11 +23,11 @@
|
|
|
23
23
|
"dependencies": {
|
|
24
24
|
"execa": "5.1.1",
|
|
25
25
|
"extract-zip": "2.0.1",
|
|
26
|
-
"remotion": "4.0.
|
|
27
|
-
"@remotion/streaming": "4.0.
|
|
26
|
+
"remotion": "4.0.426",
|
|
27
|
+
"@remotion/streaming": "4.0.426",
|
|
28
28
|
"source-map": "^0.8.0-beta.0",
|
|
29
29
|
"ws": "8.17.1",
|
|
30
|
-
"@remotion/licensing": "4.0.
|
|
30
|
+
"@remotion/licensing": "4.0.426"
|
|
31
31
|
},
|
|
32
32
|
"peerDependencies": {
|
|
33
33
|
"react": ">=16.8.0",
|
|
@@ -41,19 +41,19 @@
|
|
|
41
41
|
"react-dom": "19.2.3",
|
|
42
42
|
"@typescript/native-preview": "7.0.0-dev.20260217.1",
|
|
43
43
|
"@types/ws": "8.5.10",
|
|
44
|
-
"@remotion/example-videos": "4.0.
|
|
45
|
-
"@remotion/eslint-config-internal": "4.0.
|
|
44
|
+
"@remotion/example-videos": "4.0.426",
|
|
45
|
+
"@remotion/eslint-config-internal": "4.0.426",
|
|
46
46
|
"eslint": "9.19.0",
|
|
47
47
|
"@types/node": "20.12.14"
|
|
48
48
|
},
|
|
49
49
|
"optionalDependencies": {
|
|
50
|
-
"@remotion/compositor-darwin-arm64": "4.0.
|
|
51
|
-
"@remotion/compositor-darwin-x64": "4.0.
|
|
52
|
-
"@remotion/compositor-linux-arm64-gnu": "4.0.
|
|
53
|
-
"@remotion/compositor-linux-arm64-musl": "4.0.
|
|
54
|
-
"@remotion/compositor-linux-x64-gnu": "4.0.
|
|
55
|
-
"@remotion/compositor-linux-x64-musl": "4.0.
|
|
56
|
-
"@remotion/compositor-win32-x64-msvc": "4.0.
|
|
50
|
+
"@remotion/compositor-darwin-arm64": "4.0.426",
|
|
51
|
+
"@remotion/compositor-darwin-x64": "4.0.426",
|
|
52
|
+
"@remotion/compositor-linux-arm64-gnu": "4.0.426",
|
|
53
|
+
"@remotion/compositor-linux-arm64-musl": "4.0.426",
|
|
54
|
+
"@remotion/compositor-linux-x64-gnu": "4.0.426",
|
|
55
|
+
"@remotion/compositor-linux-x64-musl": "4.0.426",
|
|
56
|
+
"@remotion/compositor-win32-x64-msvc": "4.0.426"
|
|
57
57
|
},
|
|
58
58
|
"keywords": [
|
|
59
59
|
"remotion",
|