Live Mumble Shows for LibreTime

I am one of the maintainers of LibreTime, an open source, online radio scheduling and automation platform. One of the features LibreTime offers is live shows via Icecast mounts. These allow DJs or admins to stream content live to LibreTime that will then be played out instead of the scheduled media in real time to listeners.

Icecast mounts are great for a single person connecting and streaming content. They do not support multiple sources connecting at the same time. This makes bringing in a second DJ or guest difficult, as the group connection needs to happen before the Icecast source connection.

Mumble is an open source group audio chat application that allows users to connect and interact in rooms that can be linked together in a variety of ways. It is available on every major computing platform – Windows, OSX, Linux, Android and iOS and can be configured to imitate a studio environment so that DJs and guests are comfortable in some of the aspects of what is going on. Mumble also supports bot accounts, these bots can connect to the server and do a variety of things, for example play audio into a room or stream audio from a room to somewhere else.

I spent the last month or so developing a system that would allow people to stream a Mumble room to Icecast so that DJs and guests could participate remotely in a Mumble show, while streaming out to Icecast. The implementation includes a Mumble bot for playing out media from the LibreTime library, allowing radio stations to control what is going out on air.

Implementation

This implementation uses the following components:

The Mumble server is configured to require a server password and has 2 rooms under root: Studio and Off-Air under that. Studio and Off-Air are linked, with ACLs preventing people in Off-Air from speaking in Studio. This allows DJs and guests to talk to each other during music breaks, while still being able to hear what is going out on air. Both Botamusique and MumbleIce bots are configured to join the Studio room.

Botamusique is setup to run on the same server as LibreTime. I use LXC containers, so I mounted the LibreTime library into both containers. In the Botamusique configuration, I disabled the ability to delete media, disabled the ability to upload media and changed the command symbol to #. The last option was to avoid conflicts between botamusique and MumbleIce.

MumbleIce runs on my Kubernetes cluster and the configuration is mostly default. The Icecast credentials are those required to connect to the master mount in LibreTime.

To present a show, the DJ simply joins studio, types #web into chat to get the botamusique website URL with access token, types !connect to connect to LibreTime and starts to stream the show. At the end of the show, they type !disconnect to stop streaming. The stream automatically stops streaming to LibreTime if no one speaks for more than 30 seconds. This is to protect against streaming silence after a show if the DJ forgets to disconnect the stream before leaving.