Thanks to visit codestin.com
Credit goes to github.com

Skip to content

A modern, open-source torrent streaming engine serving as an alternative to Stremio's server.js

License

Notifications You must be signed in to change notification settings

perpetus/stream-server

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

38 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Stream Server

πŸš€ Open Source Torrent Streaming Engine

A modern, high-performance alternative to Stremio's closed-source server.js

Release Build License Open Source


πŸ’‘ About

Stream Server is a fully open-source replacement for Stremio's proprietary server.js. While Stremio's streaming backend remains closed-source, this project provides complete transparency, community-driven development, and the freedom to run your streaming engine locally on your own terms.

Built in Rust for maximum performance, minimal memory footprint, and rock-solid reliability.


🌟 Why Stream Server?

Feature Stream Server Stremio server.js
Open Source βœ… Yes (MIT License) ❌ Closed source
Performance ⚑ Native Rust Node.js overhead
Memory Usage ~50MB ~200MB+
Control βœ… Full local control ⚠️ Limited
Customizable βœ… Fork & modify ❌ No access
HLS Transcoding βœ… Built-in βœ…
Seekable Streams βœ… Instant ⚠️ Variable
Archive Streaming βœ… RAR/ZIP/7Z βœ…

Seamless Migration: Drop-in compatible with existing Stremio setups. Same API endpoints, same functionality β€” just faster and open source.


✨ Features

Core Streaming

  • πŸš€ High Performance: Native Rust with optional C++ libtorrent backend
  • πŸ“Ί HLS Transcoding: Real-time video transcoding via FFmpeg (master.m3u8, stream.m3u8)
  • πŸ”§ Multiple Backends: librqbit (pure Rust) or libtorrent (battle-tested C++)
  • πŸ“‘ HTTP Range Requests: Full support for instant seeking

Media Support

  • πŸ“ Subtitle Extraction: Automatic detection, OpenSubtitles hash calculation
  • 🎬 Video Probing: FFprobe integration for track analysis
  • πŸ“¦ Archive Streaming: Direct playback from RAR, ZIP, 7Z, TAR archives

API Compatibility

  • πŸ”Œ Stats API: /stats.json for server status and torrent info
  • 🌐 Network Info: /network-info endpoint for interface discovery
  • πŸ’“ Heartbeat: /heartbeat for health checks
  • βš™οΈ Settings: Runtime-configurable via /settings

πŸ“¦ Installation

Pre-built Binaries

Download from Releases:

Platform Download
Windows stream-server-windows-amd64.exe / .msi
Linux (Debian/Ubuntu) .deb package
Linux (Universal) .AppImage
Arch Linux .pkg.tar.zst

Build from Source

# Default build (librqbit - recommended)
cargo build --release

# With libtorrent backend (advanced)
cargo build --release --features libtorrent --no-default-features

πŸš€ Quick Start

# Run the server
./stream-server

# Or with cargo
cargo run --release -p server

The server starts on http://localhost:11470 by default (compatible with standard streaming server port).


πŸ”§ Build Instructions

🐧 Arch Linux
sudo pacman -S rustup
rustup default stable

# For libtorrent backend
sudo pacman -S libtorrent-rasterbar boost pkg-config
🐧 Ubuntu / Debian
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
source ~/.cargo/env

sudo apt update
sudo apt install build-essential pkg-config libssl-dev

# For libtorrent backend
sudo apt install libtorrent-rasterbar-dev libboost-all-dev
🐧 Fedora / RHEL
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
source ~/.cargo/env

sudo dnf install gcc gcc-c++ pkg-config openssl-devel

# For libtorrent backend
sudo dnf install rb_libtorrent-devel boost-devel
🍎 macOS
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
source ~/.cargo/env

# For libtorrent backend
brew install libtorrent-rasterbar boost pkg-config
πŸͺŸ Windows
# 1. Install Rust from https://rustup.rs
# 2. Install Visual Studio Build Tools with "Desktop development with C++"
# 3. For libtorrent, use vcpkg:
git clone https://github.com/microsoft/vcpkg
.\vcpkg\bootstrap-vcpkg.bat
.\vcpkg\vcpkg install libtorrent:x64-windows-static

πŸ“Š Backend Comparison

Feature librqbit libtorrent
Language Pure Rust C++ via FFI
Binary Size Smaller Larger
Maturity Newer Battle-tested
DHT βœ… βœ…
uTP βœ… βœ…
Piece Deadline ❌ βœ…
Windows Setup βœ… Easy ⚠️ Complex

πŸ“ Project Structure

stream-server/
β”œβ”€β”€ server/           # HTTP server and API routes
β”œβ”€β”€ enginefs/         # Torrent engine abstraction
β”‚   └── src/backend/
β”‚       β”œβ”€β”€ librqbit.rs   # Pure Rust backend
β”‚       └── libtorrent.rs # Native C++ backend
└── libtorrent-sys/   # FFI bindings to libtorrent-rasterbar

πŸ› Troubleshooting

libtorrent not found
pkg-config --exists libtorrent-rasterbar && echo "Found" || echo "Not found"
pkg-config --cflags --libs libtorrent-rasterbar
Boost not found

Install boost development headers:

  • Arch: boost
  • Ubuntu: libboost-all-dev
  • Fedora: boost-devel
  • macOS: brew install boost

πŸ“„ License

MIT License - see LICENSE for details.


⭐ Star this repo if you find it useful!

Keywords

stremio server.js alternative open source streaming engine torrent streaming local streaming desktop streaming hls transcoding rust torrent libtorrent video streaming server media engine torrent player stream torrents stremio alternative enginefs stremio open source

About

A modern, open-source torrent streaming engine serving as an alternative to Stremio's server.js

Topics

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages