UDP, RTP, Pro-MPEG and TCP¶
The transports in this group deliver MPEG-TS over the network without retransmitting lost packets; Pro-MPEG COP3/RTP+FEC (SMPTE 2022-1/2) adds forward error correction to the stream but uses no return channel. Where they apply is described in Other inputs and outputs and Pro-MPEG FEC, and recommendations for receiving high-bitrate multicast in Recommendations for working with UDP multicast.
UDP¶
MPEG-TS is received and sent in UDP datagrams: unicast or multicast, including multicast with a specified source (SSM).
Input¶
Field |
Purpose |
Values |
|---|---|---|
Address (multicast group) |
The multicast group the input listens to. An empty field means unicast reception: the node accepts everything that arrives at the specified port. The value also determines how the port is occupied: on a group several streams may listen on the same address and port, while with unicast reception the port is occupied exclusively. |
an IPv4 address, empty by default |
Port |
The receiving port. A required field. |
1–65534, 1234 in the creation form |
Bind interface |
The interface on which the input listens on the port and joins the multicast group. Chosen from the list of the node’s interfaces, each offered both by name and by address; “Any (default)” leaves the choice to the system. The loopback interface ( |
any by default |
SSM source address |
The source address for source-specific multicast reception (SSM): the group is accepted only from this sender, and a second sender on the same group will not spoil the stream. For unicast reception the field has no effect. |
an IPv4 address, empty by default |
Socket buffer (bytes) |
The requested size of the socket receive buffer, a remedy against losses on bitrate bursts. Zero means the system default value, which is also stated under the field itself. The size given is a request, not a result: on a running input the volume granted by the kernel is printed under the field, and if the request did not fit into the system ceiling, a warning appears next to it. The value is read once, when the stream window is opened, and after saving it disappears until the next opening (Recommendations for network tuning for multicast). |
default 0 |
Multicast rejoin (s) |
The period for rejoining the multicast group. It is needed where a switch or a router forgets the subscription over time and the traffic stops without any error. Zero disables rejoining; with unicast reception the field has no effect. If joining the group fails, the attempt is repeated after the same period. A Pro-MPEG input also resubscribes its FEC streams. The node does not accept a value greater than 3600 seconds, and at startup it lowers a greater value in the settings file to 3600. |
0–3600, default 0 |
Output¶
Field |
Purpose |
Values |
|---|---|---|
Address (destination) |
The address of the recipient: a multicast group, a unicast address or a host name that will be resolved through DNS. A required field. |
an address or a host name |
Port |
The recipient’s port. A required field. |
1–65534, 1234 in the creation form |
Multicast egress interface |
The interface through which the node sends multicast datagrams; it is chosen from the same list as “Bind interface” on an input. On a node with several networks, set it explicitly, otherwise the system chooses the interface from the routing table; the window does allow the output to be saved with an empty field. When sending unicast the field has no effect: the routing table always chooses the interface for it. |
chosen by the system by default |
IP multicast TTL |
How many routers are entitled to pass the datagram on. The default value is meant for a local network; to deliver through routers, increase it, and to keep the datagrams within the segment, set it to one. When sending unicast the field has no effect. |
1–255, default 4 |
Packets per datagram |
How many TS packets the node puts into a single datagram. Seven packets are 1316 bytes, which fits into an Ethernet frame without fragmentation; a smaller value reduces the latency slightly at the cost of noticeably larger overhead. Changing it reopens the output, so there will be a short break in the delivery. |
1–7, default 7 |
RTP¶
The same UDP, but with an RTP header: the packets get a sequence number and a time stamp, so the receiver notices losses and reordering. Receiving and sending one stream over two paths under SMPTE ST 2022-7, and the network requirements for it, are described in Network requirements for ST 2022-7.
Input¶
All the fields of a UDP input, plus:
Field |
Purpose |
Values |
|---|---|---|
RTP reorder |
Restore the packet order by the RTP numbers. Enable it when the packets arrive out of order, for example when the traffic is balanced over several paths. With the setting off, the node does not look at the numbers at all: the packets go on in the order they arrived in. |
disabled by default |
The depth of the reordering queue is not configurable: the node chooses it itself from the stream bitrate.
Second path (ST 2022-7). A separate block of the editor; the second path of the same RTP stream is merged with the first by packet numbers (Network requirements for ST 2022-7).
Important
Beta version 2.1. What is described here exists only in beta version 2.1: it is installed from the beta repository and only with a licence; the stable version 2.0.2 and the demo edition do not have it. The beta version comes without warranty, and support is best effort (Beta testing programme).
Field |
Purpose |
Values |
|---|---|---|
Path 2 address |
The second path’s address: a multicast group or a unicast IPv4 address. An empty field means a single path. |
IPv4 or empty |
Path 2 port |
The second path’s port. |
0–65534, default 0 — the same as “Port” |
Path 2 bind interface |
The interface on which the second path is received — like the first path’s interface. |
an interface name or empty |
Path 2 SSM source address |
The second path’s source for source-specific reception (SSM). |
IPv4 or empty |
Path skew (ms) |
The largest difference between the two paths’ delays that the merge waits for. 450 ms is ST 2022-7 class C; lower it only if the paths’ delays are known to be close. An advanced setting. |
10–1000, default 450 |
Output¶
The fields of a UDP output, plus the “Second path (ST 2022-7)” block: the same packets are also sent over the second path, with an identical header and payload. The node forms the RTP header itself.
Important
Beta version 2.1. What is described here exists only in beta version 2.1: it is installed from the beta repository and only with a licence; the stable version 2.0.2 and the demo edition do not have it. The beta version comes without warranty, and support is best effort (Beta testing programme).
Field |
Purpose |
Values |
|---|---|---|
Path 2 address |
The second path’s address: a multicast group or a unicast IPv4 address. An empty field means a single path. |
IPv4 or empty |
Path 2 port |
The second path’s port. |
0–65534, default 0 — the same as “Port” |
Path 2 multicast egress interface |
The interface from which the second path is sent. In a reserve group, set it on every member. |
an interface name or IPv4, or empty — the system’s default interface |
If the second path could not be opened, the output keeps sending over the first path, and the output statistics show “Path 2: not open, path 1 sends alone”.
Pro-MPEG¶
RTP with forward error correction according to SMPTE 2022-1/2: FEC packets are added to the stream, and from them the receiver restores losses without a return channel. By default the FEC occupies two additional ports, port+2 and port+4; take this into account when planning (Pro-MPEG FEC).
Input¶
All the fields of a UDP input, plus:
Field |
Purpose |
Values |
|---|---|---|
ProMPEG multiplexing |
A non-standard extension: the main stream and both FEC streams are sent over a single port, and the additional ports are not occupied. The setting must match the sending side, and both sides must be Perfect Streamer nodes. Cannot be combined with the second path. |
disabled by default |
ProMPEG legacy decoder |
The previous decoder of versions before 2.1.0.444: a single path only. Switch it on only for a source that the new decoder cannot read. An advanced setting, since version 2.1.0.444. Since version 2.1.2.547, it has no effect while a passphrase is set: a PSE2 packet does not fit into the previous decoder. |
disabled by default |
Passphrase |
The encryption passphrase, a non-standard extension (Stream encryption). An empty field means reception without encryption. A mismatch with the sending side is not recognised as an encryption error: the stream stops being parsed as MPEG-TS, and in the error message the node reminds you whether a passphrase is set on this side or not. Since version 2.1.2.547, encryption by the passphrase uses the PSE2 format, and a mismatch shows in the “Failed to verify” counter (The PSE2 format of Pro-MPEG and PS1). |
10–64 bytes or empty |
A Pro-MPEG input has no separate reordering setting: the stream is always reassembled by the RTP numbers, because the error correction would not work without that.
Important
Beta version 2.1. What is described here exists only in beta version 2.1: it is installed from the beta repository and only with a licence; the stable version 2.0.2 and the demo edition do not have it. The beta version comes without warranty, and support is best effort (Beta testing programme).
The input’s decoder follows SMPTE ST 2022-1: it accepts column-only FEC (1D) and column-and-row FEC (2D), a matrix of any size and datagrams of 1 to 7 TS packets. The matrix size is taken from the FEC packets themselves and needs no setting. A lost datagram waits for its FEC packet no longer than its matrix needs at the current stream rate, and no longer than the FEC wait limit; if no FEC arrives at all, the input waits only for reordering. A restart of the sender starts decoding afresh, and the FEC counters in the input statistics are kept.
FEC wait limit (since version 2.1.0.467) — the input’s “FEC wait limit, ms (0 = auto)” field; it works only with the new decoder. From 0 to 10000 ms, 0 by default, which means automatic: as long as the matrix needs at the current rate, but no more than 3 seconds. Values from 1 to 19 act as 20 ms. A change reopens the input. Before 2.1.0.467 the limit was 1 second, and that was not enough for large matrices at a low rate: a 10 × 10 matrix at 0.8 Mbit/s needs about 2.7 seconds, and the datagrams of its first rows were lost.
While a lost datagram waits for FEC, the input holds back the stream: the stream is output in order. For recovery without a picture glitch, the input’s “Jitter buffer (ms)” (Synchronisation) and “Stream timeout (s)” must be longer than this wait; lower the limit if latency matters more than recovery. In a Meshwork reserve group, seamless switching covers a wait of no more than 2100 ms.
In the input statistics, “FEC wait needed” shows how much waiting the matrix needs at the current rate (“no FEC” while no FEC arrives), and “Given up at the FEC wait limit” shows how many datagrams the node stopped waiting for at the limit, although their FEC might still have arrived. If this counter grows, raise the limit and the “Jitter buffer (ms)” along with it.
The input also receives a second path under SMPTE ST 2022-7 — the “Second path (ST 2022-7)” block with the same fields as an RTP input (second path of an RTP input). The second path’s FEC arrives on its ports +2 and +4. The paths are merged as for an RTP input, and FEC recovers what was lost on both. The second path and ProMPEG multiplexing do not work together: the settings reject such a pair with a message naming both fields, and an input with both, loaded from the settings file, loads but does not start and shows the reason.
In ProMPEG multiplexing mode the stream must come with RTP payload type 33 (MPEG-TS) and the FEC with type 96, as the Pro-MPEG output of a Perfect Streamer node sends them.
With the “ProMPEG legacy decoder” setting, the second path is not used. If a source can be read only by the previous decoder, please report such a case to support (How to report a problem). The decoder is chosen when the input opens, so changing the setting reopens the input.
Output¶
All the fields of a UDP output, plus:
Field |
Purpose |
Values |
|---|---|---|
ProMPEG columns |
The width of the FEC matrix in packets. It sets both the cost of the row protection (one correction packet per that many transmitted) and the length of a consecutive loss that can still be restored. Fewer than 4 columns only with “ProMPEG row FEC” switched off. |
1–64, default 8 |
ProMPEG rows |
The height of the FEC matrix: one column correction packet per that many transmitted. The product “columns × rows” is the block size, and the restoration latency at the receiving end grows with it. |
4–64, default 4 |
ProMPEG row FEC |
Row FEC. Switched off — column-only FEC: Perfect Streamer receivers of 2.1.0.443 and earlier and inputs with the previous decoder will not accept such a stream. An advanced setting, since version 2.1.0.445. |
enabled by default |
ProMPEG multiplexing |
Sends the main stream and both FEC streams over a single port. The value must match the receiving side. Cannot be combined with the second path. |
disabled by default |
Passphrase |
The encryption passphrase; it must be the same on both sides. The contents of the packets are encrypted, and the correction is computed on the already encrypted data. Since version 2.1.2.547, the PSE2 format (The PSE2 format of Pro-MPEG and PS1). |
10–64 bytes or empty |
The node also accepts a matrix that the standard does not require to be supported: SMPTE 2022-1 limits it to a product of no more than 100 with 1–20 columns and 4–20 rows, whereas the fields allow up to 64 in each. Outside the standard, compatibility with a third-party receiver is not guaranteed.
Important
Beta version 2.1. What is described here exists only in beta version 2.1: it is installed from the beta repository and only with a licence; the stable version 2.0.2 and the demo edition do not have it. The beta version comes without warranty, and support is best effort (Beta testing programme).
The output’s FEC conforms to SMPTE ST 2022-1, so standard receivers (hardware decoders and others that rebuild a packet from the FEC header fields) recover lost datagrams correctly. Receivers on Perfect Streamer nodes do not read these fields and are not affected by the change.
With “ProMPEG row FEC” switched off, the output sends column-only FEC (1D, SMPTE ST 2022-1 Level A): one FEC stream on port+2, port port+4 stays free, and the overhead is lower (with a 5 × 10 matrix, that is 10 % instead of 30 %). Without row FEC there may be from 1 column; with it, at least 4, as the standard requires for two FEC streams. A matrix larger than 20 columns or rows or than 100 datagrams works, but the output writes a warning to the log: a standard receiver is not obliged to parse it.
Warning
Column-only FEC is not accepted by Perfect Streamer nodes of versions before 2.1.0.444 or by inputs with the “ProMPEG legacy decoder” setting: they receive nothing from such an output. Nodes of 2.1.0.444 and newer with the default decoder, and standard receivers, accept it.
The output also sends a second path under SMPTE ST 2022-7 — the “Second path (ST 2022-7)” block with the same fields as an RTP output (second path of an RTP output). The stream and both FEC streams go over both paths identically, the second path’s FEC to its ports +2 and +4. If the second path goes to the same address as the first, its port must be at least 6 away from the first path’s port: the first path occupies its own +2 and +4. As with the input, the second path and ProMPEG multiplexing do not work together.
In a reserve group. A Pro-MPEG output can be a member of a reserve group with sender selection, like UDP and RTP outputs: only the selected node sends, and the FEC is computed so that all members would send identical packets, so when sending switches between nodes, the stream and its FEC continue at the receivers without a break. This is possible only if:
the product “columns × rows” is a power of two: 4 × 4, 8 × 4 (the default), 8 × 8, 16 × 4 and so on;
a datagram carries 7 TS packets;
neither ProMPEG multiplexing nor a passphrase is enabled.
Otherwise the Pro-MPEG member keeps sending on its own, without sender selection, beside the group’s sender, and never takes the group over; the group shows the problem prompeg-matrix or prompeg-proprietary. Set the same matrix on all members of the group: a member with a different matrix or on an older version gives the problem prompeg-fec-differs — switching to it changes the matrix at the receivers, and older receivers reconnect.
Such an output pads with empty (null) packets, up to 7 TS packets, the short datagrams that it sends at packets with a PCR. This adds about 0.1–0.5 Mbit/s, and analyzers may show a PCR accuracy within a few hundred microseconds.
TCP¶
The input receives MPEG-TS over an ordinary TCP connection where UDP is blocked. The node always connects itself, so this type has no listening mode. There is no output of this type either: the streaming HTTP server handles TCP delivery (Streaming HTTP server).
Input¶
Field |
Purpose |
Values |
|---|---|---|
Host |
The source host the connection is made to: a name or an address. The window does not consider this field required, but without it the input will not work; an empty value will show up only at start-up. |
empty by default |
Port |
The port on the source host. A required field. |
1–65534 |
Client timeout (s) |
The time limit for establishing the connection and for a read already begun. This setting does not limit the silence of an established connection: the general stream timeout on the “Stream” tab (Configure stream) detects a source that has stopped, after which the stream switches to the backup input. |
from 1, default 10 |
On losing synchronisation at the TS packet boundary, the input does not reconnect at once but tries to restore the alignment on the fly; a reconnection happens only when the alignment fails eight times in a row. The interface does not show a counter of such restorations.