@remotion/renderer 3.3.76 → 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.
@@ -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;
package/dist/client.d.ts CHANGED
@@ -1,9 +1,9 @@
1
1
  export declare const BrowserSafeApis: {
2
- getFileExtensionFromCodec: <T extends "h264" | "h265" | "vp8" | "vp9" | "mp3" | "aac" | "wav" | "prores" | "h264-mkv" | "gif">(codec: T, audioCodec: "mp3" | "aac" | "pcm-16" | "opus" | null) => import("./file-extensions").FileExtension;
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: "h264" | "h265" | "vp8" | "vp9" | "mp3" | "aac" | "wav" | "prores" | "h264-mkv" | "gif") => number;
5
- getValidCrfRanges: (codec: "h264" | "h265" | "vp8" | "vp9" | "mp3" | "aac" | "wav" | "prores" | "h264-mkv" | "gif") => [number, number];
6
- isAudioCodec: (codec: "h264" | "h265" | "vp8" | "vp9" | "mp3" | "aac" | "wav" | "prores" | "h264-mkv" | "gif" | undefined) => boolean;
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
- h264: {
22
+ aac: {
23
23
  default: import("./file-extensions").FileExtension;
24
24
  forAudioCodec: {
25
- aac: {
25
+ "pcm-16": {
26
26
  possible: import("./file-extensions").FileExtension[];
27
27
  default: import("./file-extensions").FileExtension;
28
28
  };
29
- "pcm-16": {
29
+ aac: {
30
30
  possible: import("./file-extensions").FileExtension[];
31
31
  default: import("./file-extensions").FileExtension;
32
32
  };
33
33
  };
34
34
  };
35
- h265: {
35
+ mp3: {
36
36
  default: import("./file-extensions").FileExtension;
37
37
  forAudioCodec: {
38
- aac: {
38
+ "pcm-16": {
39
39
  possible: import("./file-extensions").FileExtension[];
40
40
  default: import("./file-extensions").FileExtension;
41
41
  };
42
- "pcm-16": {
42
+ mp3: {
43
43
  possible: import("./file-extensions").FileExtension[];
44
44
  default: import("./file-extensions").FileExtension;
45
45
  };
46
46
  };
47
47
  };
48
- vp8: {
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
- opus: {
55
+ aac: {
56
56
  possible: import("./file-extensions").FileExtension[];
57
57
  default: import("./file-extensions").FileExtension;
58
58
  };
59
59
  };
60
60
  };
61
- vp9: {
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
- opus: {
68
+ aac: {
69
69
  possible: import("./file-extensions").FileExtension[];
70
70
  default: import("./file-extensions").FileExtension;
71
71
  };
72
72
  };
73
73
  };
74
- mp3: {
74
+ vp8: {
75
75
  default: import("./file-extensions").FileExtension;
76
76
  forAudioCodec: {
77
- mp3: {
77
+ "pcm-16": {
78
78
  possible: import("./file-extensions").FileExtension[];
79
79
  default: import("./file-extensions").FileExtension;
80
80
  };
81
- "pcm-16": {
81
+ opus: {
82
82
  possible: import("./file-extensions").FileExtension[];
83
83
  default: import("./file-extensions").FileExtension;
84
84
  };
85
85
  };
86
86
  };
87
- aac: {
87
+ vp9: {
88
88
  default: import("./file-extensions").FileExtension;
89
89
  forAudioCodec: {
90
- aac: {
90
+ "pcm-16": {
91
91
  possible: import("./file-extensions").FileExtension[];
92
92
  default: import("./file-extensions").FileExtension;
93
93
  };
94
- "pcm-16": {
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
- aac: {
112
+ "pcm-16": {
113
113
  possible: import("./file-extensions").FileExtension[];
114
114
  default: import("./file-extensions").FileExtension;
115
115
  };
116
- "pcm-16": {
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: "aac" | "pcm-16" | null;
139
- lossless: "aac" | "pcm-16" | null;
146
+ compressed: "pcm-16" | "aac" | null;
147
+ lossless: "pcm-16" | "aac" | null;
140
148
  };
141
149
  h265: {
142
- compressed: "aac" | "pcm-16" | null;
143
- lossless: "aac" | "pcm-16" | null;
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: "aac" | "pcm-16" | null;
167
- lossless: "aac" | "pcm-16" | null;
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, "h264" | "h265" | "vp8" | "vp9" | "mp3" | "aac" | "wav" | "prores" | "h264-mkv" | "gif">;
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: [string, string] | null;
10
+ complexFilterFlag: [
11
+ string,
12
+ string
13
+ ] | null;
11
14
  cleanup: () => void;
12
15
  }>;
@@ -0,0 +1,3 @@
1
+ import type { Codec } from './codec';
2
+ import type { PixelFormat } from './pixel-format';
3
+ export declare const warnAboutM2Bug: (codec: Codec | null, pixelFormat: PixelFormat | null) => void;
@@ -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,4 +1,3 @@
1
- /// <reference types="node" />
2
1
  import type { OffthreadVideoImageFormat } from 'remotion';
3
2
  import type { DownloadMap } from './assets/download-map';
4
3
  import type { FfmpegExecutable } from './ffmpeg-executable';
@@ -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 "h264" | "h265" | "vp8" | "vp9" | "mp3" | "aac" | "wav" | "prores" | "h264-mkv" | "gif">(codec: T, audioCodec: AudioCodec | null) => FileExtension;
5
- export declare const makeFileExtensionMap: () => Record<string, ("h264" | "h265" | "vp8" | "vp9" | "mp3" | "aac" | "wav" | "prores" | "h264-mkv" | "gif")[]>;
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: [number, number] | null;
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: "h264" | "h265" | "vp8" | "vp9" | "mp3" | "aac" | "wav" | "prores" | "h264-mkv" | "gif";
62
+ codec: "aac" | "mp3" | "h264" | "h265" | "vp8" | "vp9" | "wav" | "prores" | "h264-mkv" | "gif";
64
63
  }) => void;
65
- getFileExtensionFromCodec: <T extends "h264" | "h265" | "vp8" | "vp9" | "mp3" | "aac" | "wav" | "prores" | "h264-mkv" | "gif">(codec: T, audioCodec: "mp3" | "aac" | "pcm-16" | "opus" | null) => import("./file-extensions").FileExtension;
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: "h264" | "h265" | "vp8" | "vp9" | "mp3" | "aac" | "wav" | "prores" | "h264-mkv" | "gif") => boolean;
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: "angle" | "swangle" | "egl" | "swiftshader" | null;
123
- validateOpenGlRenderer: (option: "angle" | "swangle" | "egl" | "swiftshader" | null) => "angle" | "swangle" | "egl" | "swiftshader" | null;
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: "h264" | "h265" | "vp8" | "vp9" | "mp3" | "aac" | "wav" | "prores" | "h264-mkv" | "gif";
130
- isAudioCodec: (codec: "h264" | "h265" | "vp8" | "vp9" | "mp3" | "aac" | "wav" | "prores" | "h264-mkv" | "gif" | undefined) => boolean;
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: "error" | "verbose" | "info" | "warn", level: "error" | "verbose" | "info" | "warn") => boolean;
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: "h264" | "h265" | "vp8" | "vp9" | "mp3" | "aac" | "wav" | "prores" | "h264-mkv" | "gif";
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: "mp3" | "aac" | "pcm-16" | "opus" | null;
158
+ audioCodec: "pcm-16" | "aac" | "mp3" | "opus" | null;
160
159
  }) => Promise<void>;
161
160
  getDefaultAudioCodec: ({ codec, preferLossless, }: {
162
- codec: "h264" | "h265" | "vp8" | "vp9" | "mp3" | "aac" | "wav" | "prores" | "h264-mkv" | "gif";
161
+ codec: "aac" | "mp3" | "h264" | "h265" | "vp8" | "vp9" | "wav" | "prores" | "h264-mkv" | "gif";
163
162
  preferLossless: boolean;
164
- }) => "mp3" | "aac" | "pcm-16" | "opus" | null;
163
+ }) => "pcm-16" | "aac" | "mp3" | "opus" | null;
165
164
  validAudioCodecs: readonly ["pcm-16", "aac", "mp3", "opus"];
166
165
  defaultFileExtensionMap: {
167
- h264: {
166
+ aac: {
168
167
  default: import("./file-extensions").FileExtension;
169
168
  forAudioCodec: {
170
- aac: {
169
+ "pcm-16": {
171
170
  possible: import("./file-extensions").FileExtension[];
172
171
  default: import("./file-extensions").FileExtension;
173
172
  };
174
- "pcm-16": {
173
+ aac: {
175
174
  possible: import("./file-extensions").FileExtension[];
176
175
  default: import("./file-extensions").FileExtension;
177
176
  };
178
177
  };
179
178
  };
180
- h265: {
179
+ mp3: {
181
180
  default: import("./file-extensions").FileExtension;
182
181
  forAudioCodec: {
183
- aac: {
182
+ "pcm-16": {
184
183
  possible: import("./file-extensions").FileExtension[];
185
184
  default: import("./file-extensions").FileExtension;
186
185
  };
187
- "pcm-16": {
186
+ mp3: {
188
187
  possible: import("./file-extensions").FileExtension[];
189
188
  default: import("./file-extensions").FileExtension;
190
189
  };
191
190
  };
192
191
  };
193
- vp8: {
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
- opus: {
199
+ aac: {
201
200
  possible: import("./file-extensions").FileExtension[];
202
201
  default: import("./file-extensions").FileExtension;
203
202
  };
204
203
  };
205
204
  };
206
- vp9: {
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
- opus: {
212
+ aac: {
214
213
  possible: import("./file-extensions").FileExtension[];
215
214
  default: import("./file-extensions").FileExtension;
216
215
  };
217
216
  };
218
217
  };
219
- mp3: {
218
+ vp8: {
220
219
  default: import("./file-extensions").FileExtension;
221
220
  forAudioCodec: {
222
- mp3: {
221
+ "pcm-16": {
223
222
  possible: import("./file-extensions").FileExtension[];
224
223
  default: import("./file-extensions").FileExtension;
225
224
  };
226
- "pcm-16": {
225
+ opus: {
227
226
  possible: import("./file-extensions").FileExtension[];
228
227
  default: import("./file-extensions").FileExtension;
229
228
  };
230
229
  };
231
230
  };
232
- aac: {
231
+ vp9: {
233
232
  default: import("./file-extensions").FileExtension;
234
233
  forAudioCodec: {
235
- aac: {
234
+ "pcm-16": {
236
235
  possible: import("./file-extensions").FileExtension[];
237
236
  default: import("./file-extensions").FileExtension;
238
237
  };
239
- "pcm-16": {
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
- aac: {
256
+ "pcm-16": {
258
257
  possible: import("./file-extensions").FileExtension[];
259
258
  default: import("./file-extensions").FileExtension;
260
259
  };
261
- "pcm-16": {
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, ("h264" | "h265" | "vp8" | "vp9" | "mp3" | "aac" | "wav" | "prores" | "h264-mkv" | "gif")[]>;
294
- defaultCodecsForFileExtension: Record<import("./file-extensions").FileExtension, "h264" | "h265" | "vp8" | "vp9" | "mp3" | "aac" | "wav" | "prores" | "h264-mkv" | "gif">;
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
  };
@@ -1,4 +1,3 @@
1
- /// <reference types="node" />
2
1
  import type { OffthreadVideoImageFormat } from 'remotion';
3
2
  import type { DownloadMap, SpecialVCodecForTransparency } from './assets/download-map';
4
3
  import type { FfmpegExecutable } from './ffmpeg-executable';
@@ -1,4 +1,3 @@
1
- /// <reference types="node" />
2
1
  import type { ClipRegion } from 'remotion';
3
2
  import type { Page } from './browser/BrowserPage';
4
3
  import type { ImageFormat } from './image-format';
@@ -1,4 +1,3 @@
1
- /// <reference types="node" />
2
1
  import type { ClipRegion } from 'remotion';
3
2
  import type { Page } from './browser/BrowserPage';
4
3
  export declare const screenshot: (options: {
@@ -1,4 +1,3 @@
1
- /// <reference types="node" />
2
1
  import type { SmallTCompMetadata } from 'remotion';
3
2
  import type { RenderMediaOnDownload } from './assets/download-and-map-assets-to-file';
4
3
  import type { DownloadMap } from './assets/download-map';
@@ -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(frame, composition.durationInFrames);
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,
@@ -1,4 +1,3 @@
1
- /// <reference types="node" />
2
1
  import type { ClipRegion } from 'remotion';
3
2
  import type { Page } from './browser/BrowserPage';
4
3
  import type { ImageFormat } from './image-format';
@@ -1,4 +1,3 @@
1
- /// <reference types="node" />
2
1
  import type { ClipRegion } from 'remotion';
3
2
  import type { Page } from './browser/BrowserPage';
4
3
  import type { StillImageFormat } from './image-format';
@@ -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,4 +1,3 @@
1
- /// <reference types="node" />
2
1
  import type { TAsset } from 'remotion';
3
2
  import type { DownloadMap } from './assets/download-map';
4
3
  import type { Page } from './browser/BrowserPage';
@@ -1,4 +1,3 @@
1
- /// <reference types="node" />
2
1
  import type { OffthreadVideoImageFormat } from 'remotion';
3
2
  import type { NeedsResize, SpecialVCodecForTransparency } from './assets/download-map';
4
3
  import type { FfmpegExecutable } from './ffmpeg-executable';
@@ -1,5 +1,5 @@
1
1
  import type { AudioCodec } from './audio-codec';
2
- export declare const validateOutputFilename: <T extends "h264" | "h265" | "vp8" | "vp9" | "mp3" | "aac" | "wav" | "prores" | "h264-mkv" | "gif">({ codec, audioCodec, extension, preferLossless, }: {
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.76",
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.76",
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.76",
45
- "@remotion/compositor-darwin-x64": "3.3.76",
46
- "@remotion/compositor-linux-arm64-gnu": "3.3.76",
47
- "@remotion/compositor-linux-arm64-musl": "3.3.76",
48
- "@remotion/compositor-linux-x64-gnu": "3.3.76",
49
- "@remotion/compositor-linux-x64-musl": "3.3.76",
50
- "@remotion/compositor-win32-x64-msvc": "3.3.76"
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",
@@ -1,7 +0,0 @@
1
- import type { FfmpegExecutable } from './ffmpeg-executable';
2
- export declare const convertToPcm: ({ ffmpegExecutable, input, outName, remotionRoot, }: {
3
- ffmpegExecutable: FfmpegExecutable;
4
- input: string;
5
- outName: string;
6
- remotionRoot: string;
7
- }) => Promise<void>;
@@ -1,21 +0,0 @@
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.convertToPcm = void 0;
7
- const execa_1 = __importDefault(require("execa"));
8
- const ffmpeg_flags_1 = require("./ffmpeg-flags");
9
- const sample_rate_1 = require("./sample-rate");
10
- const convertToPcm = async ({ ffmpegExecutable, input, outName, remotionRoot, }) => {
11
- await (0, execa_1.default)(await (0, ffmpeg_flags_1.getExecutableBinary)(ffmpegExecutable, remotionRoot, 'ffmpeg'), [
12
- '-i',
13
- input,
14
- '-c:a',
15
- 'pcm_s16le',
16
- '-ar',
17
- String(sample_rate_1.DEFAULT_SAMPLE_RATE),
18
- outName,
19
- ]);
20
- };
21
- exports.convertToPcm = convertToPcm;
@@ -1 +0,0 @@
1
- export declare const validateFrame: (frame: number, durationInFrames: number) => void;
@@ -1,24 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.validateFrame = void 0;
4
- const validateFrame = (frame, durationInFrames) => {
5
- if (typeof frame === 'undefined') {
6
- throw new TypeError(`Argument missing for parameter "frame"`);
7
- }
8
- if (typeof frame !== 'number') {
9
- throw new TypeError(`Argument passed for "frame" is not a number: ${frame}`);
10
- }
11
- if (!Number.isFinite(frame)) {
12
- throw new RangeError(`Frame ${frame} is not finite`);
13
- }
14
- if (frame % 1 !== 0) {
15
- throw new RangeError(`Argument for frame must be an integer, but got ${frame}`);
16
- }
17
- if (frame < 0 && frame < -durationInFrames) {
18
- throw new RangeError(`Cannot use frame ${frame}: Duration of composition is ${durationInFrames}, therefore the lowest frame that can be rendered is ${-durationInFrames}`);
19
- }
20
- if (frame > durationInFrames - 1) {
21
- throw new RangeError(`Cannot use frame ${frame}: Duration of composition is ${durationInFrames}, therefore the highest frame that can be rendered is ${durationInFrames - 1}`);
22
- }
23
- };
24
- exports.validateFrame = validateFrame;