AutoDJ (liquidsoap) constantly switching between live and playout

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:

  1. Enable AutoDJ/liquidsoap logging to collect relevant information
  2. 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.
  3. 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.
  4. Should the problem persist, reinstalling liquidsoap can sometimes help to solve the problem.
  5. 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.
  6. 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.
  7. 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:
    1. The steps you have taken already to try to solve the problem
    2. 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.
    3. 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.

  • autodj, liquidsoap, switching
  • 0 Users Found This Useful
Was this answer helpful?

Related Articles

Media tracks or files placed directly in content is not detected

Media file information is processed and stored in the database which means that files placed in...

Stream name from DJ is not displayed when broadcasting through AutoDJ

When broadcasting directly to a SHOUTcast or Icecast service the Stream name is displayed on the...

Collecting Liquidsoap AutoDJ log files

Should you experience difficulty with Liquidsoap AutoDJ then it is possible to enable, collect...

How to change AutoDJ audio format

If you would like to change the audio format AutoDJ transmits with, you can manage this by...

AutoDJ playing the wrong track

When broadcasting through AutoDJ you expect a track from the scheduled playlist to play, but a...