When a first stream check fails, the URL is the first thing to look at. A common mix-up is pasting the station homepage, the page with the embedded player, or the address the encoder uses to log in, and then the check has nothing it can decode. A silence monitor needs the same thing a media player needs: the address that returns the audio itself.
This post covers how to find that address for Icecast, Shoutcast and HLS streams, how to tell it apart from the URLs that look similar, and how to test it before you set up a monitor. The Icecast details come from the official Icecast basic setup guide and the Icecast FAQ. The HLS details come from RFC 8216, the HTTP Live Streaming specification.
What a monitor actually connects to
A listener’s player opens one URL and keeps reading audio from it. A cloud monitor such as SilenceAlarm does the same for a short sample, then measures the level of what it received. So the URL you give it should be the one a listener’s player ends up on. If it points at an HTML page, the check gets HTML. If it points at a server the public can’t reach, the check can’t connect at all.
That rules out a few common candidates straight away:
- The station website or the page with the web player. That is a page that contains a player, and the stream URL is somewhere inside it.
- The source or encoder address. Your encoder logs in to the server with a hostname, port, mountpoint and source password. That is the upload side. Listeners and monitors use the public listening URL, and you should never paste a source password into a monitoring tool.
- The admin or status page of your streaming server. It describes the stream but doesn’t carry the audio.
Icecast: host, port and mountpoint
Icecast can carry several streams on one server. Each one lives on a mountpoint, which the Icecast docs describe as a unique name that “looks like a filename”, for example /stream.ogg. A listener can only listen to one mountpoint at a time, so if your server has a high and a low bitrate version of the same programme, those are two mountpoints and two different URLs.
The listening URL is built from the server address, the port and the mountpoint. The basic setup guide uses this example: with a server at 192.0.2.23:8000 and a mountpoint of /mystream.ogg, you open http://192.0.2.23:8000/mystream.ogg in a media player. Hosted setups usually put the stream behind a domain and HTTPS, so yours may look more like https://radio.example/live.mp3. The mountpoint doesn’t have to end in .mp3 or .aac at all. Icecast only requires that it starts with a slash, according to its FAQ.
If you don’t know your mountpoint, there are two places to look. Your encoder or playout software has it in its server settings, next to the host and port. And if you have access to the Icecast status page, it lists the mounts that currently have a source connected. Combine the public hostname and port with that mountpoint and you have the listening URL.
The .m3u trap
Icecast also answers on the same address with .m3u added, for example http://192.0.2.23:8000/mystream.ogg.m3u. The Icecast 2.4.1 setup guide explains that this URL “will serve up a link” that opens most media players. It returns a small text file that points to the stream. Many station websites offer exactly this file as the “listen” link, because it opens the listener’s default player.
For a monitor you want the address inside that file. Download it, open it in a text editor and copy the http or https line. The same applies to .pls files and other playlist downloads you find on station sites: they are small text files with the real stream address inside.
Shoutcast
Shoutcast servers work on the same principle. The encoder connects with a password, listeners connect to a public address on the server. The exact path differs between Shoutcast versions and hosting panels, so we won’t guess at a format here. The reliable route is your hosting panel or the server’s own public page, which usually offers a listen link. If that link downloads a .pls or .m3u file, open it as text and take the URL from inside, as with Icecast.
HLS: use the .m3u8 playlist
HLS works differently. The audio is split into short segment files, and a playlist tells the player which segments to fetch. RFC 8216 defines two kinds of playlist: a Media Playlist, which lists the segments, and a Master Playlist, which lists the available variants (for example different bitrates). Both are plain UTF-8 text. When served over HTTP, the spec says the path must end in .m3u8 or .m3u, or the server must send the content type application/vnd.apple.mpegurl or audio/mpegurl.
For HLS, the public .m3u8 playlist URL is the one to monitor. Unlike the Icecast .m3u pointer above, this playlist is how HLS is meant to be played, and the player keeps reloading it during a live stream. Don’t paste the URL of a single segment, because it only holds a few seconds of audio and will be replaced.
Finding the URL when you only have a website player
Sometimes you’re setting up monitoring for a stream someone else configured, and all you have is the station’s web player. The browser’s developer tools will show the address the player requests. Open the network panel, start playback and look for a request that keeps receiving data with an audio content type such as audio/mpeg or audio/aac, or for an .m3u8 request in the case of HLS. Copy that request’s URL.
Check whether the URL carries a token or session parameter. Some players add one that expires, and a monitor configured with it will start failing once it does. If you see something like that, ask whoever runs the stream for a stable public listening URL.
Test it before you rely on it
The quickest test is to open the URL in a standalone player such as VLC. If you hear the programme, the URL is good, and you’ve also confirmed there is audio right now. If you want to look from a terminal, ffprobe (part of FFmpeg) prints the codec, sample rate and channel layout it finds:
ffprobe -hide_banner "https://radio.example/live.mp3"
An error like “Invalid data found when processing input” can mean the URL returned an HTML page or a playlist pointer instead of audio. Stop it with Ctrl+C if it keeps reading a live stream.
The SilenceAlarm free live silence detector runs the same kind of check in the browser: it listens to a public stream for 20 seconds without an account and tells you whether audio is present. If that works, the URL will also work for a scheduled monitor. One passing test only covers those 20 seconds, though. For recurring checks you need a monitor: the free plan checks one stream every 15 minutes and sends email alerts, and Pro checks every 1 to 60 minutes.
Which URL when there are several?
Bigger stations often publish several streams of the same programme: MP3 and AAC, high and low bitrate, Icecast and HLS. Each one has its own encoder or transcoding path, so one can go silent while the others keep playing. Monitor the stream most of your listeners use. If you have the monitors to spare, add the others too, since a silent fallback or low bitrate mount is still something a listener can land on. Free covers one monitor, Pro up to ten.
Also check where the URL is reachable from. SilenceAlarm checks from the cloud, so the stream has to be publicly accessible. An address that only works inside your studio network, over a VPN, or with a login can’t be monitored this way.
FAQ
Can I paste my station’s homepage into a silence monitor?
No. The monitor needs the direct listener URL that returns audio. Your homepage or player page is HTML, and the stream address is something the player loads from inside it.
My stream URL doesn’t end in .mp3. Is that a problem?
Not necessarily. An Icecast mountpoint can have any name that starts with a slash, and Shoutcast paths vary by setup. What matters is that a player opening the URL plays audio. HLS is the exception, where you’d expect an .m3u8 playlist.
Should I use the .m3u link from my Icecast server?
Use the address inside it. Icecast’s .m3u URL returns a short text file that points players to the mountpoint. Open the file in a text editor and use the stream URL it contains.
Which codecs and protocols does SilenceAlarm support?
Publicly accessible Icecast, Shoutcast and HLS streams over HTTP or HTTPS, with MP3, AAC, OGG and Opus audio, according to silencealarm.com. Try the URL in the free check first.
1 Comment