@remotion/renderer 4.0.372 → 4.0.374
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/assets/inline-audio-mixing.js +5 -10
- package/dist/esm/index.mjs +3 -8
- package/dist/ffmpeg-args.js +3 -0
- package/package.json +12 -12
|
@@ -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
|
-
|
|
149
|
-
|
|
150
|
-
|
|
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.
|
|
152
|
+
arr = arr.slice(Math.floor(samplesToShaveFromStart) * NUMBER_OF_CHANNELS);
|
|
158
153
|
}
|
|
159
154
|
if (isLast) {
|
|
160
|
-
arr = arr.slice(0, arr.length + Math.
|
|
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
|
package/dist/esm/index.mjs
CHANGED
|
@@ -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.
|
|
15257
|
+
arr = arr.slice(Math.floor(samplesToShaveFromStart) * NUMBER_OF_CHANNELS);
|
|
15264
15258
|
}
|
|
15265
15259
|
if (isLast) {
|
|
15266
|
-
arr = arr.slice(0, arr.length + Math.
|
|
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;
|
|
@@ -19660,6 +19654,7 @@ var firstEncodingStepOnly = ({
|
|
|
19660
19654
|
["-pix_fmt", pixelFormat],
|
|
19661
19655
|
pixelFormat === "yuva420p" ? ["-auto-alt-ref", "0"] : null,
|
|
19662
19656
|
x264Preset ? ["-preset", x264Preset] : null,
|
|
19657
|
+
["-video_track_timescale", "90000"],
|
|
19663
19658
|
validateQualitySettings({
|
|
19664
19659
|
crf,
|
|
19665
19660
|
videoBitrate,
|
package/dist/ffmpeg-args.js
CHANGED
|
@@ -17,6 +17,9 @@ const firstEncodingStepOnly = ({ hasPreencoded, proResProfileName, pixelFormat,
|
|
|
17
17
|
// transparent WebM generation doesn't work
|
|
18
18
|
pixelFormat === 'yuva420p' ? ['-auto-alt-ref', '0'] : null,
|
|
19
19
|
x264Preset ? ['-preset', x264Preset] : null,
|
|
20
|
+
// Apply a fixed a timescale across all environments:
|
|
21
|
+
// https://discord.com/channels/809501355504959528/817306238811111454/1437471619089170613
|
|
22
|
+
['-video_track_timescale', '90000'],
|
|
20
23
|
(0, crf_1.validateQualitySettings)({
|
|
21
24
|
crf,
|
|
22
25
|
videoBitrate,
|
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.
|
|
6
|
+
"version": "4.0.374",
|
|
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.
|
|
26
|
-
"@remotion/streaming": "4.0.
|
|
25
|
+
"remotion": "4.0.374",
|
|
26
|
+
"@remotion/streaming": "4.0.374",
|
|
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.
|
|
42
|
-
"@remotion/eslint-config-internal": "4.0.
|
|
41
|
+
"@remotion/example-videos": "4.0.374",
|
|
42
|
+
"@remotion/eslint-config-internal": "4.0.374",
|
|
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.
|
|
48
|
-
"@remotion/compositor-darwin-x64": "4.0.
|
|
49
|
-
"@remotion/compositor-linux-arm64-gnu": "4.0.
|
|
50
|
-
"@remotion/compositor-linux-arm64-musl": "4.0.
|
|
51
|
-
"@remotion/compositor-linux-x64-gnu": "4.0.
|
|
52
|
-
"@remotion/compositor-linux-x64-musl": "4.0.
|
|
53
|
-
"@remotion/compositor-win32-x64-msvc": "4.0.
|
|
47
|
+
"@remotion/compositor-darwin-arm64": "4.0.374",
|
|
48
|
+
"@remotion/compositor-darwin-x64": "4.0.374",
|
|
49
|
+
"@remotion/compositor-linux-arm64-gnu": "4.0.374",
|
|
50
|
+
"@remotion/compositor-linux-arm64-musl": "4.0.374",
|
|
51
|
+
"@remotion/compositor-linux-x64-gnu": "4.0.374",
|
|
52
|
+
"@remotion/compositor-linux-x64-musl": "4.0.374",
|
|
53
|
+
"@remotion/compositor-win32-x64-msvc": "4.0.374"
|
|
54
54
|
},
|
|
55
55
|
"keywords": [
|
|
56
56
|
"remotion",
|