@torrent-tv/proxy 2.9.84 → 2.9.85

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,7 @@
1
+ ## 2.9.85
2
+
3
+ - **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.
4
+
1
5
  ## 2.9.84
2
6
 
3
7
  - **Fix**: fMP4 now cuts segments where the playlist says too, closing the gap left by 2.9.82 (which covered MPEG-TS only). The muxer that takes explicit cut times writes each fMP4 piece self-contained — `ftyp moov moof mdat … mfra`, confirmed on the field host — which is not what HLS wants, so the pieces are split on serve: the header is lifted out of the first one to become the init segment named by `#EXT-X-MAP`, and removed from every media segment along with the trailing random-access index, whose offsets describe a file that no longer exists. Timestamps still need stamping exactly as before: measured, all pieces of a run report a start of 0.080 s, each carrying its own zero, which is the same defect the existing rewriting already corrects. Verified end to end on a real piece from the field host — split into a 779-byte init and 221 KB of fragments, recombined, and decoded clean.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@torrent-tv/proxy",
3
- "version": "2.9.84",
3
+ "version": "2.9.85",
4
4
  "description": "Torrent proxy client that exposes webseed-like HTTP stream endpoint.",
5
5
  "license": "GPL-3.0-or-later",
6
6
  "publishConfig": {
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @file fMP4 (CMAF) segment format — `.m4s` media segments plus one shared
2
+ * @file fMP4 (CMAF) segment format — `.mp4` media segments plus one shared
3
3
  * `init.mp4` referenced by `#EXT-X-MAP`.
4
4
  *
5
5
  * Codec configuration (SPS/PPS) lives once in the init segment instead of being
@@ -54,7 +54,7 @@ function findFragmentBounds(bytes) {
54
54
  }
55
55
 
56
56
  const INIT_FILE_NAME = "init.mp4";
57
- const SEGMENT_PATTERN = /^segment-(\d{5})\.m4s$/;
57
+ const SEGMENT_PATTERN = /^segment-(\d{5})\.mp4$/;
58
58
 
59
59
  /**
60
60
  * @type {import("./index.js").SegmentFormat}
@@ -74,7 +74,7 @@ export const fmp4Format = {
74
74
  "-hls_fmp4_init_filename",
75
75
  INIT_FILE_NAME,
76
76
  "-hls_segment_filename",
77
- "segment-%05d.m4s"
77
+ "segment-%05d.mp4"
78
78
  ];
79
79
  },
80
80
 
@@ -109,7 +109,7 @@ export const fmp4Format = {
109
109
 
110
110
  /** The output path template for the `segment` muxer. */
111
111
  segmentFileNameTemplate() {
112
- return "segment-%05d.m4s";
112
+ return "segment-%05d.mp4";
113
113
  },
114
114
 
115
115
  /**
@@ -151,7 +151,7 @@ export const fmp4Format = {
151
151
  },
152
152
 
153
153
  segmentFileName(index) {
154
- return `segment-${String(index).padStart(5, "0")}.m4s`;
154
+ return `segment-${String(index).padStart(5, "0")}.mp4`;
155
155
  },
156
156
 
157
157
  isSegmentFileName(fileName) {