@torrent-tv/proxy 2.9.85 → 2.9.86

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,8 @@
1
+ ## 2.9.86
2
+
3
+ - **Fix**: fMP4 playback starts again. The real reason ffmpeg exited before writing anything was the audio, not the file names: the MP4 muxer derives a copied AC-3 track's `dac3` box from the bitstream, so it cannot write `moov` until the first audio packet arrives, while our `empty_moov` demands it at header time — `Cannot write moov atom before AC3 packets. Set the delay_moov flag to fix this.`, captured in the field on a copied AC-3 source. `delay_moov` is now passed alongside it. The `hls` muxer sets that flag itself, which is why the fault appeared only once the muxing moved to the `segment` muxer in 2.9.84; MPEG-TS has no `moov` and was never affected. Verified in the addon container on an AC-3 source: without the flag the exact command the proxy runs fails, with it the segments are written, and the piece layout is unchanged (`ftyp moov moof mdat … mfra`), so the init split added in 2.9.84 still cuts in the same places — headers of consecutive pieces differ in four bytes, all inside `elst`, which the `tfdt` rewriting already overrides.
4
+ - **Chore**: Correcting the 2.9.85 entry below. It blames the `.m4s` extension, and that is false: with the arguments this proxy passes, ffmpeg 8.1.2 writes `.m4s` without complaint (re-measured on the same host, and on 6.1.1). The quoted error is what the same command produces when `-segment_format mp4` is missing — which the proxy never omits — and the field failure ends in `Invalid argument`, not `Muxer not found`. The rename is harmless and stays, but it fixed nothing.
5
+
1
6
  ## 2.9.85
2
7
 
3
8
  - **Fix**: fMP4 playback did not start at all in 2.9.84 — every request for the init segment answered 500. ffmpeg had refused to open the output: `Could not write header (incorrect codec parameters ?)`, because the `segment` muxer determines the container from the file extension and does not recognise `.m4s` for MP4, whatever `-segment_format` says. Segments are now written and named `.mp4` on both paths. The extension is internal: it appears only in our own playlist and in the temporary directory, so nothing outside changes.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@torrent-tv/proxy",
3
- "version": "2.9.85",
3
+ "version": "2.9.86",
4
4
  "description": "Torrent proxy client that exposes webseed-like HTTP stream endpoint.",
5
5
  "license": "GPL-3.0-or-later",
6
6
  "publishConfig": {
@@ -102,8 +102,18 @@ export const fmp4Format = {
102
102
  // `empty_moov` is what makes each piece self-describing, which is what
103
103
  // lets the init be lifted out of it; `default_base_moof` keeps fragment
104
104
  // offsets relative, so removing the header does not invalidate them.
105
+ //
106
+ // `delay_moov` is not optional here. The MP4 muxer builds a copied AC-3
107
+ // track's `dac3` box out of the bitstream, so it cannot write `moov`
108
+ // until the first audio packet has arrived — while `empty_moov` asks for
109
+ // it at header time. Without this flag ffmpeg exits before producing
110
+ // anything: "Cannot write moov atom before AC3 packets", which is exactly
111
+ // how fMP4 playback died in the field on 2.9.84/2.9.85. The `hls` muxer
112
+ // sets this flag itself, which is why the fault only appeared once the
113
+ // muxing moved here. Delaying `moov` does not change the piece layout —
114
+ // measured: still `ftyp moov moof mdat … mfra`.
105
115
  "-segment_format_options",
106
- "movflags=+frag_keyframe+empty_moov+default_base_moof"
116
+ "movflags=+frag_keyframe+empty_moov+default_base_moof+delay_moov"
107
117
  ];
108
118
  },
109
119