@remotion/renderer 3.3.76 → 3.3.78

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;
@@ -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;
@@ -5,7 +5,6 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.mergeAudioTrack = void 0;
7
7
  const execa_1 = __importDefault(require("execa"));
8
- const fs_1 = require("fs");
9
8
  const path_1 = __importDefault(require("path"));
10
9
  const chunk_1 = require("./chunk");
11
10
  const create_ffmpeg_complex_filter_1 = require("./create-ffmpeg-complex-filter");
@@ -26,10 +25,7 @@ const mergeAudioTrackUnlimited = async ({ ffmpegExecutable, outName, files, numb
26
25
  });
27
26
  return;
28
27
  }
29
- if (files.length === 1) {
30
- (0, fs_1.copyFileSync)(files[0].outName, outName);
31
- return;
32
- }
28
+ // Previously a bug: We cannot optimize for files.length === 1 because we need to pad the audio
33
29
  // In FFMPEG, the total number of left and right tracks that can be merged at one time is limited to 64
34
30
  if (files.length >= 32) {
35
31
  const chunked = (0, chunk_1.chunk)(files, 10);
@@ -0,0 +1,7 @@
1
+ import type React from 'react';
2
+ export declare type RemotionOption = {
3
+ name: string;
4
+ cliFlag: string;
5
+ ssrName: string;
6
+ description: React.ReactNode;
7
+ };
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,7 @@
1
+ import type React from 'react';
2
+ export declare type RemotionOption = {
3
+ name: string;
4
+ cliFlag: string;
5
+ ssrName: string;
6
+ description: React.ReactNode;
7
+ };
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,2 @@
1
+ import type { RemotionOption } from './option';
2
+ export declare const scaleOption: RemotionOption;
@@ -0,0 +1,10 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.scaleOption = void 0;
4
+ const jsx_runtime_1 = require("react/jsx-runtime");
5
+ exports.scaleOption = {
6
+ name: 'Scale',
7
+ cliFlag: '--scale',
8
+ description: ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: ["Scales the output by a factor. For example, a 1280x720px frame will become a 1920x1080px frame with a scale factor of ", (0, jsx_runtime_1.jsx)("code", { children: "1.5" }), ". Vector elements like fonts and HTML markups will be rendered with extra details."] })),
9
+ ssrName: 'scale',
10
+ };
@@ -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,
@@ -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) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@remotion/renderer",
3
- "version": "3.3.76",
3
+ "version": "3.3.78",
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.78",
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.78",
45
+ "@remotion/compositor-darwin-x64": "3.3.78",
46
+ "@remotion/compositor-linux-arm64-gnu": "3.3.78",
47
+ "@remotion/compositor-linux-arm64-musl": "3.3.78",
48
+ "@remotion/compositor-linux-x64-gnu": "3.3.78",
49
+ "@remotion/compositor-linux-x64-musl": "3.3.78",
50
+ "@remotion/compositor-win32-x64-msvc": "3.3.78"
51
51
  },
52
52
  "keywords": [
53
53
  "remotion",