# mafintosh/torrent-stream

The low level streaming torrent engine that peerflix uses

Repository: https://github.com/mafintosh/torrent-stream
Canonical: https://ross.abutalabs.com/products/torrent-stream
Language: JavaScript
License: MIT
License Family: permissive
Last push: 2020-12-04T19:55:34+00:00

## Health v2 (maintenance only)
Score: 32/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 0, release rhythm 35, longevity 100
- inputs: {"age_days": 4560, "days_push": 2098, "days_rel": null, "gap_med": null, "n_releases_24m": 0}
- flags: no_releases
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 1973, forks 228 (observed 2026-08-28T04:06:01.053488+00:00)

## What it is
torrent-stream is a low-level Node.js streaming torrent client that exposes files inside a torrent as readable streams, downloading pieces on demand. It is the engine underlying peerflix and supports magnet links, DHT, trackers, and selective file streaming.

## Use cases
- stream a video from a torrent without downloading the whole file first
- download only specific files from a torrent via magnet link
- pipe torrent file contents into another Node.js stream
- build a torrent-based media player or CLI like peerflix
- selectively fetch pieces of a torrent on demand

## When to choose
- you need programmatic, stream-based access to torrent file contents in Node.js
- you want on-demand piece downloading rather than full sequential download
- you're building a higher-level tool like a torrent streaming player

## When to avoid
- you need a full-featured torrent client with a UI (use WebTorrent or a desktop client)
- you need active maintenance and recent updates (last release was 2020)
- you want browser support (this is Node.js only)

## Facets
- artifact type: library
- maturity: maintenance
- function: streaming, p2p, http-server
- domain: media, files, networking
- platform: cross-platform
- tags: torrent, bittorrent, magnet-links, node-streams, peer-to-peer, video-streaming, nodejs

## Member repositories
- mafintosh/torrent-stream (main) score 32

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:06:01.053488+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T03:04:58.976049+00:00, confidence not recorded.
  - readme: https://github.com/mafintosh/torrent-stream (fetched 2026-08-28T04:06:01.053488+00:00, sha b09c742bc13b)
  - registry_npm: https://registry.npmjs.org/torrent-stream (fetched 2026-08-29T10:44:37.938798+00:00, sha a0f788322dd4)
- Data as of 2026-08-30T08:39:29.467469+00:00.
