Torrent-stream is a core library that underpins peerflix (and similar tools), providing low-level torrent downloading and streaming capabilities in Node.js. It handles connecting to the BitTorrent swarm, negotiating peer connections, fetching torrent pieces, and exposing individual files inside a torrent as streams. This enables developers to build custom torrent-based applications — not just streaming video, but also file downloaders, partial-download managers, or peer-to-peer file distribution tools. The library supports selecting which files to download (useful in multi-file torrents), serves requested pieces on demand, and allows streaming large files without fully writing them to disk upfront — ideal for memory-efficient or on-the-fly consumption contexts. Because torrent-stream is a plain Node.js module, you can embed it in any JavaScript-based backend or tool, integrate it with HTTP servers to serve torrent content, or combine it with other processing pipelines.

Features

  • Connects to BitTorrent swarms and manages peer connections
  • Parses torrent files or magnet links and enumerates contained files
  • Provides file-level streams so you can read file contents while pieces download
  • Selective download: choose which files in a torrent to fetch (skip others)
  • On-demand piece streaming: no need to download whole torrent before access
  • Compatible with Node.js – usable in custom backends, servers, and media-serving apps

Project Samples

Project Activity

See All Activity >

Categories

BitTorrent

License

MIT License

Follow torrent-stream

torrent-stream Web Site

Other Useful Business Software
AI-generated apps that pass security review Icon
AI-generated apps that pass security review

Stop waiting on engineering. Build production-ready internal tools with AI—on your company data, in your cloud.

Retool lets you generate dashboards, admin panels, and workflows directly on your data. Type something like “Build me a revenue dashboard on my Stripe data” and get a working app with security, permissions, and compliance built in from day one. Whether on our cloud or self-hosted, create the internal software your team needs without compromising enterprise standards or control.
Try Retool free
Rate This Project
Login To Rate This Project

User Reviews

Be the first to post a review of torrent-stream!

Additional Project Details

Operating Systems

Windows

Programming Language

JavaScript

Related Categories

JavaScript BitTorrent Client

Registered

2025-12-04