FlexFEC is an XOR-based video forward error correction mechanism that is used by WebRTC. In Chromium-based browsers as well as Safari it is supported for receiving forward-error correction primarily for H.264.
FEC (Forward Error Correction) means including redundant information about a RTP packet in the following packets. That way if one of the packets is lost the data can still be recovered from the information received in the next packets without requiring retransmissions which take at least one round trip to get processed and acted upon. That makes it specially suitable for networks with high latency or real time requirements where retransmissions are less of an option.
Nowadays there are different implementations of Forward Error Correction inside WebRTC clients including Opus FEC, ULPFEC and FlexFEC (the sending part is disabled behind a flag). These schemas are negotiated in the SDP Offer/Answer exchange.
FlexFEC is very similar to ULPFEC but is used for H.264 while ULPFEC is used for VP8. Like ULPFEC it is an XOR-based recovery mechanism which means the forward error correction packet is generated as an XOR over a group of packets and can be used to recover a single lost packet in that group of packets.

Other video codecs may or may not work with FlexFEC. Support for them is dependent on the implementation of the WebRTC library found in web browsers.FlexFEC is currently implemented in a pre-standard version of the specification referred to as “flexfec-03” after the corresponding IETF draft. Updating this to the RFC version is work-in-progress.
Additional reading
- WebRTC media resilience: the role FEC, RED, PLC, RTX and other acronyms play
- If you want to learn more about FEC and resiliency mechanism, there’s also our Higher-level WebRTC Protocols course


