-
Notifications
You must be signed in to change notification settings - Fork 4
Home
English | 中文
High-performance multi-protocol live streaming server written in Go.
LiveForge is an open-source, modular media streaming server that ingests, transmuxes, and delivers audio/video in real time. It supports RTMP, RTSP, SRT, WebRTC (WHIP/WHEP), HLS, LL-HLS, DASH, HTTP-FLV, HTTP-TS, FMP4, GB28181, and WebSocket streaming -- all from a single binary with zero external dependencies.
| Direction | Protocols |
|---|---|
| Ingest (Publish) | RTMP, RTSP (TCP + UDP), SRT, WebRTC WHIP, GB28181 |
| Playback (Subscribe) | RTMP, RTSP, SRT, WebRTC WHEP, HLS, LL-HLS, DASH, HTTP-FLV, HTTP-TS, FMP4, WebSocket |
Any ingest protocol can be played back via any delivery protocol. For example: RTMP push to WebRTC pull, or GB28181 camera to HLS playback.
- Video: H.264, H.265/HEVC, VP8, VP9, AV1
- Audio: AAC, Opus, G.711 (PCMU/PCMA), MP3, G.722, G.729, Speex
- Audio Transcoding — On-demand codec bridging (AAC ↔ Opus ↔ G.711 ↔ MP3) between protocols
- GB28181 — Full video surveillance support: SIP signaling, live invite, playback, PTZ, alarm, device simulator
- Cluster Deployment — Multi-protocol forwarding and origin pull (RTMP/SRT/RTSP/RTP/GB28181) with HTTP scheduler
- LL-HLS — Low-Latency HLS with partial segments and blocking playlist reload
- Prometheus Metrics — Server-level and per-stream monitoring with Grafana-ready queries
- Testing Tools — Built-in lf-test CLI and GB28181 device simulator
git clone https://github.com/im-pingo/liveforge.git
cd liveforge
go build -o liveforge ./cmd/liveforge
./liveforge -c configs/liveforge.yamlRTMP (OBS / FFmpeg):
ffmpeg -re -i input.mp4 -c copy -f flv rtmp://localhost:1935/live/stream1RTSP:
ffmpeg -re -i input.mp4 -c copy -f rtsp rtsp://localhost:8554/live/stream1SRT:
ffmpeg -re -i input.mp4 -c copy -f mpegts "srt://localhost:6000?streamid=publish:/live/stream1"WebRTC (Browser):
Open http://localhost:8090/console, click "+ WebRTC Publish", select camera/mic, and start streaming.
GB28181:
Configure your IP camera to point at localhost:5060, or use the built-in simulator:
go run ./tools/gb28181-sim -server 127.0.0.1:5060| Protocol | URL |
|---|---|
| RTMP | rtmp://localhost:1935/live/stream1 |
| RTSP | rtsp://localhost:8554/live/stream1 |
| SRT | srt://localhost:6000?streamid=subscribe:/live/stream1 |
| HLS / LL-HLS | http://localhost:8080/live/stream1.m3u8 |
| DASH | http://localhost:8080/live/stream1.mpd |
| HTTP-FLV | http://localhost:8080/live/stream1.flv |
| HTTP-TS | http://localhost:8080/live/stream1.ts |
| FMP4 | http://localhost:8080/live/stream1.mp4 |
| WebSocket | ws://localhost:8080/ws/live/stream1.flv |
| WebRTC | Open console, select stream, preview via WebRTC tab |
See the sidebar for the full list of documentation pages covering configuration, protocols, GB28181, cluster deployment, audio transcoding, LL-HLS, authentication, recording, webhooks, REST API, metrics, testing tools, architecture, usage scenarios, and troubleshooting.