@torrent-tv/proxy 2.56.0 → 2.57.1

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 CHANGED
@@ -1,3 +1,20 @@
1
+ ## 2.57.1
2
+
3
+ - **New**: The flags a Matroska file states about its own subtitle tracks are read, instead of being guessed from the words a releaser typed into a track's name. `FlagForced` (`0x55AA`): "Set to 1 if the track is eligible for automatic selection by the player if it matches the user's language preference, even if the user's preferences would not normally enable subtitles with the selected audio track" — a track of signs and foreign speech, not of dialogue. `FlagHearingImpaired` (`0x55AB`): "suitable for users with hearing impairments". Both travel with the playback plan, so the browser can say which is which; until now "fors" and "SDH" in a menu were whatever text someone happened to write.
4
+ - **Fix**: A track the file marks unusable is no longer offered. `FlagEnabled` (`0xB9`, default 1): "Set to 1 if the track is usable." It is left out of the extraction list but KEPT in the declared one, because ffmpeg keeps it: `matroskadec.c` parses `MATROSKA_ID_TRACKFLAGENABLED` as `EBML_NONE`, reading the element and storing nothing, so the stream is created and numbered like any other. Dropping it would have shifted every track after it off `0:s:N`, which is the numbering defect 2.56.0 exists to remove. An element written with zero length carries its default, and a value outside the declared 0-1 range is not a statement either — only an explicit zero takes a track away.
5
+ - **Fix**: `LanguageBCP47` (`0x22B59D`) is read and takes precedence, which the specification states as a MUST: "If this element is used, then any Language elements used in the same TrackEntry MUST be ignored." A file writing `pt-BR` beside `por` was being shown as plain Portuguese. The tag replaces the code in the list this proxy owns and rides BESIDE it in the list that is lined up against ffmpeg's `-i` banner, which prints the three-letter form — reporting `pt-BR` there would break the pairing and cost the `FlagDefault` reading with it.
6
+
7
+ ## 2.57.0
8
+
9
+ - **New**: the packet witness records the seconds BEFORE a freeze, not only after it. A size-bounded ring (4 x 16 MB, wrapping) runs on the WebRTC UDP port for exactly as long as a data channel is open, and its files are copied aside the moment a wedge is declared. The two field captures that placed this defect (`research/delivery-freeze-sender-silent-2026-08-26.md`) both began 30 s after the queue was already stuck, so neither holds the onset.
10
+ - **Fix**: the capture rotates by SIZE. `-G <seconds>` with `-W <count>` and a file name carrying no strftime field made every rotation write the same name, so the four files the witness believed it kept were one file overwritten four times — which is why both field captures hold 28 s instead of the intended 120.
11
+ - **New**: the capture that follows a wedge runs for 180 s, three times usrsctp's 60 s retransmission ceiling. That length is what turns silence into a statement: a stalled sender whose peer advertises a zero window must probe once per timeout, and no probe appeared in either 28 s capture.
12
+ - **Fix**: a wedge is declared when it is CERTAIN rather than after a chosen delay. Three facts that are not ambiguous together: the queue has not fallen, the accepted-byte counter has not moved for longer than either the queue's own drain time at the best rate this connection has been seen to move bytes at OR the longest pause this connection has shown while healthy, and the peer has sent something during the wedge. The middle term matters twice over — the LAST rate is usually the quietest (with the browser's buffer full the only traffic is the probe, a few hundred bytes a second, and dividing a queue by that gives hours), and an ordinary retransmission timeout stops the counter dead for as long as it lasts. On the field episode's own numbers the answer comes in seconds instead of thirty; on a thin link with a large queue it waits as long as the arithmetic says it should.
13
+ - **New**: ring files left behind by a process that was KILLED are kept at the next startup instead of being deleted by the next viewer's first channel. Seven deaths in a fortnight (roadmap item 1) each threw away the last seconds of wire before them.
14
+ - **Fix**: the ring is stopped and its files removed on shutdown, and it is released by the watch that owns it rather than by the channel's `onClosed`, which does not always come. Either gap left a tcpdump writing on an idle proxy for the life of the process.
15
+ - **Fix**: captures are pruned after each one is written, not only at startup. One episode writes up to six files and the cooldown allows six episodes an hour.
16
+ - **Fix**: the delivery probe's verdict is derived, not chosen. `MISSES_FOR_VERDICT = 4` was compared against a delay that is measurable: SCTP orders per stream but schedules per ASSOCIATION, so a probe waits behind whatever is queued ahead of it on any channel, the unordered one included. Measured 2026-08-26, the old rule printed `association-stopped` at gap 4-7 while 110-150 Mbps crossed that same association and 7.34 GB went through without a failure. The allowance is now that channel's queue divided by the connection's measured rate, plus one round trip; with no rate measured the line says `no-rate-yet` instead of naming a fault.
17
+
1
18
  ## 2.56.0
2
19
 
3
20
  - **Fix**: A subtitle track is asked for by ffmpeg's own number, `0:s:N`, which counts EVERY subtitle stream the file carries — and the container plan counted only the ones it can turn into text, dropping PGS and VobSub before numbering. On a release whose picture-based track comes first the two numberings ran a place apart, with two consequences, both silent: a pushed cue named a track the browser does not know and was dropped, and the browser's own request found no track at all and fell through to the ffmpeg extraction, which reads the whole film for a few kilobytes of text (752 s measured on one file, 2026-08-19). Every text track now carries `declaredIndex` — its position among all the file's subtitle tracks, counted by what a track IS and not by what this code can read — and both the push and `/api/subtitles?trackIndex=` use it. In an MP4 that count includes the `subp` and `clcp` handlers, which ffmpeg also calls subtitle streams.