@remotion/renderer 4.0.77 → 4.0.79
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/assets/download-file.js +6 -1
- package/dist/client.d.ts +179 -126
- package/dist/compositor/payloads.d.ts +1 -0
- package/dist/crf.d.ts +4 -2
- package/dist/crf.js +11 -4
- package/dist/ffmpeg-args.d.ts +4 -2
- package/dist/ffmpeg-args.js +6 -2
- package/dist/get-extension-from-codec.d.ts +2 -2
- package/dist/index.d.ts +60 -54
- package/dist/open-browser.js +3 -0
- package/dist/options/audio-bitrate.d.ts +1 -1
- package/dist/options/color-space.d.ts +1 -1
- package/dist/options/crf.d.ts +1 -1
- package/dist/options/enable-lambda-insights.d.ts +1 -1
- package/dist/options/encoding-buffer-size.d.ts +9 -0
- package/dist/options/encoding-buffer-size.js +12 -0
- package/dist/options/encoding-max-rate.d.ts +9 -0
- package/dist/options/encoding-max-rate.js +12 -0
- package/dist/options/enforce-audio.d.ts +1 -1
- package/dist/options/gl.d.ts +1 -1
- package/dist/options/index.d.ts +28 -11
- package/dist/options/index.js +5 -1
- package/dist/options/jpeg-quality.d.ts +1 -1
- package/dist/options/offthreadvideo-cache-size.d.ts +1 -1
- package/dist/options/offthreadvideo-cache-size.js +2 -2
- package/dist/options/option.d.ts +2 -2
- package/dist/options/options-map.d.ts +116 -80
- package/dist/options/options-map.js +33 -10
- package/dist/options/scale.d.ts +1 -1
- package/dist/options/video-bitrate.d.ts +1 -1
- package/dist/options/video-codec.d.ts +1 -1
- package/dist/pixel-format.d.ts +1 -1
- package/dist/prespawn-ffmpeg.d.ts +2 -0
- package/dist/prespawn-ffmpeg.js +2 -0
- package/dist/print-useful-error-message.js +1 -1
- package/dist/render-media.d.ts +12 -4
- package/dist/render-media.js +15 -3
- package/dist/stitch-frames-to-video.d.ts +5 -1
- package/dist/stitch-frames-to-video.js +11 -2
- package/dist/validate-output-filename.d.ts +1 -1
- package/package.json +9 -9
|
@@ -1,83 +1,119 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
export declare const optionsMap: {
|
|
3
|
-
readonly renderMedia:
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
}
|
|
51
|
-
readonly
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
3
|
+
readonly renderMedia: {
|
|
4
|
+
readonly offthreadVideoCacheSizeInBytes: {
|
|
5
|
+
name: string;
|
|
6
|
+
cliFlag: "offthreadvideo-cache-size-in-bytes";
|
|
7
|
+
description: () => JSX.Element;
|
|
8
|
+
ssrName: "offthreadVideoCacheSizeInBytes";
|
|
9
|
+
docLink: string;
|
|
10
|
+
type: number | null;
|
|
11
|
+
};
|
|
12
|
+
readonly videoBitrate: {
|
|
13
|
+
name: string;
|
|
14
|
+
cliFlag: string;
|
|
15
|
+
description: () => JSX.Element;
|
|
16
|
+
ssrName: string;
|
|
17
|
+
docLink: string;
|
|
18
|
+
type: string | null;
|
|
19
|
+
};
|
|
20
|
+
};
|
|
21
|
+
readonly renderStill: {
|
|
22
|
+
readonly offthreadVideoCacheSizeInBytes: {
|
|
23
|
+
name: string;
|
|
24
|
+
cliFlag: "offthreadvideo-cache-size-in-bytes";
|
|
25
|
+
description: () => JSX.Element;
|
|
26
|
+
ssrName: "offthreadVideoCacheSizeInBytes";
|
|
27
|
+
docLink: string;
|
|
28
|
+
type: number | null;
|
|
29
|
+
};
|
|
30
|
+
};
|
|
31
|
+
readonly getCompositions: {
|
|
32
|
+
readonly offthreadVideoCacheSizeInBytes: {
|
|
33
|
+
name: string;
|
|
34
|
+
cliFlag: "offthreadvideo-cache-size-in-bytes";
|
|
35
|
+
description: () => JSX.Element;
|
|
36
|
+
ssrName: "offthreadVideoCacheSizeInBytes";
|
|
37
|
+
docLink: string;
|
|
38
|
+
type: number | null;
|
|
39
|
+
};
|
|
40
|
+
};
|
|
41
|
+
readonly selectComposition: {
|
|
42
|
+
readonly offthreadVideoCacheSizeInBytes: {
|
|
43
|
+
name: string;
|
|
44
|
+
cliFlag: "offthreadvideo-cache-size-in-bytes";
|
|
45
|
+
description: () => JSX.Element;
|
|
46
|
+
ssrName: "offthreadVideoCacheSizeInBytes";
|
|
47
|
+
docLink: string;
|
|
48
|
+
type: number | null;
|
|
49
|
+
};
|
|
50
|
+
};
|
|
51
|
+
readonly renderFrames: {
|
|
52
|
+
readonly offthreadVideoCacheSizeInBytes: {
|
|
53
|
+
name: string;
|
|
54
|
+
cliFlag: "offthreadvideo-cache-size-in-bytes";
|
|
55
|
+
description: () => JSX.Element;
|
|
56
|
+
ssrName: "offthreadVideoCacheSizeInBytes";
|
|
57
|
+
docLink: string;
|
|
58
|
+
type: number | null;
|
|
59
|
+
};
|
|
60
|
+
};
|
|
61
|
+
readonly renderMediaOnLambda: {
|
|
62
|
+
readonly offthreadVideoCacheSizeInBytes: {
|
|
63
|
+
name: string;
|
|
64
|
+
cliFlag: "offthreadvideo-cache-size-in-bytes";
|
|
65
|
+
description: () => JSX.Element;
|
|
66
|
+
ssrName: "offthreadVideoCacheSizeInBytes";
|
|
67
|
+
docLink: string;
|
|
68
|
+
type: number | null;
|
|
69
|
+
};
|
|
70
|
+
readonly videoBitrate: {
|
|
71
|
+
name: string;
|
|
72
|
+
cliFlag: string;
|
|
73
|
+
description: () => JSX.Element;
|
|
74
|
+
ssrName: string;
|
|
75
|
+
docLink: string;
|
|
76
|
+
type: string | null;
|
|
77
|
+
};
|
|
78
|
+
};
|
|
79
|
+
readonly renderStillOnLambda: {
|
|
80
|
+
readonly offthreadVideoCacheSizeInBytes: {
|
|
81
|
+
name: string;
|
|
82
|
+
cliFlag: "offthreadvideo-cache-size-in-bytes";
|
|
83
|
+
description: () => JSX.Element;
|
|
84
|
+
ssrName: "offthreadVideoCacheSizeInBytes";
|
|
85
|
+
docLink: string;
|
|
86
|
+
type: number | null;
|
|
87
|
+
};
|
|
88
|
+
};
|
|
89
|
+
readonly getCompositionsOnLambda: {
|
|
90
|
+
readonly offthreadVideoCacheSizeInBytes: {
|
|
91
|
+
name: string;
|
|
92
|
+
cliFlag: "offthreadvideo-cache-size-in-bytes";
|
|
93
|
+
description: () => JSX.Element;
|
|
94
|
+
ssrName: "offthreadVideoCacheSizeInBytes";
|
|
95
|
+
docLink: string;
|
|
96
|
+
type: number | null;
|
|
97
|
+
};
|
|
98
|
+
};
|
|
99
|
+
readonly renderMediaOnCloudRun: {
|
|
100
|
+
readonly offthreadVideoCacheSizeInBytes: {
|
|
101
|
+
name: string;
|
|
102
|
+
cliFlag: "offthreadvideo-cache-size-in-bytes";
|
|
103
|
+
description: () => JSX.Element;
|
|
104
|
+
ssrName: "offthreadVideoCacheSizeInBytes";
|
|
105
|
+
docLink: string;
|
|
106
|
+
type: number | null;
|
|
107
|
+
};
|
|
108
|
+
};
|
|
109
|
+
readonly renderStillOnCloudRun: {
|
|
110
|
+
readonly offthreadVideoCacheSizeInBytes: {
|
|
111
|
+
name: string;
|
|
112
|
+
cliFlag: "offthreadvideo-cache-size-in-bytes";
|
|
113
|
+
description: () => JSX.Element;
|
|
114
|
+
ssrName: "offthreadVideoCacheSizeInBytes";
|
|
115
|
+
docLink: string;
|
|
116
|
+
type: number | null;
|
|
117
|
+
};
|
|
118
|
+
};
|
|
83
119
|
};
|
|
@@ -2,15 +2,38 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.optionsMap = void 0;
|
|
4
4
|
const offthreadvideo_cache_size_1 = require("./offthreadvideo-cache-size");
|
|
5
|
+
const video_bitrate_1 = require("./video-bitrate");
|
|
5
6
|
exports.optionsMap = {
|
|
6
|
-
renderMedia:
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
7
|
+
renderMedia: {
|
|
8
|
+
offthreadVideoCacheSizeInBytes: offthreadvideo_cache_size_1.offthreadVideoCacheSizeInBytes,
|
|
9
|
+
videoBitrate: video_bitrate_1.videoBitrate,
|
|
10
|
+
},
|
|
11
|
+
renderStill: {
|
|
12
|
+
offthreadVideoCacheSizeInBytes: offthreadvideo_cache_size_1.offthreadVideoCacheSizeInBytes,
|
|
13
|
+
},
|
|
14
|
+
getCompositions: {
|
|
15
|
+
offthreadVideoCacheSizeInBytes: offthreadvideo_cache_size_1.offthreadVideoCacheSizeInBytes,
|
|
16
|
+
},
|
|
17
|
+
selectComposition: {
|
|
18
|
+
offthreadVideoCacheSizeInBytes: offthreadvideo_cache_size_1.offthreadVideoCacheSizeInBytes,
|
|
19
|
+
},
|
|
20
|
+
renderFrames: {
|
|
21
|
+
offthreadVideoCacheSizeInBytes: offthreadvideo_cache_size_1.offthreadVideoCacheSizeInBytes,
|
|
22
|
+
},
|
|
23
|
+
renderMediaOnLambda: {
|
|
24
|
+
offthreadVideoCacheSizeInBytes: offthreadvideo_cache_size_1.offthreadVideoCacheSizeInBytes,
|
|
25
|
+
videoBitrate: video_bitrate_1.videoBitrate,
|
|
26
|
+
},
|
|
27
|
+
renderStillOnLambda: {
|
|
28
|
+
offthreadVideoCacheSizeInBytes: offthreadvideo_cache_size_1.offthreadVideoCacheSizeInBytes,
|
|
29
|
+
},
|
|
30
|
+
getCompositionsOnLambda: {
|
|
31
|
+
offthreadVideoCacheSizeInBytes: offthreadvideo_cache_size_1.offthreadVideoCacheSizeInBytes,
|
|
32
|
+
},
|
|
33
|
+
renderMediaOnCloudRun: {
|
|
34
|
+
offthreadVideoCacheSizeInBytes: offthreadvideo_cache_size_1.offthreadVideoCacheSizeInBytes,
|
|
35
|
+
},
|
|
36
|
+
renderStillOnCloudRun: {
|
|
37
|
+
offthreadVideoCacheSizeInBytes: offthreadvideo_cache_size_1.offthreadVideoCacheSizeInBytes,
|
|
38
|
+
},
|
|
16
39
|
};
|
package/dist/options/scale.d.ts
CHANGED
package/dist/pixel-format.d.ts
CHANGED
|
@@ -2,5 +2,5 @@ import type { Codec } from './codec';
|
|
|
2
2
|
export declare const validPixelFormats: readonly ["yuv420p", "yuva420p", "yuv422p", "yuv444p", "yuv420p10le", "yuv422p10le", "yuv444p10le", "yuva444p10le"];
|
|
3
3
|
export type PixelFormat = (typeof validPixelFormats)[number];
|
|
4
4
|
export declare const DEFAULT_PIXEL_FORMAT: PixelFormat;
|
|
5
|
-
export declare const validPixelFormatsForCodec: (codec: Codec) => readonly ["yuv420p", "yuva420p", "yuv422p", "yuv444p", "yuv420p10le", "yuv422p10le", "yuv444p10le", "yuva444p10le"] | ("yuv420p" | "
|
|
5
|
+
export declare const validPixelFormatsForCodec: (codec: Codec) => readonly ["yuv420p", "yuva420p", "yuv422p", "yuv444p", "yuv420p10le", "yuv422p10le", "yuv444p10le", "yuva444p10le"] | ("yuv420p" | "yuva420p" | "yuv422p" | "yuv444p" | "yuv420p10le" | "yuv422p10le" | "yuv444p10le" | "yuva444p10le")[];
|
|
6
6
|
export declare const validateSelectedPixelFormatAndCodecCombination: (pixelFormat: PixelFormat | undefined, codec: Codec) => undefined;
|
package/dist/prespawn-ffmpeg.js
CHANGED
|
@@ -37,7 +37,7 @@ const printUsefulErrorMessage = (err) => {
|
|
|
37
37
|
}
|
|
38
38
|
if (err.message.includes('Member must have value less than or equal to 3008')) {
|
|
39
39
|
logger_1.Log.info();
|
|
40
|
-
logger_1.Log.info('💡 This error indicates that you have a AWS account on the free tier or have been limited by your organization. Often times this can be solved by adding a credit card.');
|
|
40
|
+
logger_1.Log.info('💡 This error indicates that you have a AWS account on the free tier or have been limited by your organization. Often times this can be solved by adding a credit card. See also: https://repost.aws/questions/QUKruWYNDYTSmP17jCnIz6IQ/questions/QUKruWYNDYTSmP17jCnIz6IQ/unable-to-set-lambda-memory-over-3008mb');
|
|
41
41
|
}
|
|
42
42
|
if ((_a = err.stack) === null || _a === void 0 ? void 0 : _a.includes('TooManyRequestsException: Rate Exceeded.')) {
|
|
43
43
|
logger_1.Log.info();
|
package/dist/render-media.d.ts
CHANGED
|
@@ -33,6 +33,7 @@ export type RenderMediaOnProgress = (progress: {
|
|
|
33
33
|
progress: number;
|
|
34
34
|
stitchStage: StitchingState;
|
|
35
35
|
}) => void;
|
|
36
|
+
type MoreRenderMediaOptions = ToOptions<typeof optionsMap.renderMedia>;
|
|
36
37
|
export type InternalRenderMediaOptions = {
|
|
37
38
|
outputLocation: string | null;
|
|
38
39
|
codec: Codec;
|
|
@@ -71,13 +72,18 @@ export type InternalRenderMediaOptions = {
|
|
|
71
72
|
ffmpegOverride: FfmpegOverrideFn | undefined;
|
|
72
73
|
audioBitrate: string | null;
|
|
73
74
|
videoBitrate: string | null;
|
|
75
|
+
encodingMaxRate: string | null;
|
|
76
|
+
encodingBufferSize: string | null;
|
|
74
77
|
disallowParallelEncoding: boolean;
|
|
75
78
|
audioCodec: AudioCodec | null;
|
|
76
79
|
serveUrl: string;
|
|
77
80
|
concurrency: number | string | null;
|
|
78
81
|
colorSpace: ColorSpace;
|
|
79
|
-
} &
|
|
80
|
-
|
|
82
|
+
} & MoreRenderMediaOptions;
|
|
83
|
+
type Prettify<T> = {
|
|
84
|
+
[K in keyof T]: T[K];
|
|
85
|
+
} & {};
|
|
86
|
+
export type RenderMediaOptions = Prettify<{
|
|
81
87
|
outputLocation?: string | null;
|
|
82
88
|
codec: Codec;
|
|
83
89
|
composition: VideoConfig;
|
|
@@ -122,6 +128,8 @@ export type RenderMediaOptions = {
|
|
|
122
128
|
ffmpegOverride?: FfmpegOverrideFn;
|
|
123
129
|
audioBitrate?: string | null;
|
|
124
130
|
videoBitrate?: string | null;
|
|
131
|
+
encodingMaxRate?: string | null;
|
|
132
|
+
encodingBufferSize?: string | null;
|
|
125
133
|
disallowParallelEncoding?: boolean;
|
|
126
134
|
audioCodec?: AudioCodec | null;
|
|
127
135
|
serveUrl: string;
|
|
@@ -129,7 +137,7 @@ export type RenderMediaOptions = {
|
|
|
129
137
|
logLevel?: LogLevel;
|
|
130
138
|
offthreadVideoCacheSizeInBytes?: number | null;
|
|
131
139
|
colorSpace?: ColorSpace;
|
|
132
|
-
}
|
|
140
|
+
}>;
|
|
133
141
|
type RenderMediaResult = {
|
|
134
142
|
buffer: Buffer | null;
|
|
135
143
|
slowestFrames: SlowFrame[];
|
|
@@ -140,5 +148,5 @@ export declare const internalRenderMedia: (args_0: InternalRenderMediaOptions) =
|
|
|
140
148
|
* @description Render a video from a composition
|
|
141
149
|
* @see [Documentation](https://www.remotion.dev/docs/renderer/render-media)
|
|
142
150
|
*/
|
|
143
|
-
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, audioCodec, jpegQuality, concurrency, serveUrl, disallowParallelEncoding, everyNthFrame, imageFormat, numberOfGifLoops, dumpBrowserLogs, preferLossless, verbose, quality, logLevel, offthreadVideoCacheSizeInBytes, colorSpace, }: RenderMediaOptions) => Promise<RenderMediaResult>;
|
|
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, offthreadVideoCacheSizeInBytes, colorSpace, }: RenderMediaOptions) => Promise<RenderMediaResult>;
|
|
144
152
|
export {};
|
package/dist/render-media.js
CHANGED
|
@@ -46,9 +46,15 @@ const validate_videobitrate_1 = require("./validate-videobitrate");
|
|
|
46
46
|
const wrap_with_error_handling_1 = require("./wrap-with-error-handling");
|
|
47
47
|
const x264_preset_1 = require("./x264-preset");
|
|
48
48
|
const SLOWEST_FRAME_COUNT = 10;
|
|
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, colorSpace, }) => {
|
|
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, encodingMaxRate, encodingBufferSize, audioCodec, concurrency, disallowParallelEncoding, everyNthFrame, imageFormat: provisionalImageFormat, indent, jpegQuality, numberOfGifLoops, onCtrlCExit, preferLossless, serveUrl, server: reusedServer, logLevel, serializedResolvedPropsWithCustomSchema, offthreadVideoCacheSizeInBytes, colorSpace, }) => {
|
|
50
50
|
(0, jpeg_quality_1.validateJpegQuality)(jpegQuality);
|
|
51
|
-
(0, crf_1.validateQualitySettings)({
|
|
51
|
+
(0, crf_1.validateQualitySettings)({
|
|
52
|
+
crf,
|
|
53
|
+
codec,
|
|
54
|
+
videoBitrate,
|
|
55
|
+
encodingMaxRate,
|
|
56
|
+
encodingBufferSize,
|
|
57
|
+
});
|
|
52
58
|
(0, validate_videobitrate_1.validateBitrate)(audioBitrate, 'audioBitrate');
|
|
53
59
|
(0, validate_videobitrate_1.validateBitrate)(videoBitrate, 'videoBitrate');
|
|
54
60
|
(0, prores_profile_1.validateSelectedCodecAndProResCombination)({
|
|
@@ -192,6 +198,8 @@ const internalRenderMediaRaw = ({ proResProfile, x264Preset, crf, composition, s
|
|
|
192
198
|
signal: cancelPrestitcher.cancelSignal,
|
|
193
199
|
ffmpegOverride: ffmpegOverride !== null && ffmpegOverride !== void 0 ? ffmpegOverride : (({ args }) => args),
|
|
194
200
|
videoBitrate,
|
|
201
|
+
encodingMaxRate,
|
|
202
|
+
encodingBufferSize,
|
|
195
203
|
indent,
|
|
196
204
|
x264Preset: x264Preset !== null && x264Preset !== void 0 ? x264Preset : null,
|
|
197
205
|
colorSpace,
|
|
@@ -368,6 +376,8 @@ const internalRenderMediaRaw = ({ proResProfile, x264Preset, crf, composition, s
|
|
|
368
376
|
ffmpegOverride: ffmpegOverride !== null && ffmpegOverride !== void 0 ? ffmpegOverride : null,
|
|
369
377
|
audioBitrate,
|
|
370
378
|
videoBitrate,
|
|
379
|
+
encodingBufferSize,
|
|
380
|
+
encodingMaxRate,
|
|
371
381
|
audioCodec,
|
|
372
382
|
x264Preset: x264Preset !== null && x264Preset !== void 0 ? x264Preset : null,
|
|
373
383
|
colorSpace,
|
|
@@ -437,7 +447,7 @@ exports.internalRenderMedia = (0, wrap_with_error_handling_1.wrapWithErrorHandli
|
|
|
437
447
|
* @description Render a video from a composition
|
|
438
448
|
* @see [Documentation](https://www.remotion.dev/docs/renderer/render-media)
|
|
439
449
|
*/
|
|
440
|
-
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, audioCodec, jpegQuality, concurrency, serveUrl, disallowParallelEncoding, everyNthFrame, imageFormat, numberOfGifLoops, dumpBrowserLogs, preferLossless, verbose, quality, logLevel, offthreadVideoCacheSizeInBytes, colorSpace, }) => {
|
|
450
|
+
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, }) => {
|
|
441
451
|
var _a, _b;
|
|
442
452
|
if (quality !== undefined) {
|
|
443
453
|
console.warn(`The "quality" option has been renamed. Please use "jpegQuality" instead.`);
|
|
@@ -482,6 +492,8 @@ const renderMedia = ({ proResProfile, x264Preset, crf, composition, inputProps,
|
|
|
482
492
|
scale: scale !== null && scale !== void 0 ? scale : 1,
|
|
483
493
|
timeoutInMilliseconds: timeoutInMilliseconds !== null && timeoutInMilliseconds !== void 0 ? timeoutInMilliseconds : TimeoutSettings_1.DEFAULT_TIMEOUT,
|
|
484
494
|
videoBitrate: videoBitrate !== null && videoBitrate !== void 0 ? videoBitrate : null,
|
|
495
|
+
encodingMaxRate: encodingMaxRate !== null && encodingMaxRate !== void 0 ? encodingMaxRate : null,
|
|
496
|
+
encodingBufferSize: encodingBufferSize !== null && encodingBufferSize !== void 0 ? encodingBufferSize : null,
|
|
485
497
|
logLevel: verbose || dumpBrowserLogs ? 'verbose' : logLevel !== null && logLevel !== void 0 ? logLevel : (0, logger_1.getLogLevel)(),
|
|
486
498
|
preferLossless: preferLossless !== null && preferLossless !== void 0 ? preferLossless : false,
|
|
487
499
|
indent: false,
|
|
@@ -13,6 +13,8 @@ import type { X264Preset } from './x264-preset';
|
|
|
13
13
|
type InternalStitchFramesToVideoOptions = {
|
|
14
14
|
audioBitrate: string | null;
|
|
15
15
|
videoBitrate: string | null;
|
|
16
|
+
encodingMaxRate: string | null;
|
|
17
|
+
encodingBufferSize: string | null;
|
|
16
18
|
fps: number;
|
|
17
19
|
width: number;
|
|
18
20
|
height: number;
|
|
@@ -42,6 +44,8 @@ type InternalStitchFramesToVideoOptions = {
|
|
|
42
44
|
export type StitchFramesToVideoOptions = {
|
|
43
45
|
audioBitrate?: string | null;
|
|
44
46
|
videoBitrate?: string | null;
|
|
47
|
+
encodingMaxRate?: string | null;
|
|
48
|
+
encodingBufferSize?: string | null;
|
|
45
49
|
fps: number;
|
|
46
50
|
width: number;
|
|
47
51
|
height: number;
|
|
@@ -70,5 +74,5 @@ export declare const internalStitchFramesToVideo: (options: InternalStitchFrames
|
|
|
70
74
|
* @description Takes a series of images and audio information generated by renderFrames() and encodes it to a video.
|
|
71
75
|
* @see [Documentation](https://www.remotion.dev/docs/renderer/stitch-frames-to-video)
|
|
72
76
|
*/
|
|
73
|
-
export declare const stitchFramesToVideo: ({ assetsInfo, force, fps, height, width, audioBitrate, audioCodec, cancelSignal, codec, crf, dir, enforceAudioTrack, ffmpegOverride, muted, numberOfGifLoops, onDownload, onProgress, outputLocation, pixelFormat, proResProfile, verbose, videoBitrate, x264Preset, colorSpace, }: StitchFramesToVideoOptions) => Promise<Buffer | null>;
|
|
77
|
+
export declare const stitchFramesToVideo: ({ assetsInfo, force, fps, height, width, audioBitrate, audioCodec, cancelSignal, codec, crf, dir, enforceAudioTrack, ffmpegOverride, muted, numberOfGifLoops, onDownload, onProgress, outputLocation, pixelFormat, proResProfile, verbose, videoBitrate, encodingMaxRate, encodingBufferSize, x264Preset, colorSpace, }: StitchFramesToVideoOptions) => Promise<Buffer | null>;
|
|
74
78
|
export {};
|
|
@@ -107,7 +107,7 @@ const getAssetsData = async ({ assets, onDownload, fps, expectedFrames, logLevel
|
|
|
107
107
|
});
|
|
108
108
|
return outName;
|
|
109
109
|
};
|
|
110
|
-
const innerStitchFramesToVideo = async ({ assetsInfo, audioBitrate, audioCodec, cancelSignal, codec, crf, dir, enforceAudioTrack, ffmpegOverride, force, fps, height, indent, muted, onDownload, outputLocation, pixelFormat, preEncodedFileLocation, preferLossless, proResProfile, logLevel, videoBitrate, width, numberOfGifLoops, onProgress, x264Preset, colorSpace, }, remotionRoot) => {
|
|
110
|
+
const innerStitchFramesToVideo = async ({ assetsInfo, audioBitrate, audioCodec, cancelSignal, codec, crf, dir, enforceAudioTrack, ffmpegOverride, force, fps, height, indent, muted, onDownload, outputLocation, pixelFormat, preEncodedFileLocation, preferLossless, proResProfile, logLevel, videoBitrate, encodingMaxRate, encodingBufferSize, width, numberOfGifLoops, onProgress, x264Preset, colorSpace, }, remotionRoot) => {
|
|
111
111
|
var _a;
|
|
112
112
|
(0, validate_1.validateDimension)(height, 'height', 'passed to `stitchFramesToVideo()`');
|
|
113
113
|
(0, validate_1.validateDimension)(width, 'width', 'passed to `stitchFramesToVideo()`');
|
|
@@ -124,6 +124,9 @@ const innerStitchFramesToVideo = async ({ assetsInfo, audioBitrate, audioCodec,
|
|
|
124
124
|
});
|
|
125
125
|
(0, validate_videobitrate_1.validateBitrate)(audioBitrate, 'audioBitrate');
|
|
126
126
|
(0, validate_videobitrate_1.validateBitrate)(videoBitrate, 'videoBitrate');
|
|
127
|
+
(0, validate_videobitrate_1.validateBitrate)(encodingMaxRate, 'encodingMaxRate');
|
|
128
|
+
// encodingBufferSize is not a bitrate but need to be validated using the same format
|
|
129
|
+
(0, validate_videobitrate_1.validateBitrate)(encodingBufferSize, 'encodingBufferSize');
|
|
127
130
|
(0, validate_1.validateFps)(fps, 'in `stitchFramesToVideo()`', false);
|
|
128
131
|
const proResProfileName = (0, get_prores_profile_name_1.getProResProfileName)(codec, proResProfile);
|
|
129
132
|
const mediaSupport = (0, codec_supports_media_1.codecSupportsMedia)(codec);
|
|
@@ -170,6 +173,8 @@ const innerStitchFramesToVideo = async ({ assetsInfo, audioBitrate, audioCodec,
|
|
|
170
173
|
crf,
|
|
171
174
|
codec,
|
|
172
175
|
videoBitrate,
|
|
176
|
+
encodingMaxRate,
|
|
177
|
+
encodingBufferSize,
|
|
173
178
|
});
|
|
174
179
|
(0, pixel_format_1.validateSelectedPixelFormatAndCodecCombination)(pixelFormat, codec);
|
|
175
180
|
const expectedFrames = assetsInfo.assets.length;
|
|
@@ -251,6 +256,8 @@ const innerStitchFramesToVideo = async ({ assetsInfo, audioBitrate, audioCodec,
|
|
|
251
256
|
codec,
|
|
252
257
|
crf,
|
|
253
258
|
videoBitrate,
|
|
259
|
+
encodingMaxRate,
|
|
260
|
+
encodingBufferSize,
|
|
254
261
|
hasPreencoded: Boolean(preEncodedFileLocation),
|
|
255
262
|
proResProfileName,
|
|
256
263
|
pixelFormat,
|
|
@@ -361,10 +368,12 @@ exports.internalStitchFramesToVideo = internalStitchFramesToVideo;
|
|
|
361
368
|
* @description Takes a series of images and audio information generated by renderFrames() and encodes it to a video.
|
|
362
369
|
* @see [Documentation](https://www.remotion.dev/docs/renderer/stitch-frames-to-video)
|
|
363
370
|
*/
|
|
364
|
-
const stitchFramesToVideo = ({ assetsInfo, force, fps, height, width, audioBitrate, audioCodec, cancelSignal, codec, crf, dir, enforceAudioTrack, ffmpegOverride, muted, numberOfGifLoops, onDownload, onProgress, outputLocation, pixelFormat, proResProfile, verbose, videoBitrate, x264Preset, colorSpace, }) => {
|
|
371
|
+
const stitchFramesToVideo = ({ assetsInfo, force, fps, height, width, audioBitrate, audioCodec, cancelSignal, codec, crf, dir, enforceAudioTrack, ffmpegOverride, muted, numberOfGifLoops, onDownload, onProgress, outputLocation, pixelFormat, proResProfile, verbose, videoBitrate, encodingMaxRate, encodingBufferSize, x264Preset, colorSpace, }) => {
|
|
365
372
|
return (0, exports.internalStitchFramesToVideo)({
|
|
366
373
|
assetsInfo,
|
|
367
374
|
audioBitrate: audioBitrate !== null && audioBitrate !== void 0 ? audioBitrate : null,
|
|
375
|
+
encodingMaxRate: encodingMaxRate !== null && encodingMaxRate !== void 0 ? encodingMaxRate : null,
|
|
376
|
+
encodingBufferSize: encodingBufferSize !== null && encodingBufferSize !== void 0 ? encodingBufferSize : null,
|
|
368
377
|
audioCodec: audioCodec !== null && audioCodec !== void 0 ? audioCodec : null,
|
|
369
378
|
cancelSignal: cancelSignal !== null && cancelSignal !== void 0 ? cancelSignal : null,
|
|
370
379
|
codec: codec !== null && codec !== void 0 ? codec : codec_1.DEFAULT_CODEC,
|
|
@@ -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.79",
|
|
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.79"
|
|
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-
|
|
44
|
-
"@remotion/compositor-darwin-x64": "4.0.
|
|
45
|
-
"@remotion/compositor-linux-
|
|
46
|
-
"@remotion/compositor-
|
|
47
|
-
"@remotion/compositor-linux-
|
|
48
|
-
"@remotion/compositor-
|
|
49
|
-
"@remotion/compositor-linux-x64-
|
|
43
|
+
"@remotion/compositor-darwin-arm64": "4.0.79",
|
|
44
|
+
"@remotion/compositor-darwin-x64": "4.0.79",
|
|
45
|
+
"@remotion/compositor-linux-arm64-musl": "4.0.79",
|
|
46
|
+
"@remotion/compositor-linux-arm64-gnu": "4.0.79",
|
|
47
|
+
"@remotion/compositor-linux-x64-musl": "4.0.79",
|
|
48
|
+
"@remotion/compositor-win32-x64-msvc": "4.0.79",
|
|
49
|
+
"@remotion/compositor-linux-x64-gnu": "4.0.79"
|
|
50
50
|
},
|
|
51
51
|
"keywords": [
|
|
52
52
|
"remotion",
|