RTMP / RTMPS protocol¶
RTMP (Real-Time Messaging Protocol) is available in Perfect Streamer both for reception (input) and transmission (output), based on FFmpeg avformat. Typical scenarios are publishing a TV channel to external platforms (YouTube, Facebook and any RTMP receivers) and receiving a stream from an RTMP server. The secure variant RTMPS (RTMP over TLS) is supported for both directions; in this case Perfect Streamer acts as a TLS client.
RTMP is a single-program protocol, so RTMP input and output are available only for SPTS streams.
RTMP input (reception)
Perfect Streamer connects as an RTMP client to the specified rtmp:// or rtmps:// source and pulls the stream (pull mode). The received elementary streams (video H.264 or HEVC, audio AAC) are remultiplexed into the built-in MPEG-TS and fed into the stream pipeline. There is no mode for waiting on an incoming publication (listen / push) — reception is always initiated by Perfect Streamer itself.
RTMP input settings:
URL — the full address of the RTMP session, for example
rtmp://origin.example/live/streamkey. Thertmpandrtmpsschemes are allowed.Bind Interface — the local interface or IP address from which the outgoing connection is established. By default it is chosen by the operating system’s routing.
Timeout — connection and read timeout, from 1 to 120 seconds. Default is 10.
TLS Verify — for
rtmps, verify the server certificate. Disabled by default.Trace — verbose log for connection diagnostics.
RTMP output (publishing)
Perfect Streamer publishes an SPTS stream to an external RTMP receiver: it connects as an RTMP client to the platform’s publishing address and sends the stream (publish mode). RTMP is a single-program format: one video (H.264 or HEVC) and no more than one AAC audio track are published. If the source has several tracks, one video and one audio track are selected; extra and incompatible ones (for example, non-AAC audio) are not transmitted. A multi-track source can be narrowed down in advance with the PID Accept / PID Reject filters (see «Filtering and modification of MPEG-TS»).
HEVC video is published via Enhanced RTMP — enabled by the Allow HEVC option. If the receiving platform does not support HEVC, disable the option: then only H.264 is published.
Before publishing starts, the stream is analyzed. If there is no compatible video, publishing is not performed. The analysis result is available in the stream statistics: a publish-capability flag, the selected video and audio codecs, the list of dropped tracks, and the connection state.
RTMP output settings:
URL — the platform’s publishing address, for example
rtmp://a.rtmp.youtube.com/live2/<stream-key>. Thertmpandrtmpsschemes are allowed.Bind Interface — the local interface or IP address of the outgoing connection. Default — the operating system’s routing.
Timeout — connection and transmission timeout, from 1 to 120 seconds. Default is 10.
Allow HEVC — allow publishing HEVC video via Enhanced RTMP. Enabled by default; when disabled, only H.264 is transmitted.
TLS Verify — for
rtmps, verify the server certificate. Disabled by default.Trace — verbose log for publishing diagnostics.
Examples of publishing addresses:
YouTube —
rtmp://a.rtmp.youtube.com/live2/<stream-key>Facebook —
rtmps://live-api-s.facebook.com:443/rtmp/<stream-key>