@remotion/renderer 4.0.180 → 4.0.181
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 +3 -3
- package/dist/combine-video-streams.js +0 -2
- package/dist/combine-videos.js +14 -0
- package/dist/get-video-metadata.js +2 -1
- package/dist/index.d.ts +7 -7
- package/dist/mux-video-and-audio.d.ts +2 -1
- package/dist/mux-video-and-audio.js +3 -1
- package/dist/options/gl.d.ts +3 -3
- package/dist/options/index.d.ts +3 -3
- package/ensure-browser.mjs +3247 -0
- package/package.json +10 -10
package/dist/client.d.ts
CHANGED
|
@@ -467,19 +467,19 @@ export declare const BrowserSafeApis: {
|
|
|
467
467
|
cliFlag: "gl";
|
|
468
468
|
docLink: string;
|
|
469
469
|
name: string;
|
|
470
|
-
type: "
|
|
470
|
+
type: "swangle" | "angle" | "egl" | "swiftshader" | "vulkan" | "angle-egl" | null;
|
|
471
471
|
ssrName: string;
|
|
472
472
|
description: () => import("react/jsx-runtime").JSX.Element;
|
|
473
473
|
getValue: ({ commandLine }: {
|
|
474
474
|
commandLine: Record<string, unknown>;
|
|
475
475
|
}) => {
|
|
476
|
-
value: "
|
|
476
|
+
value: "swangle" | "angle" | "egl" | "swiftshader" | "vulkan" | "angle-egl";
|
|
477
477
|
source: string;
|
|
478
478
|
} | {
|
|
479
479
|
value: null;
|
|
480
480
|
source: string;
|
|
481
481
|
};
|
|
482
|
-
setConfig: (value: "
|
|
482
|
+
setConfig: (value: "swangle" | "angle" | "egl" | "swiftshader" | "vulkan" | "angle-egl" | null) => void;
|
|
483
483
|
};
|
|
484
484
|
enableLambdaInsights: {
|
|
485
485
|
name: string;
|
|
@@ -34,8 +34,6 @@ const combineVideoStreams = async ({ fps, codec, filelistDir, numberOfGifLoops,
|
|
|
34
34
|
encoder,
|
|
35
35
|
codec === 'h265' ? '-tag:v' : null,
|
|
36
36
|
codec === 'h265' ? 'hvc1' : null,
|
|
37
|
-
codec === 'h264' ? '-movflags' : null,
|
|
38
|
-
codec === 'h264' ? 'faststart' : null,
|
|
39
37
|
addRemotionMetadata ? `-metadata` : null,
|
|
40
38
|
addRemotionMetadata ? `comment=Made with Remotion ${version_1.VERSION}` : null,
|
|
41
39
|
'-y',
|
package/dist/combine-videos.js
CHANGED
|
@@ -12,6 +12,19 @@ const logger_1 = require("./logger");
|
|
|
12
12
|
const mux_video_and_audio_1 = require("./mux-video-and-audio");
|
|
13
13
|
const audio_codec_1 = require("./options/audio-codec");
|
|
14
14
|
const truthy_1 = require("./truthy");
|
|
15
|
+
const codecSupportsFastStart = {
|
|
16
|
+
'h264-mkv': false,
|
|
17
|
+
'h264-ts': false,
|
|
18
|
+
h264: true,
|
|
19
|
+
h265: true,
|
|
20
|
+
aac: false,
|
|
21
|
+
gif: false,
|
|
22
|
+
mp3: false,
|
|
23
|
+
prores: false,
|
|
24
|
+
vp8: false,
|
|
25
|
+
vp9: false,
|
|
26
|
+
wav: false,
|
|
27
|
+
};
|
|
15
28
|
const combineChunks = async ({ files, filelistDir, output, onProgress, numberOfFrames, codec, fps, numberOfGifLoops, resolvedAudioCodec, audioBitrate, indent, logLevel, chunkDurationInSeconds, binariesDirectory, cancelSignal, seamlessAudio, seamlessVideo, muted, }) => {
|
|
16
29
|
const shouldCreateAudio = resolvedAudioCodec !== null && !muted;
|
|
17
30
|
const shouldCreateVideo = !(0, audio_codec_1.isAudioCodec)(codec);
|
|
@@ -100,6 +113,7 @@ const combineChunks = async ({ files, filelistDir, output, onProgress, numberOfF
|
|
|
100
113
|
binariesDirectory,
|
|
101
114
|
fps,
|
|
102
115
|
cancelSignal,
|
|
116
|
+
addFaststart: codecSupportsFastStart[codec],
|
|
103
117
|
});
|
|
104
118
|
onProgress(numberOfFrames);
|
|
105
119
|
(0, node_fs_1.rmSync)(filelistDir, { recursive: true });
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.getVideoMetadata = void 0;
|
|
4
|
+
const node_path_1 = require("node:path");
|
|
4
5
|
const compositor_1 = require("./compositor/compositor");
|
|
5
6
|
const getVideoMetadata = async (videoSource, options) => {
|
|
6
7
|
var _a, _b;
|
|
@@ -11,7 +12,7 @@ const getVideoMetadata = async (videoSource, options) => {
|
|
|
11
12
|
binariesDirectory: (_b = options === null || options === void 0 ? void 0 : options.binariesDirectory) !== null && _b !== void 0 ? _b : null,
|
|
12
13
|
});
|
|
13
14
|
const metadataResponse = await compositor.executeCommand('GetVideoMetadata', {
|
|
14
|
-
src: videoSource,
|
|
15
|
+
src: (0, node_path_1.resolve)(process.cwd(), videoSource),
|
|
15
16
|
});
|
|
16
17
|
await compositor.finishCommands();
|
|
17
18
|
await compositor.waitForDone();
|
package/dist/index.d.ts
CHANGED
|
@@ -141,8 +141,8 @@ export declare const RenderInternals: {
|
|
|
141
141
|
validPixelFormats: readonly ["yuv420p", "yuva420p", "yuv422p", "yuv444p", "yuv420p10le", "yuv422p10le", "yuv444p10le", "yuva444p10le"];
|
|
142
142
|
DEFAULT_BROWSER: "chrome";
|
|
143
143
|
validateFrameRange: (frameRange: import("./frame-range").FrameRange | null) => void;
|
|
144
|
-
DEFAULT_OPENGL_RENDERER: "
|
|
145
|
-
validateOpenGlRenderer: (option: unknown) => "
|
|
144
|
+
DEFAULT_OPENGL_RENDERER: "swangle" | "angle" | "egl" | "swiftshader" | "vulkan" | "angle-egl" | null;
|
|
145
|
+
validateOpenGlRenderer: (option: unknown) => "swangle" | "angle" | "egl" | "swiftshader" | "vulkan" | "angle-egl" | null;
|
|
146
146
|
validCodecs: readonly ["h264", "h265", "vp8", "vp9", "mp3", "aac", "wav", "prores", "h264-mkv", "h264-ts", "gif"];
|
|
147
147
|
DEFAULT_PIXEL_FORMAT: "yuv420p" | "yuva420p" | "yuv422p" | "yuv444p" | "yuv420p10le" | "yuv422p10le" | "yuv444p10le" | "yuva444p10le";
|
|
148
148
|
validateJpegQuality: (q: unknown) => void;
|
|
@@ -354,8 +354,8 @@ export declare const RenderInternals: {
|
|
|
354
354
|
}) => execa.ExecaChildProcess<string>;
|
|
355
355
|
validStillImageFormats: readonly ["png", "jpeg", "pdf", "webp"];
|
|
356
356
|
validVideoImageFormats: readonly ["png", "jpeg", "none"];
|
|
357
|
-
DEFAULT_STILL_IMAGE_FORMAT: "
|
|
358
|
-
DEFAULT_VIDEO_IMAGE_FORMAT: "
|
|
357
|
+
DEFAULT_STILL_IMAGE_FORMAT: "png" | "jpeg" | "pdf" | "webp";
|
|
358
|
+
DEFAULT_VIDEO_IMAGE_FORMAT: "png" | "jpeg" | "none";
|
|
359
359
|
DEFAULT_JPEG_QUALITY: number;
|
|
360
360
|
chalk: {
|
|
361
361
|
enabled: () => boolean;
|
|
@@ -454,7 +454,7 @@ export declare const RenderInternals: {
|
|
|
454
454
|
frame: number;
|
|
455
455
|
serializedInputPropsWithCustomSchema: string;
|
|
456
456
|
serializedResolvedPropsWithCustomSchema: string;
|
|
457
|
-
imageFormat: "
|
|
457
|
+
imageFormat: "png" | "jpeg" | "pdf" | "webp";
|
|
458
458
|
jpegQuality: number;
|
|
459
459
|
puppeteerInstance: HeadlessBrowser | null;
|
|
460
460
|
envVariables: Record<string, string>;
|
|
@@ -755,7 +755,7 @@ export declare const RenderInternals: {
|
|
|
755
755
|
onFrameUpdate: ((framesRendered: number, frameIndex: number, timeToRenderInMilliseconds: number) => void) | null;
|
|
756
756
|
outputDir: string | null;
|
|
757
757
|
envVariables: Record<string, string>;
|
|
758
|
-
imageFormat: "
|
|
758
|
+
imageFormat: "png" | "jpeg" | "none";
|
|
759
759
|
jpegQuality: number;
|
|
760
760
|
frameRange: import("./frame-range").FrameRange | null;
|
|
761
761
|
everyNthFrame: number;
|
|
@@ -768,7 +768,7 @@ export declare const RenderInternals: {
|
|
|
768
768
|
scale: number;
|
|
769
769
|
port: number | null;
|
|
770
770
|
cancelSignal: import("./make-cancel-signal").CancelSignal | undefined;
|
|
771
|
-
composition: Omit<import("remotion").VideoConfig, "
|
|
771
|
+
composition: Omit<import("remotion").VideoConfig, "props" | "defaultProps">;
|
|
772
772
|
indent: boolean;
|
|
773
773
|
server: import("./prepare-server").RemotionServer | undefined;
|
|
774
774
|
muted: boolean;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { LogLevel } from './log-level';
|
|
2
2
|
import type { CancelSignal } from './make-cancel-signal';
|
|
3
|
-
export declare const muxVideoAndAudio: ({ videoOutput, audioOutput, output, indent, logLevel, onProgress, binariesDirectory, fps, cancelSignal, }: {
|
|
3
|
+
export declare const muxVideoAndAudio: ({ videoOutput, audioOutput, output, indent, logLevel, onProgress, binariesDirectory, fps, cancelSignal, addFaststart, }: {
|
|
4
4
|
videoOutput: string | null;
|
|
5
5
|
audioOutput: string | null;
|
|
6
6
|
output: string;
|
|
@@ -10,4 +10,5 @@ export declare const muxVideoAndAudio: ({ videoOutput, audioOutput, output, inde
|
|
|
10
10
|
fps: number;
|
|
11
11
|
onProgress: (p: number) => void;
|
|
12
12
|
cancelSignal: CancelSignal | undefined;
|
|
13
|
+
addFaststart: boolean;
|
|
13
14
|
}) => Promise<void>;
|
|
@@ -6,7 +6,7 @@ const call_ffmpeg_1 = require("./call-ffmpeg");
|
|
|
6
6
|
const logger_1 = require("./logger");
|
|
7
7
|
const parse_ffmpeg_progress_1 = require("./parse-ffmpeg-progress");
|
|
8
8
|
const truthy_1 = require("./truthy");
|
|
9
|
-
const muxVideoAndAudio = async ({ videoOutput, audioOutput, output, indent, logLevel, onProgress, binariesDirectory, fps, cancelSignal, }) => {
|
|
9
|
+
const muxVideoAndAudio = async ({ videoOutput, audioOutput, output, indent, logLevel, onProgress, binariesDirectory, fps, cancelSignal, addFaststart, }) => {
|
|
10
10
|
var _a;
|
|
11
11
|
const startTime = Date.now();
|
|
12
12
|
logger_1.Log.verbose({ indent, logLevel }, 'Muxing video and audio together');
|
|
@@ -20,6 +20,8 @@ const muxVideoAndAudio = async ({ videoOutput, audioOutput, output, indent, logL
|
|
|
20
20
|
videoOutput ? 'copy' : null,
|
|
21
21
|
audioOutput ? '-c:a' : null,
|
|
22
22
|
audioOutput ? 'copy' : null,
|
|
23
|
+
addFaststart ? '-movflags' : null,
|
|
24
|
+
addFaststart ? 'faststart' : null,
|
|
23
25
|
`-metadata`,
|
|
24
26
|
`comment=Made with Remotion ${version_1.VERSION}`,
|
|
25
27
|
'-y',
|
package/dist/options/gl.d.ts
CHANGED
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
export declare const validOpenGlRenderers: readonly ["swangle", "angle", "egl", "swiftshader", "vulkan", "angle-egl"];
|
|
2
2
|
export type OpenGlRenderer = (typeof validOpenGlRenderers)[number];
|
|
3
3
|
export declare const DEFAULT_OPENGL_RENDERER: OpenGlRenderer | null;
|
|
4
|
-
export declare const getChromiumOpenGlRenderer: () => "
|
|
4
|
+
export declare const getChromiumOpenGlRenderer: () => "swangle" | "angle" | "egl" | "swiftshader" | "vulkan" | "angle-egl" | null;
|
|
5
5
|
export declare const setChromiumOpenGlRenderer: (renderer: OpenGlRenderer) => void;
|
|
6
6
|
export declare const glOption: {
|
|
7
7
|
cliFlag: "gl";
|
|
8
8
|
docLink: string;
|
|
9
9
|
name: string;
|
|
10
|
-
type: "
|
|
10
|
+
type: "swangle" | "angle" | "egl" | "swiftshader" | "vulkan" | "angle-egl" | null;
|
|
11
11
|
ssrName: string;
|
|
12
12
|
description: () => import("react/jsx-runtime").JSX.Element;
|
|
13
13
|
getValue: ({ commandLine }: {
|
|
14
14
|
commandLine: Record<string, unknown>;
|
|
15
15
|
}) => {
|
|
16
|
-
value: "
|
|
16
|
+
value: "swangle" | "angle" | "egl" | "swiftshader" | "vulkan" | "angle-egl";
|
|
17
17
|
source: string;
|
|
18
18
|
} | {
|
|
19
19
|
value: null;
|
package/dist/options/index.d.ts
CHANGED
|
@@ -245,19 +245,19 @@ export declare const allOptions: {
|
|
|
245
245
|
cliFlag: "gl";
|
|
246
246
|
docLink: string;
|
|
247
247
|
name: string;
|
|
248
|
-
type: "
|
|
248
|
+
type: "swangle" | "angle" | "egl" | "swiftshader" | "vulkan" | "angle-egl" | null;
|
|
249
249
|
ssrName: string;
|
|
250
250
|
description: () => import("react/jsx-runtime").JSX.Element;
|
|
251
251
|
getValue: ({ commandLine }: {
|
|
252
252
|
commandLine: Record<string, unknown>;
|
|
253
253
|
}) => {
|
|
254
|
-
value: "
|
|
254
|
+
value: "swangle" | "angle" | "egl" | "swiftshader" | "vulkan" | "angle-egl";
|
|
255
255
|
source: string;
|
|
256
256
|
} | {
|
|
257
257
|
value: null;
|
|
258
258
|
source: string;
|
|
259
259
|
};
|
|
260
|
-
setConfig: (value: "
|
|
260
|
+
setConfig: (value: "swangle" | "angle" | "egl" | "swiftshader" | "vulkan" | "angle-egl" | null) => void;
|
|
261
261
|
};
|
|
262
262
|
enableLambdaInsights: {
|
|
263
263
|
name: string;
|