Auto switch to fallback stream¶
The Auto Switch function can be used to replace an audio source that is no longer available - for example, as a fallback for a simulcast.
Workflow¶
Create a new additional source for this channel with the right incoming bitrate and select the fallback master server (the naming in the UI is a bit misleading, it’s not only “mid-roll trigger inside source”).
When creating listener mounts transcoding should be “forced”. Otherwise transcoding will be skipped if the source and listener mount have the same spec (e.g. same bitrate/format). The fallback mechanism is part of our transcodings so it needs to be enabled.
A special setting for the channel has to be created in “Advanced Settings”. This is the place for all settings that don’t have an UI and is written in JSON.
Hint
Please check if there is a red mark in the sidbar. In this case the JSON is not valid and can not be saved.
Description Structure of the JSON document¶
parameters silence, noise and threshold are freely configurable
configuration per channel
transcoding feature necessary
{
"fallback": {
"url": "http://api.streamabc.net/sources/mounts/redirect/qc_0dm7w3mdgo3b_koaz",
"max_silence": "10",
"min_noise": "10",
"threshold": "-30"
}
}
fallback
is the Key for the settings
url
is the StreamURL of the fallback stream. You can just copy the URL of the source here. However, we have a special service that redirects to the source if a channelkey (our unique ID for a channel) is given. It auto-selects fallback mounts. The syntax is http://api.streamabc.net/sources/mounts/redirect/<channelkey>
Just use the channelkey of the current channel here. You can find it under “Setup”
max_silence
is the number of seconds that the stream has to be silent before switching to fallback
min_noise
is the number of seconds without silence before switching back
threshold
is the audio level in dB that is considered silence
Special use cases¶
If the fallback is a QuantumCast cloud playout there is no need to add an additional source. In that case use the special URL http://api.streamabc.net/sources/mounts/redirect/<channelkey>/playout and replace <channelkey> with the channelkey of the playout channel.
In case of sources with integrated bitflips we need a dedicated fallback url for every codec and bitrate as it is not possible to transcode these channels (in order to not loose the bitflips)