Go-Live

License: MIT Go Report Card Go Release

δΈ­ζ–‡ English

A lightweight, high-performance WebRTC SFU (Selective Forwarding Unit) server built with Go and Pion WebRTC. Supports WHIP/WHEP protocols for streaming, room-based broadcast, recording, and comprehensive observability.


πŸš€ Quick Start

# Clone the repository
git clone https://github.com/LessUp/go-live.git
cd go-live

# Run directly
go run ./cmd/server

# Or use the development script (recommended)
./scripts/start.sh

After the server starts, visit http://localhost:8080 to see the frontend interface.


✨ Features

πŸ“‘

WHIP/WHEP Protocols

Full support for WHIP publishing and WHEP playback, compatible with OBS and browsers

🏠

Room-based Broadcast

SFU architecture with one publisher and multiple subscribers per room

πŸŽ₯

Recording & Upload

Built-in recording with automatic S3/MinIO object storage upload

πŸ“Š

Observability

Prometheus metrics and OpenTelemetry distributed tracing integration

πŸ”’

Authentication

Token and JWT authentication with configurable per-room access control

⚑

High Performance

Low-latency, high-throughput media stream distribution in Go


πŸ“– Documentation Navigation

Documentation Description Link
Usage Guide Deployment, configuration, API examples, troubleshooting Usage Guide
API Reference Complete REST API documentation API Reference
Design System architecture, modules, data flow Design

πŸ› οΈ Quick Deployment

Docker Deployment

# Build image
docker build -t live-webrtc-go:latest .

# Run
docker run --rm -p 8080:8080 live-webrtc-go:latest

# Enable recording
docker run --rm -p 8080:8080 \
  -e RECORD_ENABLED=1 \
  -e RECORD_DIR=/records \
  -v $(pwd)/records:/records \
  live-webrtc-go:latest

Docker Compose

version: '3.8'
services:
  live-webrtc:
    build: .
    ports:
      - "8080:8080"
    environment:
      - RECORD_ENABLED=1
    volumes:
      - ./records:/records
    restart: unless-stopped

πŸ“¦ Requirements

Dependency Version Notes
Go 1.22+ Required for compilation
Docker 20.10+ Optional for container deployment
Browser Chrome 90+ / Firefox 88+ WebRTC support required