@remotion/renderer 4.0.106 → 4.0.107

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.
@@ -37,9 +37,6 @@ const download_file_1 = require("./download-file");
37
37
  const sanitize_filepath_1 = require("./sanitize-filepath");
38
38
  const waitForAssetToBeDownloaded = ({ src, downloadDir, downloadMap, }) => {
39
39
  var _a, _b;
40
- if (process.env.NODE_ENV === 'test') {
41
- console.log('waiting for asset to be downloaded', src);
42
- }
43
40
  if ((_a = downloadMap.hasBeenDownloadedMap[src]) === null || _a === void 0 ? void 0 : _a[downloadDir]) {
44
41
  return Promise.resolve((_b = downloadMap.hasBeenDownloadedMap[src]) === null || _b === void 0 ? void 0 : _b[downloadDir]);
45
42
  }
@@ -142,9 +139,6 @@ const downloadAsset = async ({ src, downloadMap, indent, logLevel, }) => {
142
139
  downloadMap.isDownloadingMap[src] = {};
143
140
  }
144
141
  downloadMap.isDownloadingMap[src][downloadDir] = true;
145
- if (process.env.NODE_ENV === 'test') {
146
- console.log('Actually downloading asset', src);
147
- }
148
142
  downloadMap.emitter.dispatchDownload(src);
149
143
  if (src.startsWith('data:')) {
150
144
  const [assetDetails, assetData] = src.substring('data:'.length).split(',');
@@ -36,6 +36,9 @@ export type DownloadMap = {
36
36
  compositorCache: {
37
37
  [key: string]: string;
38
38
  };
39
+ preventCleanup: () => void;
40
+ allowCleanup: () => void;
41
+ isPreventedFromCleanup: () => boolean;
39
42
  };
40
43
  export type RenderAssetInfo = {
41
44
  assets: TRenderAsset[][];
@@ -45,6 +45,7 @@ const makeDownloadMap = () => {
45
45
  const dir = (0, tmp_dir_1.tmpDir)(packageJson
46
46
  ? `remotion-v${packageJson.version.replace(/\./g, '-')}-assets`
47
47
  : 'remotion-assets');
48
+ let prevented = false;
48
49
  return {
49
50
  isDownloadingMap: {},
50
51
  hasBeenDownloadedMap: {},
@@ -62,10 +63,22 @@ const makeDownloadMap = () => {
62
63
  compositingDir: makeAndReturn(dir, 'remotion-compositing-temp-dir'),
63
64
  compositorCache: {},
64
65
  emitter: new offthread_video_server_1.OffthreadVideoServerEmitter(),
66
+ preventCleanup: () => {
67
+ prevented = true;
68
+ },
69
+ allowCleanup: () => {
70
+ prevented = false;
71
+ },
72
+ isPreventedFromCleanup: () => {
73
+ return prevented;
74
+ },
65
75
  };
66
76
  };
67
77
  exports.makeDownloadMap = makeDownloadMap;
68
78
  const cleanDownloadMap = (downloadMap) => {
79
+ if (downloadMap.isPreventedFromCleanup()) {
80
+ return;
81
+ }
69
82
  (0, delete_directory_1.deleteDirectory)(downloadMap.downloadDir);
70
83
  (0, delete_directory_1.deleteDirectory)(downloadMap.complexFilter);
71
84
  (0, delete_directory_1.deleteDirectory)(downloadMap.compositingDir);
@@ -29,7 +29,6 @@ exports.CDPSession = exports.CDPSessionEmittedEvents = exports.Connection = void
29
29
  * limitations under the License.
30
30
  */
31
31
  const logger_1 = require("../logger");
32
- const assert_1 = require("./assert");
33
32
  const Errors_1 = require("./Errors");
34
33
  const EventEmitter_1 = require("./EventEmitter");
35
34
  const ConnectionEmittedEvents = {
@@ -228,7 +227,6 @@ class CDPSession extends EventEmitter_1.EventEmitter {
228
227
  }
229
228
  }
230
229
  else {
231
- (0, assert_1.assert)(!object.id);
232
230
  this.emit(object.method, object.params);
233
231
  }
234
232
  }
@@ -1,4 +1,5 @@
1
1
  import execa from 'execa';
2
+ import type { SpawnOptionsWithoutStdio } from 'node:child_process';
2
3
  import type { LogLevel } from './log-level';
3
4
  export declare const callFf: ({ args, bin, indent, logLevel, options, }: {
4
5
  bin: 'ffmpeg' | 'ffprobe';
@@ -7,3 +8,10 @@ export declare const callFf: ({ args, bin, indent, logLevel, options, }: {
7
8
  logLevel: LogLevel;
8
9
  options?: execa.Options<string> | undefined;
9
10
  }) => execa.ExecaChildProcess<string>;
11
+ export declare const callFfNative: ({ args, bin, indent, logLevel, options, }: {
12
+ bin: 'ffmpeg' | 'ffprobe';
13
+ args: (string | null)[];
14
+ indent: boolean;
15
+ logLevel: LogLevel;
16
+ options?: SpawnOptionsWithoutStdio | undefined;
17
+ }) => import("child_process").ChildProcessWithoutNullStreams;
@@ -3,8 +3,9 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
3
3
  return (mod && mod.__esModule) ? mod : { "default": mod };
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.callFf = void 0;
6
+ exports.callFfNative = exports.callFf = void 0;
7
7
  const execa_1 = __importDefault(require("execa"));
8
+ const node_child_process_1 = require("node:child_process");
8
9
  const node_fs_1 = require("node:fs");
9
10
  const path_1 = __importDefault(require("path"));
10
11
  const get_executable_path_1 = require("./compositor/get-executable-path");
@@ -20,3 +21,14 @@ const callFf = ({ args, bin, indent, logLevel, options, }) => {
20
21
  });
21
22
  };
22
23
  exports.callFf = callFf;
24
+ const callFfNative = ({ args, bin, indent, logLevel, options, }) => {
25
+ const executablePath = (0, get_executable_path_1.getExecutablePath)(bin, indent, logLevel);
26
+ if (!process.env.READ_ONLY_FS) {
27
+ (0, node_fs_1.chmodSync)(executablePath, 0o755);
28
+ }
29
+ return (0, node_child_process_1.spawn)(executablePath, args.filter(truthy_1.truthy), {
30
+ cwd: path_1.default.dirname(executablePath),
31
+ ...options,
32
+ });
33
+ };
34
+ exports.callFfNative = callFfNative;
@@ -0,0 +1,3 @@
1
+ import type { LogLevel } from './log-level';
2
+ export declare const gLibCErrorMessage: (libCString: string) => string | null;
3
+ export declare const checkNodeVersionAndWarnAboutRosetta: (logLevel: LogLevel, indent: boolean) => void;
@@ -0,0 +1,42 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.checkNodeVersionAndWarnAboutRosetta = exports.gLibCErrorMessage = void 0;
4
+ const logger_1 = require("./logger");
5
+ const gLibCErrorMessage = (libCString) => {
6
+ const split = libCString.split('.');
7
+ if (split.length !== 2) {
8
+ return null;
9
+ }
10
+ if (split[0] === '2' && Number(split[1]) >= 35) {
11
+ return null;
12
+ }
13
+ if (Number(split[0]) > 2) {
14
+ return null;
15
+ }
16
+ return `Rendering videos requires glibc 2.35 or higher. Your system has glibc ${libCString}.`;
17
+ };
18
+ exports.gLibCErrorMessage = gLibCErrorMessage;
19
+ const checkLibCRequirement = (logLevel, indent) => {
20
+ const { report } = process;
21
+ if (report) {
22
+ // @ts-expect-error no types
23
+ const { glibcVersionRuntime } = report.getReport().header;
24
+ if (!glibcVersionRuntime) {
25
+ return;
26
+ }
27
+ const error = (0, exports.gLibCErrorMessage)(glibcVersionRuntime);
28
+ if (error) {
29
+ logger_1.Log.warn({ logLevel, indent }, error);
30
+ }
31
+ }
32
+ };
33
+ const checkNodeVersionAndWarnAboutRosetta = (logLevel, indent) => {
34
+ const version = process.version.replace('v', '').split('.');
35
+ const majorVersion = Number(version[0]);
36
+ const requiredNodeVersion = 16;
37
+ if (majorVersion < 16) {
38
+ throw new Error(`Remotion requires at least Node ${requiredNodeVersion}. You currently have ${process.version}. Update your node version to ${requiredNodeVersion} to use Remotion.`);
39
+ }
40
+ checkLibCRequirement(logLevel, indent);
41
+ };
42
+ exports.checkNodeVersionAndWarnAboutRosetta = checkNodeVersionAndWarnAboutRosetta;
package/dist/client.d.ts CHANGED
@@ -316,7 +316,7 @@ export declare const BrowserSafeApis: {
316
316
  cliFlag: "gl";
317
317
  docLink: string;
318
318
  name: string;
319
- type: "angle" | "swangle" | "egl" | "swiftshader" | "vulkan" | "angle-egl";
319
+ type: "swangle" | "angle" | "egl" | "swiftshader" | "vulkan" | "angle-egl";
320
320
  ssrName: string;
321
321
  description: () => import("react/jsx-runtime").JSX.Element;
322
322
  };
@@ -88,7 +88,10 @@ const callCompositor = (payload, indent, logLevel) => {
88
88
  try {
89
89
  child.stdin.write(payload, (e) => {
90
90
  if (e) {
91
- reject(e);
91
+ if (e instanceof Error && e.message.includes('EPIPE')) {
92
+ reject(new Error('Compositor stdin closed unexpectedly,' +
93
+ Buffer.concat(stderrChunks).toString('utf-8')));
94
+ }
92
95
  return;
93
96
  }
94
97
  child.stdin.end();
@@ -4,6 +4,9 @@ export declare const createFfmpegComplexFilter: ({ filters, downloadMap, }: {
4
4
  filters: PreprocessedAudioTrack[];
5
5
  downloadMap: DownloadMap;
6
6
  }) => Promise<{
7
- complexFilterFlag: [string, string] | null;
7
+ complexFilterFlag: [
8
+ string,
9
+ string
10
+ ] | null;
8
11
  cleanup: () => void;
9
12
  }>;
@@ -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,5 +1,3 @@
1
- /// <reference types="node" />
2
- /// <reference types="node" />
3
1
  import execa from 'execa';
4
2
  import { HeadlessBrowser } from './browser/Browser';
5
3
  import { SymbolicateableError } from './error-handling/symbolicateable-error';
@@ -137,8 +135,8 @@ export declare const RenderInternals: {
137
135
  validPixelFormats: readonly ["yuv420p", "yuva420p", "yuv422p", "yuv444p", "yuv420p10le", "yuv422p10le", "yuv444p10le", "yuva444p10le"];
138
136
  DEFAULT_BROWSER: "chrome";
139
137
  validateFrameRange: (frameRange: import("./frame-range").FrameRange | null) => void;
140
- DEFAULT_OPENGL_RENDERER: "angle" | "swangle" | "egl" | "swiftshader" | "vulkan" | "angle-egl" | null;
141
- 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;
142
140
  validCodecs: readonly ["h264", "h265", "vp8", "vp9", "mp3", "aac", "wav", "prores", "h264-mkv", "gif"];
143
141
  DEFAULT_PIXEL_FORMAT: "yuv420p" | "yuva420p" | "yuv422p" | "yuv444p" | "yuv420p10le" | "yuv422p10le" | "yuv444p10le" | "yuva444p10le";
144
142
  validateJpegQuality: (q: number | undefined) => void;
@@ -6,6 +6,6 @@ export declare const colorSpaceOption: {
6
6
  description: () => import("react/jsx-runtime").JSX.Element;
7
7
  docLink: string;
8
8
  ssrName: string;
9
- type: "bt709" | "bt2020-ncl" | "default";
9
+ type: "default" | "bt709" | "bt2020-ncl";
10
10
  };
11
11
  export declare const validateColorSpace: (option: unknown) => void;
@@ -3,7 +3,7 @@ export declare const glOption: {
3
3
  cliFlag: "gl";
4
4
  docLink: string;
5
5
  name: string;
6
- type: "angle" | "swangle" | "egl" | "swiftshader" | "vulkan" | "angle-egl";
6
+ type: "swangle" | "angle" | "egl" | "swiftshader" | "vulkan" | "angle-egl";
7
7
  ssrName: string;
8
8
  description: () => import("react/jsx-runtime").JSX.Element;
9
9
  };
@@ -115,7 +115,7 @@ export declare const allOptions: {
115
115
  cliFlag: "gl";
116
116
  docLink: string;
117
117
  name: string;
118
- type: "angle" | "swangle" | "egl" | "swiftshader" | "vulkan" | "angle-egl";
118
+ type: "swangle" | "angle" | "egl" | "swiftshader" | "vulkan" | "angle-egl";
119
119
  ssrName: string;
120
120
  description: () => import("react/jsx-runtime").JSX.Element;
121
121
  };
@@ -2,5 +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" | "yuv422p" | "yuv444p" | "yuva420p" | "yuv420p10le" | "yuv422p10le" | "yuv444p10le" | "yuva444p10le")[];
5
+ export declare const validPixelFormatsForCodec: (codec: Codec) => readonly ["yuv420p", "yuva420p", "yuv422p", "yuv444p", "yuv420p10le", "yuv422p10le", "yuv444p10le", "yuva444p10le"] | ("yuv420p" | "yuva420p" | "yuv422p" | "yuv444p" | "yuv420p10le" | "yuv422p10le" | "yuv444p10le" | "yuva444p10le")[];
6
6
  export declare const validateSelectedPixelFormatAndCodecCombination: (pixelFormat: PixelFormat | undefined, codec: Codec) => undefined;
@@ -83,6 +83,8 @@ const prepareServer = async ({ webpackConfigOrServeUrl, port, remotionRoot, conc
83
83
  }
84
84
  return close();
85
85
  },
86
+ // This should be kept localhost, even if the server is bound to ::1,
87
+ // to prevent "Failed to load resource: net::ERR_FAILED Access to image at 'http://localhost:3000/proxy?src=http%3A%2F%2F%5B%3A%3A%5D%3A3000%2Fpublic%2Fframer.webm&time=0&transparent=false' from origin 'http://[::]:3000' has been blocked by CORS policy: The request client is not a secure context and the resource is in more-private address space `local`".
86
88
  serveUrl: `http://localhost:${serverPort}`,
87
89
  offthreadPort: serverPort,
88
90
  compositor,
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" | "prores" | "aac" | "mp3" | "wav" | "h264-mkv" | "gif">(codec: T, audioCodec: "opus" | "aac" | "mp3" | "pcm-16" | null) => import("./file-extensions").FileExtension;
5
- validateOutputFilename: <T_1 extends "h264" | "h265" | "vp8" | "vp9" | "prores" | "aac" | "mp3" | "wav" | "h264-mkv" | "gif">({ codec, audioCodec, extension, preferLossless, }: {
4
+ 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;
5
+ validateOutputFilename: <T_1 extends "h264" | "h265" | "vp8" | "vp9" | "mp3" | "aac" | "wav" | "prores" | "h264-mkv" | "gif">({ codec, audioCodec, extension, preferLossless, }: {
6
6
  codec: T_1;
7
- audioCodec: "opus" | "aac" | "mp3" | "pcm-16" | null;
7
+ audioCodec: "mp3" | "aac" | "pcm-16" | "opus" | null;
8
8
  extension: string;
9
9
  preferLossless: boolean;
10
10
  }) => void;
@@ -59,9 +59,10 @@ const screenshotTask = async ({ format, height, omitBackground, page, width, pat
59
59
  optimizeForSpeed: false,
60
60
  // We find that there is a 0.1% framedrop when rendering under memory pressure
61
61
  // which can be circumvented by disabling this option on Lambda.
62
- // To be determined: Is this a problem with Lambda, Linux, or the Chrome version
62
+ // To be determined: Is this a problem with Lambda, or the Chrome version
63
63
  // we are using on Lambda?
64
- fromSurface: process.platform !== 'linux',
64
+ // We already found out that the problem is not a general Linux problem.
65
+ fromSurface: !process.env.DISABLE_FROM_SURFACE,
65
66
  });
66
67
  result = value;
67
68
  }
@@ -11,6 +11,7 @@ const version_1 = require("remotion/version");
11
11
  const calculate_asset_positions_1 = require("./assets/calculate-asset-positions");
12
12
  const convert_assets_to_file_urls_1 = require("./assets/convert-assets-to-file-urls");
13
13
  const download_and_map_assets_to_file_1 = require("./assets/download-and-map-assets-to-file");
14
+ const download_map_1 = require("./assets/download-map");
14
15
  const audio_codec_1 = require("./audio-codec");
15
16
  const call_ffmpeg_1 = require("./call-ffmpeg");
16
17
  const codec_1 = require("./codec");
@@ -101,6 +102,7 @@ const innerStitchFramesToVideo = async ({ assetsInfo, audioBitrate, audioCodec,
101
102
  // encodingBufferSize is not a bitrate but need to be validated using the same format
102
103
  (0, validate_videobitrate_1.validateBitrate)(encodingBufferSize, 'encodingBufferSize');
103
104
  (0, validate_1.validateFps)(fps, 'in `stitchFramesToVideo()`', false);
105
+ assetsInfo.downloadMap.preventCleanup();
104
106
  const proResProfileName = (0, get_prores_profile_name_1.getProResProfileName)(codec, proResProfile);
105
107
  const mediaSupport = (0, codec_supports_media_1.codecSupportsMedia)(codec);
106
108
  const shouldRenderAudio = mediaSupport.audio &&
@@ -208,10 +210,7 @@ const innerStitchFramesToVideo = async ({ assetsInfo, audioBitrate, audioCodec,
208
210
  }
209
211
  });
210
212
  (0, delete_directory_1.deleteDirectory)(assetsInfo.downloadMap.stitchFrames);
211
- return {
212
- getLogs: () => '',
213
- task: Promise.resolve(file),
214
- };
213
+ return Promise.resolve(file);
215
214
  }
216
215
  const ffmpegArgs = [
217
216
  ...(preEncodedFileLocation
@@ -269,7 +268,7 @@ const innerStitchFramesToVideo = async ({ assetsInfo, audioBitrate, audioCodec,
269
268
  logLevel,
270
269
  tag: 'stitchFramesToVideo()',
271
270
  }, finalFfmpegString.join(' '));
272
- const task = (0, call_ffmpeg_1.callFf)({
271
+ const task = (0, call_ffmpeg_1.callFfNative)({
273
272
  bin: 'ffmpeg',
274
273
  args: finalFfmpegString,
275
274
  indent,
@@ -278,12 +277,12 @@ const innerStitchFramesToVideo = async ({ assetsInfo, audioBitrate, audioCodec,
278
277
  cancelSignal === null || cancelSignal === void 0 ? void 0 : cancelSignal(() => {
279
278
  task.kill();
280
279
  });
281
- let ffmpegOutput = '';
280
+ let ffmpegStderr = '';
282
281
  let isFinished = false;
283
282
  (_a = task.stderr) === null || _a === void 0 ? void 0 : _a.on('data', (data) => {
284
283
  var _a;
285
284
  const str = data.toString();
286
- ffmpegOutput += str;
285
+ ffmpegStderr += str;
287
286
  if (onProgress) {
288
287
  const parsed = (0, parse_ffmpeg_progress_1.parseFfmpegProgress)(str);
289
288
  // FFMPEG bug: In some cases, FFMPEG does hang after it is finished with it's job
@@ -302,35 +301,37 @@ const innerStitchFramesToVideo = async ({ assetsInfo, audioBitrate, audioCodec,
302
301
  }
303
302
  }
304
303
  });
305
- return {
306
- task: task.then(() => {
307
- (0, delete_directory_1.deleteDirectory)(assetsInfo.downloadMap.audioPreprocessing);
308
- if (tempFile === null) {
309
- (0, delete_directory_1.deleteDirectory)(assetsInfo.downloadMap.stitchFrames);
310
- return null;
304
+ return new Promise((resolve, reject) => {
305
+ task.once('close', (code, signal) => {
306
+ if (code === 0) {
307
+ assetsInfo.downloadMap.allowCleanup();
308
+ if (tempFile === null) {
309
+ (0, download_map_1.cleanDownloadMap)(assetsInfo.downloadMap);
310
+ return resolve(null);
311
+ }
312
+ node_fs_1.promises
313
+ .readFile(tempFile)
314
+ .then((f) => {
315
+ resolve(f);
316
+ })
317
+ .catch((e) => {
318
+ reject(e);
319
+ })
320
+ .finally(() => {
321
+ (0, download_map_1.cleanDownloadMap)(assetsInfo.downloadMap);
322
+ });
311
323
  }
312
- return node_fs_1.promises
313
- .readFile(tempFile)
314
- .then((file) => {
315
- return Promise.all([
316
- file,
317
- (0, delete_directory_1.deleteDirectory)(node_path_1.default.dirname(tempFile)),
318
- (0, delete_directory_1.deleteDirectory)(assetsInfo.downloadMap.stitchFrames),
319
- ]);
320
- })
321
- .then(([file]) => file);
322
- }),
323
- getLogs: () => ffmpegOutput,
324
- };
324
+ else {
325
+ reject(new Error(`FFmpeg quit with code ${code} ${signal ? `(${signal})` : ''} The FFmpeg output was ${ffmpegStderr}`));
326
+ }
327
+ });
328
+ });
325
329
  };
326
330
  const internalStitchFramesToVideo = async (options) => {
327
331
  const remotionRoot = (0, find_closest_package_json_1.findRemotionRoot)();
328
- const { task, getLogs } = await innerStitchFramesToVideo(options, remotionRoot);
329
- const happyPath = task.catch(() => {
330
- throw new Error(getLogs());
331
- });
332
+ const task = await innerStitchFramesToVideo(options, remotionRoot);
332
333
  return Promise.race([
333
- happyPath,
334
+ task,
334
335
  new Promise((_resolve, reject) => {
335
336
  var _a;
336
337
  (_a = options.cancelSignal) === null || _a === void 0 ? void 0 : _a.call(options, () => {
@@ -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.106",
3
+ "version": "4.0.107",
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.106"
21
+ "remotion": "4.0.107"
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.106",
44
- "@remotion/compositor-darwin-arm64": "4.0.106",
45
- "@remotion/compositor-linux-arm64-gnu": "4.0.106",
46
- "@remotion/compositor-linux-arm64-musl": "4.0.106",
47
- "@remotion/compositor-linux-x64-gnu": "4.0.106",
48
- "@remotion/compositor-win32-x64-msvc": "4.0.106",
49
- "@remotion/compositor-linux-x64-musl": "4.0.106"
43
+ "@remotion/compositor-linux-arm64-gnu": "4.0.107",
44
+ "@remotion/compositor-darwin-arm64": "4.0.107",
45
+ "@remotion/compositor-linux-x64-gnu": "4.0.107",
46
+ "@remotion/compositor-darwin-x64": "4.0.107",
47
+ "@remotion/compositor-linux-arm64-musl": "4.0.107",
48
+ "@remotion/compositor-linux-x64-musl": "4.0.107",
49
+ "@remotion/compositor-win32-x64-msvc": "4.0.107"
50
50
  },
51
51
  "keywords": [
52
52
  "remotion",