go-rtmp#

A production-ready RTMP server in pure Go. Zero external dependencies.

Stream from OBS/FFmpeg → go-rtmp server → multiple viewers + FLV recording + multi-destination relay.


What is go-rtmp?#

go-rtmp is a lightweight, high-performance RTMP server built entirely on Go’s standard library. It receives live audio/video streams from tools like OBS Studio or FFmpeg, and can simultaneously:

  • Relay streams to unlimited subscribers in real-time
  • Record streams to FLV files on disk
  • Forward streams to external RTMP servers (YouTube, Twitch, custom CDNs)
  • Notify external services via webhooks, shell scripts, or stdio hooks
  • Authenticate publishers and subscribers with pluggable token-based validation
  • Monitor live metrics via HTTP /debug/vars endpoint

Key Features#

FeatureDescription
Zero DependenciesBuilt entirely on Go’s standard library — no vendor lock-in
RTMP v3 ProtocolFull handshake, chunk streaming, AMF0 commands
Enhanced RTMPH.265 (HEVC), AV1, VP9 via E-RTMP v2 FourCC signaling
Live RelayTransparent pub/sub forwarding to unlimited subscribers
FLV RecordingAutomatic recording with timestamped filenames
Late-Join SupportH.264/H.265/AV1/VP9 + AAC config caching for instant playback
Multi-Destination RelayForward to external RTMP servers (-relay-to)
AuthenticationStatic tokens, JSON file, or webhook callback
Event HooksWebhooks, shell scripts, stdio for all lifecycle events
Expvar MetricsLive counters via HTTP endpoint
Zombie DetectionTCP deadline enforcement (read 90s, write 30s)

Get Started#

- ### 🚀 [Quick Start](/rtmp-go/docs/quick-start/) Build, run, and stream in **under 5 minutes**. No configuration needed. - ### 📖 [User Guide](/rtmp-go/docs/user-guide/) Configure recording, relay, authentication, hooks, metrics, and more. - ### 🔧 [Developer Guide](/rtmp-go/docs/developer/) Architecture, RTMP protocol reference, code walkthrough, and testing.

Supported Platforms#

PlatformArchitectureBinary
Linuxx86_64, ARM64rtmp-server-linux-amd64
macOSIntel, Apple Siliconrtmp-server-darwin-arm64
Windowsx86_64rtmp-server-windows-amd64.exe

Requirements#

  • Go 1.21+ (to build from source)
  • FFmpeg (optional, for testing with ffmpeg/ffplay)
  • OBS Studio (optional, for live streaming from camera/screen)