@remotion/renderer 4.0.73 → 4.0.75

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 CHANGED
@@ -1,14 +1,14 @@
1
- /// <reference types="react" />
2
1
  export declare const BrowserSafeApis: {
3
- getFileExtensionFromCodec: <T extends "h264" | "h265" | "vp8" | "vp9" | "prores" | "aac" | "mp3" | "wav" | "h264-mkv" | "gif">(codec: T, audioCodec: "opus" | "aac" | "mp3" | "pcm-16" | null) => import("./file-extensions").FileExtension;
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;
4
3
  validCodecs: readonly ["h264", "h265", "vp8", "vp9", "mp3", "aac", "wav", "prores", "h264-mkv", "gif"];
5
4
  validAudioCodecs: readonly ["pcm-16", "aac", "mp3", "opus"];
6
- getDefaultCrfForCodec: (codec: "h264" | "h265" | "vp8" | "vp9" | "prores" | "aac" | "mp3" | "wav" | "h264-mkv" | "gif") => number;
7
- getValidCrfRanges: (codec: "h264" | "h265" | "vp8" | "vp9" | "prores" | "aac" | "mp3" | "wav" | "h264-mkv" | "gif") => [number, number];
8
- isAudioCodec: (codec: "h264" | "h265" | "vp8" | "vp9" | "prores" | "aac" | "mp3" | "wav" | "h264-mkv" | "gif" | null | undefined) => boolean;
5
+ getDefaultCrfForCodec: (codec: "h264" | "h265" | "vp8" | "vp9" | "mp3" | "aac" | "wav" | "prores" | "h264-mkv" | "gif") => number;
6
+ getValidCrfRanges: (codec: "h264" | "h265" | "vp8" | "vp9" | "mp3" | "aac" | "wav" | "prores" | "h264-mkv" | "gif") => [number, number];
7
+ isAudioCodec: (codec: "h264" | "h265" | "vp8" | "vp9" | "mp3" | "aac" | "wav" | "prores" | "h264-mkv" | "gif" | null | undefined) => boolean;
9
8
  proResProfileOptions: readonly ["4444-xq", "4444", "hq", "standard", "light", "proxy"];
10
9
  x264PresetOptions: readonly ["ultrafast", "superfast", "veryfast", "faster", "fast", "medium", "slow", "slower", "veryslow", "placebo"];
11
10
  validPixelFormats: readonly ["yuv420p", "yuva420p", "yuv422p", "yuv444p", "yuv420p10le", "yuv422p10le", "yuv444p10le", "yuva444p10le"];
11
+ validPixelFormatsForCodec: (codec: "h264" | "h265" | "vp8" | "vp9" | "mp3" | "aac" | "wav" | "prores" | "h264-mkv" | "gif") => readonly ["yuv420p", "yuva420p", "yuv422p", "yuv444p", "yuv420p10le", "yuv422p10le", "yuv444p10le", "yuva444p10le"] | ("yuv420p" | "yuva420p" | "yuv422p" | "yuv444p" | "yuv420p10le" | "yuv422p10le" | "yuv444p10le" | "yuva444p10le")[];
12
12
  DEFAULT_PIXEL_FORMAT: "yuv420p" | "yuva420p" | "yuv422p" | "yuv444p" | "yuv420p10le" | "yuv422p10le" | "yuv444p10le" | "yuva444p10le";
13
13
  supportedAudioCodecs: {
14
14
  readonly h264: readonly ["aac", "pcm-16", "mp3"];
@@ -26,11 +26,11 @@ export declare const BrowserSafeApis: {
26
26
  h264: {
27
27
  default: import("./file-extensions").FileExtension;
28
28
  forAudioCodec: {
29
- aac: {
29
+ mp3: {
30
30
  possible: import("./file-extensions").FileExtension[];
31
31
  default: import("./file-extensions").FileExtension;
32
32
  };
33
- mp3: {
33
+ aac: {
34
34
  possible: import("./file-extensions").FileExtension[];
35
35
  default: import("./file-extensions").FileExtension;
36
36
  };
@@ -56,11 +56,11 @@ export declare const BrowserSafeApis: {
56
56
  vp8: {
57
57
  default: import("./file-extensions").FileExtension;
58
58
  forAudioCodec: {
59
- opus: {
59
+ "pcm-16": {
60
60
  possible: import("./file-extensions").FileExtension[];
61
61
  default: import("./file-extensions").FileExtension;
62
62
  };
63
- "pcm-16": {
63
+ opus: {
64
64
  possible: import("./file-extensions").FileExtension[];
65
65
  default: import("./file-extensions").FileExtension;
66
66
  };
@@ -69,20 +69,20 @@ export declare const BrowserSafeApis: {
69
69
  vp9: {
70
70
  default: import("./file-extensions").FileExtension;
71
71
  forAudioCodec: {
72
- opus: {
72
+ "pcm-16": {
73
73
  possible: import("./file-extensions").FileExtension[];
74
74
  default: import("./file-extensions").FileExtension;
75
75
  };
76
- "pcm-16": {
76
+ opus: {
77
77
  possible: import("./file-extensions").FileExtension[];
78
78
  default: import("./file-extensions").FileExtension;
79
79
  };
80
80
  };
81
81
  };
82
- prores: {
82
+ mp3: {
83
83
  default: import("./file-extensions").FileExtension;
84
84
  forAudioCodec: {
85
- aac: {
85
+ mp3: {
86
86
  possible: import("./file-extensions").FileExtension[];
87
87
  default: import("./file-extensions").FileExtension;
88
88
  };
@@ -105,22 +105,22 @@ export declare const BrowserSafeApis: {
105
105
  };
106
106
  };
107
107
  };
108
- mp3: {
108
+ wav: {
109
109
  default: import("./file-extensions").FileExtension;
110
110
  forAudioCodec: {
111
- mp3: {
112
- possible: import("./file-extensions").FileExtension[];
113
- default: import("./file-extensions").FileExtension;
114
- };
115
111
  "pcm-16": {
116
112
  possible: import("./file-extensions").FileExtension[];
117
113
  default: import("./file-extensions").FileExtension;
118
114
  };
119
115
  };
120
116
  };
121
- wav: {
117
+ prores: {
122
118
  default: import("./file-extensions").FileExtension;
123
119
  forAudioCodec: {
120
+ aac: {
121
+ possible: import("./file-extensions").FileExtension[];
122
+ default: import("./file-extensions").FileExtension;
123
+ };
124
124
  "pcm-16": {
125
125
  possible: import("./file-extensions").FileExtension[];
126
126
  default: import("./file-extensions").FileExtension;
@@ -147,37 +147,37 @@ export declare const BrowserSafeApis: {
147
147
  };
148
148
  defaultAudioCodecs: {
149
149
  h264: {
150
- compressed: "aac" | "mp3" | "pcm-16" | null;
151
- lossless: "aac" | "mp3" | "pcm-16" | null;
150
+ compressed: "mp3" | "aac" | "pcm-16" | null;
151
+ lossless: "mp3" | "aac" | "pcm-16" | null;
152
152
  };
153
153
  h265: {
154
154
  compressed: "aac" | "pcm-16" | null;
155
155
  lossless: "aac" | "pcm-16" | null;
156
156
  };
157
157
  vp8: {
158
- compressed: "opus" | "pcm-16" | null;
159
- lossless: "opus" | "pcm-16" | null;
158
+ compressed: "pcm-16" | "opus" | null;
159
+ lossless: "pcm-16" | "opus" | null;
160
160
  };
161
161
  vp9: {
162
- compressed: "opus" | "pcm-16" | null;
163
- lossless: "opus" | "pcm-16" | null;
162
+ compressed: "pcm-16" | "opus" | null;
163
+ lossless: "pcm-16" | "opus" | null;
164
164
  };
165
- prores: {
166
- compressed: "aac" | "pcm-16" | null;
167
- lossless: "aac" | "pcm-16" | null;
165
+ mp3: {
166
+ compressed: "mp3" | "pcm-16" | null;
167
+ lossless: "mp3" | "pcm-16" | null;
168
168
  };
169
169
  aac: {
170
170
  compressed: "aac" | "pcm-16" | null;
171
171
  lossless: "aac" | "pcm-16" | null;
172
172
  };
173
- mp3: {
174
- compressed: "mp3" | "pcm-16" | null;
175
- lossless: "mp3" | "pcm-16" | null;
176
- };
177
173
  wav: {
178
174
  compressed: "pcm-16" | null;
179
175
  lossless: "pcm-16" | null;
180
176
  };
177
+ prores: {
178
+ compressed: "aac" | "pcm-16" | null;
179
+ lossless: "aac" | "pcm-16" | null;
180
+ };
181
181
  "h264-mkv": {
182
182
  compressed: "mp3" | "pcm-16" | null;
183
183
  lossless: "mp3" | "pcm-16" | null;
@@ -187,10 +187,10 @@ export declare const BrowserSafeApis: {
187
187
  lossless: null;
188
188
  };
189
189
  };
190
- defaultCodecsForFileExtension: Record<import("./file-extensions").FileExtension, "h264" | "h265" | "vp8" | "vp9" | "prores" | "aac" | "mp3" | "wav" | "h264-mkv" | "gif">;
191
- validateOutputFilename: <T_1 extends "h264" | "h265" | "vp8" | "vp9" | "prores" | "aac" | "mp3" | "wav" | "h264-mkv" | "gif">({ codec, audioCodec, extension, preferLossless, }: {
190
+ defaultCodecsForFileExtension: Record<import("./file-extensions").FileExtension, "h264" | "h265" | "vp8" | "vp9" | "mp3" | "aac" | "wav" | "prores" | "h264-mkv" | "gif">;
191
+ validateOutputFilename: <T_1 extends "h264" | "h265" | "vp8" | "vp9" | "mp3" | "aac" | "wav" | "prores" | "h264-mkv" | "gif">({ codec, audioCodec, extension, preferLossless, }: {
192
192
  codec: T_1;
193
- audioCodec: "opus" | "aac" | "mp3" | "pcm-16" | null;
193
+ audioCodec: "mp3" | "aac" | "pcm-16" | "opus" | null;
194
194
  extension: string;
195
195
  preferLossless: boolean;
196
196
  }) => void;
@@ -281,7 +281,7 @@ export declare const BrowserSafeApis: {
281
281
  description: () => JSX.Element;
282
282
  docLink: string;
283
283
  ssrName: string;
284
- type: "bt709" | "default";
284
+ type: "default" | "bt709";
285
285
  };
286
286
  deleteAfterOption: {
287
287
  name: string;
@@ -311,7 +311,7 @@ export declare const BrowserSafeApis: {
311
311
  cliFlag: string;
312
312
  docLink: string;
313
313
  name: string;
314
- type: "angle" | "swangle" | "egl" | "swiftshader" | "vulkan" | "angle-egl";
314
+ type: "swangle" | "angle" | "egl" | "swiftshader" | "vulkan" | "angle-egl";
315
315
  ssrName: string;
316
316
  description: () => JSX.Element;
317
317
  };
@@ -407,6 +407,6 @@ export declare const BrowserSafeApis: {
407
407
  type: number | null;
408
408
  }];
409
409
  };
410
- codecSupportsCrf: (codec: "h264" | "h265" | "vp8" | "vp9" | "prores" | "aac" | "mp3" | "wav" | "h264-mkv" | "gif") => boolean;
411
- codecSupportsVideoBitrate: (codec: "h264" | "h265" | "vp8" | "vp9" | "prores" | "aac" | "mp3" | "wav" | "h264-mkv" | "gif") => boolean;
410
+ codecSupportsCrf: (codec: "h264" | "h265" | "vp8" | "vp9" | "mp3" | "aac" | "wav" | "prores" | "h264-mkv" | "gif") => boolean;
411
+ codecSupportsVideoBitrate: (codec: "h264" | "h265" | "vp8" | "vp9" | "mp3" | "aac" | "wav" | "prores" | "h264-mkv" | "gif") => boolean;
412
412
  };
package/dist/client.js CHANGED
@@ -25,6 +25,7 @@ exports.BrowserSafeApis = {
25
25
  proResProfileOptions: prores_profile_1.proResProfileOptions,
26
26
  x264PresetOptions: x264_preset_1.x264PresetOptions,
27
27
  validPixelFormats: pixel_format_1.validPixelFormats,
28
+ validPixelFormatsForCodec: pixel_format_1.validPixelFormatsForCodec,
28
29
  DEFAULT_PIXEL_FORMAT: pixel_format_1.DEFAULT_PIXEL_FORMAT,
29
30
  supportedAudioCodecs: audio_codec_1.supportedAudioCodecs,
30
31
  defaultFileExtensionMap: file_extensions_1.defaultFileExtensionMap,
@@ -5,7 +5,7 @@ const crf_1 = require("./crf");
5
5
  const get_codec_name_1 = require("./get-codec-name");
6
6
  const truthy_1 = require("./truthy");
7
7
  const firstEncodingStepOnly = ({ hasPreencoded, proResProfileName, pixelFormat, x264Preset, codec, crf, videoBitrate, }) => {
8
- if (hasPreencoded) {
8
+ if (hasPreencoded || codec === 'gif') {
9
9
  return [];
10
10
  }
11
11
  return [
@@ -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" | "prores" | "aac" | "mp3" | "wav" | "h264-mkv" | "gif">(codec: T, audioCodec: AudioCodec | null) => FileExtension;
5
- export declare const makeFileExtensionMap: () => Record<string, ("h264" | "h265" | "vp8" | "vp9" | "prores" | "aac" | "mp3" | "wav" | "h264-mkv" | "gif")[]>;
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")[]>;
6
6
  export declare const defaultCodecsForFileExtension: Record<FileExtension, Codec>;
package/dist/index.d.ts CHANGED
@@ -1,6 +1,3 @@
1
- /// <reference types="node" />
2
- /// <reference types="react" />
3
- /// <reference types="node" />
4
1
  import execa from 'execa';
5
2
  import { HeadlessBrowser } from './browser/Browser';
6
3
  import { SymbolicateableError } from './error-handling/symbolicateable-error';
@@ -67,10 +64,10 @@ export declare const RenderInternals: {
67
64
  width: number;
68
65
  height: number;
69
66
  scale: number;
70
- codec: "h264" | "h265" | "vp8" | "vp9" | "prores" | "aac" | "mp3" | "wav" | "h264-mkv" | "gif";
67
+ codec: "h264" | "h265" | "vp8" | "vp9" | "mp3" | "aac" | "wav" | "prores" | "h264-mkv" | "gif";
71
68
  wantsImageSequence: boolean;
72
69
  }) => void;
73
- getFileExtensionFromCodec: <T extends "h264" | "h265" | "vp8" | "vp9" | "prores" | "aac" | "mp3" | "wav" | "h264-mkv" | "gif">(codec: T, audioCodec: "opus" | "aac" | "mp3" | "pcm-16" | null) => import("./file-extensions").FileExtension;
70
+ 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;
74
71
  tmpDir: (str: string) => string;
75
72
  deleteDirectory: (directory: string) => void;
76
73
  isServeUrl: (potentialUrl: string) => boolean;
@@ -127,7 +124,7 @@ export declare const RenderInternals: {
127
124
  };
128
125
  registerErrorSymbolicationLock: () => number;
129
126
  unlockErrorSymbolicationLock: (id: number) => void;
130
- canUseParallelEncoding: (codec: "h264" | "h265" | "vp8" | "vp9" | "prores" | "aac" | "mp3" | "wav" | "h264-mkv" | "gif") => boolean;
127
+ canUseParallelEncoding: (codec: "h264" | "h265" | "vp8" | "vp9" | "mp3" | "aac" | "wav" | "prores" | "h264-mkv" | "gif") => boolean;
131
128
  mimeContentType: typeof mimeContentType;
132
129
  mimeLookup: typeof mimeLookup;
133
130
  validateConcurrency: ({ setting, value, checkIfValidForCurrentMachine, }: {
@@ -138,14 +135,14 @@ export declare const RenderInternals: {
138
135
  validPixelFormats: readonly ["yuv420p", "yuva420p", "yuv422p", "yuv444p", "yuv420p10le", "yuv422p10le", "yuv444p10le", "yuva444p10le"];
139
136
  DEFAULT_BROWSER: "chrome";
140
137
  validateFrameRange: (frameRange: import("./frame-range").FrameRange | null) => void;
141
- DEFAULT_OPENGL_RENDERER: "angle" | "swangle" | "egl" | "swiftshader" | "vulkan" | "angle-egl" | null;
142
- validateOpenGlRenderer: (option: "angle" | "swangle" | "egl" | "swiftshader" | "vulkan" | "angle-egl" | null) => "angle" | "swangle" | "egl" | "swiftshader" | "vulkan" | "angle-egl" | null;
138
+ DEFAULT_OPENGL_RENDERER: "swangle" | "angle" | "egl" | "swiftshader" | "vulkan" | "angle-egl" | null;
139
+ validateOpenGlRenderer: (option: "swangle" | "angle" | "egl" | "swiftshader" | "vulkan" | "angle-egl" | null) => "swangle" | "angle" | "egl" | "swiftshader" | "vulkan" | "angle-egl" | null;
143
140
  validCodecs: readonly ["h264", "h265", "vp8", "vp9", "mp3", "aac", "wav", "prores", "h264-mkv", "gif"];
144
141
  DEFAULT_PIXEL_FORMAT: "yuv420p" | "yuva420p" | "yuv422p" | "yuv444p" | "yuv420p10le" | "yuv422p10le" | "yuv444p10le" | "yuva444p10le";
145
142
  validateJpegQuality: (q: number | undefined) => void;
146
143
  DEFAULT_TIMEOUT: number;
147
- DEFAULT_CODEC: "h264" | "h265" | "vp8" | "vp9" | "prores" | "aac" | "mp3" | "wav" | "h264-mkv" | "gif";
148
- isAudioCodec: (codec: "h264" | "h265" | "vp8" | "vp9" | "prores" | "aac" | "mp3" | "wav" | "h264-mkv" | "gif" | null | undefined) => boolean;
144
+ DEFAULT_CODEC: "h264" | "h265" | "vp8" | "vp9" | "mp3" | "aac" | "wav" | "prores" | "h264-mkv" | "gif";
145
+ isAudioCodec: (codec: "h264" | "h265" | "vp8" | "vp9" | "mp3" | "aac" | "wav" | "prores" | "h264-mkv" | "gif" | null | undefined) => boolean;
149
146
  logLevels: readonly ["verbose", "info", "warn", "error"];
150
147
  isEqualOrBelowLogLevel: (currentLevel: "verbose" | "info" | "warn" | "error", level: "verbose" | "info" | "warn" | "error") => boolean;
151
148
  isValidLogLevel: (level: string) => boolean;
@@ -162,10 +159,10 @@ export declare const RenderInternals: {
162
159
  output: string;
163
160
  onProgress: (p: number) => void;
164
161
  numberOfFrames: number;
165
- codec: "h264" | "h265" | "vp8" | "vp9" | "prores" | "aac" | "mp3" | "wav" | "h264-mkv" | "gif";
162
+ codec: "h264" | "h265" | "vp8" | "vp9" | "mp3" | "aac" | "wav" | "prores" | "h264-mkv" | "gif";
166
163
  fps: number;
167
164
  numberOfGifLoops: number | null;
168
- audioCodec: "opus" | "aac" | "mp3" | "pcm-16" | null;
165
+ audioCodec: "mp3" | "aac" | "pcm-16" | "opus" | null;
169
166
  audioBitrate: string | null;
170
167
  indent: boolean;
171
168
  logLevel: "verbose" | "info" | "warn" | "error";
@@ -173,19 +170,19 @@ export declare const RenderInternals: {
173
170
  getMinConcurrency: () => number;
174
171
  getMaxConcurrency: () => number;
175
172
  getDefaultAudioCodec: ({ codec, preferLossless, }: {
176
- codec: "h264" | "h265" | "vp8" | "vp9" | "prores" | "aac" | "mp3" | "wav" | "h264-mkv" | "gif";
173
+ codec: "h264" | "h265" | "vp8" | "vp9" | "mp3" | "aac" | "wav" | "prores" | "h264-mkv" | "gif";
177
174
  preferLossless: boolean;
178
- }) => "opus" | "aac" | "mp3" | "pcm-16" | null;
175
+ }) => "mp3" | "aac" | "pcm-16" | "opus" | null;
179
176
  validAudioCodecs: readonly ["pcm-16", "aac", "mp3", "opus"];
180
177
  defaultFileExtensionMap: {
181
178
  h264: {
182
179
  default: import("./file-extensions").FileExtension;
183
180
  forAudioCodec: {
184
- aac: {
181
+ mp3: {
185
182
  possible: import("./file-extensions").FileExtension[];
186
183
  default: import("./file-extensions").FileExtension;
187
184
  };
188
- mp3: {
185
+ aac: {
189
186
  possible: import("./file-extensions").FileExtension[];
190
187
  default: import("./file-extensions").FileExtension;
191
188
  };
@@ -211,11 +208,11 @@ export declare const RenderInternals: {
211
208
  vp8: {
212
209
  default: import("./file-extensions").FileExtension;
213
210
  forAudioCodec: {
214
- opus: {
211
+ "pcm-16": {
215
212
  possible: import("./file-extensions").FileExtension[];
216
213
  default: import("./file-extensions").FileExtension;
217
214
  };
218
- "pcm-16": {
215
+ opus: {
219
216
  possible: import("./file-extensions").FileExtension[];
220
217
  default: import("./file-extensions").FileExtension;
221
218
  };
@@ -224,20 +221,20 @@ export declare const RenderInternals: {
224
221
  vp9: {
225
222
  default: import("./file-extensions").FileExtension;
226
223
  forAudioCodec: {
227
- opus: {
224
+ "pcm-16": {
228
225
  possible: import("./file-extensions").FileExtension[];
229
226
  default: import("./file-extensions").FileExtension;
230
227
  };
231
- "pcm-16": {
228
+ opus: {
232
229
  possible: import("./file-extensions").FileExtension[];
233
230
  default: import("./file-extensions").FileExtension;
234
231
  };
235
232
  };
236
233
  };
237
- prores: {
234
+ mp3: {
238
235
  default: import("./file-extensions").FileExtension;
239
236
  forAudioCodec: {
240
- aac: {
237
+ mp3: {
241
238
  possible: import("./file-extensions").FileExtension[];
242
239
  default: import("./file-extensions").FileExtension;
243
240
  };
@@ -260,22 +257,22 @@ export declare const RenderInternals: {
260
257
  };
261
258
  };
262
259
  };
263
- mp3: {
260
+ wav: {
264
261
  default: import("./file-extensions").FileExtension;
265
262
  forAudioCodec: {
266
- mp3: {
267
- possible: import("./file-extensions").FileExtension[];
268
- default: import("./file-extensions").FileExtension;
269
- };
270
263
  "pcm-16": {
271
264
  possible: import("./file-extensions").FileExtension[];
272
265
  default: import("./file-extensions").FileExtension;
273
266
  };
274
267
  };
275
268
  };
276
- wav: {
269
+ prores: {
277
270
  default: import("./file-extensions").FileExtension;
278
271
  forAudioCodec: {
272
+ aac: {
273
+ possible: import("./file-extensions").FileExtension[];
274
+ default: import("./file-extensions").FileExtension;
275
+ };
279
276
  "pcm-16": {
280
277
  possible: import("./file-extensions").FileExtension[];
281
278
  default: import("./file-extensions").FileExtension;
@@ -312,8 +309,8 @@ export declare const RenderInternals: {
312
309
  readonly vp9: readonly ["opus", "pcm-16"];
313
310
  readonly wav: readonly ["pcm-16"];
314
311
  };
315
- makeFileExtensionMap: () => Record<string, ("h264" | "h265" | "vp8" | "vp9" | "prores" | "aac" | "mp3" | "wav" | "h264-mkv" | "gif")[]>;
316
- defaultCodecsForFileExtension: Record<import("./file-extensions").FileExtension, "h264" | "h265" | "vp8" | "vp9" | "prores" | "aac" | "mp3" | "wav" | "h264-mkv" | "gif">;
312
+ makeFileExtensionMap: () => Record<string, ("h264" | "h265" | "vp8" | "vp9" | "mp3" | "aac" | "wav" | "prores" | "h264-mkv" | "gif")[]>;
313
+ defaultCodecsForFileExtension: Record<import("./file-extensions").FileExtension, "h264" | "h265" | "vp8" | "vp9" | "mp3" | "aac" | "wav" | "prores" | "h264-mkv" | "gif">;
317
314
  getExecutablePath: (type: "compositor" | "ffmpeg" | "ffprobe" | "ffmpeg-cwd", indent: boolean, logLevel: "verbose" | "info" | "warn" | "error") => string;
318
315
  callFf: (bin: "ffmpeg" | "ffprobe", args: (string | null)[], indent: boolean, logLevel: "verbose" | "info" | "warn" | "error", options?: execa.Options<string> | undefined) => execa.ExecaChildProcess<string>;
319
316
  dynamicLibraryPathOptions: (indent: boolean, logLevel: "verbose" | "info" | "warn" | "error") => {
@@ -330,8 +327,8 @@ export declare const RenderInternals: {
330
327
  };
331
328
  validStillImageFormats: readonly ["png", "jpeg", "pdf", "webp"];
332
329
  validVideoImageFormats: readonly ["png", "jpeg", "none"];
333
- DEFAULT_STILL_IMAGE_FORMAT: "jpeg" | "png" | "webp" | "pdf";
334
- DEFAULT_VIDEO_IMAGE_FORMAT: "none" | "jpeg" | "png";
330
+ DEFAULT_STILL_IMAGE_FORMAT: "png" | "jpeg" | "pdf" | "webp";
331
+ DEFAULT_VIDEO_IMAGE_FORMAT: "png" | "jpeg" | "none";
335
332
  DEFAULT_JPEG_QUALITY: number;
336
333
  chalk: {
337
334
  enabled: () => boolean;
@@ -430,7 +427,7 @@ export declare const RenderInternals: {
430
427
  frame: number;
431
428
  serializedInputPropsWithCustomSchema: string;
432
429
  serializedResolvedPropsWithCustomSchema: string;
433
- imageFormat: "jpeg" | "png" | "webp" | "pdf";
430
+ imageFormat: "png" | "jpeg" | "pdf" | "webp";
434
431
  jpegQuality: number;
435
432
  puppeteerInstance: HeadlessBrowser | null;
436
433
  envVariables: Record<string, string>;
@@ -7,6 +7,6 @@ export declare const colorSpaceOption: {
7
7
  description: () => JSX.Element;
8
8
  docLink: string;
9
9
  ssrName: string;
10
- type: "bt709" | "default";
10
+ type: "default" | "bt709";
11
11
  };
12
12
  export declare const validateColorSpace: (option: unknown) => void;
@@ -4,7 +4,7 @@ export declare const glOption: {
4
4
  cliFlag: string;
5
5
  docLink: string;
6
6
  name: string;
7
- type: "angle" | "swangle" | "egl" | "swiftshader" | "vulkan" | "angle-egl";
7
+ type: "swangle" | "angle" | "egl" | "swiftshader" | "vulkan" | "angle-egl";
8
8
  ssrName: string;
9
9
  description: () => JSX.Element;
10
10
  };
@@ -86,7 +86,7 @@ export declare const allOptions: {
86
86
  description: () => JSX.Element;
87
87
  docLink: string;
88
88
  ssrName: string;
89
- type: "bt709" | "default";
89
+ type: "default" | "bt709";
90
90
  };
91
91
  deleteAfterOption: {
92
92
  name: string;
@@ -116,7 +116,7 @@ export declare const allOptions: {
116
116
  cliFlag: string;
117
117
  docLink: string;
118
118
  name: string;
119
- type: "angle" | "swangle" | "egl" | "swiftshader" | "vulkan" | "angle-egl";
119
+ type: "swangle" | "angle" | "egl" | "swiftshader" | "vulkan" | "angle-egl";
120
120
  ssrName: string;
121
121
  description: () => JSX.Element;
122
122
  };
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  export declare const videoCodecOption: {
3
2
  name: string;
4
3
  cliFlag: string;
@@ -5,7 +5,7 @@ const jsx_runtime_1 = require("react/jsx-runtime");
5
5
  exports.videoCodecOption = {
6
6
  name: 'Codec',
7
7
  cliFlag: 'codec',
8
- description: () => ((0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: "H264 works well in most cases, but sometimes it's worth going for a different codec. WebM achieves higher compression but is slower to render. WebM and ProRes support transparency." })),
8
+ description: () => ((0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: "H264 works well in most cases, but sometimes it's worth going for a different codec. WebM achieves higher compression but is slower to render. WebM, GIF and ProRes support transparency." })),
9
9
  ssrName: 'codec',
10
10
  docLink: 'https://www.remotion.dev/docs/encoding/#choosing-a-codec',
11
11
  type: '',
@@ -2,4 +2,5 @@ import type { Codec } from './codec';
2
2
  export declare const validPixelFormats: readonly ["yuv420p", "yuva420p", "yuv422p", "yuv444p", "yuv420p10le", "yuv422p10le", "yuv444p10le", "yuva444p10le"];
3
3
  export type PixelFormat = (typeof validPixelFormats)[number];
4
4
  export declare const DEFAULT_PIXEL_FORMAT: PixelFormat;
5
+ export declare const validPixelFormatsForCodec: (codec: Codec) => readonly ["yuv420p", "yuva420p", "yuv422p", "yuv444p", "yuv420p10le", "yuv422p10le", "yuv444p10le", "yuva444p10le"] | ("yuv420p" | "yuva420p" | "yuv422p" | "yuv444p" | "yuv420p10le" | "yuv422p10le" | "yuv444p10le" | "yuva444p10le")[];
5
6
  export declare const validateSelectedPixelFormatAndCodecCombination: (pixelFormat: PixelFormat | undefined, codec: Codec) => undefined;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.validateSelectedPixelFormatAndCodecCombination = exports.DEFAULT_PIXEL_FORMAT = exports.validPixelFormats = void 0;
3
+ exports.validateSelectedPixelFormatAndCodecCombination = exports.validPixelFormatsForCodec = exports.DEFAULT_PIXEL_FORMAT = exports.validPixelFormats = void 0;
4
4
  exports.validPixelFormats = [
5
5
  'yuv420p',
6
6
  'yuva420p',
@@ -12,6 +12,13 @@ exports.validPixelFormats = [
12
12
  'yuva444p10le',
13
13
  ];
14
14
  exports.DEFAULT_PIXEL_FORMAT = 'yuv420p';
15
+ const validPixelFormatsForCodec = (codec) => {
16
+ if (codec === 'vp8' || codec === 'vp9') {
17
+ return exports.validPixelFormats;
18
+ }
19
+ return exports.validPixelFormats.filter((format) => format !== 'yuva420p');
20
+ };
21
+ exports.validPixelFormatsForCodec = validPixelFormatsForCodec;
15
22
  const validateSelectedPixelFormatAndCodecCombination = (pixelFormat, codec) => {
16
23
  if (typeof pixelFormat === 'undefined') {
17
24
  return pixelFormat;
@@ -22,8 +29,9 @@ const validateSelectedPixelFormatAndCodecCombination = (pixelFormat, codec) => {
22
29
  if (pixelFormat !== 'yuva420p') {
23
30
  return;
24
31
  }
25
- if (codec !== 'vp8' && codec !== 'vp9') {
26
- throw new TypeError("Pixel format was set to 'yuva420p' but codec is not 'vp8' or 'vp9'. To render videos with alpha channel, you must choose a codec that supports it.");
32
+ const validFormats = (0, exports.validPixelFormatsForCodec)(codec);
33
+ if (!validFormats.includes(pixelFormat)) {
34
+ throw new TypeError(`Pixel format was set to 'yuva420p' but codec ${codec} does not support it. Valid pixel formats for codec ${codec} are: ${validFormats.join(', ')}.`);
27
35
  }
28
36
  };
29
37
  exports.validateSelectedPixelFormatAndCodecCombination = validateSelectedPixelFormatAndCodecCombination;
@@ -1,4 +1,3 @@
1
- /// <reference types="node" />
2
1
  import type { ClipRegion } from 'remotion/no-react';
3
2
  import type { Page } from './browser/BrowserPage';
4
3
  import type { StillImageFormat } from './image-format';
@@ -1,4 +1,3 @@
1
- /// <reference types="node" />
2
1
  import type { ClipRegion } from 'remotion/no-react';
3
2
  import type { Page } from './browser/BrowserPage';
4
3
  import type { StillImageFormat } from './image-format';
@@ -1,4 +1,3 @@
1
- /// <reference types="node" />
2
1
  import type { RenderMediaOnDownload } from './assets/download-and-map-assets-to-file';
3
2
  import type { RenderAssetInfo } from './assets/download-map';
4
3
  import type { AudioCodec } from './audio-codec';
@@ -239,6 +239,9 @@ const innerStitchFramesToVideo = async ({ assetsInfo, audioBitrate, audioCodec,
239
239
  ['-s', `${width}x${height}`],
240
240
  ['-start_number', String(assetsInfo.firstFrameIndex)],
241
241
  ['-i', assetsInfo.imageSequenceName],
242
+ codec === 'gif'
243
+ ? ['-filter_complex', 'split[v],palettegen,[v]paletteuse']
244
+ : null,
242
245
  ]),
243
246
  audio ? ['-i', audio] : null,
244
247
  numberOfGifLoops === null
@@ -1,4 +1,3 @@
1
- /// <reference types="node" />
2
1
  import type { TRenderAsset } from 'remotion/no-react';
3
2
  import type { DownloadMap } from './assets/download-map';
4
3
  import type { Page } from './browser/BrowserPage';
@@ -1,5 +1,5 @@
1
1
  import type { AudioCodec } from './audio-codec';
2
- export declare const validateOutputFilename: <T extends "h264" | "h265" | "vp8" | "vp9" | "prores" | "aac" | "mp3" | "wav" | "h264-mkv" | "gif">({ codec, audioCodec, extension, preferLossless, }: {
2
+ export declare const validateOutputFilename: <T extends "h264" | "h265" | "vp8" | "vp9" | "mp3" | "aac" | "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": "4.0.73",
3
+ "version": "4.0.75",
4
4
  "description": "Renderer for Remotion",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -18,7 +18,7 @@
18
18
  "extract-zip": "2.0.1",
19
19
  "source-map": "^0.8.0-beta.0",
20
20
  "ws": "8.7.0",
21
- "remotion": "4.0.73"
21
+ "remotion": "4.0.75"
22
22
  },
23
23
  "peerDependencies": {
24
24
  "react": ">=16.8.0",
@@ -40,13 +40,13 @@
40
40
  "vitest": "0.31.1"
41
41
  },
42
42
  "optionalDependencies": {
43
- "@remotion/compositor-darwin-x64": "4.0.73",
44
- "@remotion/compositor-darwin-arm64": "4.0.73",
45
- "@remotion/compositor-linux-arm64-gnu": "4.0.73",
46
- "@remotion/compositor-linux-x64-gnu": "4.0.73",
47
- "@remotion/compositor-linux-arm64-musl": "4.0.73",
48
- "@remotion/compositor-linux-x64-musl": "4.0.73",
49
- "@remotion/compositor-win32-x64-msvc": "4.0.73"
43
+ "@remotion/compositor-darwin-x64": "4.0.75",
44
+ "@remotion/compositor-linux-arm64-gnu": "4.0.75",
45
+ "@remotion/compositor-darwin-arm64": "4.0.75",
46
+ "@remotion/compositor-linux-x64-gnu": "4.0.75",
47
+ "@remotion/compositor-linux-arm64-musl": "4.0.75",
48
+ "@remotion/compositor-linux-x64-musl": "4.0.75",
49
+ "@remotion/compositor-win32-x64-msvc": "4.0.75"
50
50
  },
51
51
  "keywords": [
52
52
  "remotion",