PS1, SRT and RIST¶
Peer protocols of reliable delivery: lost packets are retransmitted at the receiver’s request, so all three have a receive buffer and a bandwidth reserve for retransmission. The choice of protocol and the calculation of bandwidth and latency are described in Peer protocols for reliable transmission and Planning bandwidth, latency and ports, encryption in Stream encryption.
Each protocol determines the side that establishes the connection in its own way: with PS1 it is always the receiver that connects, with SRT the side is chosen by a setting, with RIST it follows from the addresses. This decides where an open port is needed and where an outgoing connection is enough.
PS1¶
A protocol of our own design (PS1 (Perfect Stream)). The connection is always established by the receiver, so the input connects to the transmitter while the output listens on a port. There is no side-selection mode.
Input¶
Field |
Purpose |
Values |
|---|---|---|
Address (source host) |
The transmitting host the receiver connects to. A required field. |
an address or a host name |
Port |
The transmitter’s port. A required field. |
1–65535 |
“Login”, “Password” |
The credentials the receiver presents to the transmitter; the latter checks them against its own list of logins (Users / Logins). An empty login means authorization by the receiver’s IP address. The value must be shorter than 32 bytes: a longer one the receiver rejects itself, without sending a request, and the input stays in the error state. Instead of entering them by hand, the Meshwork auto sign-in is available — see below. |
empty by default |
Passphrase |
The encryption passphrase; it must match the transmitter. The protocol does not recognize a mismatch: the connection will be established but the stream will not be parsed as MPEG-TS — in the error text the node reminds you whether a passphrase is set on this side. |
10–64 bytes or empty |
Start timeout (s) |
How long to wait for the transmitter’s answer to the authorization request. Having not waited long enough, the receiver reconnects. |
5–3600, default 10 |
Play timeout (s) |
How long a working connection may stay silent before the receiver considers it broken. This is the reaction time to a source failure. |
5–3600, default 10 |
Latency (ms) |
The requested reception latency: the window for removing jitter and for retransmission. The value is a request: the transmitter limits it by its own buffer and shows the agreed figure in the input statistics. The rule of thumb is four round-trip times; low-bitrate streams need more, so that enough packets fit into the window. |
250–10000, default 3000 |
RTT (initial estimate) (ms) |
The initial estimate of the round-trip time, only for the first seconds after connecting: after that the receiver measures it itself and adjusts the retransmissions. Zero here does not mean “automatically” — it is simply below the allowed limit. |
40–10000, default 300 |
Meshwork auto sign-in. On a PS1 input the login and the password may be left out: the “Use meshwork auto sign-in” button switches the input to domain authorization, in which the credentials are formed automatically and renewed at every reconnection, and no account has to be created on the transmitter (Peers and secrets). A node domain is required. Switching back — “Switch to manual sign-in…” — clears the auto sign-in and asks for confirmation.
Output¶
Field |
Purpose |
Values |
|---|---|---|
Listening port |
The port the transmitter listens on. A required field; it may be left at zero — the node will pick a free port when saving, while the button next to it picks one right away. |
1–65534 |
Bind interface |
The interface on which the port is listened on; chosen from the list of the node’s interfaces. An empty value means any interface. An interface absent from the node is not considered an error: in that case the output listens on all interfaces, as with an empty field. |
any by default |
Passphrase |
The encryption passphrase; it must match the receivers. |
10–64 bytes or empty |
Latency (ms) |
The transmitter’s buffer: the limit of the latency it is prepared to grant the receivers, and the size of its own retransmission buffer. Each receiver gets no more than this value minus one second, so the reserve for the whole link is set here. |
from 3000, default 6000 |
Trace |
Logging of connections and refusals to the stream log. |
disabled by default |
SRT¶
An open protocol based on UDP (SRT). The side that establishes the connection is chosen by the “Listen mode” setting — and the same setting changes the meaning of several fields, so it is set first.
“Listen mode” is off by default on an input: the input connects to the transmitter itself (caller). On an output it is on, on the contrary: the output listens on a port and delivers the stream to those who connect (listener). Most of the fields the window shows in both modes, even when they have no effect in the current one; only two are hidden — “Enable billing” on an output and the offer of the Meshwork auto sign-in on an input.
Input¶
Field |
Purpose |
Values |
|---|---|---|
Listen mode |
Off — the input connects to the specified address and port. On — the input listens on a port and waits for a connection. |
disabled by default |
Address |
With “Listen mode” off — the source host the input connects to; a host name is admissible here too. With it on — the single address from which a connection is accepted, and it is specified as a number: a host name or a typo will not be recognized and is equivalent to the absence of a restriction, just like an empty field. |
an address or a host name |
Port |
The port: the remote one when connecting to a source, the local one in listening mode. A required field. In listening mode the port may be left at zero — the node will pick a free one. |
1–65535 |
Bind interface |
The interface: in listening mode the port is listened on it, when connecting to a source the outgoing connection leaves from it. Chosen from the list of the node’s interfaces. |
any by default |
“Login”, “Password” |
When connecting to a source, a stream ID presented to the transmitter is formed out of them. In listening mode only the login is used — it is the identifier the connecting party is obliged to present: the comparison is exact, on the whole string (SRT: login and password authorization in third-party software). |
empty by default |
Passphrase |
The passphrase of the connection encryption. Both sides must set the same phrase or both leave the field empty. When connecting to a source, a mismatch is learned from the peer’s refusal: the input goes into the waiting-for-the-administrator state and raises an alert. In listening mode the connection is simply not established, and the input keeps waiting. |
10–79 bytes or empty |
AES key length |
The encryption key length. It applies only when a passphrase is set. |
AES-128 (default), AES-192, AES-256 |
Latency (ms) |
The window during which the receiver holds the packets back, giving the protocol time for retransmission. The larger the window, the deeper the restoration and the higher the end-to-end latency; the practical rule of thumb is three to four round-trip times. |
from 120, default 1000 |
Loss max TTL |
The upper bound of tolerance to packet reordering: within these limits the receiver chooses by itself how long to wait for a lagging packet before considering a gap a loss and requesting a retransmission. The value is increased on paths where packets really are reordered — that saves unnecessary retransmissions. Zero disables the mechanism: any gap is immediately counted as a loss. |
from 0, default 0 |
Overhead (%) |
The bandwidth reserve above the stream bitrate that the protocol is entitled to spend on retransmissions. It applies while “Max bandwidth” is zero. |
5–100, default 25 |
Max bandwidth (B/s) |
A hard limit on the sending rate in bytes per second. The percentage reserve applies only at zero: then the limit is derived from the measured bitrate and that reserve. The value −1 removes the restriction, a positive value sets the limit directly — and in both cases the percentage reserve stops applying. |
from −1, default 0 |
Connect timeout (ms) |
The admissible silence of the peer, after which the connection is considered broken. For the side that establishes the connection this is also the timeout of the connection itself. |
from 0, default 3000 |
Disable TSBPD |
Disables the delivery of packets by their time stamps: the packets are given out as soon as they arrive. The latency is minimal, but there is no longer any levelling or ordering on the SRT side — and the Latency setting stops governing the delivery. It is used on dense receiving nodes, where the synchronization is taken over by the node’s jitter buffer (Synchronization). |
disabled by default |
An input in listening mode accepts one connection: while the receiver is busy with one source, a second one will not connect. To accept several sources, several inputs are added (Source redundancy and distribution).
The Meshwork auto sign-in is available here too, when connecting to a source: it substitutes the domain stream identifier for the login and the password (Peers and secrets). In the connection-listening mode this possibility is absent, but a connection from a node of the same domain is accepted there as well — by the domain identifier, in addition to the ordinary check.
Output¶
The encryption fields and the link settings are the same as on the input. The differences:
Field |
Purpose |
Values |
|---|---|---|
Listen mode |
On — the output listens on a port and several receivers connect to it, each with its own authorization. Off — the output connects to the specified address itself and delivers the stream to a single receiver. |
enabled by default |
Address |
The receiver’s address. Required when “Listen mode” is off; in the connection-listening mode it is not used. |
an address or a host name |
Port |
The local port in listening mode (it may be left at zero — the node will pick a free one) or the receiver’s port when connecting. A required field. |
1–65534 |
Bind interface |
The interface: in listening mode the port is listened on it, when connecting to a receiver the outgoing connection leaves from it. |
any by default |
Meshwork peer auth |
Domain authorization instead of a stream identifier — when connecting to a receiver of the same domain (Peers and secrets). Unlike on the input, here this is an ordinary switch, and in listening mode it is shown too, although it has no effect. |
disabled by default |
SRT stream id |
The stream identifier the output presents to a receiver when connecting to it. In listening mode it is not used — there the identifier is presented by the connecting party. |
empty by default |
Enable billing |
Only when connecting to a receiver: before the connection the output asks the billing server for permission. A refusal or the unavailability of the server stops the output until an administrator intervenes — the stream does not go out unauthorized. In listening mode the field is not shown: there every connection is authorized separately. |
disabled by default |
Packets per datagram |
How many TS packets are put into a single SRT message. Seven packets fill the standard 1316 bytes; a smaller value reduces the latency slightly at the cost of noticeably larger overhead. Changing it reopens the output. |
1–7, default 7 |
Trace |
Logging of connections, refusals and disconnections of receivers to the stream log. |
disabled by default |
RIST¶
An open protocol based on RTP/RTCP with retransmission by NACK (RIST). RIST has more than one peer: both the input and the output work with a list of peers, which gives redundancy over several paths and delivery to several recipients at once.
The Main profile packs the data and the service channel into a single port, and only in it does encryption work. The Simple profile occupies two consecutive ports, so the base port must be even, and the passphrase has no effect in this profile.
The list of peers¶
The peers are set by the “RIST peers” table: one row is one peer, the columns being Address, Port, Interface and Weight. The column caption carries a hint about its usual use, and it differs on the input and the output: on the input — Address (multicast) and Interface (unicast), on the output — Address and Interface (multicast). The “Add peer” button adds a row, “Delete peer” removes one; an empty table is accompanied by the note “No peers yet.” A zero in the Port and Weight columns is shown as an empty cell.
Column |
Purpose |
Values |
|---|---|---|
Address |
The peer’s address. On the input this is the address the stream is received from: a multicast group makes the input a member of the group, an empty cell means unicast reception — and then the socket is bound to the address from the Interface column. On the output it is the recipient’s address, and it is mandatory. Multicast groups and unicast addresses may not be mixed in one list. |
an address |
Port |
The peer’s port. Mandatory in every row. In the Simple profile the port must be even — the neighbouring port is taken by the service channel. |
1–65535 |
Interface |
The interface. On the input it is needed with unicast reception — it is precisely to its address that the receiver is bound; with multicast reception it is only checked. On the output it sets the sending interface for a multicast group, while for unicast it has no effect: the interface is chosen by the routing table. |
an interface name or its address |
Weight |
The path policy on transmission. Zero means duplication: every packet is sent to the peer — that is link redundancy. A positive value enables load sharing between the peers with positive weights, in proportion to them. On reception the value has no effect. |
from 0, default 0 |
A RIST input gets into the domain catalog only through the peers with a multicast address; unicast reception is not announced there (Shared resource catalog).
Saving is blocked while the table is not filled in: “Add at least one peer.”, “Every peer must have a port from 1 to 65535.”, “Every peer must have an address.” — on the output, “Every peer must have an address (multicast) or an interface (unicast).” — on the input. Three more messages repeat the node’s checks, so that you do not meet them as a refused save: “In the Simple profile every peer’s port must be even.”, “A unicast peer on an input needs a bind interface.” and “All the peers must be either multicast or unicast — they may not be mixed.”
The last two messages appear only when every row holds an address rather than a host name: a browser cannot resolve a name, and the cast class of the address is unknowable before that. In a table filled with names, both restrictions will be checked only by the node — as a refused save.
The lists in this table cannot be made inconsistent: every edit rebuilds all four lists as a whole. A configuration that reached the node past the interface and is already inconsistent is shown in full — the missing cells are empty — and saving stays blocked until the row is completed; after that the lists are aligned.
Input¶
Field |
Purpose |
Values |
|---|---|---|
RIST profile |
The transmission format. Main — a single port, encryption available. Simple — two consecutive ports, without encryption. |
Simple, Main (default) |
Allowed peer IP |
The single address from which a connection is accepted; the rest are rejected with a log entry. An empty field allows a connection from any address. This is one address, not a list, a mask or a range. |
empty by default |
Passphrase |
The encryption passphrase; it must match on both sides. The length is not limited, but only the first 127 bytes are taken into account. It applies only in the Main profile. |
empty by default |
Session timeout (ms) |
How long a peer may stay silent before the session is broken off. A smaller value speeds up the detection of a failed path, too small a one causes disconnections on an unstable link. |
from 100, default 2000 |
Recovery RTT min (ms), Recovery RTT max (ms) |
The bounds within which the measured round-trip time is confined when computing the interval of the retransmission requests. They do not set the size of the recovery buffer — it is fixed. |
from 10; default 50 and 500 |
Trace |
Logging of peer events to the stream log. Changing the setting restarts the input. |
disabled by default |
Output¶
The same peer table, the same profile, passphrase and recovery settings. The differences:
Field |
Purpose |
Values |
|---|---|---|
Auth type |
None — a connection is accepted from any peer. Embedded — a peer is authorized by IP address against the node’s list of logins (Users / Logins); an unknown address is rejected. |
None (default), Embedded |
Packets per datagram |
How many TS packets are put into a single datagram. Seven packets fill the standard 1316 bytes. Changing it reopens the output. |
1–7, default 7 |