Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Reliable recovery starts by identifying which connection failed: the audio source to the streaming server, the server to the listener, or the listener’s own internet connection. Configure the source to retry, keep a local backup audio source ready, and make the player reload when its media request stalls. If a listener is fully offline, live audio cannot reach them; only audio already buffered or stored locally can keep playing.

Find the failed link first

A typical internet-radio setup has three parts: a source that generates or sends the sleep sounds, a server that relays the stream, and a listener’s player. Recovery depends on which link has failed.

  • Source to server: The encoder or streaming process has lost its connection to the relay. Source-side reconnect behavior is the main fix.
  • Server to listener: The relay is unavailable or the listener cannot fetch its audio. A local fallback at the source cannot help if the server is unreachable; the player must retry when delivery becomes possible again.
  • Listener’s internet connection: The player cannot receive new audio at all. A buffer can cover only the audio it already contains; for a longer outage, playback needs an offline copy on the listener’s device.

When diagnosing an interruption, check the source logs, the server or mount, and the listener’s player separately. A single “stream is down” message does not identify which part failed.

Configure the source to reconnect

Liquidsoap sending to Icecast

Liquidsoap’s development documentation for version 2.5.x says that when an Icecast connection fails or the server closes it, Liquidsoap logs the error and tries to reconnect after three seconds. It keeps retrying while the script continues to run. This is documented behavior for that version, not a guarantee for every client or deployment. Check the documentation for the version you actually run before relying on particular defaults: Liquidsoap: Streaming to Icecast and Shoutcast.

Free tools Windows power users keep installed

One-click scans. No signup required.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
#1 Best Overall
GL.iNet GL-X2000 Spitz Plus 4G LTE CAT 12 Wi-Fi 6 Dual-SIM Router, NA Only
  • 【Fast Wi-Fi 6, 3000M wireless speed】GL-X2000 provides reliable cellular networks for remote access and high speed internet in urban areas with up to 574Mbps (2.4GHz) + 2402Mbps (5GHz) Wi-Fi speeds.*Speed Tests conducted on a local network. Real world speeds may differ depending on your network configuration.
  • 【Dual-SIM with Single Standby】Dual-SIM flexibility for selecting the stronger and faster ISP connection, AT&T & T-Mobile certificated while supporting Network Failover and the option to configure Failover priorities among multiple connection methods.
  • 【Multi-WAN】Spitz Plus' cellular 4G router with multi-WAN technology lets users utilize multiple connection methods, including Ethernet, Repeater, Cellular, and Tethering; Load-balancing capabilities let users distribute bandwidth by custom proportion among multiple connection methods.
  • 【VPN Tunnelling & Remote Access】Provides pre-installed OpenVPN and WireGuard to support 30+ VPN services and encrypts all network traffic within the connected network so that the network is secured when connecting to a public Wi-Fi. Max. VPN speed of 30 Mbps (OpenVPN); 190 Mbps (WireGuard) *Speed Tests conducted on a local network. Real world speeds may differ depending on your network configuration.
  • 【Interchangeable SMA Connectors】The GL-X2000 features four SMA connectors, allowing for the integration of multiple external antennas to enhance the device's performance across various application scenarios.

The same documentation lists a default connection_timeout of five seconds for waiting for a connection to be established, and a default timeout of 30 seconds for read or write operations. These settings describe different waits; neither is a universal outage-recovery schedule. Liquidsoap’s output also supports connect, disconnect, and error callbacks, which can help log state changes or adjust retry behavior. An error callback may choose a delay or stop retries, so confirm that your callback does not unintentionally disable unattended recovery.

Keep the Liquidsoap process and its script running. Reconnection cannot continue after the process itself exits. Verify recovery by checking the logs and confirming that audio returns at the Icecast mount after the network link comes back.

Ices 2 is a different client

Ices 2 documents separate settings named reconnectdelay, reconnectattempts, and retry-initial in its version 2.0.3 configuration documentation: Icecast: IceS v2.0 Documentation, Configuration. These are Ices settings, not Liquidsoap options. Pay particular attention to an attempt limit: once the configured retries are exhausted, an instance may stop trying. Choose a limit deliberately if you need unattended recovery, and confirm behavior against your installed version. The documentation does not establish one best retry delay for every connection or outage.

Keep a backup sleep-audio source ready

Retrying the connection restores delivery only if the source still has audio to send. If the primary file, playlist, or source becomes unavailable, configure a fallback that can supply another sleep-sounds file or prepared playlist.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Liquidsoap’s quickstart describes mksafe as making an unavailable source safe by supplying silence, and fallback as switching to an always-available backup source. For sleep audio, a local ambient loop or backup playlist is usually more suitable than silence when uninterrupted sound is the goal. This is an application of the documented operators, not a guarantee about a particular configuration. See Liquidsoap: Quickstart.

A source fallback protects the generator side only. It does not restore a listener’s connection to the server, nor does it deliver audio while that listener is completely offline.

Make the listener’s browser player retry

A browser media element can signal that fetching or playback has stalled. Events including stalled, waiting, and error can drive a recovery state and a visible message such as “Reconnecting.” Apple’s HTML media documentation and MDN describe these media states and events: Apple Developer Documentation: HTMLMediaElement and MDN: HTMLMediaElement error event.

Rank #2
Portable WiFi Hotspot, 4G LTE USB Mobile Router, Standard SIM Card, B1/B3/B5 4G LTE Frequency Band, B1 3G UMTS Band, 150mbps, Support 802.11 B/g/n, 10 Users
  • Support Multiple Users: USB portable WiFi supports multiple terminals to access the Internet at the same time, and supports 10 devices, such as mobile phones,laptops, computers, smart TVs and other devices.
  • USB Powered: Portable WIFI supports multiple 4G networks, sharing up to 10 wifi users, powered by devices with USB ports, such as mobile phone chargers, car chargers, power banks, etc.
  • High Speed Stable: 4G USB portable WIFI provides fast and stable high speed Internet access, high speed 4G internet, stable signal, feel the wonderful internet life, and fast Internet access.
  • Plug and play: 4G mobile WiFi is plug and play, enjoy 4G internet, convenient USB power supply method, connect power device, insert SIM card, use SIM card data to surf the Internet anytime, anywhere.
  • Multiple Protection: WiFi router adopts multiple protection design, more secure, WPA/WPA2 WiFi encryption, effectively avoid internet squatting, support data control.
  1. Detect the interruption. Listen for relevant stalled, waiting, and error events. Avoid treating every brief wait for data as a permanent failure.
  2. Wait for connectivity to return. A retry loop that runs immediately and repeatedly during an outage may create unnecessary requests. Use a controlled retry policy suited to your player and server.
  3. Reload the media resource. Calling HTMLMediaElement.load() resets the media element and begins source selection and loading again; it also aborts ongoing operations. Details: MDN: HTMLMediaElement load() method.
  4. Wait for readiness, then request playback. Handle a failed load or playback request and show the listener what is happening. Browser autoplay policies or user-gesture requirements can prevent sound from resuming automatically.

load() restarts source selection; it does not guarantee that every browser will resume audible playback automatically. For a custom Media Source Extensions player, the application also owns segment fetching and buffering, so its recovery logic must handle failed chunk requests and re-establish the media pipeline. The available documentation does not establish a particular library or universal code recipe.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

When segmented delivery may help

Liquidsoap can generate HLS files for a web server to serve. HLS or DASH uses rolling playlists and short segments; adaptive variants can switch to a lower bitrate when bandwidth degrades. That can help with a weak or fluctuating connection, but it cannot deliver new audio during a complete loss of connectivity.

The Liquidsoap book gives an illustrative example of a playlist containing the last minute of audio split into two-second segments. Those figures are examples in the book, not universal settings, buffer guarantees, or requirements for your stream. Choose segmented delivery only if it fits your server and player setup: The Liquidsoap book.

Test recovery at each boundary

There is no universal retry schedule, buffer size, or seamless-recovery guarantee for an unspecified host, player, and network. Test the actual deployment by interrupting one link at a time and recording what happens:

  1. Disconnect the source-to-server network link while leaving the source process running. Check whether it logs the outage, retries, and returns to the server mount.
  2. Make the primary audio source unavailable while leaving the server link up. Confirm that the backup playlist plays rather than silence, if that is the intended behavior.
  3. Interrupt server delivery to a connected listener. Observe player events, retry behavior, and whether playback resumes after service returns.
  4. Disconnect the listener’s internet connection. Confirm that the player indicates the interruption and establish how long any existing buffer lasts. Test an offline copy separately if playback must continue through a longer outage.

Keep the results with the configuration details, including client and Liquidsoap versions. A successful source reconnect does not prove that the browser player or the listener’s offline case recovers.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Or let it run in the cloud

For a prerecorded sleep-sounds video intended to run continuously on YouTube, StreamNeo is a separate option: upload the video, add your YouTube stream key, and go live. It loops the uploaded video from the cloud, so your computer and home connection do not need to stay on. It streams to YouTube only and plays uploaded videos; it is not a live camera-input service. StreamNeo includes automatic recovery if YouTube drops the stream, and uploaded quality is kept as made up to 4K 60fps at one flat price per slot. The first day is free with no card required, one free day per account. Monthly billing is $9.99 per month. Learn more at StreamNeo, then start your free day.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.