---
title: UDP, RTP, Pro-MPEG and TCP
url: https://doc2.pstreamer.tv/en/manual/webui/io/network.html
lang: en
product: Perfect Streamer
version: 2.0.1.264
---

# UDP, RTP, Pro-MPEG and TCP

The transports in this group deliver MPEG-TS over the network without retransmitting lost packets; Pro-MPEG adds forward error correction to the stream but uses no return channel. The field of application is described in [Other inputs and outputs](../../planning/index.md#planning-other-io) and [Pro-MPEG / RTP+FEC (SMPTE 2022-1/2)](../../planning/index.md#planning-prompeg), the recommendations for receiving high-bitrate multicast in [Recommendations for working with UDP multicast](../../faq/index.md#faq-multicast-nic).

## UDP

Receiving and sending MPEG-TS in UDP datagrams — unicast or multicast, including source-specific (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 decides 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 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 is offered both by name and by address; “Any (default)” leaves the choice to the system. If the named interface is not present on the node, the input does not fail but goes into the waiting-for-the-administrator state and picks the interface up when it appears. | 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](../../faq/index.md#faq-multicast-sysctl)). | default 0 |
| Multicast rejoin (s) | The period of rejoining the multicast group. It is needed where a switch or a router forgets the subscription over time and the traffic ceases without any error at all. Zero disables the repetition; with unicast reception the field has no effect. Values greater than 4294 seconds should not be set: the time count overflows and the rejoining starts to be performed continuously. | 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 it is worth setting explicitly — otherwise the interface is chosen by the system 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 interface for it is always chosen by the routing table. | 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 it is increased, and to forbid leaving the segment it is set 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 — there will be a short break in the delivery. | 1–7, default 7 |

## RTP

The same UDP, but with an RTP header: the packets acquire a sequence number and a time stamp, so the receiver notices losses and reorderings.

### Input

All the fields of a UDP input, plus:

| Field | Purpose | Values |
| --- | --- | --- |
| RTP reorder | Restore the packet order by the RTP numbers. It is enabled 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.

### Output

The fields of a UDP output without changes or additions: the RTP header the node forms itself.

## 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` — which is taken into account when planning ([Pro-MPEG / RTP+FEC (SMPTE 2022-1/2)](../../planning/index.md#planning-prompeg)).

### 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, the additional ports are not occupied. The setting must match the sending side, and both sides must be Perfect Streamer nodes. | disabled by default |
| ProMPEG header XOR | Obfuscation of the FEC packet header: the header is XOR-ed with this number. A non-standard extension — the value must match on both sides, and for compatibility with third-party equipment it is left at zero. | 0–255, default 0 |
| Passphrase | The encryption passphrase — a non-standard extension ([Stream encryption](../../planning/index.md#planning-encryption)). An empty field means reception without encryption. A mismatch with the sending side is not recognized as an encryption error: the stream simply 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. | 10–64 bytes or empty |

A Pro-MPEG input has no separate reordering setting: the stream is always reassembled by the RTP numbers — without that the error correction would not work.

### 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. | 4–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 with it grows the restoration latency at the receiving end. | 4–64, default 4 |
| ProMPEG multiplexing | Sending the main stream and both FEC streams over a single port. The value must match the receiving side. | disabled by default |
| ProMPEG header XOR | Obfuscation of the FEC packet header; the value must match the receiving side. For compatibility with third-party equipment it is left at zero. | 0–255, default 0 |
| Passphrase | The encryption passphrase; it must be the same on both sides. What is encrypted is the contents of the packets, and the correction is computed on the already encrypted data. | 10–64 bytes or empty |

The node accepts a matrix that the standard does not require to be supported either: 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.

## TCP

Receiving 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: TCP delivery is performed by the streaming HTTP server ([Streaming HTTP server](../administration.md#webui-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 come to light 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. The silence of an established connection is not limited by this setting: a source that has stopped is detected by the general stream timeout on the “Stream” tab ([Configure stream](../streams.md#webui-stream-editor)), after which the stream switches to the backup input. | from 1, default 10 |

On losing synchronization 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.
