Forward Error Correction (FEC)

Top  Previous  Next

Since system version 3.2.0.122 Forward Error Correction (FEC) is supported for all RTP connections.

 

1. General

In real life IP transmissions IP packets can be lost since
- routers discard them since they are damaged

- routers discard them since other traffic has got higher priority

- different routing

FEC provides the possibility of error detection and/or correction by adding redundant data. Thereby retransmission or corruption of data can often be avoided at the cost of higher bandwidth needs and increased delay.

 

The FEC algorithm used by MAYAH is described in the “Pro-MPEG Code of Practice #3 release (www.pro-mpeg.org) based on rfc 2733 (www.ietf.org/rfc/rfc2733.txt).

Opposed to other FEC schemes used for e.g. satellite transmissions this algorithm correct single bits inside an IP packet, but the recreation of entirely lost IP packets. This is essential for the use in IP based networks, since due to the nature of these networks the most common transport problem is a complete loss of one or several successive packets (burst loss).

 

2. How it works

FEC generates additional packets using matrixes. Every FEC matrix has got L columns and D rows to create additional packets, but with following restrictions:

L x D <= 100

1 <= L <= 20

4 <= D <= 20

 

FEC packets are generated from RTP packets by a XOR (exclusive or) operation. Each FEC packet corresponds to one row or column.

The FEC packets are transmitted on dedicated ports in separate streams. There is always a stream for column FEC packets (2 ports above media port; usually port 5006), optional also row FEC packets can be sent (4 ports above media port; usually port 5008).

 

Lost Packets at a RTP transmission using a FEC (4,4) matrix

 

FEC_LostPackets_002

 

Recreation of lost packets in a FEC (4,4) Matrix:

 

FEC_RecreatedPackets_002

 

As you can see in the pictures above all lost RTP media packets can be rebuilt. Just if the referring FEC column and row misses, RTP packet recreation is impossible.

 

3. Parameters

Generally a lot of matrix combinations are available. However, to enhance the clarity codec_name_arial12_001 offers most typical FEC parameters described in the diagram below.

 

Most typical FEC Parameters

 

FEC_TypicalParameters_002

 

Description of FEC parameters in the diagram above:

L,D
Number of columns (L) and rows (D)
Mode
C: column FEC only
CR: column and row FEC
Overhead
Overhead introduced by FEC
Example:
L=4, D=2 -> matrix size = 8 packets -> 4 column FEC packets generated and transmitted per matrix equals 50%
Buffer size
In order to perform the FEC operation L x D packets have to be retained in a buffer. The above diagram presumes an MPEG TS transmission with 7 packets combined in one media packet, so that one media packet has the size of 7 x 188 bytes = 1316 bytes. An FEC packet has the size of a media packet plus a special FEC header of 16 bytes: 1316bytes + 16 bytes = 1332 bytes. A matrix size of 4 x 2 = 8 corresponds thus to a buffer of 8 x 1332 = 10656 bytes
Latency
This shows what a given buffer size corresponds to at a certain line speed (3Mbps, 10Mbps, 100Mbps). (10656bytes x 8 = 85248 bits / 3 Mbps = 0,02842s = 28,42ms)
Note:
This is just the theoretical minimum latency. Encoding time, decoding time and decoding buffer are not evaluated. Especially in CR mode with certain patterns of packet loss the latency will be significantly higher.
Recovery

The maximum number of IP-Packets that can be recovered. In CR mode this value is determined by the pattern of which packets are lost.

 

4. Configuration steps on codec_name_arial12bold_001 side

FEC can be set at menu item Settings/Network provided codec_name_arial12_001 system version 3.2.0.122 (or later) is installed.