|
Some checks failed
release / build-and-upload (push) Failing after 3m33s
- WebUI Copy button for absolute m3u8 URLs (no player) - Per-stream variants ladder; HD/SD live-transcoded as sibling HLS - variants_json in DB/API; supervisor spawns scaled ffmpeg packagers |
||
|---|---|---|
| .. | ||
| internal | ||
| servecmd | ||
| go.mod | ||
| go.sum | ||
| README.md | ||
streamd
Control plane: REST API, SQLite, dashboard and media supervisor. Hosted by the
single binary as drm serve.
apps/streamd/
servecmd/ the command body, imported by apps/cli
internal/api HTTP handlers
internal/db SQLite store
internal/ui dashboard (index.html, app.js, app.css)
internal/supervisor downloader + ffmpeg supervision
internal/ws agent heartbeat
Run
./bin/drm serve --bind 127.0.0.1:8083 --data .cache/streamd --token SECRET
Port 8083 by default, to stay clear of anything already on 8080/8081. On start,
missing media tools are downloaded into bin/ (ffmpeg, N_m3u8DL-RE, mp4decrypt)
unless you pass --skip-deps. Flags / env still win when set.
Open http://HOST:8083/ and put the token in the header box for mutating actions.
Add a stream with an .mpd URL; Widevine keys are optional for clear content.
Optional per-stream SOCKS5/HTTP proxy routes origin fetches (geo egress).
API
| Method | Path | Notes |
|---|---|---|
| GET | /api/health |
liveness + uptime |
| GET | /api/apps |
modules// providers, channels, registered rewriters |
| GET | /api/streams |
list + runtime (the agent polls this) |
| POST | /api/streams |
create |
| GET/PATCH/DELETE | /api/streams/:id |
detail / edit / delete |
| POST | /api/streams/:id/start|stop|restart |
desired state |
| POST | /api/streams/:id/credentials |
{mpd,key?,pssh?,auth?,pid?} — key optional; restarts if enabled |
| POST | /api/streams/:id/claim |
agent lease (agent_id, TTL ~3m) |
| POST | /api/streams/:id/claim/release |
release lease |
Mutating routes need Authorization: Bearer TOKEN (or X-Streamd-Token, or
?token=). HLS output is served from --data/www at /hls/<name>/index.m3u8.
No provider knowledge
The schema has no provider defaults, and the dashboard's app/channel pickers come
from /api/apps. Per-stream downloader settings resolve at start time:
stored row -> the stream's app module (app.StreamDefaults) -> neutral defaults
The manifest rewriter is a registry lookup on the stream's rewriter column, and
HLS is detected from the manifest shape — not from an app or stream name.
Status
| Area | State |
|---|---|
| serve + SQLite + CRUD UI + claims + credentials | done |
/api/apps + module-driven defaults |
done |
| Real downloader/ffmpeg workers + playlist health | partial — least exercised path |
Full guide: docs/streamd.md