RTMP¶
media.push.rtmp
Sapsan initiates an outgoing publication over RTMP. A stream can have several named pushes.
Configuration¶
Apply the stream configuration through central.
A stream's pushes are a mapping of push name to setting, not a list. The name is unique within the stream and serves as the key: it is how a push is found in the configuration, in the statistics, and in the metrics. A push has exactly one protocol.
streams:
- name: tv1
inputs:
- udp: {host: 239.0.0.1, port: 5000}
pushes:
delivery:
rtmp:
url: rtmp://a.rtmp.youtube.com/live2/xxxx-xxxx
| Protocol | Parameters |
|---|---|
rtmp |
url, connect_timeout_ms |
The name is the push's identity. Renaming carries over neither the setting nor the accumulated counters: the old push disappears and the new one starts from zero.
Capabilities and behavior¶
- RTMP push handles H.264, AAC/MP3, 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).
Reconnection¶
A pusher has no retry policy of its own — the stream raises it again. Every five seconds the stream reconciles the running pushes against the configuration and replaces a dead pusher with a new one; the reconnects counter counts exactly those replacements. An unreachable target therefore never "gives up" and needs no manual restart: it keeps being raised for as long as the push is enabled.
What is not counted as a reconnect:
- editing a push setting — the pusher is restarted too, but that is the operator's decision, not a channel failure;
- disabling and enabling (
enabled: false) — disabling is not deletion: the setting and the accumulated counters stay, only the sending stops.
Disabling and deleting¶
A disabled push stays in the configuration under its name: the statistics show it as disabled, its counters are frozen at their last values, and enabling continues from those. Deleting the key deletes the statistics too: counters belong to the name.
Monitoring¶
Every push has statistics of its own — target, status, failure reason, rate, bytes, errors, reconnects. The field reference, the Prometheus series, and alerting recipes are on the Statistics page.
Transport¶
RTMP over TCP; Sapsan opens an outgoing connection to url.
Supported codecs¶
- H.264
- HEVC (Enhanced RTMP)
- AV1 (Enhanced RTMP)
- AAC
- MP3
The push packages encoded tracks into FLV without transcoding them. HEVC and AV1 require an Enhanced RTMP receiver; support for H.264/AAC alone does not guarantee this.