SwiftStream is a high-performance HLS (m3u8) streaming accelerator written in Rust. It acts as a local proxy that caches and prefetches media segments to enable faster playback in local media players.
- 🚀 Accelerates HLS/m3u8 streaming playback
- 📦 Local caching of TS segments
- ⚡ Low-latency proxy server
- 📊 Configurable cache settings
Run with Docker
-
Write your
docker-compose.yml
services: swiftstream: image: ghcr.io/klrohias/swiftstream:latest container_name: swiftstream restart: always ports: - <your_expose_port>:<port_in_listenAddr> network_mode: bridge volumes: - /path/to/config.yml:/config.yml
-
Configuration
See Configuration
NOTE: Normally, port in
baseUrl
should be same as the expose port -
Run
docker compose up -d
Build and run
-
Clone and build
git clone https://github.com/your-repo/swiftstream-rs.git cd swiftstream-rs cargo build --release
-
Configuration
See Configuration
-
Run
./target/release/swiftstream
Use in your player
-
For channels list
{baseUrl}/playlist?origin={originUrl}
Example:
http://127.0.0.1:11451/playlist?origin=http://some-website.com/my-tv-program-list.m3u8
-
For a single HLS stream
{baseUrl}/media?origin={originUrl}
Example:
http://127.0.0.1:11451/media?origin=http://some-website.com/stream-such-as-BBC.m3u8
The program defaults to reading the configuration from config.yml
. If you need to customize the configuration file path, please use the SS_CONFIG_PATH
environment variable.