@remotion/renderer 4.0.74 → 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,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  export declare const BrowserSafeApis: {
3
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"];
@@ -9,6 +8,7 @@ export declare const BrowserSafeApis: {
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"];
@@ -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
  };
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,
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';
@@ -138,8 +135,8 @@ 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;
@@ -314,7 +311,7 @@ export declare const RenderInternals: {
314
311
  };
315
312
  makeFileExtensionMap: () => Record<string, ("h264" | "h265" | "vp8" | "vp9" | "mp3" | "aac" | "wav" | "prores" | "h264-mkv" | "gif")[]>;
316
313
  defaultCodecsForFileExtension: Record<import("./file-extensions").FileExtension, "h264" | "h265" | "vp8" | "vp9" | "mp3" | "aac" | "wav" | "prores" | "h264-mkv" | "gif">;
317
- getExecutablePath: (type: "ffmpeg" | "ffprobe" | "compositor" | "ffmpeg-cwd", indent: boolean, logLevel: "verbose" | "info" | "warn" | "error") => string;
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") => {
320
317
  env: {
@@ -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: "jpeg" | "png" | "none";
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>;
@@ -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
  };
@@ -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 { TRenderAsset } from 'remotion/no-react';
3
2
  import type { DownloadMap } from './assets/download-map';
4
3
  import type { Page } from './browser/BrowserPage';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@remotion/renderer",
3
- "version": "4.0.74",
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.74"
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-arm64": "4.0.74",
44
- "@remotion/compositor-darwin-x64": "4.0.74",
45
- "@remotion/compositor-linux-x64-gnu": "4.0.74",
46
- "@remotion/compositor-linux-arm64-gnu": "4.0.74",
47
- "@remotion/compositor-linux-arm64-musl": "4.0.74",
48
- "@remotion/compositor-win32-x64-msvc": "4.0.74",
49
- "@remotion/compositor-linux-x64-musl": "4.0.74"
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",