@remotion/renderer 4.0.371 → 4.0.373

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.
@@ -145,19 +145,14 @@ const makeInlineAudioMixing = (dir) => {
145
145
  const isLast = asset.frame === totalNumberOfFrames + firstFrame - 1;
146
146
  const samplesToShaveFromStart = trimLeftOffset * sample_rate_1.DEFAULT_SAMPLE_RATE;
147
147
  const samplesToShaveFromEnd = trimRightOffset * sample_rate_1.DEFAULT_SAMPLE_RATE;
148
- if (Math.abs(Math.round(samplesToShaveFromEnd) - samplesToShaveFromEnd) >
149
- 0.0000001) {
150
- throw new Error(`samplesToShaveFromEnd should be approximately an integer, is${samplesToShaveFromEnd}`);
151
- }
152
- if (Math.abs(Math.round(samplesToShaveFromStart) - samplesToShaveFromStart) >
153
- 0.0000001) {
154
- throw new Error(`samplesToShaveFromStart should be approximately an integer, is ${samplesToShaveFromStart}`);
155
- }
148
+ // Higher tolerance is needed for floating point videos
149
+ // Rendering https://github.com/remotion-dev/remotion/pull/5920 in native frame rate
150
+ // could hit this case
156
151
  if (isFirst) {
157
- arr = arr.slice(Math.round(samplesToShaveFromStart) * NUMBER_OF_CHANNELS);
152
+ arr = arr.slice(Math.floor(samplesToShaveFromStart) * NUMBER_OF_CHANNELS);
158
153
  }
159
154
  if (isLast) {
160
- arr = arr.slice(0, arr.length + Math.round(samplesToShaveFromEnd) * NUMBER_OF_CHANNELS);
155
+ arr = arr.slice(0, arr.length + Math.ceil(samplesToShaveFromEnd) * NUMBER_OF_CHANNELS);
161
156
  }
162
157
  const positionInSeconds = (asset.frame - firstFrame) / fps - (isFirst ? 0 : trimLeftOffset);
163
158
  // Always rounding down to ensure there are no gaps when the samples don't align
@@ -15253,17 +15253,11 @@ var makeInlineAudioMixing = (dir) => {
15253
15253
  const isLast = asset.frame === totalNumberOfFrames + firstFrame - 1;
15254
15254
  const samplesToShaveFromStart = trimLeftOffset * DEFAULT_SAMPLE_RATE;
15255
15255
  const samplesToShaveFromEnd = trimRightOffset * DEFAULT_SAMPLE_RATE;
15256
- if (Math.abs(Math.round(samplesToShaveFromEnd) - samplesToShaveFromEnd) > 0.0000001) {
15257
- throw new Error(`samplesToShaveFromEnd should be approximately an integer, is${samplesToShaveFromEnd}`);
15258
- }
15259
- if (Math.abs(Math.round(samplesToShaveFromStart) - samplesToShaveFromStart) > 0.0000001) {
15260
- throw new Error(`samplesToShaveFromStart should be approximately an integer, is ${samplesToShaveFromStart}`);
15261
- }
15262
15256
  if (isFirst) {
15263
- arr = arr.slice(Math.round(samplesToShaveFromStart) * NUMBER_OF_CHANNELS);
15257
+ arr = arr.slice(Math.floor(samplesToShaveFromStart) * NUMBER_OF_CHANNELS);
15264
15258
  }
15265
15259
  if (isLast) {
15266
- arr = arr.slice(0, arr.length + Math.round(samplesToShaveFromEnd) * NUMBER_OF_CHANNELS);
15260
+ arr = arr.slice(0, arr.length + Math.ceil(samplesToShaveFromEnd) * NUMBER_OF_CHANNELS);
15267
15261
  }
15268
15262
  const positionInSeconds = (asset.frame - firstFrame) / fps - (isFirst ? 0 : trimLeftOffset);
15269
15263
  const position = Math.floor(positionInSeconds * DEFAULT_SAMPLE_RATE) * NUMBER_OF_CHANNELS * BYTES_PER_SAMPLE;
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "url": "https://github.com/remotion-dev/remotion/tree/main/packages/renderer"
4
4
  },
5
5
  "name": "@remotion/renderer",
6
- "version": "4.0.371",
6
+ "version": "4.0.373",
7
7
  "description": "Render Remotion videos using Node.js or Bun",
8
8
  "main": "dist/index.js",
9
9
  "types": "dist/index.d.ts",
@@ -22,8 +22,8 @@
22
22
  "dependencies": {
23
23
  "execa": "5.1.1",
24
24
  "extract-zip": "2.0.1",
25
- "remotion": "4.0.371",
26
- "@remotion/streaming": "4.0.371",
25
+ "remotion": "4.0.373",
26
+ "@remotion/streaming": "4.0.373",
27
27
  "source-map": "^0.8.0-beta.0",
28
28
  "ws": "8.17.1"
29
29
  },
@@ -38,19 +38,19 @@
38
38
  "react": "19.0.0",
39
39
  "react-dom": "19.0.0",
40
40
  "@types/ws": "8.5.10",
41
- "@remotion/example-videos": "4.0.371",
42
- "@remotion/eslint-config-internal": "4.0.371",
41
+ "@remotion/example-videos": "4.0.373",
42
+ "@remotion/eslint-config-internal": "4.0.373",
43
43
  "eslint": "9.19.0",
44
44
  "@types/node": "20.12.14"
45
45
  },
46
46
  "optionalDependencies": {
47
- "@remotion/compositor-darwin-arm64": "4.0.371",
48
- "@remotion/compositor-darwin-x64": "4.0.371",
49
- "@remotion/compositor-linux-arm64-gnu": "4.0.371",
50
- "@remotion/compositor-linux-arm64-musl": "4.0.371",
51
- "@remotion/compositor-linux-x64-gnu": "4.0.371",
52
- "@remotion/compositor-linux-x64-musl": "4.0.371",
53
- "@remotion/compositor-win32-x64-msvc": "4.0.371"
47
+ "@remotion/compositor-darwin-arm64": "4.0.373",
48
+ "@remotion/compositor-darwin-x64": "4.0.373",
49
+ "@remotion/compositor-linux-arm64-gnu": "4.0.373",
50
+ "@remotion/compositor-linux-arm64-musl": "4.0.373",
51
+ "@remotion/compositor-linux-x64-gnu": "4.0.373",
52
+ "@remotion/compositor-linux-x64-musl": "4.0.373",
53
+ "@remotion/compositor-win32-x64-msvc": "4.0.373"
54
54
  },
55
55
  "keywords": [
56
56
  "remotion",