@remotion/renderer 4.0.529 → 4.0.531
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/aac-priming.d.ts +6 -0
- package/dist/aac-priming.js +24 -0
- package/dist/client.d.ts +19 -0
- package/dist/client.js +2 -0
- package/dist/combine-chunks.js +2 -0
- package/dist/crf.js +6 -0
- package/dist/esm/client.mjs +903 -861
- package/dist/esm/index.mjs +67 -13
- package/dist/esm/pure.mjs +2 -1
- package/dist/ffmpeg-args.d.ts +3 -1
- package/dist/ffmpeg-args.js +14 -2
- package/dist/get-extension-of-filename.js +4 -1
- package/dist/mux-video-and-audio.d.ts +3 -1
- package/dist/mux-video-and-audio.js +9 -1
- package/dist/options/canvas-tabs.d.ts +18 -0
- package/dist/options/canvas-tabs.js +38 -0
- package/dist/options/encoding-buffer-size.js +1 -1
- package/dist/options/encoding-max-rate.js +1 -1
- package/dist/options/experimental-client-side-rendering.d.ts +16 -0
- package/dist/options/experimental-client-side-rendering.js +30 -0
- package/dist/options/index.d.ts +18 -0
- package/dist/options/index.js +2 -0
- package/dist/prespawn-ffmpeg.js +4 -0
- package/dist/puppeteer-evaluate.js +3 -1
- package/dist/render-media.js +3 -3
- package/dist/stitch-frames-to-video.js +18 -1
- package/package.json +13 -13
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export declare const LIBFDK_AAC_LC_ENCODER_DELAY_IN_SAMPLES = 2048;
|
|
2
|
+
export declare const getAacPrimingInputArgs: ({ audioCodec, sampleRate, outputExtension, }: {
|
|
3
|
+
audioCodec: "aac" | "mp3" | "opus" | "pcm-16" | null;
|
|
4
|
+
sampleRate: number;
|
|
5
|
+
outputExtension: string | null;
|
|
6
|
+
}) => string[];
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getAacPrimingInputArgs = exports.LIBFDK_AAC_LC_ENCODER_DELAY_IN_SAMPLES = void 0;
|
|
4
|
+
// libfdk_aac (AAC-LC) prepends 2048 samples of encoder delay ("priming") to
|
|
5
|
+
// its output. The audio is encoded to ADTS first (compressAudio, combineAudio),
|
|
6
|
+
// and ADTS cannot signal that delay, so stream-copying it into an MP4 or MOV
|
|
7
|
+
// produced an edit list starting at media time 0: players then played the
|
|
8
|
+
// priming as content and the audio was 2048 / sampleRate late (42.67ms at
|
|
9
|
+
// 48kHz). Shifting the ADTS input back by the delay makes the muxer write an
|
|
10
|
+
// edit list that skips the priming, like encoding straight to MP4 does.
|
|
11
|
+
exports.LIBFDK_AAC_LC_ENCODER_DELAY_IN_SAMPLES = 2048;
|
|
12
|
+
const getAacPrimingInputArgs = ({ audioCodec, sampleRate, outputExtension, }) => {
|
|
13
|
+
if (audioCodec !== 'aac') {
|
|
14
|
+
return [];
|
|
15
|
+
}
|
|
16
|
+
// Only containers with edit lists can carry the shift
|
|
17
|
+
const extension = outputExtension === null || outputExtension === void 0 ? void 0 : outputExtension.toLowerCase();
|
|
18
|
+
if (extension !== 'mp4' && extension !== 'mov') {
|
|
19
|
+
return [];
|
|
20
|
+
}
|
|
21
|
+
const delayInMicroseconds = Math.round((exports.LIBFDK_AAC_LC_ENCODER_DELAY_IN_SAMPLES / sampleRate) * 1000000);
|
|
22
|
+
return ['-itsoffset', `-${delayInMicroseconds}us`];
|
|
23
|
+
};
|
|
24
|
+
exports.getAacPrimingInputArgs = getAacPrimingInputArgs;
|
package/dist/client.d.ts
CHANGED
|
@@ -6,6 +6,7 @@ export type { BuiltInEditor, CustomEditor, DefaultEditor, } from './options/defa
|
|
|
6
6
|
export { HardwareAccelerationOption } from './options/hardware-acceleration';
|
|
7
7
|
export { ProResProfile } from './options/prores-profile';
|
|
8
8
|
export declare const BrowserSafeApis: {
|
|
9
|
+
getExtensionOfFilename: (filename: string | null) => string | null;
|
|
9
10
|
getFileExtensionFromCodec: <T extends "aac" | "av1" | "gif" | "h264" | "h264-mkv" | "h264-ts" | "h265" | "mp3" | "prores" | "vp8" | "vp9" | "wav">(codec: T, audioCodec: "aac" | "mp3" | "opus" | "pcm-16" | null) => import("./file-extensions").FileExtension;
|
|
10
11
|
validCodecs: readonly ["h264", "h265", "vp8", "vp9", "av1", "mp3", "aac", "wav", "prores", "h264-mkv", "h264-ts", "gif"];
|
|
11
12
|
validAudioCodecs: readonly ["pcm-16", "aac", "mp3", "opus"];
|
|
@@ -1440,6 +1441,24 @@ export declare const BrowserSafeApis: {
|
|
|
1440
1441
|
reset: () => void;
|
|
1441
1442
|
id: "disable-keyboard-shortcuts";
|
|
1442
1443
|
};
|
|
1444
|
+
canvasTabsOption: {
|
|
1445
|
+
name: string;
|
|
1446
|
+
cliFlag: "disable-canvas-tabs";
|
|
1447
|
+
description: () => import("react/jsx-runtime").JSX.Element;
|
|
1448
|
+
ssrName: null;
|
|
1449
|
+
docLink: string;
|
|
1450
|
+
type: boolean;
|
|
1451
|
+
getValue: ({ commandLine }: {
|
|
1452
|
+
commandLine: Record<string, unknown>;
|
|
1453
|
+
}) => {
|
|
1454
|
+
value: boolean;
|
|
1455
|
+
source: string;
|
|
1456
|
+
};
|
|
1457
|
+
setConfig(value: boolean): void;
|
|
1458
|
+
getConfigValue: () => boolean | null;
|
|
1459
|
+
reset: () => void;
|
|
1460
|
+
id: "disable-canvas-tabs";
|
|
1461
|
+
};
|
|
1443
1462
|
framesOption: {
|
|
1444
1463
|
name: string;
|
|
1445
1464
|
cliFlag: "frames";
|
package/dist/client.js
CHANGED
|
@@ -8,6 +8,7 @@ const codec_supports_media_1 = require("./codec-supports-media");
|
|
|
8
8
|
const crf_1 = require("./crf");
|
|
9
9
|
const file_extensions_1 = require("./file-extensions");
|
|
10
10
|
const get_extension_from_codec_1 = require("./get-extension-from-codec");
|
|
11
|
+
const get_extension_of_filename_1 = require("./get-extension-of-filename");
|
|
11
12
|
const image_format_1 = require("./image-format");
|
|
12
13
|
const jpeg_quality_1 = require("./jpeg-quality");
|
|
13
14
|
const log_level_1 = require("./log-level");
|
|
@@ -30,6 +31,7 @@ Object.defineProperty(exports, "customEditorLineNumberPlaceholder", { enumerable
|
|
|
30
31
|
Object.defineProperty(exports, "customEditorTargetPathPlaceholder", { enumerable: true, get: function () { return default_editor_1.customEditorTargetPathPlaceholder; } });
|
|
31
32
|
Object.defineProperty(exports, "defaultEditorIds", { enumerable: true, get: function () { return default_editor_1.defaultEditorIds; } });
|
|
32
33
|
exports.BrowserSafeApis = {
|
|
34
|
+
getExtensionOfFilename: get_extension_of_filename_1.getExtensionOfFilename,
|
|
33
35
|
getFileExtensionFromCodec: get_extension_from_codec_1.getFileExtensionFromCodec,
|
|
34
36
|
validCodecs: codec_1.validCodecs,
|
|
35
37
|
validAudioCodecs: audio_codec_1.validAudioCodecs,
|
package/dist/combine-chunks.js
CHANGED
|
@@ -124,6 +124,8 @@ const internalCombineChunks = async ({ outputLocation: output, onProgress, codec
|
|
|
124
124
|
cancelSignal,
|
|
125
125
|
metadata,
|
|
126
126
|
numberOfGifLoops,
|
|
127
|
+
audioCodec: resolvedAudioCodec,
|
|
128
|
+
sampleRate,
|
|
127
129
|
});
|
|
128
130
|
onProgress({ totalProgress: 1, frames: numberOfFrames });
|
|
129
131
|
(0, node_fs_1.rmSync)(filelistDir, { recursive: true });
|
package/dist/crf.js
CHANGED
|
@@ -60,6 +60,12 @@ const validateQualitySettings = ({ codec, crf, videoBitrate, encodingMaxRate, en
|
|
|
60
60
|
if (encodingMaxRate && !encodingBufferSize) {
|
|
61
61
|
throw new Error('"encodingMaxRate" can not be set without also setting "encodingBufferSize".');
|
|
62
62
|
}
|
|
63
|
+
// libvpx and libaom-av1 reject -maxrate and -bufsize without -b:v
|
|
64
|
+
if ((encodingMaxRate || encodingBufferSize) &&
|
|
65
|
+
!videoBitrate &&
|
|
66
|
+
(codec === 'vp8' || codec === 'vp9' || codec === 'av1')) {
|
|
67
|
+
throw new Error(`The ${codec} codec needs "videoBitrate" when "encodingMaxRate" or "encodingBufferSize" is set.`);
|
|
68
|
+
}
|
|
63
69
|
const bufSizeArray = encodingBufferSize
|
|
64
70
|
? ['-bufsize', encodingBufferSize]
|
|
65
71
|
: [];
|