How prohibitedtv/bitriver-live works
BitRiver Live is a self-hosted streaming platform: creators publish RTMP streams, the Go control plane coordinates channel state and media services, and viewers discover and watch live video, chat, follow creators, and play VODs. The principal path runs from OBS through SRS and OME to the Next.js viewer, with API-managed channel mapping and transcoding; uploads form a separate creator-to-VOD path. README capabilities also include authentication, moderation, analytics, installation, and health operations. Edges are limited to README-documented flows or visible source references; several implementation details are unsampled.
Main entry points: server/main.go Go API · app Next.js viewer · viewer-api-core.ts Viewer API client · srs-controller/main.go SRS controller
Components 22
Viewer experience
- Next.js viewer
web/viewer/app - Viewer API client
web/viewer/lib/viewer-api-core.ts - Upload manager
web/viewer/components/UploadManager.tsx - Chat client
web/static/chat-client.js
Control plane
- Go API
cmd/server/main.go - API handlers
internal/api - Authentication
internal/auth - Chat gateway
internal/chat/gateway.go - Ingest controller
internal/ingest/http_controller.go - Install preflight
internal/api/installer_preflight.go - Control centre
web/static/app.js
Media pipeline
- SRS controller
cmd/srs-controller/main.go - SRS ingest
- OME playback
- FFmpeg transcoder
cmd/transcoder/main.go
Persistence and coordination
- Postgres
- Redis
- Storage layer
internal/storage/storage.go
Host operations
- Installer wizard
web/static/installer.js - Host CLI
cmd/bitriver/main.go
Other components
- Creator / OBS
- Viewers
Connections 24
- Creator / OBS → SRS ingest: publishes RTMP
README.md - SRS ingest → SRS controller: publish callback
README.md - SRS controller → Go API: authenticates callback
- Go API → SRS ingest: maps channel
README.md - SRS ingest → OME playback: forwards RTMP
README.md - OME playback → Next.js viewer: serves LL-HLS
README.md - Go API → FFmpeg transcoder: manages jobs
README.md - FFmpeg transcoder → Next.js viewer: serves HLS
README.md - Viewers → Next.js viewer: browses and watches
README.md - Next.js viewer → Viewer API client: requests data
- Viewer API client → Go API: calls API
- Upload manager → Viewer API client: creates uploads
web/viewer/components/UploadManager.tsx - Next.js viewer → Chat client: uses chat
- Chat client → Chat gateway: WebSocket events
web/static/chat-client.js - Go API → API handlers: routes requests
- API handlers → Authentication: authenticates users
- Go API → Storage layer: persists product data
- Storage layer → Postgres: reads and writes
- Go API → Redis: coordinates services
- Creator / OBS → Next.js viewer: manages channel
README.md - Installer wizard → Install preflight: checks setup
web/static/installer.js - Control centre → Go API: requests status
web/static/app.js - Host CLI → Go API: manages host
- Ingest controller → SRS controller: coordinates ingest