Skip to content

Restreaming (push)

Sapsan can actively send a stream onward: to CDNs and streaming platforms over RTMP, to another server over SRT, or into the network over UDP (multicast/unicast). A stream can have several pushes at once.

Configuration

Each push has a unique name and exactly one protocol:

streams:
  tv1:
    inputs:
    - udp: {host: 239.0.0.1, port: 5000}
    pushes:
    - name: youtube
      rtmp:
        url: rtmp://a.rtmp.youtube.com/live2/xxxx-xxxx
    - name: backup-dc
      srt:
        host: 203.0.113.10
        port: 9000
        passphrase: verysecretpass
    - name: local-multicast
      udp:
        host: 239.1.1.1
        port: 5500
Protocol Parameters
rtmp url, connect_timeout_ms
srt host, port, passphrase, stream_id, timeouts
udp host, port — MPEG-TS to multicast or unicast

Capabilities and behavior

  • RTMP push handles H264+AAC, HEVC, and AV1 (enhanced RTMP), and audio-only streams; timestamps start at zero on push, as CDNs expect.
  • Push errors are distinguished and visible in status: connection refused, connection timeout, publish rejection (NetStream.Publish.BadName — key taken or wrong), a stalled server (frame write timeout).
  • An SRT push with a mismatching passphrase gets a handshake rejection; a silent receiver (no ACKs) is registered as a peer timeout.

Note

TODO: push reconnection policy, track selection for a push (which quality goes out).

Next steps