@remotion/renderer 4.0.277 → 4.0.279
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/calculate-asset-positions.js +0 -1
- package/dist/assets/ffmpeg-volume-expression.d.ts +1 -2
- package/dist/assets/ffmpeg-volume-expression.js +3 -5
- package/dist/assets/types.d.ts +0 -1
- package/dist/can-concat-seamlessly.d.ts +4 -0
- package/dist/can-concat-seamlessly.js +17 -0
- package/dist/client.d.ts +2 -2
- package/dist/combine-chunks.d.ts +39 -0
- package/dist/{combine-videos.js → combine-chunks.js} +50 -7
- package/dist/esm/client.mjs +209 -281
- package/dist/esm/error-handling.mjs +8 -0
- package/dist/esm/index.mjs +2146 -2143
- package/dist/index.d.ts +30 -22
- package/dist/index.js +8 -3
- package/dist/options/index.d.ts +2 -2
- package/dist/options/metadata.d.ts +1 -1
- package/dist/options/webhook-custom-data.d.ts +1 -1
- package/dist/print-useful-error-message.js +8 -0
- package/dist/render-media.d.ts +2 -1
- package/dist/render-media.js +7 -8
- package/dist/stringify-ffmpeg-filter.js +0 -1
- package/dist/symbolicate-stacktrace.js +2 -1
- package/dist/validate-even-dimensions-with-codec.d.ts +4 -1
- package/dist/validate-even-dimensions-with-codec.js +14 -4
- package/package.json +15 -15
- package/dist/combine-videos.d.ts +0 -27
package/dist/index.d.ts
CHANGED
|
@@ -9,6 +9,7 @@ export { BrowserExecutable } from './browser-executable';
|
|
|
9
9
|
export { BrowserLog } from './browser-log';
|
|
10
10
|
export type { HeadlessBrowser } from './browser/Browser';
|
|
11
11
|
export { Codec, CodecOrUndefined } from './codec';
|
|
12
|
+
export { CombineChunksOnProgress, CombineChunksOptions, combineChunks, } from './combine-chunks';
|
|
12
13
|
export { Crf } from './crf';
|
|
13
14
|
export { EnsureBrowserOptions, ensureBrowser } from './ensure-browser';
|
|
14
15
|
export { ErrorWithStackFrame } from './error-handling/handle-javascript-exception';
|
|
@@ -73,7 +74,10 @@ export declare const RenderInternals: {
|
|
|
73
74
|
wantsImageSequence: boolean;
|
|
74
75
|
indent: boolean;
|
|
75
76
|
logLevel: import("./log-level").LogLevel;
|
|
76
|
-
}) =>
|
|
77
|
+
}) => {
|
|
78
|
+
actualWidth: number;
|
|
79
|
+
actualHeight: number;
|
|
80
|
+
};
|
|
77
81
|
getFileExtensionFromCodec: <T extends import("./codec").Codec>(codec: T, audioCodec: AudioCodec | null) => import("./file-extensions").FileExtension;
|
|
78
82
|
tmpDir: (str: string) => string;
|
|
79
83
|
deleteDirectory: (directory: string) => void;
|
|
@@ -158,27 +162,6 @@ export declare const RenderInternals: {
|
|
|
158
162
|
}) => number;
|
|
159
163
|
findRemotionRoot: () => string;
|
|
160
164
|
validateBitrate: (bitrate: unknown, name: string) => void;
|
|
161
|
-
combineChunks: ({ files, filelistDir, output, onProgress, numberOfFrames, codec, fps, numberOfGifLoops, resolvedAudioCodec, audioBitrate, indent, logLevel, chunkDurationInSeconds, binariesDirectory, cancelSignal, seamlessAudio, seamlessVideo, muted, metadata, }: {
|
|
162
|
-
files: string[];
|
|
163
|
-
filelistDir: string;
|
|
164
|
-
output: string;
|
|
165
|
-
onProgress: (p: number) => void;
|
|
166
|
-
numberOfFrames: number;
|
|
167
|
-
codec: import("./codec").Codec;
|
|
168
|
-
fps: number;
|
|
169
|
-
numberOfGifLoops: number | null;
|
|
170
|
-
resolvedAudioCodec: AudioCodec | null;
|
|
171
|
-
audioBitrate: string | null;
|
|
172
|
-
indent: boolean;
|
|
173
|
-
logLevel: import("./log-level").LogLevel;
|
|
174
|
-
chunkDurationInSeconds: number;
|
|
175
|
-
binariesDirectory: string | null;
|
|
176
|
-
cancelSignal: import("./make-cancel-signal").CancelSignal | undefined;
|
|
177
|
-
seamlessAudio: boolean;
|
|
178
|
-
seamlessVideo: boolean;
|
|
179
|
-
muted: boolean;
|
|
180
|
-
metadata: Record<string, string> | null;
|
|
181
|
-
}) => Promise<void>;
|
|
182
165
|
getMinConcurrency: () => number;
|
|
183
166
|
getMaxConcurrency: () => number;
|
|
184
167
|
getDefaultAudioCodec: ({ codec, preferLossless, }: {
|
|
@@ -1149,4 +1132,29 @@ export declare const RenderInternals: {
|
|
|
1149
1132
|
}>) => Promise<import("./ensure-browser").BrowserStatus>;
|
|
1150
1133
|
printUsefulErrorMessage: (err: Error, logLevel: import("./log-level").LogLevel, indent: boolean) => void;
|
|
1151
1134
|
DEFAULT_RENDER_FRAMES_OFFTHREAD_VIDEO_THREADS: number;
|
|
1135
|
+
canConcatVideoSeamlessly: (codec: import("./codec").Codec) => codec is "h264";
|
|
1136
|
+
canConcatAudioSeamlessly: (audioCodec: AudioCodec | null, chunkDurationInFrames: number) => boolean;
|
|
1137
|
+
internalCombineChunks: ({ outputLocation: output, onProgress, codec, fps, numberOfGifLoops, audioBitrate, indent, logLevel, binariesDirectory, cancelSignal, metadata, audioFiles, videoFiles, framesPerChunk, audioCodec, preferLossless, everyNthFrame, frameRange, compositionDurationInFrames, }: ({
|
|
1138
|
+
outputLocation: string;
|
|
1139
|
+
audioFiles: string[];
|
|
1140
|
+
codec: import("./codec").Codec;
|
|
1141
|
+
videoFiles: string[];
|
|
1142
|
+
fps: number;
|
|
1143
|
+
framesPerChunk: number;
|
|
1144
|
+
preferLossless: boolean;
|
|
1145
|
+
compositionDurationInFrames: number;
|
|
1146
|
+
} & {
|
|
1147
|
+
onProgress: import("./combine-chunks").CombineChunksOnProgress;
|
|
1148
|
+
audioBitrate: string | null;
|
|
1149
|
+
numberOfGifLoops: number | null;
|
|
1150
|
+
logLevel: import("./log-level").LogLevel;
|
|
1151
|
+
binariesDirectory: string | null;
|
|
1152
|
+
audioCodec: AudioCodec | null;
|
|
1153
|
+
cancelSignal: import("./make-cancel-signal").CancelSignal | undefined;
|
|
1154
|
+
metadata: Record<string, string> | null;
|
|
1155
|
+
frameRange: import("./frame-range").FrameRange | null;
|
|
1156
|
+
everyNthFrame: number;
|
|
1157
|
+
}) & {
|
|
1158
|
+
indent: boolean;
|
|
1159
|
+
}) => Promise<void>;
|
|
1152
1160
|
};
|
package/dist/index.js
CHANGED
|
@@ -26,7 +26,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
26
26
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
27
27
|
};
|
|
28
28
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29
|
-
exports.RenderInternals = exports.validateOutputFilename = exports.stitchFramesToVideo = exports.selectComposition = exports.renderStill = exports.renderMedia = exports.renderFrames = exports.openBrowser = exports.makeCancelSignal = exports.validateSelectedPixelFormatAndImageFormatCombination = exports.getVideoMetadata = exports.getSilentParts = exports.getCompositions = exports.extractAudio = exports.ErrorWithStackFrame = exports.ensureBrowser = void 0;
|
|
29
|
+
exports.RenderInternals = exports.validateOutputFilename = exports.stitchFramesToVideo = exports.selectComposition = exports.renderStill = exports.renderMedia = exports.renderFrames = exports.openBrowser = exports.makeCancelSignal = exports.validateSelectedPixelFormatAndImageFormatCombination = exports.getVideoMetadata = exports.getSilentParts = exports.getCompositions = exports.extractAudio = exports.ErrorWithStackFrame = exports.ensureBrowser = exports.combineChunks = void 0;
|
|
30
30
|
const execa_1 = __importDefault(require("execa"));
|
|
31
31
|
const download_file_1 = require("./assets/download-file");
|
|
32
32
|
const browser_1 = require("./browser");
|
|
@@ -38,7 +38,6 @@ const chalk_1 = require("./chalk");
|
|
|
38
38
|
const is_color_supported_1 = require("./chalk/is-color-supported");
|
|
39
39
|
const check_version_requirements_1 = require("./check-version-requirements");
|
|
40
40
|
const codec_1 = require("./codec");
|
|
41
|
-
const combine_videos_1 = require("./combine-videos");
|
|
42
41
|
const get_executable_path_1 = require("./compositor/get-executable-path");
|
|
43
42
|
const convert_to_positive_frame_index_1 = require("./convert-to-positive-frame-index");
|
|
44
43
|
const delete_directory_1 = require("./delete-directory");
|
|
@@ -78,6 +77,8 @@ const test_gpu_1 = require("./test-gpu");
|
|
|
78
77
|
const tmp_dir_1 = require("./tmp-dir");
|
|
79
78
|
const validate_concurrency_1 = require("./validate-concurrency");
|
|
80
79
|
const validate_even_dimensions_with_codec_1 = require("./validate-even-dimensions-with-codec");
|
|
80
|
+
var combine_chunks_1 = require("./combine-chunks");
|
|
81
|
+
Object.defineProperty(exports, "combineChunks", { enumerable: true, get: function () { return combine_chunks_1.combineChunks; } });
|
|
81
82
|
var ensure_browser_1 = require("./ensure-browser");
|
|
82
83
|
Object.defineProperty(exports, "ensureBrowser", { enumerable: true, get: function () { return ensure_browser_1.ensureBrowser; } });
|
|
83
84
|
var handle_javascript_exception_1 = require("./error-handling/handle-javascript-exception");
|
|
@@ -109,7 +110,9 @@ Object.defineProperty(exports, "stitchFramesToVideo", { enumerable: true, get: f
|
|
|
109
110
|
var validate_output_filename_1 = require("./validate-output-filename");
|
|
110
111
|
Object.defineProperty(exports, "validateOutputFilename", { enumerable: true, get: function () { return validate_output_filename_1.validateOutputFilename; } });
|
|
111
112
|
const download_map_1 = require("./assets/download-map");
|
|
113
|
+
const can_concat_seamlessly_1 = require("./can-concat-seamlessly");
|
|
112
114
|
const codec_supports_media_1 = require("./codec-supports-media");
|
|
115
|
+
const combine_chunks_2 = require("./combine-chunks");
|
|
113
116
|
const make_file_executable_1 = require("./compositor/make-file-executable");
|
|
114
117
|
const ensure_browser_2 = require("./ensure-browser");
|
|
115
118
|
const audio_codec_1 = require("./options/audio-codec");
|
|
@@ -163,7 +166,6 @@ exports.RenderInternals = {
|
|
|
163
166
|
convertToPositiveFrameIndex: convert_to_positive_frame_index_1.convertToPositiveFrameIndex,
|
|
164
167
|
findRemotionRoot: find_closest_package_json_1.findRemotionRoot,
|
|
165
168
|
validateBitrate: validate_videobitrate_1.validateBitrate,
|
|
166
|
-
combineChunks: combine_videos_1.combineChunks,
|
|
167
169
|
getMinConcurrency: validate_concurrency_1.getMinConcurrency,
|
|
168
170
|
getMaxConcurrency: validate_concurrency_1.getMaxConcurrency,
|
|
169
171
|
getDefaultAudioCodec: audio_codec_1.getDefaultAudioCodec,
|
|
@@ -205,6 +207,9 @@ exports.RenderInternals = {
|
|
|
205
207
|
internalEnsureBrowser: ensure_browser_2.internalEnsureBrowser,
|
|
206
208
|
printUsefulErrorMessage: print_useful_error_message_1.printUsefulErrorMessage,
|
|
207
209
|
DEFAULT_RENDER_FRAMES_OFFTHREAD_VIDEO_THREADS: offthreadvideo_threads_1.DEFAULT_RENDER_FRAMES_OFFTHREAD_VIDEO_THREADS,
|
|
210
|
+
canConcatVideoSeamlessly: can_concat_seamlessly_1.canConcatVideoSeamlessly,
|
|
211
|
+
canConcatAudioSeamlessly: can_concat_seamlessly_1.canConcatAudioSeamlessly,
|
|
212
|
+
internalCombineChunks: combine_chunks_2.internalCombineChunks,
|
|
208
213
|
};
|
|
209
214
|
// Warn of potential performance issues with Apple Silicon (M1 chip under Rosetta)
|
|
210
215
|
(0, check_version_requirements_1.checkRuntimeVersion)('info', false);
|
package/dist/options/index.d.ts
CHANGED
|
@@ -189,7 +189,7 @@ export declare const allOptions: {
|
|
|
189
189
|
webhookCustomDataOption: {
|
|
190
190
|
name: string;
|
|
191
191
|
cliFlag: "webhook-custom-data";
|
|
192
|
-
description: (type: "
|
|
192
|
+
description: (type: "cli" | "ssr") => import("react/jsx-runtime").JSX.Element;
|
|
193
193
|
ssrName: "customData";
|
|
194
194
|
docLink: string;
|
|
195
195
|
type: Record<string, unknown> | null;
|
|
@@ -602,7 +602,7 @@ export declare const allOptions: {
|
|
|
602
602
|
metadataOption: {
|
|
603
603
|
name: string;
|
|
604
604
|
cliFlag: "metadata";
|
|
605
|
-
description: (mode: "
|
|
605
|
+
description: (mode: "cli" | "ssr") => import("react/jsx-runtime").JSX.Element;
|
|
606
606
|
docLink: string;
|
|
607
607
|
type: import("./metadata").Metadata;
|
|
608
608
|
getValue: ({ commandLine }: {
|
|
@@ -2,7 +2,7 @@ export type Metadata = Record<string, string>;
|
|
|
2
2
|
export declare const metadataOption: {
|
|
3
3
|
name: string;
|
|
4
4
|
cliFlag: "metadata";
|
|
5
|
-
description: (mode: "
|
|
5
|
+
description: (mode: "cli" | "ssr") => import("react/jsx-runtime").JSX.Element;
|
|
6
6
|
docLink: string;
|
|
7
7
|
type: Metadata;
|
|
8
8
|
getValue: ({ commandLine }: {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export declare const webhookCustomDataOption: {
|
|
2
2
|
name: string;
|
|
3
3
|
cliFlag: "webhook-custom-data";
|
|
4
|
-
description: (type: "
|
|
4
|
+
description: (type: "cli" | "ssr") => import("react/jsx-runtime").JSX.Element;
|
|
5
5
|
ssrName: "customData";
|
|
6
6
|
docLink: string;
|
|
7
7
|
type: Record<string, unknown> | null;
|
|
@@ -91,5 +91,13 @@ const printUsefulErrorMessage = (err, logLevel, indent) => {
|
|
|
91
91
|
logger_1.Log.info({ indent, logLevel }, '💡 On Lambda, one reason this could happen is that Chrome is rejecting an asset to be loaded when it is running low on disk space.');
|
|
92
92
|
logger_1.Log.info({ indent, logLevel }, 'Try increasing the disk size of your Lambda function.');
|
|
93
93
|
}
|
|
94
|
+
if (err.message.includes('Invalid value specified for cpu')) {
|
|
95
|
+
logger_1.Log.info({ indent, logLevel });
|
|
96
|
+
logger_1.Log.info({ indent, logLevel }, '💡 This error indicates that your GCP account does have a limit. Try setting `--maxInstances=5` / `maxInstances: 5` when deploying this service.');
|
|
97
|
+
logger_1.Log.info({
|
|
98
|
+
indent,
|
|
99
|
+
logLevel,
|
|
100
|
+
});
|
|
101
|
+
}
|
|
94
102
|
};
|
|
95
103
|
exports.printUsefulErrorMessage = printUsefulErrorMessage;
|
package/dist/render-media.d.ts
CHANGED
|
@@ -122,11 +122,12 @@ export type RenderMediaOptions = Prettify<{
|
|
|
122
122
|
binariesDirectory?: string | null;
|
|
123
123
|
onArtifact?: OnArtifact;
|
|
124
124
|
metadata?: Record<string, string> | null;
|
|
125
|
+
compositionStart?: number;
|
|
125
126
|
}> & Partial<MoreRenderMediaOptions>;
|
|
126
127
|
type RenderMediaResult = {
|
|
127
128
|
buffer: Buffer | null;
|
|
128
129
|
slowestFrames: SlowFrame[];
|
|
129
130
|
};
|
|
130
131
|
export declare const internalRenderMedia: (args_0: InternalRenderMediaOptions) => Promise<RenderMediaResult>;
|
|
131
|
-
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, }: RenderMediaOptions) => Promise<RenderMediaResult>;
|
|
132
|
+
export declare const renderMedia: ({ proResProfile, x264Preset, crf, composition, inputProps, pixelFormat, codec, envVariables, frameRange, puppeteerInstance, outputLocation, onProgress, overwrite, onDownload, onBrowserLog, onStart, timeoutInMilliseconds, chromiumOptions, scale, browserExecutable, port, cancelSignal, muted, enforceAudioTrack, ffmpegOverride, audioBitrate, videoBitrate, encodingMaxRate, encodingBufferSize, audioCodec, jpegQuality, concurrency, serveUrl, disallowParallelEncoding, everyNthFrame, imageFormat, numberOfGifLoops, dumpBrowserLogs, preferLossless, verbose, quality, logLevel: passedLogLevel, offthreadVideoCacheSizeInBytes, colorSpace, repro, binariesDirectory, separateAudioTo, forSeamlessAacConcatenation, onBrowserDownload, onArtifact, metadata, hardwareAcceleration, chromeMode, offthreadVideoThreads, compositionStart, }: RenderMediaOptions) => Promise<RenderMediaResult>;
|
|
132
133
|
export {};
|
package/dist/render-media.js
CHANGED
|
@@ -172,7 +172,7 @@ const internalRenderMediaRaw = ({ proResProfile, x264Preset, crf, composition, s
|
|
|
172
172
|
if (onCtrlCExit && workingDir) {
|
|
173
173
|
onCtrlCExit(`Delete ${workingDir}`, () => (0, delete_directory_1.deleteDirectory)(workingDir));
|
|
174
174
|
}
|
|
175
|
-
(0, validate_even_dimensions_with_codec_1.validateEvenDimensionsWithCodec)({
|
|
175
|
+
const { actualWidth, actualHeight } = (0, validate_even_dimensions_with_codec_1.validateEvenDimensionsWithCodec)({
|
|
176
176
|
codec,
|
|
177
177
|
height: composition.height,
|
|
178
178
|
scale,
|
|
@@ -209,8 +209,8 @@ const internalRenderMediaRaw = ({ proResProfile, x264Preset, crf, composition, s
|
|
|
209
209
|
const createPrestitcherIfNecessary = () => {
|
|
210
210
|
if (preEncodedFileLocation) {
|
|
211
211
|
preStitcher = (0, prespawn_ffmpeg_1.prespawnFfmpeg)({
|
|
212
|
-
width:
|
|
213
|
-
height:
|
|
212
|
+
width: actualWidth,
|
|
213
|
+
height: actualHeight,
|
|
214
214
|
fps,
|
|
215
215
|
outputLocation: preEncodedFileLocation,
|
|
216
216
|
pixelFormat,
|
|
@@ -383,8 +383,8 @@ const internalRenderMediaRaw = ({ proResProfile, x264Preset, crf, composition, s
|
|
|
383
383
|
}
|
|
384
384
|
const stitchStart = Date.now();
|
|
385
385
|
return (0, stitch_frames_to_video_1.internalStitchFramesToVideo)({
|
|
386
|
-
width:
|
|
387
|
-
height:
|
|
386
|
+
width: actualWidth,
|
|
387
|
+
height: actualHeight,
|
|
388
388
|
fps,
|
|
389
389
|
outputLocation: absoluteOutputLocation,
|
|
390
390
|
preEncodedFileLocation,
|
|
@@ -512,7 +512,7 @@ exports.internalRenderMedia = (0, wrap_with_error_handling_1.wrapWithErrorHandli
|
|
|
512
512
|
* @description Render a video or an audio programmatically.
|
|
513
513
|
* @see [Documentation](https://www.remotion.dev/docs/renderer/render-media)
|
|
514
514
|
*/
|
|
515
|
-
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, }) => {
|
|
515
|
+
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, }) => {
|
|
516
516
|
var _a, _b;
|
|
517
517
|
const indent = false;
|
|
518
518
|
const logLevel = verbose || dumpBrowserLogs ? 'verbose' : (passedLogLevel !== null && passedLogLevel !== void 0 ? passedLogLevel : 'info');
|
|
@@ -585,8 +585,7 @@ const renderMedia = ({ proResProfile, x264Preset, crf, composition, inputProps,
|
|
|
585
585
|
}),
|
|
586
586
|
onArtifact: onArtifact !== null && onArtifact !== void 0 ? onArtifact : null,
|
|
587
587
|
metadata: metadata !== null && metadata !== void 0 ? metadata : null,
|
|
588
|
-
|
|
589
|
-
compositionStart: 0,
|
|
588
|
+
compositionStart: compositionStart !== null && compositionStart !== void 0 ? compositionStart : 0,
|
|
590
589
|
hardwareAcceleration: hardwareAcceleration !== null && hardwareAcceleration !== void 0 ? hardwareAcceleration : 'disable',
|
|
591
590
|
chromeMode: chromeMode !== null && chromeMode !== void 0 ? chromeMode : 'headless-shell',
|
|
592
591
|
});
|
|
@@ -112,7 +112,6 @@ const stringifyFfmpegFilter = ({ channels, volume, fps, assetDuration, chunkLeng
|
|
|
112
112
|
volume,
|
|
113
113
|
fps,
|
|
114
114
|
trimLeft: actualTrimLeft,
|
|
115
|
-
allowAmplificationDuringRender: asset.allowAmplificationDuringRender,
|
|
116
115
|
});
|
|
117
116
|
const padAtEnd = chunkLengthInSeconds - audibleDuration - startInVideoSeconds;
|
|
118
117
|
const padStart = startInVideoSeconds + presentationTimeOffsetInSeconds;
|
|
@@ -118,7 +118,8 @@ const symbolicateFromSources = (frames, mapValues) => {
|
|
|
118
118
|
}
|
|
119
119
|
return (0, exports.symbolicateStackFrame)(frame, map);
|
|
120
120
|
})
|
|
121
|
-
.filter(truthy_1.truthy)
|
|
121
|
+
.filter(truthy_1.truthy)
|
|
122
|
+
.filter((f) => f.originalScriptCode !== null);
|
|
122
123
|
};
|
|
123
124
|
exports.symbolicateFromSources = symbolicateFromSources;
|
|
124
125
|
const symbolicateStackFrame = (frame, map) => {
|
|
@@ -4,17 +4,23 @@ exports.validateEvenDimensionsWithCodec = void 0;
|
|
|
4
4
|
const logger_1 = require("./logger");
|
|
5
5
|
const truthy_1 = require("./truthy");
|
|
6
6
|
const validateEvenDimensionsWithCodec = ({ width, height, codec, scale, wantsImageSequence, indent, logLevel, }) => {
|
|
7
|
+
let actualWidth = width * scale;
|
|
8
|
+
let actualHeight = height * scale;
|
|
7
9
|
if (wantsImageSequence) {
|
|
8
|
-
return
|
|
10
|
+
return {
|
|
11
|
+
actualWidth,
|
|
12
|
+
actualHeight,
|
|
13
|
+
};
|
|
9
14
|
}
|
|
10
15
|
if (codec !== 'h264-mkv' &&
|
|
11
16
|
codec !== 'h264' &&
|
|
12
17
|
codec !== 'h265' &&
|
|
13
18
|
codec !== 'h264-ts') {
|
|
14
|
-
return
|
|
19
|
+
return {
|
|
20
|
+
actualWidth,
|
|
21
|
+
actualHeight,
|
|
22
|
+
};
|
|
15
23
|
}
|
|
16
|
-
let actualWidth = width * scale;
|
|
17
|
-
let actualHeight = height * scale;
|
|
18
24
|
if (actualWidth % 1 !== 0 &&
|
|
19
25
|
(actualWidth % 1 < 0.005 || actualWidth % 1 > 0.005)) {
|
|
20
26
|
logger_1.Log.verbose({ indent, logLevel }, `Rounding width to an even number from ${actualWidth} to ${Math.round(actualWidth)}`);
|
|
@@ -48,5 +54,9 @@ const validateEvenDimensionsWithCodec = ({ width, height, codec, scale, wantsIma
|
|
|
48
54
|
].join(' ');
|
|
49
55
|
throw new Error(message);
|
|
50
56
|
}
|
|
57
|
+
return {
|
|
58
|
+
actualWidth,
|
|
59
|
+
actualHeight,
|
|
60
|
+
};
|
|
51
61
|
};
|
|
52
62
|
exports.validateEvenDimensionsWithCodec = validateEvenDimensionsWithCodec;
|
package/package.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
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.279",
|
|
7
7
|
"description": "Render Remotion videos using Node.js or Bun",
|
|
8
8
|
"main": "dist/index.js",
|
|
9
9
|
"types": "dist/index.d.ts",
|
|
@@ -18,8 +18,8 @@
|
|
|
18
18
|
"extract-zip": "2.0.1",
|
|
19
19
|
"source-map": "^0.8.0-beta.0",
|
|
20
20
|
"ws": "8.17.1",
|
|
21
|
-
"remotion": "4.0.
|
|
22
|
-
"
|
|
21
|
+
"@remotion/streaming": "4.0.279",
|
|
22
|
+
"remotion": "4.0.279"
|
|
23
23
|
},
|
|
24
24
|
"peerDependencies": {
|
|
25
25
|
"react": ">=16.8.0",
|
|
@@ -33,17 +33,17 @@
|
|
|
33
33
|
"react-dom": "19.0.0",
|
|
34
34
|
"@types/ws": "8.5.10",
|
|
35
35
|
"eslint": "9.19.0",
|
|
36
|
-
"@remotion/
|
|
37
|
-
"@remotion/
|
|
36
|
+
"@remotion/eslint-config-internal": "4.0.279",
|
|
37
|
+
"@remotion/example-videos": "4.0.279"
|
|
38
38
|
},
|
|
39
39
|
"optionalDependencies": {
|
|
40
|
-
"@remotion/compositor-darwin-arm64": "4.0.
|
|
41
|
-
"@remotion/compositor-darwin-x64": "4.0.
|
|
42
|
-
"@remotion/compositor-linux-arm64-
|
|
43
|
-
"@remotion/compositor-linux-x64-gnu": "4.0.
|
|
44
|
-
"@remotion/compositor-linux-x64-musl": "4.0.
|
|
45
|
-
"@remotion/compositor-win32-x64-msvc": "4.0.
|
|
46
|
-
"@remotion/compositor-linux-arm64-
|
|
40
|
+
"@remotion/compositor-darwin-arm64": "4.0.279",
|
|
41
|
+
"@remotion/compositor-darwin-x64": "4.0.279",
|
|
42
|
+
"@remotion/compositor-linux-arm64-musl": "4.0.279",
|
|
43
|
+
"@remotion/compositor-linux-x64-gnu": "4.0.279",
|
|
44
|
+
"@remotion/compositor-linux-x64-musl": "4.0.279",
|
|
45
|
+
"@remotion/compositor-win32-x64-msvc": "4.0.279",
|
|
46
|
+
"@remotion/compositor-linux-arm64-gnu": "4.0.279"
|
|
47
47
|
},
|
|
48
48
|
"keywords": [
|
|
49
49
|
"remotion",
|
|
@@ -86,13 +86,13 @@
|
|
|
86
86
|
"typesVersions": {
|
|
87
87
|
">=1.0": {
|
|
88
88
|
"client": [
|
|
89
|
-
"dist/client.d.ts"
|
|
89
|
+
"./dist/client.d.ts"
|
|
90
90
|
],
|
|
91
91
|
"pure": [
|
|
92
|
-
"dist/pure.d.ts"
|
|
92
|
+
"./dist/pure.d.ts"
|
|
93
93
|
],
|
|
94
94
|
"error-handling": [
|
|
95
|
-
"dist/error-handling.d.ts"
|
|
95
|
+
"./dist/error-handling.d.ts"
|
|
96
96
|
]
|
|
97
97
|
}
|
|
98
98
|
},
|
package/dist/combine-videos.d.ts
DELETED
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import type { Codec } from './codec';
|
|
2
|
-
import type { LogLevel } from './log-level';
|
|
3
|
-
import type { CancelSignal } from './make-cancel-signal';
|
|
4
|
-
import type { AudioCodec } from './options/audio-codec';
|
|
5
|
-
type Options = {
|
|
6
|
-
files: string[];
|
|
7
|
-
filelistDir: string;
|
|
8
|
-
output: string;
|
|
9
|
-
onProgress: (p: number) => void;
|
|
10
|
-
numberOfFrames: number;
|
|
11
|
-
codec: Codec;
|
|
12
|
-
fps: number;
|
|
13
|
-
numberOfGifLoops: number | null;
|
|
14
|
-
resolvedAudioCodec: AudioCodec | null;
|
|
15
|
-
audioBitrate: string | null;
|
|
16
|
-
indent: boolean;
|
|
17
|
-
logLevel: LogLevel;
|
|
18
|
-
chunkDurationInSeconds: number;
|
|
19
|
-
binariesDirectory: string | null;
|
|
20
|
-
cancelSignal: CancelSignal | undefined;
|
|
21
|
-
seamlessAudio: boolean;
|
|
22
|
-
seamlessVideo: boolean;
|
|
23
|
-
muted: boolean;
|
|
24
|
-
metadata: Record<string, string> | null;
|
|
25
|
-
};
|
|
26
|
-
export declare const combineChunks: ({ files, filelistDir, output, onProgress, numberOfFrames, codec, fps, numberOfGifLoops, resolvedAudioCodec, audioBitrate, indent, logLevel, chunkDurationInSeconds, binariesDirectory, cancelSignal, seamlessAudio, seamlessVideo, muted, metadata, }: Options) => Promise<void>;
|
|
27
|
-
export {};
|