Skip to content

Publishing SRT

media.publish.srt

The source connects to Sapsan and sends the stream. This is publishing; client capture from a remote server belongs to media.ingest.

This is the basic publishing feature for a single server, without cluster routing. Multi-server deployments require the separate SRT Streamkey feature: it will select the stream and authorize publication using the supplied secret key. This feature is planned and is not implemented yet.

Configuration

streams:
- name: studio
  srt_publish:
    port: 9000
    passphrase: verysecretpass
    latency_ms: 120

Sender URL: srt://server:9000?passphrase=verysecretpass. The port belongs to one stream. srt_publish implies a publish input; it need not be written separately. latency_ms sets receive latency, default 120 ms. The port selects the stream; streamid does not.

Authentication

The stream passphrase (10–79 bytes) controls admission and encryption. auth.publish_tokens and streamid do not authorize SRT publishing. Without passphrase, the port accepts unencrypted connections.

Transport

MPEG-TS over SRT/UDP. srt_publish.port accepts sender connections.

Supported codecs

  • H.264
  • HEVC / H.265
  • AV1
  • JPEG 2000
  • MPEG-2 Video
  • AAC (ADTS)
  • AC-3
  • E-AC-3
  • MPEG Audio (Layer II / III)
  • SMPTE ST 302M

MPEG-TS is the container; SRT, RIST, UDP and HTTP are delivery transports. This list describes extracting frames from MPEG-TS, not decoding them or player support.

AV1 requires stream_type 0x06 and the AV01 registration descriptor in the PMT; one PES must contain a complete temporal unit. AV1 in MPEG-TS without this signaling is not supported. AAC parsing uses ADTS; recognizing stream_type 0x11 does not establish LATM support. Opus can be identified in the PMT, but the current PES decoder does not emit its frames.

Error handling

A stream accepts one active publication at a time. When the connection ends, the source becomes unavailable and shared failover rules apply. The sender initiates reconnection.

When a working source precedes publish, the RTMP or SRT encoder is accepted as standby. Once the primary recovers through the clean window, the encoder stays connected as standby. A second encoder is rejected, even while the first is standby or has not sent usable frames. Switching to video publishing waits for the next keyframe; audio-only waits for a usable audio frame. Existing source and transport timeouts apply.

streams:
- name: studio
  srt_publish:
    port: 9000
    passphrase: verysecretpass
  inputs:
  - rtsp:
      url: rtsp://camera/main
  - publish: {}

Next steps