Skip to content
im-pingo edited this page Mar 26, 2026 · 1 revision

English | 中文

RTMP

LiveForge includes a full RTMP implementation supporting both ingest (publish) and playback (subscribe).

Configuration

rtmp:
  enabled: true
  listen: ":1935"
  chunk_size: 4096
  # tls: true          # Optional: override global TLS setting
Field Type Default Description
enabled bool true Enable/disable the RTMP module
listen string ":1935" TCP listen address
chunk_size int 4096 RTMP chunk size in bytes
tls *bool nil Per-module TLS override (see Server & TLS)

When TLS is enabled, the module serves RTMPS.

Supported Commands

  • connect -- Client connection with app name
  • createStream -- Create a new RTMP stream
  • publish -- Begin publishing to a stream key
  • play -- Begin subscribing to a stream key
  • deleteStream -- Close a stream
  • FCPublish / FCUnpublish -- Flash Communication publish commands
  • releaseStream -- Release a stream key

Publish Examples

OBS Studio

  1. Settings > Stream
  2. Service: Custom
  3. Server: rtmp://your-server:1935/live
  4. Stream Key: stream1

FFmpeg

ffmpeg -re -i input.mp4 -c copy -f flv rtmp://localhost:1935/live/stream1

With Authentication Token

When JWT auth is enabled, pass the token as a query parameter:

ffmpeg -re -i input.mp4 -c copy -f flv "rtmp://localhost:1935/live/stream1?token=eyJhbGciOi..."

In OBS, append the token to the stream key:

stream1?token=eyJhbGciOi...

Play Examples

FFplay

ffplay rtmp://localhost:1935/live/stream1

VLC

Open Network Stream: rtmp://localhost:1935/live/stream1

Use Cases

  • Primary ingest point for OBS, FFmpeg, GStreamer, and other RTMP encoders
  • Low-latency distribution to RTMP-compatible players and CDNs
  • Protocol bridging -- publish via RTMP and play via HLS, DASH, WebRTC, or any other protocol

Clone this wiki locally