Skip to content

Commit b27ef6a

Browse files
committed
add: README
1 parent dbd91e8 commit b27ef6a

File tree

2 files changed

+117
-0
lines changed

2 files changed

+117
-0
lines changed

README.md

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
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+
```

README.zh-CN.md

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
# SwiftStream 🚀
2+
3+
[English](README.md) | [简体中文](README.zh-CN.md)
4+
5+
## 项目概述
6+
SwiftStream 是一款用 Rust 编写的高性能 HLS (m3u8) 流媒体加速器。它作为本地代理服务器,通过缓存和预加载媒体分段来实现本地播放器的流畅播放加速。
7+
8+
## 核心特性
9+
- 🚀 提升 HLS/m3u8 流媒体播放速度
10+
- 📦 本地缓存 TS 媒体分段
11+
- ⚡ 低延迟代理服务
12+
- 📊 可自定义缓存配置
13+
14+
## 使用指南
15+
<details>
16+
17+
<summary>自行构建并运行</summary>
18+
19+
1. 克隆并构建
20+
```bash
21+
git clone https://github.com/your-repo/swiftstream-rs.git
22+
cd swiftstream-rs
23+
cargo build --release
24+
```
25+
26+
2. 配置
27+
参见 [配置说明](#配置说明)
28+
29+
3. 运行
30+
```shell
31+
./target/release/swiftstream
32+
```
33+
34+
</details>
35+
36+
## 配置说明
37+
程序默认从 `config.yml` 读取配置。如需指定自定义配置文件路径,请使用 `SS_CONFIG_PATH` 环境变量。
38+
39+
```yml
40+
# listenAddr 服务监听地址
41+
listenAddr: 0.0.0.0:19198
42+
43+
# baseUrl 服务访问地址
44+
baseUrl: http://127.0.0.1:19198
45+
46+
# sizeLimit 内存缓存上限(单位:字节,默认值:536870912)
47+
sizeLimit: 536870912 # 512 MB
48+
49+
# cacheExpire TS分段缓存有效期(单位:秒,默认值:60)
50+
cacheExpire: 60
51+
52+
# trackExpire 媒体资源跟踪有效期(单位:秒,默认值:30)
53+
trackExpire: 30
54+
55+
# trackInterval 媒体预加载间隔(单位:秒,默认值:5)
56+
trackInterval: 5
57+
```

0 commit comments

Comments
 (0)