Skip to content

Backup encoder (failover) ​

When the encoder of a live stream drops (OBS crashes, the venue's internet cuts out), the stream normally ends: viewers see it stop and restream destinations such as YouTube disconnect. With a backup encoder, a second encoder takes over when the main one stops, and the main takes over again when it is back.

The backup encoder is part of a channel's live stream input. A channel can also fall back to a pull stream (a link Unda fetches) and a playlist of your videos, in the order you choose: see Channel inputs.

Switch it on ​

  1. On the Channels page, click Inputs next to the channel (it doesn't have to be live).
  2. Switch on Use this channel's inputs in order. The live stream is the first input unless you move it.

If the stream is live at that moment, its encoder is disconnected once and reconnects by itself (OBS and vMix do this automatically).

The channel now has two keys:

KeyFor
The channel's key (unchanged)The main encoder
The backup key (new)A backup encoder

The channel's owner finds the backup key in the channel's Encoder settings (Channels page) and on the Input tab (Show).

Set up the backup encoder ​

Use a second OBS or vMix, ideally on another machine with another internet connection, with the backup key:

  • Server: rtmp://tv.example.com:1935/live (the same as the main)
  • Stream key: the channel's backup key

Or over SRT: srt://tv.example.com:6000?streamid=publish:BACKUP-KEY.

Both encoders can stream at the same time: the backup waits, ready, and costs viewers nothing.

Give both encoders the same settings (resolution, frame rate, encoder profile, audio sample rate and channels). With direct switching, the default, Unda then switches between them without viewers noticing; encoders set up differently make the stream restart for a moment at each switch. With seamless switching (an operator's choice, which re-encodes the channel), the two may differ. See Direct or seamless switching.

What viewers see ​

MomentViewers see
The main encoder disconnectsThe backup, within about a second
The main encoder freezes (connected, no pictures)The last picture for 2 seconds (your setting), then the backup
The main is backThe main again, once it has sent steady pictures for 10 seconds (your setting)
Neither is liveThe channel's next input (a pull stream or a playlist), or the stream ends

See Channel inputs for the settings, who can change what, and the licence.

Limits ​

  • A backup encoder protects against an encoder or its connection failing, not against this server failing.
  • Backup encoders are for channels created on the Channels page. 24/7 channels from a schedule have their own live input (see 24/7 channels).
  • Watching the main or backup input directly (/watch/main-show.main) needs a signed link. Viewers watch the channel itself.