-
-
Notifications
You must be signed in to change notification settings - Fork 5
Live broadcasting
This page explains how to broadcast live audio through BotWave, meaning audio streamed in real time rather than from a pre-recorded file.
Note
This page assumes you're already familiar with the basics. If not, start with Main/Basic Usage.
Live broadcasting in BotWave uses an ALSA loopback card. It is a virtual audio device on your system that acts as a bridge. You send audio into it from any application, and BotWave picks it up and transmits it over FM. Think of it like a virtual cable between your audio source and the radio transmitter.
Important
You need the ALSA loopback card installed for live broadcasting to work. If you skipped it during installation, you can enable it by re-running the installer with the --alsa flag:
curl -sSL https://botwave.dpip.lol/install | sudo bash -s -- client --alsaThen verify it's available by running aplay -l — you should see two BotWave cards listed.
Once your ALSA card is set up, starting a live broadcast is straightforward. In your BotWave prompt, type live:
Local Client:
botwave> live [frequency] [ps] [rt] [pi]Server:
botwave> live <targets> [frequency] [ps] [rt] [pi]| Parameter | Description |
|---|---|
targets |
(server only) Client ID, hostname, or all
|
frequency |
FM frequency in MHz (default: 90.0) |
ps |
Station name shown on RDS radios (default: BotWave) |
rt |
Station description (default: Broadcasting) |
pi |
Program Identifier code (default: FFFF) |
Example:
botwave> live 88.5 MyRadio "Live Show"Once the command runs, BotWave is listening on the ALSA loopback card. Now you just need to send audio to it.
The ALSA card expects audio in this format: 48000 Hz, 2 channels, S16_LE. Any source that can output in this format will work.
This is useful for streaming files to clients without storing them on their filesystem first:
aplay -D plughw:BotWave,0 yourfile.wav-
Find your microphone's card name:
arecord -l
-
Pipe its audio into BotWave:
arecord -D plughw:YOUR_CARD,0 -f S16_LE -c 2 -r 48000 | aplay -D plughw:BotWave,0Replace
YOUR_CARDwith your microphone's card name or number from the previous step.
This section covers how to stream audio from a separate computer to the Pi running BotWave. Both machines need FFmpeg installed.
On the Pi, start listening for incoming audio:
ffmpeg -f s16le -ac 2 -ar 48000 -i udp://0.0.0.0:5004 -f alsa plughw:BotWave,0On your Linux or Mac computer, send audio from your system output. First find your output device:
# Linux (PulseAudio)
pactl list short sources
# Mac
ffmpeg -list_devices true -f avfoundation -i dummyThen stream it:
# Linux (PulseAudio) - replace with your source name
ffmpeg -f pulse -i your_monitor_source -ac 2 -ar 48000 -f s16le udp://PI_HOST:5004
# Mac - replace with your device index
ffmpeg -f avfoundation -i ":DEVICE_INDEX" -ac 2 -ar 48000 -f s16le udp://PI_HOST:5004Replace PI_HOST with your Pi's IP address.
This uses VoiceMeeter to capture your system audio and FFmpeg to stream it.
- Install VoiceMeeter
- Open VoiceMeeter and in the VIRTUAL INPUT section:
- Disable the
>Abutton - Enable the
>Bbutton
- Disable the
- Set your system audio output to
VoiceMeeter Input (VB-Audio Voicemeeter VAIO) - Verify FFmpeg can see it:
You should see
ffmpeg -list_devices true -f dshow -i dummyVoicemeeter Out B1 (VB-Audio Voicemeeter VAIO)in the list.
On the Pi, start listening:
ffmpeg -f s16le -ac 2 -ar 48000 -i udp://0.0.0.0:5004 -f alsa plughw:BotWave,0ffmpeg -f dshow -i audio="Voicemeeter Out B1 (VB-Audio Voicemeeter VAIO)" -ac 2 -ar 48000 -f s16le udp://PI_HOST:5004Replace PI_HOST with your Pi's IP address.
Expect around 5 seconds of latency depending on your network. The transmission speed should stabilize around
1xafter a few seconds. If it doesn't, restart both FFmpeg commands.
The live command fails or nothing transmits:
- Run
aplay -land confirm aBotWavecard is listed. If not, re-run the installer with--alsa.
Audio is silent or cuts out:
- Make sure your source is outputting at 48000 Hz, 2 channels, S16_LE. Mismatched formats are the most common cause of silence.
FFmpeg stream is too fast or too slow:
- Restart both FFmpeg commands (Pi side first, then computer side). This usually stabilizes within a few seconds.
BotWave by DPIP Studio | Website