@remotion/renderer 4.0.318 → 4.0.320
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/browser/BrowserFetcher.js +3 -0
- package/dist/esm/index.mjs +11 -3
- package/dist/render-media.js +10 -3
- package/ensure-browser.mjs +3 -0
- package/package.json +13 -13
|
@@ -66,6 +66,9 @@ const TESTED_VERSION = '134.0.6998.35';
|
|
|
66
66
|
const PLAYWRIGHT_VERSION = '1161'; // 134.0.6998.35
|
|
67
67
|
function getChromeDownloadUrl({ platform, version, chromeMode, }) {
|
|
68
68
|
if (platform === 'linux-arm64') {
|
|
69
|
+
if (chromeMode === 'chrome-for-testing') {
|
|
70
|
+
return `https://playwright.azureedge.net/builds/chromium/${version !== null && version !== void 0 ? version : PLAYWRIGHT_VERSION}/chromium-linux-arm64.zip`;
|
|
71
|
+
}
|
|
69
72
|
return `https://playwright.azureedge.net/builds/chromium/${version !== null && version !== void 0 ? version : PLAYWRIGHT_VERSION}/chromium-headless-shell-linux-arm64.zip`;
|
|
70
73
|
}
|
|
71
74
|
if (chromeMode === 'headless-shell') {
|
package/dist/esm/index.mjs
CHANGED
|
@@ -4720,6 +4720,9 @@ function getChromeDownloadUrl({
|
|
|
4720
4720
|
chromeMode
|
|
4721
4721
|
}) {
|
|
4722
4722
|
if (platform2 === "linux-arm64") {
|
|
4723
|
+
if (chromeMode === "chrome-for-testing") {
|
|
4724
|
+
return `https://playwright.azureedge.net/builds/chromium/${version ?? PLAYWRIGHT_VERSION}/chromium-linux-arm64.zip`;
|
|
4725
|
+
}
|
|
4723
4726
|
return `https://playwright.azureedge.net/builds/chromium/${version ?? PLAYWRIGHT_VERSION}/chromium-headless-shell-linux-arm64.zip`;
|
|
4724
4727
|
}
|
|
4725
4728
|
if (chromeMode === "headless-shell") {
|
|
@@ -21020,6 +21023,7 @@ var validateOutputFilename = ({
|
|
|
21020
21023
|
|
|
21021
21024
|
// src/render-media.ts
|
|
21022
21025
|
var SLOWEST_FRAME_COUNT = 10;
|
|
21026
|
+
var MAX_RECENT_FRAME_TIMINGS = 50;
|
|
21023
21027
|
var internalRenderMediaRaw = ({
|
|
21024
21028
|
proResProfile,
|
|
21025
21029
|
x264Preset,
|
|
@@ -21133,7 +21137,7 @@ var internalRenderMediaRaw = ({
|
|
|
21133
21137
|
let encodedDoneIn = null;
|
|
21134
21138
|
let cancelled = false;
|
|
21135
21139
|
let renderEstimatedTime = 0;
|
|
21136
|
-
|
|
21140
|
+
const recentFrameTimings = [];
|
|
21137
21141
|
const renderStart = Date.now();
|
|
21138
21142
|
const { estimatedUsage, freeMemory, hasEnoughMemory } = shouldUseParallelEncoding({
|
|
21139
21143
|
height: composition.height,
|
|
@@ -21309,8 +21313,12 @@ var internalRenderMediaRaw = ({
|
|
|
21309
21313
|
composition,
|
|
21310
21314
|
onFrameUpdate: (frame, frameIndex, timeToRenderInMilliseconds) => {
|
|
21311
21315
|
renderedFrames = frame;
|
|
21312
|
-
|
|
21313
|
-
|
|
21316
|
+
recentFrameTimings.push(timeToRenderInMilliseconds);
|
|
21317
|
+
if (recentFrameTimings.length > MAX_RECENT_FRAME_TIMINGS) {
|
|
21318
|
+
recentFrameTimings.shift();
|
|
21319
|
+
}
|
|
21320
|
+
const recentTimingsSum = recentFrameTimings.reduce((sum, time) => sum + time, 0);
|
|
21321
|
+
const newAverage = recentTimingsSum / recentFrameTimings.length;
|
|
21314
21322
|
const remainingFrames = totalFramesToRender - renderedFrames;
|
|
21315
21323
|
renderEstimatedTime = Math.round(remainingFrames * newAverage);
|
|
21316
21324
|
callUpdate();
|
package/dist/render-media.js
CHANGED
|
@@ -51,6 +51,7 @@ const validate_scale_1 = require("./validate-scale");
|
|
|
51
51
|
const validate_videobitrate_1 = require("./validate-videobitrate");
|
|
52
52
|
const wrap_with_error_handling_1 = require("./wrap-with-error-handling");
|
|
53
53
|
const SLOWEST_FRAME_COUNT = 10;
|
|
54
|
+
const MAX_RECENT_FRAME_TIMINGS = 50;
|
|
54
55
|
const internalRenderMediaRaw = ({ proResProfile, x264Preset, crf, composition, serializedInputPropsWithCustomSchema, pixelFormat: userPixelFormat, codec, envVariables, frameRange, puppeteerInstance, outputLocation, onProgress, overwrite, onDownload, onBrowserLog, onStart, timeoutInMilliseconds, chromiumOptions, scale, browserExecutable, port, cancelSignal, muted, enforceAudioTrack, ffmpegOverride, audioBitrate, videoBitrate, encodingMaxRate, encodingBufferSize, audioCodec, concurrency, disallowParallelEncoding, everyNthFrame, imageFormat: provisionalImageFormat, indent, jpegQuality, numberOfGifLoops, onCtrlCExit, preferLossless, serveUrl, server: reusedServer, logLevel, serializedResolvedPropsWithCustomSchema, offthreadVideoCacheSizeInBytes, colorSpace, repro, binariesDirectory, separateAudioTo, forSeamlessAacConcatenation, compositionStart, onBrowserDownload, onArtifact, metadata, hardwareAcceleration, chromeMode, offthreadVideoThreads, }) => {
|
|
55
56
|
var _a, _b;
|
|
56
57
|
const pixelFormat = (_a = userPixelFormat !== null && userPixelFormat !== void 0 ? userPixelFormat : composition.defaultPixelFormat) !== null && _a !== void 0 ? _a : pixel_format_1.DEFAULT_PIXEL_FORMAT;
|
|
@@ -111,7 +112,7 @@ const internalRenderMediaRaw = ({ proResProfile, x264Preset, crf, composition, s
|
|
|
111
112
|
let encodedDoneIn = null;
|
|
112
113
|
let cancelled = false;
|
|
113
114
|
let renderEstimatedTime = 0;
|
|
114
|
-
|
|
115
|
+
const recentFrameTimings = [];
|
|
115
116
|
const renderStart = Date.now();
|
|
116
117
|
const { estimatedUsage, freeMemory, hasEnoughMemory } = (0, prestitcher_memory_usage_1.shouldUseParallelEncoding)({
|
|
117
118
|
height: composition.height,
|
|
@@ -303,8 +304,14 @@ const internalRenderMediaRaw = ({ proResProfile, x264Preset, crf, composition, s
|
|
|
303
304
|
composition,
|
|
304
305
|
onFrameUpdate: (frame, frameIndex, timeToRenderInMilliseconds) => {
|
|
305
306
|
renderedFrames = frame;
|
|
306
|
-
|
|
307
|
-
|
|
307
|
+
// Track recent frame timings (at most 50)
|
|
308
|
+
recentFrameTimings.push(timeToRenderInMilliseconds);
|
|
309
|
+
if (recentFrameTimings.length > MAX_RECENT_FRAME_TIMINGS) {
|
|
310
|
+
recentFrameTimings.shift();
|
|
311
|
+
}
|
|
312
|
+
// Calculate average using only recent timings for better estimation
|
|
313
|
+
const recentTimingsSum = recentFrameTimings.reduce((sum, time) => sum + time, 0);
|
|
314
|
+
const newAverage = recentTimingsSum / recentFrameTimings.length;
|
|
308
315
|
const remainingFrames = totalFramesToRender - renderedFrames;
|
|
309
316
|
// Get estimated time by multiplying the avarage render time by the remaining frames
|
|
310
317
|
renderEstimatedTime = Math.round(remainingFrames * newAverage);
|
package/ensure-browser.mjs
CHANGED
|
@@ -3094,6 +3094,9 @@ function getChromeDownloadUrl({
|
|
|
3094
3094
|
chromeMode
|
|
3095
3095
|
}) {
|
|
3096
3096
|
if (platform2 === "linux-arm64") {
|
|
3097
|
+
if (chromeMode === "chrome-for-testing") {
|
|
3098
|
+
return `https://playwright.azureedge.net/builds/chromium/${version ?? PLAYWRIGHT_VERSION}/chromium-linux-arm64.zip`;
|
|
3099
|
+
}
|
|
3097
3100
|
return `https://playwright.azureedge.net/builds/chromium/${version ?? PLAYWRIGHT_VERSION}/chromium-headless-shell-linux-arm64.zip`;
|
|
3098
3101
|
}
|
|
3099
3102
|
if (chromeMode === "headless-shell") {
|
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.320",
|
|
7
7
|
"description": "Render Remotion videos using Node.js or Bun",
|
|
8
8
|
"main": "dist/index.js",
|
|
9
9
|
"types": "dist/index.d.ts",
|
|
@@ -18,8 +18,8 @@
|
|
|
18
18
|
"extract-zip": "2.0.1",
|
|
19
19
|
"source-map": "^0.8.0-beta.0",
|
|
20
20
|
"ws": "8.17.1",
|
|
21
|
-
"remotion": "4.0.
|
|
22
|
-
"@remotion/streaming": "4.0.
|
|
21
|
+
"remotion": "4.0.320",
|
|
22
|
+
"@remotion/streaming": "4.0.320"
|
|
23
23
|
},
|
|
24
24
|
"peerDependencies": {
|
|
25
25
|
"react": ">=16.8.0",
|
|
@@ -33,17 +33,17 @@
|
|
|
33
33
|
"react-dom": "19.0.0",
|
|
34
34
|
"@types/ws": "8.5.10",
|
|
35
35
|
"eslint": "9.19.0",
|
|
36
|
-
"@remotion/
|
|
37
|
-
"@remotion/
|
|
36
|
+
"@remotion/example-videos": "4.0.320",
|
|
37
|
+
"@remotion/eslint-config-internal": "4.0.320"
|
|
38
38
|
},
|
|
39
39
|
"optionalDependencies": {
|
|
40
|
-
"@remotion/compositor-darwin-
|
|
41
|
-
"@remotion/compositor-darwin-
|
|
42
|
-
"@remotion/compositor-linux-arm64-gnu": "4.0.
|
|
43
|
-
"@remotion/compositor-linux-arm64-musl": "4.0.
|
|
44
|
-
"@remotion/compositor-linux-x64-
|
|
45
|
-
"@remotion/compositor-
|
|
46
|
-
"@remotion/compositor-
|
|
40
|
+
"@remotion/compositor-darwin-arm64": "4.0.320",
|
|
41
|
+
"@remotion/compositor-darwin-x64": "4.0.320",
|
|
42
|
+
"@remotion/compositor-linux-arm64-gnu": "4.0.320",
|
|
43
|
+
"@remotion/compositor-linux-arm64-musl": "4.0.320",
|
|
44
|
+
"@remotion/compositor-linux-x64-gnu": "4.0.320",
|
|
45
|
+
"@remotion/compositor-linux-x64-musl": "4.0.320",
|
|
46
|
+
"@remotion/compositor-win32-x64-msvc": "4.0.320"
|
|
47
47
|
},
|
|
48
48
|
"keywords": [
|
|
49
49
|
"remotion",
|
|
@@ -97,7 +97,7 @@
|
|
|
97
97
|
}
|
|
98
98
|
},
|
|
99
99
|
"scripts": {
|
|
100
|
-
"formatting": "prettier src --check",
|
|
100
|
+
"formatting": "prettier --experimental-cli src --check",
|
|
101
101
|
"lint": "eslint src",
|
|
102
102
|
"test": "bun test src",
|
|
103
103
|
"make": "tsc -d && bun --env-file=../.env.bundle bundle.ts"
|