@torrent-tv/proxy 2.95.0 → 2.95.2

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.
@@ -42,6 +42,21 @@ The MPEG-4 Part 2 set is decoded by the same decoder (`mpeg4`) as an XviD or
42
42
  DivX 4+ release. VC-1 has no set because ffmpeg has no VC-1 encoder, and
43
43
  10-bit AV1 has none yet; both are priced as H.264, and the startup log says so.
44
44
 
45
+ ## The encode reference clip
46
+
47
+ `cal-encode-reference.mp4` is 3 s of **"Chimera"**, also Netflix Open Content
48
+ under CC BY 4.0, from `AV1/Chimera/Old/Chimera-AV1-8bit-1920x1080-6736kbps.mp4`
49
+ at 250 s, re-encoded with `libx264 -preset slow -crf 21 -profile:v high -g 72`,
50
+ 1920×1080, 24 fps, no audio. Every startup encode reading is taken on it.
51
+
52
+ It is the middle of that film by how hard it is to encode, and that film was
53
+ the hardest of four measured on the addon host on 2026-10-07 (Meridian, Chimera,
54
+ Sparks, Cosmos Laundromat): its typical stretch cost 1.30x the processor time per
55
+ second of video of the Meridian clip used before at `ultrafast` and 2.2x at
56
+ `fast`. Encoded at `-crf 12` instead, the same stretch cost the same within 2 %.
57
+ (torrent-tv/meta#3, `research/startup-calibration-spread-2026-10-07.md` in
58
+ `torrent-tv/meta`.)
59
+
45
60
  ## Why six, and why this grid
46
61
 
47
62
  `services/encode/hwaccel.js` decodes them at startup and fits the host's decode cost,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@torrent-tv/proxy",
3
- "version": "2.95.0",
3
+ "version": "2.95.2",
4
4
  "description": "Torrent proxy client that exposes webseed-like HTTP stream endpoint.",
5
5
  "license": "GPL-3.0-or-later",
6
6
  "repository": {
@@ -506,7 +506,22 @@ const CALIBRATION_SETS = {
506
506
  "cal-av1-480-lo.mp4"
507
507
  ]
508
508
  };
509
- export const CALIBRATION_REFERENCE_CLIP = "cal-h264-1080-hi.mp4";
509
+ /**
510
+ * The footage every encode reading is taken on: 3 s of Netflix Open Content
511
+ * "Chimera" (CC BY 4.0), from the middle of that film by how hard it is to
512
+ * encode (torrent-tv/meta#3).
513
+ *
514
+ * It used to be the first decode clip, 2 s of "Meridian". Measured on the addon
515
+ * host on 2026-10-07, against the hardest and the middle stretches of four films,
516
+ * that clip was the cheapest of them all to encode: a typical stretch of Chimera
517
+ * took 1.32x its processor time per second of video at `ultrafast` and 2.42x at
518
+ * `fast`, so every startup figure read a machine faster than it is on an
519
+ * ordinary film. The hardest film's typical stretch is the baseline, not its
520
+ * hardest five seconds: the offer is about the speed a machine holds for a whole
521
+ * film, and a short hard stretch is what the viewer's cushion is for
522
+ * (`research/startup-calibration-spread-2026-10-07.md`).
523
+ */
524
+ export const CALIBRATION_REFERENCE_CLIP = "cal-encode-reference.mp4";
510
525
  export const CALIBRATION_DIR = path.join(path.dirname(fileURLToPath(import.meta.url)), "..", "..", "assets", "calibration");
511
526
  // How wide the measured window must be before the slope is trusted, and how
512
527
  // long to wait for it at most.
@@ -1,4 +1,5 @@
1
1
  import { AudioTrack } from "./tracks/AudioTrack.js";
2
+ import { TextSubtitleTrack } from "./tracks/TextSubtitleTrack.js";
2
3
 
3
4
  const VIDEO_CODECS = new Map([
4
5
  ["V_MPEG4/ISO/AVC", "h264"], ["avc1", "h264"], ["avc3", "h264"],
@@ -37,7 +38,11 @@ export function playbackDeclarations({ tracks, media, fileBytes = null }) {
37
38
  ...track, index, streamIndex: track.declaredIndex,
38
39
  codec: type === "audio" ? AudioTrack.codecNameOf(track)
39
40
  : SUBTITLE_CODECS.get(track.codecId) ?? track.codecId.toLowerCase(),
40
- title: track.name ?? ""
41
+ title: track.name ?? "",
42
+ // The browser offers only tracks marked text-based: a picture subtitle
43
+ // cannot become WebVTT. Dropped when the plan moved to these declarations
44
+ // (torrent-tv/meta#95), which emptied every subtitle menu (#8).
45
+ ...(type === "subtitle" ? { textBased: TextSubtitleTrack.isTextCodec(track.codecId) } : {})
41
46
  }));
42
47
  const audioTracks = inventory("audio"), subtitleTracks = inventory("subtitle");
43
48
  return { tracks, video, audioTracks, subtitleTracks,