@remotion/renderer 4.0.124 → 4.0.125

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.
Files changed (42) hide show
  1. package/dist/call-ffmpeg.d.ts +1 -0
  2. package/dist/can-concatenate-seamlessly.d.ts +3 -0
  3. package/dist/can-concatenate-seamlessly.js +7 -0
  4. package/dist/check-apple-silicon.d.ts +3 -1
  5. package/dist/check-apple-silicon.js +32 -2
  6. package/dist/client.d.ts +70 -70
  7. package/dist/create-combined-video.d.ts +2 -3
  8. package/dist/create-combined-video.js +1 -7
  9. package/dist/get-compositions.js +1 -0
  10. package/dist/get-extension-from-audio-codec.d.ts +2 -2
  11. package/dist/get-extension-from-codec.d.ts +2 -2
  12. package/dist/index.d.ts +45 -42
  13. package/dist/options/audio-codec.d.ts +5 -5
  14. package/dist/options/index.d.ts +8 -8
  15. package/dist/options/options-map.d.ts +8 -8
  16. package/dist/options/separate-audio-to.d.ts +18 -0
  17. package/dist/options/separate-audio-to.js +31 -0
  18. package/dist/options/video-codec.d.ts +1 -1
  19. package/dist/port-config.d.ts +2 -6
  20. package/dist/port-config.js +7 -4
  21. package/dist/prepare-server.d.ts +2 -1
  22. package/dist/prepare-server.js +3 -1
  23. package/dist/pure.d.ts +3 -3
  24. package/dist/render-frames.js +1 -0
  25. package/dist/render-media.js +1 -0
  26. package/dist/render-still.js +1 -0
  27. package/dist/select-composition.js +1 -0
  28. package/dist/serve-static.d.ts +1 -0
  29. package/dist/serve-static.js +1 -1
  30. package/dist/should-seamless.d.ts +3 -0
  31. package/dist/should-seamless.js +7 -0
  32. package/dist/supported-audio-codecs.d.ts +13 -0
  33. package/dist/supported-audio-codecs.js +16 -0
  34. package/dist/take-frame-and-compose.d.ts +0 -1
  35. package/dist/validate-output-filename.d.ts +1 -1
  36. package/dist/x264-preset.d.ts +0 -15
  37. package/dist/x264-preset.js +1 -26
  38. package/package.json +9 -9
  39. package/dist/does-have-m2-bug.d.ts +0 -3
  40. package/dist/does-have-m2-bug.js +0 -12
  41. package/dist/options/prores-profile.d.ts +0 -0
  42. package/dist/options/prores-profile.js +0 -1
package/dist/index.d.ts CHANGED
@@ -59,6 +59,7 @@ export declare const RenderInternals: {
59
59
  indent: boolean;
60
60
  offthreadVideoCacheSizeInBytes: number | null;
61
61
  binariesDirectory: string | null;
62
+ forceIPv4: boolean;
62
63
  }) => Promise<{
63
64
  port: number;
64
65
  close: () => Promise<void>;
@@ -68,10 +69,10 @@ export declare const RenderInternals: {
68
69
  width: number;
69
70
  height: number;
70
71
  scale: number;
71
- codec: "h264" | "h265" | "vp8" | "vp9" | "mp3" | "aac" | "wav" | "prores" | "h264-mkv" | "h264-ts" | "gif";
72
+ codec: "aac" | "mp3" | "h264" | "h265" | "vp8" | "vp9" | "wav" | "prores" | "h264-mkv" | "h264-ts" | "gif";
72
73
  wantsImageSequence: boolean;
73
74
  }) => void;
74
- getFileExtensionFromCodec: <T extends "h264" | "h265" | "vp8" | "vp9" | "mp3" | "aac" | "wav" | "prores" | "h264-mkv" | "h264-ts" | "gif">(codec: T, audioCodec: "mp3" | "aac" | "pcm-16" | "opus" | null) => import("./file-extensions").FileExtension;
75
+ getFileExtensionFromCodec: <T extends "aac" | "mp3" | "h264" | "h265" | "vp8" | "vp9" | "wav" | "prores" | "h264-mkv" | "h264-ts" | "gif">(codec: T, audioCodec: "pcm-16" | "aac" | "mp3" | "opus" | null) => import("./file-extensions").FileExtension;
75
76
  tmpDir: (str: string) => string;
76
77
  deleteDirectory: (directory: string) => void;
77
78
  isServeUrl: (potentialUrl: string) => boolean;
@@ -128,7 +129,7 @@ export declare const RenderInternals: {
128
129
  };
129
130
  registerErrorSymbolicationLock: () => number;
130
131
  unlockErrorSymbolicationLock: (id: number) => void;
131
- canUseParallelEncoding: (codec: "h264" | "h265" | "vp8" | "vp9" | "mp3" | "aac" | "wav" | "prores" | "h264-mkv" | "h264-ts" | "gif") => boolean;
132
+ canUseParallelEncoding: (codec: "aac" | "mp3" | "h264" | "h265" | "vp8" | "vp9" | "wav" | "prores" | "h264-mkv" | "h264-ts" | "gif") => boolean;
132
133
  mimeContentType: typeof mimeContentType;
133
134
  mimeLookup: typeof mimeLookup;
134
135
  validateConcurrency: ({ setting, value, checkIfValidForCurrentMachine, }: {
@@ -145,8 +146,8 @@ export declare const RenderInternals: {
145
146
  DEFAULT_PIXEL_FORMAT: "yuv420p" | "yuva420p" | "yuv422p" | "yuv444p" | "yuv420p10le" | "yuv422p10le" | "yuv444p10le" | "yuva444p10le";
146
147
  validateJpegQuality: (q: unknown) => void;
147
148
  DEFAULT_TIMEOUT: number;
148
- DEFAULT_CODEC: "h264" | "h265" | "vp8" | "vp9" | "mp3" | "aac" | "wav" | "prores" | "h264-mkv" | "h264-ts" | "gif";
149
- isAudioCodec: (codec: "h264" | "h265" | "vp8" | "vp9" | "mp3" | "aac" | "wav" | "prores" | "h264-mkv" | "h264-ts" | "gif" | null | undefined) => boolean;
149
+ DEFAULT_CODEC: "aac" | "mp3" | "h264" | "h265" | "vp8" | "vp9" | "wav" | "prores" | "h264-mkv" | "h264-ts" | "gif";
150
+ isAudioCodec: (codec: "aac" | "mp3" | "h264" | "h265" | "vp8" | "vp9" | "wav" | "prores" | "h264-mkv" | "h264-ts" | "gif" | null | undefined) => boolean;
150
151
  logLevels: readonly ["verbose", "info", "warn", "error"];
151
152
  isEqualOrBelowLogLevel: (currentLevel: "verbose" | "info" | "warn" | "error", level: "verbose" | "info" | "warn" | "error") => boolean;
152
153
  isValidLogLevel: (level: string) => boolean;
@@ -163,10 +164,10 @@ export declare const RenderInternals: {
163
164
  output: string;
164
165
  onProgress: (p: number) => void;
165
166
  numberOfFrames: number;
166
- codec: "h264" | "h265" | "vp8" | "vp9" | "mp3" | "aac" | "wav" | "prores" | "h264-mkv" | "h264-ts" | "gif";
167
+ codec: "aac" | "mp3" | "h264" | "h265" | "vp8" | "vp9" | "wav" | "prores" | "h264-mkv" | "h264-ts" | "gif";
167
168
  fps: number;
168
169
  numberOfGifLoops: number | null;
169
- resolvedAudioCodec: "mp3" | "aac" | "pcm-16" | "opus" | null;
170
+ resolvedAudioCodec: "pcm-16" | "aac" | "mp3" | "opus" | null;
170
171
  audioBitrate: string | null;
171
172
  indent: boolean;
172
173
  logLevel: "verbose" | "info" | "warn" | "error";
@@ -179,14 +180,14 @@ export declare const RenderInternals: {
179
180
  getMinConcurrency: () => number;
180
181
  getMaxConcurrency: () => number;
181
182
  getDefaultAudioCodec: ({ codec, preferLossless, }: {
182
- codec: "h264" | "h265" | "vp8" | "vp9" | "mp3" | "aac" | "wav" | "prores" | "h264-mkv" | "h264-ts" | "gif";
183
+ codec: "aac" | "mp3" | "h264" | "h265" | "vp8" | "vp9" | "wav" | "prores" | "h264-mkv" | "h264-ts" | "gif";
183
184
  preferLossless: boolean;
184
- }) => "mp3" | "aac" | "pcm-16" | "opus" | null;
185
+ }) => "pcm-16" | "aac" | "mp3" | "opus" | null;
185
186
  defaultFileExtensionMap: {
186
- h264: {
187
+ aac: {
187
188
  default: import("./file-extensions").FileExtension;
188
189
  forAudioCodec: {
189
- mp3: {
190
+ "pcm-16": {
190
191
  possible: import("./file-extensions").FileExtension[];
191
192
  default: import("./file-extensions").FileExtension;
192
193
  };
@@ -194,72 +195,72 @@ export declare const RenderInternals: {
194
195
  possible: import("./file-extensions").FileExtension[];
195
196
  default: import("./file-extensions").FileExtension;
196
197
  };
197
- "pcm-16": {
198
- possible: import("./file-extensions").FileExtension[];
199
- default: import("./file-extensions").FileExtension;
200
- };
201
198
  };
202
199
  };
203
- h265: {
200
+ mp3: {
204
201
  default: import("./file-extensions").FileExtension;
205
202
  forAudioCodec: {
206
- aac: {
203
+ "pcm-16": {
207
204
  possible: import("./file-extensions").FileExtension[];
208
205
  default: import("./file-extensions").FileExtension;
209
206
  };
210
- "pcm-16": {
207
+ mp3: {
211
208
  possible: import("./file-extensions").FileExtension[];
212
209
  default: import("./file-extensions").FileExtension;
213
210
  };
214
211
  };
215
212
  };
216
- vp8: {
213
+ h264: {
217
214
  default: import("./file-extensions").FileExtension;
218
215
  forAudioCodec: {
219
216
  "pcm-16": {
220
217
  possible: import("./file-extensions").FileExtension[];
221
218
  default: import("./file-extensions").FileExtension;
222
219
  };
223
- opus: {
220
+ aac: {
221
+ possible: import("./file-extensions").FileExtension[];
222
+ default: import("./file-extensions").FileExtension;
223
+ };
224
+ mp3: {
224
225
  possible: import("./file-extensions").FileExtension[];
225
226
  default: import("./file-extensions").FileExtension;
226
227
  };
227
228
  };
228
229
  };
229
- vp9: {
230
+ h265: {
230
231
  default: import("./file-extensions").FileExtension;
231
232
  forAudioCodec: {
232
233
  "pcm-16": {
233
234
  possible: import("./file-extensions").FileExtension[];
234
235
  default: import("./file-extensions").FileExtension;
235
236
  };
236
- opus: {
237
+ aac: {
237
238
  possible: import("./file-extensions").FileExtension[];
238
239
  default: import("./file-extensions").FileExtension;
239
240
  };
240
241
  };
241
242
  };
242
- mp3: {
243
+ vp8: {
243
244
  default: import("./file-extensions").FileExtension;
244
245
  forAudioCodec: {
245
- mp3: {
246
+ "pcm-16": {
246
247
  possible: import("./file-extensions").FileExtension[];
247
248
  default: import("./file-extensions").FileExtension;
248
249
  };
249
- "pcm-16": {
250
+ opus: {
250
251
  possible: import("./file-extensions").FileExtension[];
251
252
  default: import("./file-extensions").FileExtension;
252
253
  };
253
254
  };
254
255
  };
255
- aac: {
256
+ vp9: {
256
257
  default: import("./file-extensions").FileExtension;
257
258
  forAudioCodec: {
258
- aac: {
259
+ "pcm-16": {
259
260
  possible: import("./file-extensions").FileExtension[];
260
261
  default: import("./file-extensions").FileExtension;
261
262
  };
262
- "pcm-16": {
263
+ opus: {
263
264
  possible: import("./file-extensions").FileExtension[];
264
265
  default: import("./file-extensions").FileExtension;
265
266
  };
@@ -277,11 +278,11 @@ export declare const RenderInternals: {
277
278
  prores: {
278
279
  default: import("./file-extensions").FileExtension;
279
280
  forAudioCodec: {
280
- aac: {
281
+ "pcm-16": {
281
282
  possible: import("./file-extensions").FileExtension[];
282
283
  default: import("./file-extensions").FileExtension;
283
284
  };
284
- "pcm-16": {
285
+ aac: {
285
286
  possible: import("./file-extensions").FileExtension[];
286
287
  default: import("./file-extensions").FileExtension;
287
288
  };
@@ -290,11 +291,11 @@ export declare const RenderInternals: {
290
291
  "h264-mkv": {
291
292
  default: import("./file-extensions").FileExtension;
292
293
  forAudioCodec: {
293
- mp3: {
294
+ "pcm-16": {
294
295
  possible: import("./file-extensions").FileExtension[];
295
296
  default: import("./file-extensions").FileExtension;
296
297
  };
297
- "pcm-16": {
298
+ mp3: {
298
299
  possible: import("./file-extensions").FileExtension[];
299
300
  default: import("./file-extensions").FileExtension;
300
301
  };
@@ -303,11 +304,11 @@ export declare const RenderInternals: {
303
304
  "h264-ts": {
304
305
  default: import("./file-extensions").FileExtension;
305
306
  forAudioCodec: {
306
- aac: {
307
+ "pcm-16": {
307
308
  possible: import("./file-extensions").FileExtension[];
308
309
  default: import("./file-extensions").FileExtension;
309
310
  };
310
- "pcm-16": {
311
+ aac: {
311
312
  possible: import("./file-extensions").FileExtension[];
312
313
  default: import("./file-extensions").FileExtension;
313
314
  };
@@ -331,8 +332,8 @@ export declare const RenderInternals: {
331
332
  readonly vp9: readonly ["opus", "pcm-16"];
332
333
  readonly wav: readonly ["pcm-16"];
333
334
  };
334
- makeFileExtensionMap: () => Record<string, ("h264" | "h265" | "vp8" | "vp9" | "mp3" | "aac" | "wav" | "prores" | "h264-mkv" | "h264-ts" | "gif")[]>;
335
- defaultCodecsForFileExtension: Record<import("./file-extensions").FileExtension, "h264" | "h265" | "vp8" | "vp9" | "mp3" | "aac" | "wav" | "prores" | "h264-mkv" | "h264-ts" | "gif">;
335
+ makeFileExtensionMap: () => Record<string, ("aac" | "mp3" | "h264" | "h265" | "vp8" | "vp9" | "wav" | "prores" | "h264-mkv" | "h264-ts" | "gif")[]>;
336
+ defaultCodecsForFileExtension: Record<import("./file-extensions").FileExtension, "aac" | "mp3" | "h264" | "h265" | "vp8" | "vp9" | "wav" | "prores" | "h264-mkv" | "h264-ts" | "gif">;
336
337
  getExecutablePath: ({ indent, logLevel, type, binariesDirectory, }: {
337
338
  type: "ffmpeg" | "ffprobe" | "compositor";
338
339
  indent: boolean;
@@ -416,7 +417,7 @@ export declare const RenderInternals: {
416
417
  INDENT_TOKEN: string;
417
418
  isColorSupported: () => boolean;
418
419
  HeadlessBrowser: typeof HeadlessBrowser;
419
- prepareServer: ({ webpackConfigOrServeUrl, port, remotionRoot, concurrency, logLevel, indent, offthreadVideoCacheSizeInBytes, binariesDirectory, }: {
420
+ prepareServer: ({ webpackConfigOrServeUrl, port, remotionRoot, concurrency, logLevel, indent, offthreadVideoCacheSizeInBytes, binariesDirectory, forceIPv4, }: {
420
421
  webpackConfigOrServeUrl: string;
421
422
  port: number | null;
422
423
  remotionRoot: string;
@@ -425,6 +426,7 @@ export declare const RenderInternals: {
425
426
  indent: boolean;
426
427
  offthreadVideoCacheSizeInBytes: number | null;
427
428
  binariesDirectory: string | null;
429
+ forceIPv4: boolean;
428
430
  }) => Promise<import("./prepare-server").RemotionServer>;
429
431
  makeOrReuseServer: (server: import("./prepare-server").RemotionServer | undefined, config: {
430
432
  webpackConfigOrServeUrl: string;
@@ -435,6 +437,7 @@ export declare const RenderInternals: {
435
437
  indent: boolean;
436
438
  offthreadVideoCacheSizeInBytes: number | null;
437
439
  binariesDirectory: string | null;
440
+ forceIPv4: boolean;
438
441
  }, { onDownload, onError, }: {
439
442
  onError: (err: Error) => void;
440
443
  onDownload: import("./assets/download-and-map-assets-to-file").RenderMediaOnDownload | null;
@@ -729,17 +732,17 @@ export declare const RenderInternals: {
729
732
  feature: string;
730
733
  status: string;
731
734
  }[]>;
732
- getPortConfig: () => {
735
+ getPortConfig: (preferIpv4: boolean) => {
733
736
  host: string;
734
737
  hostsToTry: string[];
735
738
  };
736
739
  makeDownloadMap: () => import("./assets/download-map").DownloadMap;
737
- getExtensionFromAudioCodec: (audioCodec: "mp3" | "aac" | "pcm-16" | "opus") => "mp3" | "aac" | "wav" | "opus";
740
+ getExtensionFromAudioCodec: (audioCodec: "pcm-16" | "aac" | "mp3" | "opus") => "aac" | "mp3" | "opus" | "wav";
738
741
  makeFileExecutableIfItIsNot: (path: string) => void;
739
742
  resolveAudioCodec: ({ codec, setting, preferLossless, separateAudioTo, }: {
740
- setting: "mp3" | "aac" | "pcm-16" | "opus" | null;
741
- codec: "h264" | "h265" | "vp8" | "vp9" | "mp3" | "aac" | "wav" | "prores" | "h264-mkv" | "h264-ts" | "gif";
743
+ setting: "pcm-16" | "aac" | "mp3" | "opus" | null;
744
+ codec: "aac" | "mp3" | "h264" | "h265" | "vp8" | "vp9" | "wav" | "prores" | "h264-mkv" | "h264-ts" | "gif";
742
745
  preferLossless: boolean;
743
746
  separateAudioTo: string | null;
744
- }) => "mp3" | "aac" | "pcm-16" | "opus" | null;
747
+ }) => "pcm-16" | "aac" | "mp3" | "opus" | null;
745
748
  };
@@ -23,25 +23,25 @@ export declare const defaultAudioCodecs: {
23
23
  [k in 'compressed' | 'lossless']: (typeof supportedAudioCodecs)[key][number] | null;
24
24
  };
25
25
  };
26
- export declare const getExtensionFromAudioCodec: (audioCodec: AudioCodec) => "mp3" | "aac" | "wav" | "opus";
26
+ export declare const getExtensionFromAudioCodec: (audioCodec: AudioCodec) => "aac" | "mp3" | "opus" | "wav";
27
27
  export declare const resolveAudioCodec: ({ codec, setting, preferLossless, separateAudioTo, }: {
28
28
  setting: AudioCodec | null;
29
29
  codec: Codec;
30
30
  preferLossless: boolean;
31
31
  separateAudioTo: string | null;
32
- }) => "mp3" | "aac" | "pcm-16" | "opus" | null;
32
+ }) => "pcm-16" | "aac" | "mp3" | "opus" | null;
33
33
  export declare const getDefaultAudioCodec: ({ codec, preferLossless, }: {
34
34
  codec: Codec;
35
35
  preferLossless: boolean;
36
36
  }) => AudioCodec | null;
37
37
  export declare const audioCodecOption: {
38
38
  cliFlag: "audio-codec";
39
- setConfig: (audioCodec: "mp3" | "aac" | "pcm-16" | "opus" | null) => void;
39
+ setConfig: (audioCodec: "pcm-16" | "aac" | "mp3" | "opus" | null) => void;
40
40
  getValue: ({ commandLine }: {
41
41
  commandLine: Record<string, unknown>;
42
42
  }) => {
43
43
  source: string;
44
- value: "mp3" | "aac" | "pcm-16" | "opus";
44
+ value: "pcm-16" | "aac" | "mp3" | "opus";
45
45
  } | {
46
46
  source: string;
47
47
  value: null;
@@ -50,6 +50,6 @@ export declare const audioCodecOption: {
50
50
  docLink: string;
51
51
  name: string;
52
52
  ssrName: "audioCodec";
53
- type: "mp3" | "aac" | "pcm-16" | "opus";
53
+ type: "pcm-16" | "aac" | "mp3" | "opus";
54
54
  };
55
55
  export {};
@@ -2,12 +2,12 @@ import type { AnyRemotionOption } from './option';
2
2
  export declare const allOptions: {
3
3
  audioCodecOption: {
4
4
  cliFlag: "audio-codec";
5
- setConfig: (audioCodec: "mp3" | "aac" | "pcm-16" | "opus" | null) => void;
5
+ setConfig: (audioCodec: "pcm-16" | "aac" | "mp3" | "opus" | null) => void;
6
6
  getValue: ({ commandLine }: {
7
7
  commandLine: Record<string, unknown>;
8
8
  }) => {
9
9
  source: string;
10
- value: "mp3" | "aac" | "pcm-16" | "opus";
10
+ value: "pcm-16" | "aac" | "mp3" | "opus";
11
11
  } | {
12
12
  source: string;
13
13
  value: null;
@@ -16,7 +16,7 @@ export declare const allOptions: {
16
16
  docLink: string;
17
17
  name: string;
18
18
  ssrName: "audioCodec";
19
- type: "mp3" | "aac" | "pcm-16" | "opus";
19
+ type: "pcm-16" | "aac" | "mp3" | "opus";
20
20
  };
21
21
  scaleOption: {
22
22
  name: string;
@@ -135,17 +135,17 @@ export declare const allOptions: {
135
135
  description: () => import("react/jsx-runtime").JSX.Element;
136
136
  ssrName: string;
137
137
  docLink: string;
138
- type: "h264" | "h265" | "vp8" | "vp9" | "mp3" | "aac" | "wav" | "prores" | "h264-mkv" | "h264-ts" | "gif";
138
+ type: "aac" | "mp3" | "h264" | "h265" | "vp8" | "vp9" | "wav" | "prores" | "h264-mkv" | "h264-ts" | "gif";
139
139
  getValue: ({ commandLine }: {
140
140
  commandLine: Record<string, unknown>;
141
141
  }, { compositionCodec, configFile, downloadName, outName, uiCodec, }: {
142
142
  outName: string | null;
143
143
  downloadName: string | null;
144
- configFile: "h264" | "h265" | "vp8" | "vp9" | "mp3" | "aac" | "wav" | "prores" | "h264-mkv" | "h264-ts" | "gif" | null;
145
- uiCodec: "h264" | "h265" | "vp8" | "vp9" | "mp3" | "aac" | "wav" | "prores" | "h264-mkv" | "h264-ts" | "gif" | null;
146
- compositionCodec: "h264" | "h265" | "vp8" | "vp9" | "mp3" | "aac" | "wav" | "prores" | "h264-mkv" | "h264-ts" | "gif" | null;
144
+ configFile: "aac" | "mp3" | "h264" | "h265" | "vp8" | "vp9" | "wav" | "prores" | "h264-mkv" | "h264-ts" | "gif" | null;
145
+ uiCodec: "aac" | "mp3" | "h264" | "h265" | "vp8" | "vp9" | "wav" | "prores" | "h264-mkv" | "h264-ts" | "gif" | null;
146
+ compositionCodec: "aac" | "mp3" | "h264" | "h265" | "vp8" | "vp9" | "wav" | "prores" | "h264-mkv" | "h264-ts" | "gif" | null;
147
147
  }) => {
148
- value: "h264" | "h265" | "vp8" | "vp9" | "mp3" | "aac" | "wav" | "prores" | "h264-mkv" | "h264-ts" | "gif";
148
+ value: "aac" | "mp3" | "h264" | "h265" | "vp8" | "vp9" | "wav" | "prores" | "h264-mkv" | "h264-ts" | "gif";
149
149
  source: string;
150
150
  };
151
151
  setConfig: (newCodec: import("..").CodecOrUndefined) => void;
@@ -123,17 +123,17 @@ export declare const optionsMap: {
123
123
  description: () => import("react/jsx-runtime").JSX.Element;
124
124
  ssrName: string;
125
125
  docLink: string;
126
- type: "h264" | "h265" | "vp8" | "vp9" | "mp3" | "aac" | "wav" | "prores" | "h264-mkv" | "h264-ts" | "gif";
126
+ type: "aac" | "mp3" | "h264" | "h265" | "vp8" | "vp9" | "wav" | "prores" | "h264-mkv" | "h264-ts" | "gif";
127
127
  getValue: ({ commandLine }: {
128
128
  commandLine: Record<string, unknown>;
129
129
  }, { compositionCodec, configFile, downloadName, outName, uiCodec, }: {
130
130
  outName: string | null;
131
131
  downloadName: string | null;
132
- configFile: "h264" | "h265" | "vp8" | "vp9" | "mp3" | "aac" | "wav" | "prores" | "h264-mkv" | "h264-ts" | "gif" | null;
133
- uiCodec: "h264" | "h265" | "vp8" | "vp9" | "mp3" | "aac" | "wav" | "prores" | "h264-mkv" | "h264-ts" | "gif" | null;
134
- compositionCodec: "h264" | "h265" | "vp8" | "vp9" | "mp3" | "aac" | "wav" | "prores" | "h264-mkv" | "h264-ts" | "gif" | null;
132
+ configFile: "aac" | "mp3" | "h264" | "h265" | "vp8" | "vp9" | "wav" | "prores" | "h264-mkv" | "h264-ts" | "gif" | null;
133
+ uiCodec: "aac" | "mp3" | "h264" | "h265" | "vp8" | "vp9" | "wav" | "prores" | "h264-mkv" | "h264-ts" | "gif" | null;
134
+ compositionCodec: "aac" | "mp3" | "h264" | "h265" | "vp8" | "vp9" | "wav" | "prores" | "h264-mkv" | "h264-ts" | "gif" | null;
135
135
  }) => {
136
- value: "h264" | "h265" | "vp8" | "vp9" | "mp3" | "aac" | "wav" | "prores" | "h264-mkv" | "h264-ts" | "gif";
136
+ value: "aac" | "mp3" | "h264" | "h265" | "vp8" | "vp9" | "wav" | "prores" | "h264-mkv" | "h264-ts" | "gif";
137
137
  source: string;
138
138
  };
139
139
  setConfig: (newCodec: import("..").CodecOrUndefined) => void;
@@ -287,12 +287,12 @@ export declare const optionsMap: {
287
287
  };
288
288
  readonly audioCodec: {
289
289
  cliFlag: "audio-codec";
290
- setConfig: (audioCodec: "mp3" | "aac" | "pcm-16" | "opus" | null) => void;
290
+ setConfig: (audioCodec: "pcm-16" | "aac" | "mp3" | "opus" | null) => void;
291
291
  getValue: ({ commandLine }: {
292
292
  commandLine: Record<string, unknown>;
293
293
  }) => {
294
294
  source: string;
295
- value: "mp3" | "aac" | "pcm-16" | "opus";
295
+ value: "pcm-16" | "aac" | "mp3" | "opus";
296
296
  } | {
297
297
  source: string;
298
298
  value: null;
@@ -301,7 +301,7 @@ export declare const optionsMap: {
301
301
  docLink: string;
302
302
  name: string;
303
303
  ssrName: "audioCodec";
304
- type: "mp3" | "aac" | "pcm-16" | "opus";
304
+ type: "pcm-16" | "aac" | "mp3" | "opus";
305
305
  };
306
306
  };
307
307
  readonly stitchFramesToVideo: {
@@ -0,0 +1,18 @@
1
+ export declare const separateAudioOption: {
2
+ cliFlag: string;
3
+ description: () => import("react/jsx-runtime").JSX.Element;
4
+ docLink: string;
5
+ getValue: ({ commandLine }: {
6
+ commandLine: Record<string, unknown>;
7
+ }) => {
8
+ source: string;
9
+ value: string;
10
+ } | {
11
+ source: string;
12
+ value: null;
13
+ };
14
+ name: string;
15
+ setConfig: () => never;
16
+ ssrName: string;
17
+ type: string | null;
18
+ };
@@ -0,0 +1,31 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.separateAudioOption = void 0;
4
+ const jsx_runtime_1 = require("react/jsx-runtime");
5
+ const DEFAULT = null;
6
+ const cliFlag = 'separate-audio-to';
7
+ exports.separateAudioOption = {
8
+ cliFlag,
9
+ description: () => {
10
+ return ((0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: "If set, the audio will not be included in the main output but rendered as a separate file at the location you pass. It is recommended to use an absolute path. If a relative path is passed, it is relative to the Remotion Root." }));
11
+ },
12
+ docLink: 'https://remotion.dev/docs/renderer/render-media',
13
+ getValue: ({ commandLine }) => {
14
+ if (commandLine[cliFlag]) {
15
+ return {
16
+ source: 'cli',
17
+ value: commandLine[cliFlag],
18
+ };
19
+ }
20
+ return {
21
+ source: 'default',
22
+ value: DEFAULT,
23
+ };
24
+ },
25
+ name: 'Separate audio to',
26
+ setConfig: () => {
27
+ throw new Error('Not implemented');
28
+ },
29
+ ssrName: 'separateAudioTo',
30
+ type: 'string',
31
+ };
@@ -6,7 +6,7 @@ export declare const videoCodecOption: {
6
6
  description: () => import("react/jsx-runtime").JSX.Element;
7
7
  ssrName: string;
8
8
  docLink: string;
9
- type: "h264" | "h265" | "vp8" | "vp9" | "mp3" | "aac" | "wav" | "prores" | "h264-mkv" | "h264-ts" | "gif";
9
+ type: "aac" | "mp3" | "h264" | "h265" | "vp8" | "vp9" | "wav" | "prores" | "h264-mkv" | "h264-ts" | "gif";
10
10
  getValue: ({ commandLine }: {
11
11
  commandLine: Record<string, unknown>;
12
12
  }, { compositionCodec, configFile, downloadName, outName, uiCodec, }: {
@@ -1,15 +1,11 @@
1
- /// <reference types="node" />
2
- /// <reference types="node" />
3
- /// <reference types="node" />
4
- /// <reference types="node" />
5
1
  import type { NetworkInterfaceInfo } from 'os';
6
2
  import os from 'os';
7
3
  type PortConfig = {
8
4
  host: string;
9
5
  hostsToTry: string[];
10
6
  };
11
- export declare const getPortConfig: () => PortConfig;
12
- export declare const getHostToBind: (flattened: os.NetworkInterfaceInfo[]) => "::" | "0.0.0.0";
7
+ export declare const getPortConfig: (preferIpv4: boolean) => PortConfig;
8
+ export declare const getHostToBind: (flattened: os.NetworkInterfaceInfo[], preferIpv4: boolean) => "0.0.0.0" | "::";
13
9
  export declare const getHostsToTry: (flattened: os.NetworkInterfaceInfo[]) => string[];
14
10
  export declare const flattenNetworkInterfaces: (networkInterfaces: NodeJS.Dict<NetworkInterfaceInfo[]>) => NetworkInterfaceInfo[];
15
11
  export declare const isIpV6Supported: (flattened: os.NetworkInterfaceInfo[]) => boolean;
@@ -7,21 +7,24 @@ exports.hasIpv4LoopbackAddress = exports.hasIPv6LoopbackAddress = exports.isIpV6
7
7
  const os_1 = __importDefault(require("os"));
8
8
  const truthy_1 = require("./truthy");
9
9
  let cached = null;
10
- const getPortConfig = () => {
10
+ const getPortConfig = (preferIpv4) => {
11
11
  if (cached) {
12
12
  return cached;
13
13
  }
14
14
  const networkInterfaces = os_1.default.networkInterfaces();
15
15
  const flattened = (0, exports.flattenNetworkInterfaces)(networkInterfaces);
16
- const host = (0, exports.getHostToBind)(flattened);
16
+ const host = (0, exports.getHostToBind)(flattened, preferIpv4);
17
17
  const hostsToTry = (0, exports.getHostsToTry)(flattened);
18
18
  const response = { host, hostsToTry };
19
19
  cached = response;
20
20
  return response;
21
21
  };
22
22
  exports.getPortConfig = getPortConfig;
23
- const getHostToBind = (flattened) => {
24
- return (0, exports.isIpV6Supported)(flattened) ? '::' : '0.0.0.0';
23
+ const getHostToBind = (flattened, preferIpv4) => {
24
+ if (preferIpv4 || !(0, exports.isIpV6Supported)(flattened)) {
25
+ return '0.0.0.0';
26
+ }
27
+ return '::';
25
28
  };
26
29
  exports.getHostToBind = getHostToBind;
27
30
  const getHostsToTry = (flattened) => {
@@ -20,8 +20,9 @@ type PrepareServerOptions = {
20
20
  indent: boolean;
21
21
  offthreadVideoCacheSizeInBytes: number | null;
22
22
  binariesDirectory: string | null;
23
+ forceIPv4: boolean;
23
24
  };
24
- export declare const prepareServer: ({ webpackConfigOrServeUrl, port, remotionRoot, concurrency, logLevel, indent, offthreadVideoCacheSizeInBytes, binariesDirectory, }: PrepareServerOptions) => Promise<RemotionServer>;
25
+ export declare const prepareServer: ({ webpackConfigOrServeUrl, port, remotionRoot, concurrency, logLevel, indent, offthreadVideoCacheSizeInBytes, binariesDirectory, forceIPv4, }: PrepareServerOptions) => Promise<RemotionServer>;
25
26
  export declare const makeOrReuseServer: (server: RemotionServer | undefined, config: PrepareServerOptions, { onDownload, onError, }: {
26
27
  onError: (err: Error) => void;
27
28
  onDownload: RenderMediaOnDownload | null;
@@ -15,7 +15,7 @@ const logger_1 = require("./logger");
15
15
  const serve_static_1 = require("./serve-static");
16
16
  const symbolicate_stacktrace_1 = require("./symbolicate-stacktrace");
17
17
  const wait_for_symbolication_error_to_be_done_1 = require("./wait-for-symbolication-error-to-be-done");
18
- const prepareServer = async ({ webpackConfigOrServeUrl, port, remotionRoot, concurrency, logLevel, indent, offthreadVideoCacheSizeInBytes, binariesDirectory, }) => {
18
+ const prepareServer = async ({ webpackConfigOrServeUrl, port, remotionRoot, concurrency, logLevel, indent, offthreadVideoCacheSizeInBytes, binariesDirectory, forceIPv4, }) => {
19
19
  const downloadMap = (0, download_map_1.makeDownloadMap)();
20
20
  logger_1.Log.verbose({ indent, logLevel }, 'Created directory for temporary files', downloadMap.assetDir);
21
21
  if ((0, is_serve_url_1.isServeUrl)(webpackConfigOrServeUrl)) {
@@ -28,6 +28,7 @@ const prepareServer = async ({ webpackConfigOrServeUrl, port, remotionRoot, conc
28
28
  indent,
29
29
  offthreadVideoCacheSizeInBytes,
30
30
  binariesDirectory,
31
+ forceIPv4,
31
32
  });
32
33
  let remoteSourceMap = null;
33
34
  (0, symbolicate_stacktrace_1.getSourceMapFromRemoteUrl)((0, get_bundle_url_from_serve_url_1.getBundleMapUrlFromServeUrl)(webpackConfigOrServeUrl))
@@ -74,6 +75,7 @@ const prepareServer = async ({ webpackConfigOrServeUrl, port, remotionRoot, conc
74
75
  indent,
75
76
  offthreadVideoCacheSizeInBytes,
76
77
  binariesDirectory,
78
+ forceIPv4,
77
79
  });
78
80
  return Promise.resolve({
79
81
  closeServer: async (force) => {
package/dist/pure.d.ts CHANGED
@@ -1,10 +1,10 @@
1
1
  export declare const NoReactAPIs: {
2
2
  wrapWithErrorHandling: <A extends unknown[], R>(fn: (...args: A) => Promise<R>) => (...args: A) => Promise<R>;
3
3
  getExtensionOfFilename: (filename: string | null) => string | null;
4
- getFileExtensionFromCodec: <T extends "h264" | "h265" | "vp8" | "vp9" | "mp3" | "aac" | "wav" | "prores" | "h264-mkv" | "h264-ts" | "gif">(codec: T, audioCodec: "mp3" | "aac" | "pcm-16" | "opus" | null) => import("./file-extensions").FileExtension;
5
- validateOutputFilename: <T_1 extends "h264" | "h265" | "vp8" | "vp9" | "mp3" | "aac" | "wav" | "prores" | "h264-mkv" | "h264-ts" | "gif">({ codec, audioCodecSetting, extension, preferLossless, separateAudioTo, }: {
4
+ getFileExtensionFromCodec: <T extends "aac" | "mp3" | "h264" | "h265" | "vp8" | "vp9" | "wav" | "prores" | "h264-mkv" | "h264-ts" | "gif">(codec: T, audioCodec: "pcm-16" | "aac" | "mp3" | "opus" | null) => import("./file-extensions").FileExtension;
5
+ validateOutputFilename: <T_1 extends "aac" | "mp3" | "h264" | "h265" | "vp8" | "vp9" | "wav" | "prores" | "h264-mkv" | "h264-ts" | "gif">({ codec, audioCodecSetting, extension, preferLossless, separateAudioTo, }: {
6
6
  codec: T_1;
7
- audioCodecSetting: "mp3" | "aac" | "pcm-16" | "opus" | null;
7
+ audioCodecSetting: "pcm-16" | "aac" | "mp3" | "opus" | null;
8
8
  extension: string;
9
9
  preferLossless: boolean;
10
10
  separateAudioTo: string | null;
@@ -353,6 +353,7 @@ const internalRenderFramesRaw = ({ browserExecutable, cancelSignal, chromiumOpti
353
353
  indent,
354
354
  offthreadVideoCacheSizeInBytes,
355
355
  binariesDirectory,
356
+ forceIPv4: false,
356
357
  }, {
357
358
  onDownload,
358
359
  onError,
@@ -273,6 +273,7 @@ const internalRenderMediaRaw = ({ proResProfile, x264Preset, crf, composition, s
273
273
  webpackConfigOrServeUrl: serveUrl,
274
274
  offthreadVideoCacheSizeInBytes: offthreadVideoCacheSizeInBytes !== null && offthreadVideoCacheSizeInBytes !== void 0 ? offthreadVideoCacheSizeInBytes : null,
275
275
  binariesDirectory,
276
+ forceIPv4: false,
276
277
  }, {
277
278
  onDownload,
278
279
  onError: (err) => reject(err),
@@ -213,6 +213,7 @@ const internalRenderStillRaw = (options) => {
213
213
  indent: options.indent,
214
214
  offthreadVideoCacheSizeInBytes: options.offthreadVideoCacheSizeInBytes,
215
215
  binariesDirectory: options.binariesDirectory,
216
+ forceIPv4: false,
216
217
  }, {
217
218
  onDownload: options.onDownload,
218
219
  onError,
@@ -120,6 +120,7 @@ const internalSelectCompositionRaw = async (options) => {
120
120
  indent,
121
121
  offthreadVideoCacheSizeInBytes,
122
122
  binariesDirectory,
123
+ forceIPv4: false,
123
124
  }, {
124
125
  onDownload: () => undefined,
125
126
  onError,
@@ -10,6 +10,7 @@ export declare const serveStatic: (path: string | null, options: {
10
10
  indent: boolean;
11
11
  offthreadVideoCacheSizeInBytes: number | null;
12
12
  binariesDirectory: string | null;
13
+ forceIPv4: boolean;
13
14
  }) => Promise<{
14
15
  port: number;
15
16
  close: () => Promise<void>;
@@ -47,7 +47,7 @@ const serveStatic = async (path, options) => {
47
47
  });
48
48
  let selectedPort = null;
49
49
  const maxTries = 5;
50
- const portConfig = (0, port_config_1.getPortConfig)();
50
+ const portConfig = (0, port_config_1.getPortConfig)(options.forceIPv4);
51
51
  for (let i = 0; i < maxTries; i++) {
52
52
  let unlock = () => { };
53
53
  try {
@@ -0,0 +1,3 @@
1
+ import type { AudioCodec } from './audio-codec';
2
+ import type { Codec } from './codec';
3
+ export declare const canConcatSeamlessly: (audioCodec: AudioCodec | null, codec: Codec) => boolean;