finds.dev← search

// the find

gitsummore/nile.js

★ 1,758 · JavaScript · MIT · updated Nov 2018

Scalable peer to peer live video streaming built on torrents and webRTC

nile.js is a proof-of-concept for peer-to-peer live video streaming that chains WebTorrent (torrents over WebRTC) with Socket.io to fan out streams without a media server doing the heavy lifting. The broadcaster records in fixed-length chunks, seeds each chunk as a torrent, and propagates magnet links down a client chain. Abandoned since 2018.

The torrent-chunking approach is genuinely clever — by seeding each recorded segment, you get a DVR-like rewind capability that pure WebRTC streams don't have. The linear client chain with reconnect-on-disconnect is a reasonable way to offload server bandwidth without requiring a mesh. The API surface is minimal and the broadcaster/viewer split is a clean conceptual boundary.

The project is dead and says so in the README — the unpkg CDN links reference a 2017 package version that may not resolve cleanly anymore. The fixed-interval torrent approach introduces unavoidable latency equal to at least one recordInterval (recommended 6-10 seconds), making this useless for anything that needs near-realtime. The client chain topology is a single point of failure — if enough intermediate nodes drop simultaneously before the reconnect logic fires, downstream viewers lose the stream entirely. No tests of substance, no documented browser compatibility, and WebTorrent itself has moved on significantly since this was written.

View on GitHub → Homepage ↗

// want more like this?

We dig through GitHub every week and send a few repos picked for what you actually care about — each with an honest take like this one.

Get finds in your inbox → Search again →