@remotion/renderer 3.3.75 → 3.3.77
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/browser/is-target-closed-err.d.ts +1 -0
- package/dist/browser/is-target-closed-err.js +9 -0
- package/dist/call-ffmpeg.d.ts +17 -0
- package/dist/call-ffmpeg.js +34 -0
- package/dist/client.d.ts +37 -37
- package/dist/create-ffmpeg-complex-filter.d.ts +4 -1
- package/dist/does-have-m2-bug.d.ts +3 -0
- package/dist/does-have-m2-bug.js +12 -0
- package/dist/extract-frame-from-video.d.ts +0 -1
- package/dist/get-extension-from-codec.d.ts +2 -2
- package/dist/get-frame-of-video-slow.d.ts +4 -2
- package/dist/index.d.ts +32 -33
- package/dist/last-frame-from-video-cache.d.ts +0 -1
- package/dist/provide-screenshot.d.ts +0 -1
- package/dist/puppeteer-screenshot.d.ts +0 -1
- package/dist/render-media.d.ts +0 -1
- package/dist/render-still.js +5 -1
- package/dist/screenshot-dom-element.d.ts +0 -1
- package/dist/screenshot-task.d.ts +0 -1
- package/dist/stitch-frames-to-video.js +3 -0
- package/dist/take-frame-and-compose.d.ts +0 -1
- package/dist/try-to-extract-frame-of-video-fast.d.ts +0 -1
- package/dist/validate-output-filename.d.ts +1 -1
- package/package.json +9 -9
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const isTargetClosedErr: (error: Error | undefined) => boolean | undefined;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.isTargetClosedErr = void 0;
|
|
4
|
+
const isTargetClosedErr = (error) => {
|
|
5
|
+
var _a, _b;
|
|
6
|
+
return (((_a = error === null || error === void 0 ? void 0 : error.message) === null || _a === void 0 ? void 0 : _a.includes('Target closed')) ||
|
|
7
|
+
((_b = error === null || error === void 0 ? void 0 : error.message) === null || _b === void 0 ? void 0 : _b.includes('Session closed')));
|
|
8
|
+
};
|
|
9
|
+
exports.isTargetClosedErr = isTargetClosedErr;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import execa from 'execa';
|
|
2
|
+
export declare const callFfExtraOptions: () => {
|
|
3
|
+
env: {
|
|
4
|
+
DYLD_LIBRARY_PATH: string;
|
|
5
|
+
PATH?: undefined;
|
|
6
|
+
LD_LIBRARY_PATH?: undefined;
|
|
7
|
+
} | {
|
|
8
|
+
PATH: string;
|
|
9
|
+
DYLD_LIBRARY_PATH?: undefined;
|
|
10
|
+
LD_LIBRARY_PATH?: undefined;
|
|
11
|
+
} | {
|
|
12
|
+
LD_LIBRARY_PATH: string;
|
|
13
|
+
DYLD_LIBRARY_PATH?: undefined;
|
|
14
|
+
PATH?: undefined;
|
|
15
|
+
};
|
|
16
|
+
};
|
|
17
|
+
export declare const callFf: (bin: 'ffmpeg' | 'ffprobe', args: (string | null)[], options?: execa.Options<string>) => execa.ExecaChildProcess<string>;
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.callFf = exports.callFfExtraOptions = void 0;
|
|
7
|
+
const execa_1 = __importDefault(require("execa"));
|
|
8
|
+
const path_1 = __importDefault(require("path"));
|
|
9
|
+
const get_executable_path_1 = require("./compositor/get-executable-path");
|
|
10
|
+
const truthy_1 = require("./truthy");
|
|
11
|
+
const callFfExtraOptions = () => {
|
|
12
|
+
const lib = path_1.default.join((0, get_executable_path_1.getExecutablePath)('ffmpeg-cwd'), 'remotion', 'lib');
|
|
13
|
+
return {
|
|
14
|
+
env: process.platform === 'darwin'
|
|
15
|
+
? {
|
|
16
|
+
DYLD_LIBRARY_PATH: lib,
|
|
17
|
+
}
|
|
18
|
+
: process.platform === 'win32'
|
|
19
|
+
? {
|
|
20
|
+
PATH: `${process.env.PATH};${lib}`,
|
|
21
|
+
}
|
|
22
|
+
: {
|
|
23
|
+
LD_LIBRARY_PATH: lib,
|
|
24
|
+
},
|
|
25
|
+
};
|
|
26
|
+
};
|
|
27
|
+
exports.callFfExtraOptions = callFfExtraOptions;
|
|
28
|
+
const callFf = (bin, args, options) => {
|
|
29
|
+
return (0, execa_1.default)((0, get_executable_path_1.getExecutablePath)(bin), args.filter(truthy_1.truthy), {
|
|
30
|
+
...(0, exports.callFfExtraOptions)(),
|
|
31
|
+
...options,
|
|
32
|
+
});
|
|
33
|
+
};
|
|
34
|
+
exports.callFf = callFf;
|
package/dist/client.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
export declare const BrowserSafeApis: {
|
|
2
|
-
getFileExtensionFromCodec: <T extends "
|
|
2
|
+
getFileExtensionFromCodec: <T extends "aac" | "mp3" | "h264" | "h265" | "vp8" | "vp9" | "wav" | "prores" | "h264-mkv" | "gif">(codec: T, audioCodec: "pcm-16" | "aac" | "mp3" | "opus" | null) => import("./file-extensions").FileExtension;
|
|
3
3
|
validCodecs: readonly ["h264", "h265", "vp8", "vp9", "mp3", "aac", "wav", "prores", "h264-mkv", "gif"];
|
|
4
|
-
getDefaultCrfForCodec: (codec: "
|
|
5
|
-
getValidCrfRanges: (codec: "
|
|
6
|
-
isAudioCodec: (codec: "
|
|
4
|
+
getDefaultCrfForCodec: (codec: "aac" | "mp3" | "h264" | "h265" | "vp8" | "vp9" | "wav" | "prores" | "h264-mkv" | "gif") => number;
|
|
5
|
+
getValidCrfRanges: (codec: "aac" | "mp3" | "h264" | "h265" | "vp8" | "vp9" | "wav" | "prores" | "h264-mkv" | "gif") => [number, number];
|
|
6
|
+
isAudioCodec: (codec: "aac" | "mp3" | "h264" | "h265" | "vp8" | "vp9" | "wav" | "prores" | "h264-mkv" | "gif" | undefined) => boolean;
|
|
7
7
|
validPixelFormats: readonly ["yuv420p", "yuva420p", "yuv422p", "yuv444p", "yuv420p10le", "yuv422p10le", "yuv444p10le", "yuva444p10le"];
|
|
8
8
|
DEFAULT_PIXEL_FORMAT: "yuv420p" | "yuva420p" | "yuv422p" | "yuv444p" | "yuv420p10le" | "yuv422p10le" | "yuv444p10le" | "yuva444p10le";
|
|
9
9
|
supportedAudioCodecs: {
|
|
@@ -19,79 +19,79 @@ export declare const BrowserSafeApis: {
|
|
|
19
19
|
readonly wav: readonly ["pcm-16"];
|
|
20
20
|
};
|
|
21
21
|
defaultFileExtensionMap: {
|
|
22
|
-
|
|
22
|
+
aac: {
|
|
23
23
|
default: import("./file-extensions").FileExtension;
|
|
24
24
|
forAudioCodec: {
|
|
25
|
-
|
|
25
|
+
"pcm-16": {
|
|
26
26
|
possible: import("./file-extensions").FileExtension[];
|
|
27
27
|
default: import("./file-extensions").FileExtension;
|
|
28
28
|
};
|
|
29
|
-
|
|
29
|
+
aac: {
|
|
30
30
|
possible: import("./file-extensions").FileExtension[];
|
|
31
31
|
default: import("./file-extensions").FileExtension;
|
|
32
32
|
};
|
|
33
33
|
};
|
|
34
34
|
};
|
|
35
|
-
|
|
35
|
+
mp3: {
|
|
36
36
|
default: import("./file-extensions").FileExtension;
|
|
37
37
|
forAudioCodec: {
|
|
38
|
-
|
|
38
|
+
"pcm-16": {
|
|
39
39
|
possible: import("./file-extensions").FileExtension[];
|
|
40
40
|
default: import("./file-extensions").FileExtension;
|
|
41
41
|
};
|
|
42
|
-
|
|
42
|
+
mp3: {
|
|
43
43
|
possible: import("./file-extensions").FileExtension[];
|
|
44
44
|
default: import("./file-extensions").FileExtension;
|
|
45
45
|
};
|
|
46
46
|
};
|
|
47
47
|
};
|
|
48
|
-
|
|
48
|
+
h264: {
|
|
49
49
|
default: import("./file-extensions").FileExtension;
|
|
50
50
|
forAudioCodec: {
|
|
51
51
|
"pcm-16": {
|
|
52
52
|
possible: import("./file-extensions").FileExtension[];
|
|
53
53
|
default: import("./file-extensions").FileExtension;
|
|
54
54
|
};
|
|
55
|
-
|
|
55
|
+
aac: {
|
|
56
56
|
possible: import("./file-extensions").FileExtension[];
|
|
57
57
|
default: import("./file-extensions").FileExtension;
|
|
58
58
|
};
|
|
59
59
|
};
|
|
60
60
|
};
|
|
61
|
-
|
|
61
|
+
h265: {
|
|
62
62
|
default: import("./file-extensions").FileExtension;
|
|
63
63
|
forAudioCodec: {
|
|
64
64
|
"pcm-16": {
|
|
65
65
|
possible: import("./file-extensions").FileExtension[];
|
|
66
66
|
default: import("./file-extensions").FileExtension;
|
|
67
67
|
};
|
|
68
|
-
|
|
68
|
+
aac: {
|
|
69
69
|
possible: import("./file-extensions").FileExtension[];
|
|
70
70
|
default: import("./file-extensions").FileExtension;
|
|
71
71
|
};
|
|
72
72
|
};
|
|
73
73
|
};
|
|
74
|
-
|
|
74
|
+
vp8: {
|
|
75
75
|
default: import("./file-extensions").FileExtension;
|
|
76
76
|
forAudioCodec: {
|
|
77
|
-
|
|
77
|
+
"pcm-16": {
|
|
78
78
|
possible: import("./file-extensions").FileExtension[];
|
|
79
79
|
default: import("./file-extensions").FileExtension;
|
|
80
80
|
};
|
|
81
|
-
|
|
81
|
+
opus: {
|
|
82
82
|
possible: import("./file-extensions").FileExtension[];
|
|
83
83
|
default: import("./file-extensions").FileExtension;
|
|
84
84
|
};
|
|
85
85
|
};
|
|
86
86
|
};
|
|
87
|
-
|
|
87
|
+
vp9: {
|
|
88
88
|
default: import("./file-extensions").FileExtension;
|
|
89
89
|
forAudioCodec: {
|
|
90
|
-
|
|
90
|
+
"pcm-16": {
|
|
91
91
|
possible: import("./file-extensions").FileExtension[];
|
|
92
92
|
default: import("./file-extensions").FileExtension;
|
|
93
93
|
};
|
|
94
|
-
|
|
94
|
+
opus: {
|
|
95
95
|
possible: import("./file-extensions").FileExtension[];
|
|
96
96
|
default: import("./file-extensions").FileExtension;
|
|
97
97
|
};
|
|
@@ -109,11 +109,11 @@ export declare const BrowserSafeApis: {
|
|
|
109
109
|
prores: {
|
|
110
110
|
default: import("./file-extensions").FileExtension;
|
|
111
111
|
forAudioCodec: {
|
|
112
|
-
|
|
112
|
+
"pcm-16": {
|
|
113
113
|
possible: import("./file-extensions").FileExtension[];
|
|
114
114
|
default: import("./file-extensions").FileExtension;
|
|
115
115
|
};
|
|
116
|
-
|
|
116
|
+
aac: {
|
|
117
117
|
possible: import("./file-extensions").FileExtension[];
|
|
118
118
|
default: import("./file-extensions").FileExtension;
|
|
119
119
|
};
|
|
@@ -134,13 +134,21 @@ export declare const BrowserSafeApis: {
|
|
|
134
134
|
};
|
|
135
135
|
};
|
|
136
136
|
defaultAudioCodecs: {
|
|
137
|
+
aac: {
|
|
138
|
+
compressed: "pcm-16" | "aac" | null;
|
|
139
|
+
lossless: "pcm-16" | "aac" | null;
|
|
140
|
+
};
|
|
141
|
+
mp3: {
|
|
142
|
+
compressed: "pcm-16" | "mp3" | null;
|
|
143
|
+
lossless: "pcm-16" | "mp3" | null;
|
|
144
|
+
};
|
|
137
145
|
h264: {
|
|
138
|
-
compressed: "
|
|
139
|
-
lossless: "
|
|
146
|
+
compressed: "pcm-16" | "aac" | null;
|
|
147
|
+
lossless: "pcm-16" | "aac" | null;
|
|
140
148
|
};
|
|
141
149
|
h265: {
|
|
142
|
-
compressed: "
|
|
143
|
-
lossless: "
|
|
150
|
+
compressed: "pcm-16" | "aac" | null;
|
|
151
|
+
lossless: "pcm-16" | "aac" | null;
|
|
144
152
|
};
|
|
145
153
|
vp8: {
|
|
146
154
|
compressed: "pcm-16" | "opus" | null;
|
|
@@ -150,21 +158,13 @@ export declare const BrowserSafeApis: {
|
|
|
150
158
|
compressed: "pcm-16" | "opus" | null;
|
|
151
159
|
lossless: "pcm-16" | "opus" | null;
|
|
152
160
|
};
|
|
153
|
-
mp3: {
|
|
154
|
-
compressed: "mp3" | "pcm-16" | null;
|
|
155
|
-
lossless: "mp3" | "pcm-16" | null;
|
|
156
|
-
};
|
|
157
|
-
aac: {
|
|
158
|
-
compressed: "aac" | "pcm-16" | null;
|
|
159
|
-
lossless: "aac" | "pcm-16" | null;
|
|
160
|
-
};
|
|
161
161
|
wav: {
|
|
162
162
|
compressed: "pcm-16" | null;
|
|
163
163
|
lossless: "pcm-16" | null;
|
|
164
164
|
};
|
|
165
165
|
prores: {
|
|
166
|
-
compressed: "
|
|
167
|
-
lossless: "
|
|
166
|
+
compressed: "pcm-16" | "aac" | null;
|
|
167
|
+
lossless: "pcm-16" | "aac" | null;
|
|
168
168
|
};
|
|
169
169
|
"h264-mkv": {
|
|
170
170
|
compressed: "pcm-16" | null;
|
|
@@ -175,5 +175,5 @@ export declare const BrowserSafeApis: {
|
|
|
175
175
|
lossless: null;
|
|
176
176
|
};
|
|
177
177
|
};
|
|
178
|
-
defaultCodecsForFileExtension: Record<import("./file-extensions").FileExtension, "
|
|
178
|
+
defaultCodecsForFileExtension: Record<import("./file-extensions").FileExtension, "aac" | "mp3" | "h264" | "h265" | "vp8" | "vp9" | "wav" | "prores" | "h264-mkv" | "gif">;
|
|
179
179
|
};
|
|
@@ -7,6 +7,9 @@ export declare const createFfmpegComplexFilter: ({ filters, downloadMap, ffmpegE
|
|
|
7
7
|
ffmpegExecutable: FfmpegExecutable;
|
|
8
8
|
remotionRoot: string;
|
|
9
9
|
}) => Promise<{
|
|
10
|
-
complexFilterFlag: [
|
|
10
|
+
complexFilterFlag: [
|
|
11
|
+
string,
|
|
12
|
+
string
|
|
13
|
+
] | null;
|
|
11
14
|
cleanup: () => void;
|
|
12
15
|
}>;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.warnAboutM2Bug = void 0;
|
|
4
|
+
const os_1 = require("os");
|
|
5
|
+
const warnAboutM2Bug = (codec, pixelFormat) => {
|
|
6
|
+
const isM2 = (0, os_1.cpus)().find((c) => c.model.includes('Apple M2'));
|
|
7
|
+
if (codec === 'prores' && pixelFormat === 'yuv422p10le' && isM2) {
|
|
8
|
+
console.warn();
|
|
9
|
+
console.warn('⚠️ Known issue: Apple M2 CPUs currently suffer from a bug where transparent ProRes videos have flickering. https://github.com/remotion-dev/remotion/issues/1929');
|
|
10
|
+
}
|
|
11
|
+
};
|
|
12
|
+
exports.warnAboutM2Bug = warnAboutM2Bug;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { AudioCodec } from './audio-codec';
|
|
2
2
|
import type { Codec } from './codec';
|
|
3
3
|
import type { FileExtension } from './file-extensions';
|
|
4
|
-
export declare const getFileExtensionFromCodec: <T extends "
|
|
5
|
-
export declare const makeFileExtensionMap: () => Record<string, ("
|
|
4
|
+
export declare const getFileExtensionFromCodec: <T extends "aac" | "mp3" | "h264" | "h265" | "vp8" | "vp9" | "wav" | "prores" | "h264-mkv" | "gif">(codec: T, audioCodec: AudioCodec | null) => FileExtension;
|
|
5
|
+
export declare const makeFileExtensionMap: () => Record<string, ("aac" | "mp3" | "h264" | "h265" | "vp8" | "vp9" | "wav" | "prores" | "h264-mkv" | "gif")[]>;
|
|
6
6
|
export declare const defaultCodecsForFileExtension: Record<FileExtension, Codec>;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/// <reference types="node" />
|
|
2
1
|
import type { OffthreadVideoImageFormat } from 'remotion';
|
|
3
2
|
import type { SpecialVCodecForTransparency } from './assets/download-map';
|
|
4
3
|
import type { FfmpegExecutable } from './ffmpeg-executable';
|
|
@@ -8,7 +7,10 @@ export declare const getFrameOfVideoSlow: ({ src, duration, ffmpegExecutable, im
|
|
|
8
7
|
duration: number;
|
|
9
8
|
imageFormat: OffthreadVideoImageFormat;
|
|
10
9
|
specialVCodecForTransparency: SpecialVCodecForTransparency;
|
|
11
|
-
needsResize: [
|
|
10
|
+
needsResize: [
|
|
11
|
+
number,
|
|
12
|
+
number
|
|
13
|
+
] | null;
|
|
12
14
|
offset: number;
|
|
13
15
|
fps: number | null;
|
|
14
16
|
remotionRoot: string;
|
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/// <reference types="node" />
|
|
2
1
|
import execa from 'execa';
|
|
3
2
|
import { SymbolicateableError } from './error-handling/symbolicateable-error';
|
|
4
3
|
import { mimeContentType, mimeLookup } from './mime-types';
|
|
@@ -60,9 +59,9 @@ export declare const RenderInternals: {
|
|
|
60
59
|
width: number;
|
|
61
60
|
height: number;
|
|
62
61
|
scale: number;
|
|
63
|
-
codec: "
|
|
62
|
+
codec: "aac" | "mp3" | "h264" | "h265" | "vp8" | "vp9" | "wav" | "prores" | "h264-mkv" | "gif";
|
|
64
63
|
}) => void;
|
|
65
|
-
getFileExtensionFromCodec: <T extends "
|
|
64
|
+
getFileExtensionFromCodec: <T extends "aac" | "mp3" | "h264" | "h265" | "vp8" | "vp9" | "wav" | "prores" | "h264-mkv" | "gif">(codec: T, audioCodec: "pcm-16" | "aac" | "mp3" | "opus" | null) => import("./file-extensions").FileExtension;
|
|
66
65
|
tmpDir: (str: string) => string;
|
|
67
66
|
deleteDirectory: (directory: string) => void;
|
|
68
67
|
isServeUrl: (potentialUrl: string) => boolean;
|
|
@@ -112,24 +111,24 @@ export declare const RenderInternals: {
|
|
|
112
111
|
};
|
|
113
112
|
registerErrorSymbolicationLock: () => number;
|
|
114
113
|
unlockErrorSymbolicationLock: (id: number) => void;
|
|
115
|
-
canUseParallelEncoding: (codec: "
|
|
114
|
+
canUseParallelEncoding: (codec: "aac" | "mp3" | "h264" | "h265" | "vp8" | "vp9" | "wav" | "prores" | "h264-mkv" | "gif") => boolean;
|
|
116
115
|
mimeContentType: typeof mimeContentType;
|
|
117
116
|
mimeLookup: typeof mimeLookup;
|
|
118
117
|
validateConcurrency: (value: unknown, setting: string) => void;
|
|
119
118
|
validPixelFormats: readonly ["yuv420p", "yuva420p", "yuv422p", "yuv444p", "yuv420p10le", "yuv422p10le", "yuv444p10le", "yuva444p10le"];
|
|
120
119
|
DEFAULT_BROWSER: import("./browser").Browser;
|
|
121
120
|
validateFrameRange: (frameRange: import("./frame-range").FrameRange | null) => void;
|
|
122
|
-
DEFAULT_OPENGL_RENDERER: "
|
|
123
|
-
validateOpenGlRenderer: (option: "
|
|
121
|
+
DEFAULT_OPENGL_RENDERER: "swangle" | "angle" | "egl" | "swiftshader" | null;
|
|
122
|
+
validateOpenGlRenderer: (option: "swangle" | "angle" | "egl" | "swiftshader" | null) => "swangle" | "angle" | "egl" | "swiftshader" | null;
|
|
124
123
|
validImageFormats: readonly ["png", "jpeg", "none"];
|
|
125
124
|
validCodecs: readonly ["h264", "h265", "vp8", "vp9", "mp3", "aac", "wav", "prores", "h264-mkv", "gif"];
|
|
126
125
|
DEFAULT_PIXEL_FORMAT: "yuv420p" | "yuva420p" | "yuv422p" | "yuv444p" | "yuv420p10le" | "yuv422p10le" | "yuv444p10le" | "yuva444p10le";
|
|
127
126
|
validateQuality: (q: number | undefined) => void;
|
|
128
127
|
DEFAULT_TIMEOUT: number;
|
|
129
|
-
DEFAULT_CODEC: "
|
|
130
|
-
isAudioCodec: (codec: "
|
|
128
|
+
DEFAULT_CODEC: "aac" | "mp3" | "h264" | "h265" | "vp8" | "vp9" | "wav" | "prores" | "h264-mkv" | "gif";
|
|
129
|
+
isAudioCodec: (codec: "aac" | "mp3" | "h264" | "h265" | "vp8" | "vp9" | "wav" | "prores" | "h264-mkv" | "gif" | undefined) => boolean;
|
|
131
130
|
logLevels: readonly ["verbose", "info", "warn", "error"];
|
|
132
|
-
isEqualOrBelowLogLevel: (currentLevel: "
|
|
131
|
+
isEqualOrBelowLogLevel: (currentLevel: "verbose" | "info" | "warn" | "error", level: "verbose" | "info" | "warn" | "error") => boolean;
|
|
133
132
|
isValidLogLevel: (level: string) => boolean;
|
|
134
133
|
perf: typeof perf;
|
|
135
134
|
makeDownloadMap: () => import("./assets/download-map").DownloadMap;
|
|
@@ -151,92 +150,92 @@ export declare const RenderInternals: {
|
|
|
151
150
|
output: string;
|
|
152
151
|
onProgress: (p: number) => void;
|
|
153
152
|
numberOfFrames: number;
|
|
154
|
-
codec: "
|
|
153
|
+
codec: "aac" | "mp3" | "h264" | "h265" | "vp8" | "vp9" | "wav" | "prores" | "h264-mkv" | "gif";
|
|
155
154
|
fps: number;
|
|
156
155
|
numberOfGifLoops: number | null;
|
|
157
156
|
remotionRoot: string;
|
|
158
157
|
ffmpegExecutable: import("./ffmpeg-executable").FfmpegExecutable;
|
|
159
|
-
audioCodec: "
|
|
158
|
+
audioCodec: "pcm-16" | "aac" | "mp3" | "opus" | null;
|
|
160
159
|
}) => Promise<void>;
|
|
161
160
|
getDefaultAudioCodec: ({ codec, preferLossless, }: {
|
|
162
|
-
codec: "
|
|
161
|
+
codec: "aac" | "mp3" | "h264" | "h265" | "vp8" | "vp9" | "wav" | "prores" | "h264-mkv" | "gif";
|
|
163
162
|
preferLossless: boolean;
|
|
164
|
-
}) => "
|
|
163
|
+
}) => "pcm-16" | "aac" | "mp3" | "opus" | null;
|
|
165
164
|
validAudioCodecs: readonly ["pcm-16", "aac", "mp3", "opus"];
|
|
166
165
|
defaultFileExtensionMap: {
|
|
167
|
-
|
|
166
|
+
aac: {
|
|
168
167
|
default: import("./file-extensions").FileExtension;
|
|
169
168
|
forAudioCodec: {
|
|
170
|
-
|
|
169
|
+
"pcm-16": {
|
|
171
170
|
possible: import("./file-extensions").FileExtension[];
|
|
172
171
|
default: import("./file-extensions").FileExtension;
|
|
173
172
|
};
|
|
174
|
-
|
|
173
|
+
aac: {
|
|
175
174
|
possible: import("./file-extensions").FileExtension[];
|
|
176
175
|
default: import("./file-extensions").FileExtension;
|
|
177
176
|
};
|
|
178
177
|
};
|
|
179
178
|
};
|
|
180
|
-
|
|
179
|
+
mp3: {
|
|
181
180
|
default: import("./file-extensions").FileExtension;
|
|
182
181
|
forAudioCodec: {
|
|
183
|
-
|
|
182
|
+
"pcm-16": {
|
|
184
183
|
possible: import("./file-extensions").FileExtension[];
|
|
185
184
|
default: import("./file-extensions").FileExtension;
|
|
186
185
|
};
|
|
187
|
-
|
|
186
|
+
mp3: {
|
|
188
187
|
possible: import("./file-extensions").FileExtension[];
|
|
189
188
|
default: import("./file-extensions").FileExtension;
|
|
190
189
|
};
|
|
191
190
|
};
|
|
192
191
|
};
|
|
193
|
-
|
|
192
|
+
h264: {
|
|
194
193
|
default: import("./file-extensions").FileExtension;
|
|
195
194
|
forAudioCodec: {
|
|
196
195
|
"pcm-16": {
|
|
197
196
|
possible: import("./file-extensions").FileExtension[];
|
|
198
197
|
default: import("./file-extensions").FileExtension;
|
|
199
198
|
};
|
|
200
|
-
|
|
199
|
+
aac: {
|
|
201
200
|
possible: import("./file-extensions").FileExtension[];
|
|
202
201
|
default: import("./file-extensions").FileExtension;
|
|
203
202
|
};
|
|
204
203
|
};
|
|
205
204
|
};
|
|
206
|
-
|
|
205
|
+
h265: {
|
|
207
206
|
default: import("./file-extensions").FileExtension;
|
|
208
207
|
forAudioCodec: {
|
|
209
208
|
"pcm-16": {
|
|
210
209
|
possible: import("./file-extensions").FileExtension[];
|
|
211
210
|
default: import("./file-extensions").FileExtension;
|
|
212
211
|
};
|
|
213
|
-
|
|
212
|
+
aac: {
|
|
214
213
|
possible: import("./file-extensions").FileExtension[];
|
|
215
214
|
default: import("./file-extensions").FileExtension;
|
|
216
215
|
};
|
|
217
216
|
};
|
|
218
217
|
};
|
|
219
|
-
|
|
218
|
+
vp8: {
|
|
220
219
|
default: import("./file-extensions").FileExtension;
|
|
221
220
|
forAudioCodec: {
|
|
222
|
-
|
|
221
|
+
"pcm-16": {
|
|
223
222
|
possible: import("./file-extensions").FileExtension[];
|
|
224
223
|
default: import("./file-extensions").FileExtension;
|
|
225
224
|
};
|
|
226
|
-
|
|
225
|
+
opus: {
|
|
227
226
|
possible: import("./file-extensions").FileExtension[];
|
|
228
227
|
default: import("./file-extensions").FileExtension;
|
|
229
228
|
};
|
|
230
229
|
};
|
|
231
230
|
};
|
|
232
|
-
|
|
231
|
+
vp9: {
|
|
233
232
|
default: import("./file-extensions").FileExtension;
|
|
234
233
|
forAudioCodec: {
|
|
235
|
-
|
|
234
|
+
"pcm-16": {
|
|
236
235
|
possible: import("./file-extensions").FileExtension[];
|
|
237
236
|
default: import("./file-extensions").FileExtension;
|
|
238
237
|
};
|
|
239
|
-
|
|
238
|
+
opus: {
|
|
240
239
|
possible: import("./file-extensions").FileExtension[];
|
|
241
240
|
default: import("./file-extensions").FileExtension;
|
|
242
241
|
};
|
|
@@ -254,11 +253,11 @@ export declare const RenderInternals: {
|
|
|
254
253
|
prores: {
|
|
255
254
|
default: import("./file-extensions").FileExtension;
|
|
256
255
|
forAudioCodec: {
|
|
257
|
-
|
|
256
|
+
"pcm-16": {
|
|
258
257
|
possible: import("./file-extensions").FileExtension[];
|
|
259
258
|
default: import("./file-extensions").FileExtension;
|
|
260
259
|
};
|
|
261
|
-
|
|
260
|
+
aac: {
|
|
262
261
|
possible: import("./file-extensions").FileExtension[];
|
|
263
262
|
default: import("./file-extensions").FileExtension;
|
|
264
263
|
};
|
|
@@ -290,6 +289,6 @@ export declare const RenderInternals: {
|
|
|
290
289
|
readonly vp9: readonly ["opus", "pcm-16"];
|
|
291
290
|
readonly wav: readonly ["pcm-16"];
|
|
292
291
|
};
|
|
293
|
-
makeFileExtensionMap: () => Record<string, ("
|
|
294
|
-
defaultCodecsForFileExtension: Record<import("./file-extensions").FileExtension, "
|
|
292
|
+
makeFileExtensionMap: () => Record<string, ("aac" | "mp3" | "h264" | "h265" | "vp8" | "vp9" | "wav" | "prores" | "h264-mkv" | "gif")[]>;
|
|
293
|
+
defaultCodecsForFileExtension: Record<import("./file-extensions").FileExtension, "aac" | "mp3" | "h264" | "h265" | "vp8" | "vp9" | "wav" | "prores" | "h264-mkv" | "gif">;
|
|
295
294
|
};
|
package/dist/render-media.d.ts
CHANGED
package/dist/render-still.js
CHANGED
|
@@ -58,7 +58,11 @@ const innerRenderStill = async ({ composition, quality, imageFormat = 'png', ser
|
|
|
58
58
|
allowFloats: false,
|
|
59
59
|
});
|
|
60
60
|
(0, image_format_1.validateNonNullImageFormat)(imageFormat);
|
|
61
|
-
remotion_1.Internals.validateFrame(
|
|
61
|
+
remotion_1.Internals.validateFrame({
|
|
62
|
+
frame,
|
|
63
|
+
durationInFrames: composition.durationInFrames,
|
|
64
|
+
allowFloats: false,
|
|
65
|
+
});
|
|
62
66
|
const stillFrame = (0, convert_to_positive_frame_index_1.convertToPositiveFrameIndex)({
|
|
63
67
|
durationInFrames: composition.durationInFrames,
|
|
64
68
|
frame,
|
|
@@ -40,6 +40,7 @@ const codec_supports_media_1 = require("./codec-supports-media");
|
|
|
40
40
|
const convert_number_of_gif_loops_to_ffmpeg_1 = require("./convert-number-of-gif-loops-to-ffmpeg");
|
|
41
41
|
const crf_1 = require("./crf");
|
|
42
42
|
const delete_directory_1 = require("./delete-directory");
|
|
43
|
+
const does_have_m2_bug_1 = require("./does-have-m2-bug");
|
|
43
44
|
const ffmpeg_flags_1 = require("./ffmpeg-flags");
|
|
44
45
|
const find_closest_package_json_1 = require("./find-closest-package-json");
|
|
45
46
|
const get_codec_name_1 = require("./get-codec-name");
|
|
@@ -344,11 +345,13 @@ exports.spawnFfmpeg = spawnFfmpeg;
|
|
|
344
345
|
* @see [Documentation](https://www.remotion.dev/docs/renderer/stitch-frames-to-video)
|
|
345
346
|
*/
|
|
346
347
|
const stitchFramesToVideo = async (options) => {
|
|
348
|
+
var _a, _b;
|
|
347
349
|
const remotionRoot = (0, find_closest_package_json_1.findRemotionRoot)();
|
|
348
350
|
const { task, getLogs } = await (0, exports.spawnFfmpeg)(options, remotionRoot);
|
|
349
351
|
const happyPath = task.catch(() => {
|
|
350
352
|
throw new Error(getLogs());
|
|
351
353
|
});
|
|
354
|
+
(0, does_have_m2_bug_1.warnAboutM2Bug)((_a = options.codec) !== null && _a !== void 0 ? _a : null, (_b = options.pixelFormat) !== null && _b !== void 0 ? _b : null);
|
|
352
355
|
return Promise.race([
|
|
353
356
|
happyPath,
|
|
354
357
|
new Promise((_resolve, reject) => {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { AudioCodec } from './audio-codec';
|
|
2
|
-
export declare const validateOutputFilename: <T extends "
|
|
2
|
+
export declare const validateOutputFilename: <T extends "aac" | "mp3" | "h264" | "h265" | "vp8" | "vp9" | "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": "3.3.
|
|
3
|
+
"version": "3.3.77",
|
|
4
4
|
"description": "Renderer for Remotion",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
"dependencies": {
|
|
17
17
|
"execa": "5.1.1",
|
|
18
18
|
"extract-zip": "2.0.1",
|
|
19
|
-
"remotion": "3.3.
|
|
19
|
+
"remotion": "3.3.77",
|
|
20
20
|
"source-map": "^0.8.0-beta.0",
|
|
21
21
|
"ws": "8.7.0"
|
|
22
22
|
},
|
|
@@ -41,13 +41,13 @@
|
|
|
41
41
|
"vitest": "0.24.3"
|
|
42
42
|
},
|
|
43
43
|
"optionalDependencies": {
|
|
44
|
-
"@remotion/compositor-darwin-arm64": "3.3.
|
|
45
|
-
"@remotion/compositor-darwin-x64": "3.3.
|
|
46
|
-
"@remotion/compositor-linux-arm64-gnu": "3.3.
|
|
47
|
-
"@remotion/compositor-linux-arm64-musl": "3.3.
|
|
48
|
-
"@remotion/compositor-linux-x64-gnu": "3.3.
|
|
49
|
-
"@remotion/compositor-linux-x64-musl": "3.3.
|
|
50
|
-
"@remotion/compositor-win32-x64-msvc": "3.3.
|
|
44
|
+
"@remotion/compositor-darwin-arm64": "3.3.77",
|
|
45
|
+
"@remotion/compositor-darwin-x64": "3.3.77",
|
|
46
|
+
"@remotion/compositor-linux-arm64-gnu": "3.3.77",
|
|
47
|
+
"@remotion/compositor-linux-arm64-musl": "3.3.77",
|
|
48
|
+
"@remotion/compositor-linux-x64-gnu": "3.3.77",
|
|
49
|
+
"@remotion/compositor-linux-x64-musl": "3.3.77",
|
|
50
|
+
"@remotion/compositor-win32-x64-msvc": "3.3.77"
|
|
51
51
|
},
|
|
52
52
|
"keywords": [
|
|
53
53
|
"remotion",
|