[Icecast] only a few listeners - reduce resource usage?

Philipp Schafft phschafft at de.loewenfelsen.net
Thu Apr 7 07:18:09 UTC 2022

Good morning,

On Wed, 2022-04-06 at 06:37 +0000, D.T. wrote:
> Hello,
> I have made myself a radio station that just shuffles my music
> collection, transcodes it to ogg/vorbis and streams that over
> icecast.
> It's a simple shell script utilixing ffmpeg and oggfwd, on a headless
> Debian server.
> Due to copyright issues I cannot make it public (I guess), so I'll
> often have no listeners at all, and usually just myself.
> But the script is still chugging along, transcoding music to nowhere.
> Now I understand that the buffer has to be full when a listener
> connects. And I also understand that the unique character of a radio
> station would be lost if the playlist actually stops when nobody is
> listening.
> Even so, is it possible to avoid this waste of resources while still
> having my very own radio station?

Actually, yes and a bit of no:

You can do that with on-demand relays. They are exactly what you ask
With on-demand relays the source is connected when at least one
listener is connected and is disconnected in times of idle.

So from an Icecast point of view this is totally possible.

However I have not yet seen any out-of-the-box sourceclient for that.
But if you are already on the scripting level of things that could be
an option for you.

Overview on how it works:
Basically when data is required Icecast will do a HTTP GET request to a
URL you provided. It expects a source of data there. Keep in mind that
this source needs to provide data at the correct speed.

And that's all there is to it already. :)

> Cheers,
> D.T.
> PS: thanks for yet another glorious FOSS application!!!

Thank you for your kind words. :)

With best regards,

PS: Feel free to use "shout" from libshout as a little bit more modern
replacement to "oggfwd". :)

Philipp Schafft (CEO/Geschäftsführer) 
Telephon:  +49.3535 490 17 92
Website:   https://www.loewenfelsen.net/
Follow us: https://www.linkedin.com/company/loewenfelsen/

Löwenfelsen UG (haftungsbeschränkt)     Registration number:
Bickinger Straße 21                     HRB 12308 CB
04916 Herzberg (Elster)                 VATIN/USt-ID:
Germany                                 DE305133015
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 228 bytes
Desc: This is a digitally signed message part
URL: <http://lists.xiph.org/pipermail/icecast/attachments/20220407/d439a5bc/attachment.sig>

More information about the Icecast mailing list