|
| 1 | +# SwiftStream 🚀 |
| 2 | + |
| 3 | +[English](README.md) | [简体中文](README.zh-CN.md) |
| 4 | + |
| 5 | +## Project Overview |
| 6 | +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. |
| 7 | + |
| 8 | +## Key Features |
| 9 | +- 🚀 Accelerates HLS/m3u8 streaming playback |
| 10 | +- 📦 Local caching of TS segments |
| 11 | +- ⚡ Low-latency proxy server |
| 12 | +- 📊 Configurable cache settings |
| 13 | + |
| 14 | +## Usage |
| 15 | +<details> |
| 16 | + |
| 17 | +<summary>Build and run</summary> |
| 18 | + |
| 19 | +1. Clone and build |
| 20 | + |
| 21 | + ```bash |
| 22 | + git clone https://github.com/your-repo/swiftstream-rs.git |
| 23 | + cd swiftstream-rs |
| 24 | + cargo build --release |
| 25 | + ``` |
| 26 | + |
| 27 | +2. Configuration |
| 28 | + |
| 29 | + See [Configuration](#configuration) |
| 30 | + |
| 31 | +3. Run |
| 32 | + |
| 33 | + ```shell |
| 34 | + ./target/release/swiftstream |
| 35 | + ``` |
| 36 | + |
| 37 | +</details> |
| 38 | + |
| 39 | +## Configuration |
| 40 | +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. |
| 41 | + |
| 42 | +```yml |
| 43 | +# listenAddr, where does your server run at |
| 44 | +listenAddr: 0.0.0.0:19198 |
| 45 | +
|
| 46 | +# baseUrl, where can you access to the server |
| 47 | +baseUrl: http://127.0.0.1:19198 |
| 48 | +
|
| 49 | +# sizeLimit, the maximum RAM size use for caching (in bytes, default: 536870912) |
| 50 | +sizeLimit: 536870912 # 512 MB |
| 51 | +
|
| 52 | +# cacheExpire, the expire of cached ts segments (in seconds, default: 60) |
| 53 | +cacheExpire: 60 |
| 54 | +
|
| 55 | +# trackExpire, the expire of a media (in seconds, default: 30) |
| 56 | +trackExpire: 30 |
| 57 | +
|
| 58 | +# trackExpire, the interval of starting to prepare a media (in seconds, default: 5) |
| 59 | +trackInterval: 5 |
| 60 | +``` |
0 commit comments