LiveKit LogoDocs
Real-timeEgress/IngressCloudGuidesReference

Audio RED (REDundant Encoding)

LiveKit supports redundant encoding to improve audio quality

On this page

What is redundant encoding?Disabling RED support on the serverDisabling RED when a client joins a roomDisabling RED on a per-track basis

What is redundant encoding?

REDundant Encoding is a technique to improve audio quality by sending multiple copies of the same audio data in different packets. This is useful in lossy networks where packets may be dropped. The receiver can then use the redundant packets to reconstruct the original audio packet.

As an engineering tradeoff, redundant encoding increases bandwidth usage in order to achieve higher audio quality. Audio glitches are so distracting that we at LiveKit believe this tradeoff is almost always worth it. If your use prioritizes bandwidth and can tolerate audio glitches, you can be disable RED.

Disabling RED support on the server

RED is supported by default, but you can disable it so that no client can publish audio tracks with RED.

You can disable RED in LiveKit Cloud on your Project Settings page.

Disabling RED when a client joins a room

Instead of disabling RED for all clients, you can also disable it when a client connects to a Room.

<LiveKitRoom
audio={true}
video={true}
token={token}
options={{
publishDefaults: {
red: false,
},
}}
>
<GridLayout>
<ParticipantTile />
</GridLayout>
</LiveKitRoom>

(Note: disabling RED from the client is currently only supported in our Javascript SDK.)

Disabling RED on a per-track basis

Clients can disable RED when publishing new audio tracks:

const localParticipant = useLocalParticipant();
const audioTrack = await createLocalAudioTrack();
const audioPublication = await localParticipant.publishTrack(audioTrack, {
red: false,
});

(Note: disabling RED from the client is currently only supported in our Javascript SDK.)

Previous

Chevron IconVideo codecs
LiveKit logo

Product

SFU

SDKs

Performance

Deployment

GitHub LogoSlack Logo