Switching back and forth between a live dj connection and autodj media file playout can occur for several reasons. There are three potential problems here depending on the behaviour being experienced.
Please note that if you are experiencing audio silence, or breaks in the output of the stream this is unrelated and is most likely a network issue where you should reduce bitrate output and try again.
Brief switch once every few hours
If the problem occurs once every several hours than the issue is likely due to a difference in frequency (samplerate) between the live dj connection and the output to icecast/shoutcast (configured under Mount Point settings).
A difference in frequency (samplerate) of the live dj connection can lead to an eventual buffer underrun or overflow and will trigger a short switch between sources.
This is a known issue with liquidsoap that we are tracking and working with the developers to resolve. In the meanwhile, it is important to make sure the audio frequency of the live dj connection is exactly the same as the output configurations.
Occasional brief switch
This can occur should the network conditions between broadcaster and server become unstable. There are a number of network conditions including congestion, sudden disconnection, or other instability that may cause problems. Such conditions may trigger a buffer overrun where liquidsoap will switch to playout before realizing the broadcaster/dj connection is still available.
Repetitive switch every few seconds or minutes
A constant switch between live connection and playout every few seconds or minutes may relate to network instability or congestion. If the problem has started occurring after upgrading the Media Control Panel then there is also the possibility that the liquidsoap installation is problematic, or there is a problem with the liquidsoap configuration.
A hot-fix has been applied to MediaCP versions 2.12.5 and 2.13.1 that adjusts the live connection buffer for liquidsoap, we first advise rerunning the MediaCP Upgrade and restarting your AutoDJ services.
Should the problem persist, then we recommend following the below procedure to identify and resolve the issue:
- Enable AutoDJ/liquidsoap logging to collect relevant information
- Test the DJ encoder connection yourself ensuring the client encoder frequency/samplerate matches that configured in the service mountpoint autodj configuration. If successful, this indicates there is a problem with the clients encoder configuration or network stability.
- Reduce encoder bitrate down to a minimum to see if this solves the problem. If successful, this indicates there is a network stability or congestion issue that must be resolved by your network provider. Possibly the server is too far away from the client.
- Should the problem persist, reinstalling liquidsoap can sometimes help to solve the problem.
- Recent versions of MediaCP have upgraded liquidsoap to version 2.1.x which may introduce problems. Try reverting to Liquidsoap 2.0.6, restarting the AutoDJ service to see if the problem persists. If the problem is solved then this indicates there is an issue in liquidsoap software causing the problem.
- Updating to the latest release of liquidsoap on the 2.1.x branch (currently 2.1.4) is recommended. Follow the Install custom version of Liquidsoap instructions.
- Should the problem persist, the next step is to engage with Liquidsoap support channels via Github and Slack. Please do remember that liquidsoap is not a creation of MediaCP and our software simply provides an integration of liquidsoap. We recommend opening as an issue on GitHub and following up via Slack. When submitting an issue to Github it is important to provide as much information as possible including:
- The steps you have taken already to try to solve the problem
- Part of the log file relevant to where the problem occurs, or linking the entire log file if you are uncertain. The liquidsoap log file is found from within the MediaCP service overview -> Log Manager -> liquidsoap.log.
- Remember that Liquidsoap is an open source project created by volunteers
Will MediaCP complete the above steps for me?
Our support team can provide guidance on completing the steps above however if you require all steps to be completed then a Professional Services hour can be billed to complete the work.