Skip to content

Accepting publications

Publishing means the source connects to Sapsan and sends the stream itself (as opposed to ingest, where Sapsan connects to the source). Sapsan accepts publications over RTMP, SRT, and WebRTC WHIP.

Stream configuration

A stream is declared with a publish input, which means "wait until somebody publishes":

listeners:
  rtmp:
    - port: 1935
  webrtc:
    - port: 5005

streams:
  studio:
    inputs:
    - publish: {}

RTMP publishing

Publish from OBS or ffmpeg to:

rtmp://server:1935/static/studio

Note

TODO: clarify the RTMP URL scheme (application/stream key) and streamkey-based publish authorization.

WebRTC publishing (WHIP)

Standard WHIP endpoint:

http://server/streaming/whip/studio

You can publish from a browser or any WHIP-compatible client (e.g. OBS 30+). Codecs are H264 and Opus.

One publisher per stream

While a publication is active, a second publication into the same stream is rejected — the air cannot be hijacked. If the stream also has regular inputs, a publication does not kick out a working source: LSI switches to the publisher under the usual readiness rules (keyframe), and with a fallback file configured the publication may yield to the filler.

SRT publishing

SRT publishing is configured as an SRT input with a dedicated port per stream.

Publish authorization

Publications are protected with publish_tokens — see authorization.

Next steps