@remotion/renderer 3.3.51 → 3.3.53

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
@@ -175,4 +175,5 @@ export declare const BrowserSafeApis: {
175
175
  lossless: null;
176
176
  };
177
177
  };
178
+ defaultCodecsForFileExtension: Record<import("./file-extensions").FileExtension, "h264" | "h265" | "vp8" | "vp9" | "mp3" | "aac" | "wav" | "prores" | "h264-mkv" | "gif">;
178
179
  };
package/dist/client.js CHANGED
@@ -19,4 +19,5 @@ exports.BrowserSafeApis = {
19
19
  supportedAudioCodecs: file_extensions_1.supportedAudioCodecs,
20
20
  defaultFileExtensionMap: file_extensions_1.defaultFileExtensionMap,
21
21
  defaultAudioCodecs: audio_codec_1.defaultAudioCodecs,
22
+ defaultCodecsForFileExtension: get_extension_from_codec_1.defaultCodecsForFileExtension,
22
23
  };
@@ -40,8 +40,8 @@ exports.defaultFileExtensionMap = {
40
40
  h264: {
41
41
  default: 'mp4',
42
42
  forAudioCodec: {
43
- 'pcm-16': { possible: ['mkv'], default: 'mkv' },
44
- aac: { possible: ['mp4', 'mkv'], default: 'mp4' },
43
+ 'pcm-16': { possible: ['mkv', 'mov'], default: 'mkv' },
44
+ aac: { possible: ['mp4', 'mkv', 'mov'], default: 'mp4' },
45
45
  },
46
46
  },
47
47
  h265: {
@@ -0,0 +1,2 @@
1
+ import type { Codec } from './codec';
2
+ export declare const getAudioCodecName: (codec: Codec) => string | null;
@@ -0,0 +1,28 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.getAudioCodecName = void 0;
4
+ const is_audio_codec_1 = require("./is-audio-codec");
5
+ const getAudioCodecName = (codec) => {
6
+ if (!(0, is_audio_codec_1.isAudioCodec)(codec)) {
7
+ // The mkv container supports WAV, but MP4 does only support
8
+ // AAC. Choose MKV codec for better quality because we can put in lossless audio
9
+ if (codec === 'h264-mkv') {
10
+ return 'pcm_s16le';
11
+ }
12
+ if (codec === 'vp8' || codec === 'vp9') {
13
+ return 'libopus';
14
+ }
15
+ return 'aac';
16
+ }
17
+ if (codec === 'aac') {
18
+ return 'aac';
19
+ }
20
+ if (codec === 'mp3') {
21
+ return 'libmp3lame';
22
+ }
23
+ if (codec === 'wav') {
24
+ return 'pcm_s16le';
25
+ }
26
+ return null;
27
+ };
28
+ exports.getAudioCodecName = getAudioCodecName;
@@ -0,0 +1 @@
1
+ export declare const validateFrame: (frame: number, durationInFrames: number) => void;
@@ -0,0 +1,24 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.validateFrame = void 0;
4
+ const validateFrame = (frame, durationInFrames) => {
5
+ if (typeof frame === 'undefined') {
6
+ throw new TypeError(`Argument missing for parameter "frame"`);
7
+ }
8
+ if (typeof frame !== 'number') {
9
+ throw new TypeError(`Argument passed for "frame" is not a number: ${frame}`);
10
+ }
11
+ if (!Number.isFinite(frame)) {
12
+ throw new RangeError(`Frame ${frame} is not finite`);
13
+ }
14
+ if (frame % 1 !== 0) {
15
+ throw new RangeError(`Argument for frame must be an integer, but got ${frame}`);
16
+ }
17
+ if (frame < 0 && frame < -durationInFrames) {
18
+ throw new RangeError(`Cannot use frame ${frame}: Duration of composition is ${durationInFrames}, therefore the lowest frame that can be rendered is ${-durationInFrames}`);
19
+ }
20
+ if (frame > durationInFrames - 1) {
21
+ throw new RangeError(`Cannot use frame ${frame}: Duration of composition is ${durationInFrames}, therefore the highest frame that can be rendered is ${durationInFrames - 1}`);
22
+ }
23
+ };
24
+ exports.validateFrame = validateFrame;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@remotion/renderer",
3
- "version": "3.3.51",
3
+ "version": "3.3.53",
4
4
  "description": "Renderer for Remotion",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -24,7 +24,7 @@
24
24
  "dependencies": {
25
25
  "execa": "5.1.1",
26
26
  "extract-zip": "2.0.1",
27
- "remotion": "3.3.51",
27
+ "remotion": "3.3.53",
28
28
  "source-map": "^0.8.0-beta.0",
29
29
  "ws": "8.7.0"
30
30
  },
@@ -49,13 +49,13 @@
49
49
  "vitest": "0.24.3"
50
50
  },
51
51
  "optionalDependencies": {
52
- "@remotion/compositor-darwin-arm64": "3.3.51",
53
- "@remotion/compositor-darwin-x64": "3.3.51",
54
- "@remotion/compositor-linux-arm64-gnu": "3.3.51",
55
- "@remotion/compositor-linux-arm64-musl": "3.3.51",
56
- "@remotion/compositor-linux-x64-gnu": "3.3.51",
57
- "@remotion/compositor-linux-x64-musl": "3.3.51",
58
- "@remotion/compositor-win32-x64-msvc": "3.3.51"
52
+ "@remotion/compositor-darwin-arm64": "3.3.53",
53
+ "@remotion/compositor-darwin-x64": "3.3.53",
54
+ "@remotion/compositor-linux-arm64-gnu": "3.3.53",
55
+ "@remotion/compositor-linux-arm64-musl": "3.3.53",
56
+ "@remotion/compositor-linux-x64-gnu": "3.3.53",
57
+ "@remotion/compositor-linux-x64-musl": "3.3.53",
58
+ "@remotion/compositor-win32-x64-msvc": "3.3.53"
59
59
  },
60
60
  "keywords": [
61
61
  "remotion",
@@ -67,5 +67,5 @@
67
67
  "publishConfig": {
68
68
  "access": "public"
69
69
  },
70
- "gitHead": "be64134aece51abd6c63e644702517c868d6c8d0"
70
+ "gitHead": "b6d64c3ec91b55ac537765fda0b927c3a472b529"
71
71
  }