@torrent-tv/proxy 2.9.9 → 2.9.10
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/CHANGELOG.md +5 -1
- package/package.json +1 -1
- package/services/hwaccel.js +5 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,4 +1,8 @@
|
|
|
1
|
-
## 2.9.
|
|
1
|
+
## 2.9.10
|
|
2
|
+
|
|
3
|
+
- **Fix**: Raised the adaptive-preset speed margin (`PRESET_SPEED_MARGIN` 1.3 → 1.8). The preset benchmark runs at startup with an idle CPU, but during playback ffmpeg competes with in-process WebTorrent (download + SHA1 hashing) and delivery, so real throughput is lower than benchmarked. A 1.3× margin picked a preset that ran near/below realtime under load (e.g. `faster` at ~1.3×) and stalled; 1.8× picks a preset with genuine headroom (e.g. `veryfast`), keeping playback above 1× under real load.
|
|
4
|
+
|
|
5
|
+
## 2.9.9
|
|
2
6
|
|
|
3
7
|
- **Fix**: Software (libx264) video transcode is much faster on weak ARM hosts, so playback keeps up with realtime: encode uses all CPU cores (`-threads`), and the scaler **never upscales** — the target box is capped to the source size via `min(W,iw)`/`min(H,ih)`, so a small source (e.g. 720x400) is encoded at its own resolution instead of being scaled up to the viewport (far fewer pixels).
|
|
4
8
|
- **New**: Adaptive software preset (preset auto-benchmark). At startup the proxy benchmarks libx264 presets (`fast`→`ultrafast`) on this host and records encode throughput (pixels/sec). Per stream, `hls-session-manager` picks the **highest-quality preset that still encodes the actual (source-capped) output resolution faster than realtime** with a safety margin, falling back to `ultrafast`. This maximises quality without dropping below 1× (which causes stalls). Logged as `video=libx264/<preset>` at session start.
|
package/package.json
CHANGED
package/services/hwaccel.js
CHANGED
|
@@ -37,8 +37,11 @@ const BENCHMARK_REF_W = 640;
|
|
|
37
37
|
const BENCHMARK_REF_H = 360;
|
|
38
38
|
const BENCHMARK_DURATION_SEC = 3;
|
|
39
39
|
// Require the encoder to be this much faster than realtime for the target
|
|
40
|
-
// resolution
|
|
41
|
-
|
|
40
|
+
// resolution. The benchmark runs at startup with an idle CPU; during playback
|
|
41
|
+
// ffmpeg competes with in-process WebTorrent (download + hashing) and delivery,
|
|
42
|
+
// so real throughput is lower. A generous margin keeps playback above 1× under
|
|
43
|
+
// that real load and absorbs complex scenes.
|
|
44
|
+
const PRESET_SPEED_MARGIN = 1.8;
|
|
42
45
|
|
|
43
46
|
/**
|
|
44
47
|
* @param {number} targetWidth
|