Quantcast
Channel: Raspberry Pi Forums
Viewing all articles
Browse latest Browse all 8609

Graphics, sound and multimedia • Documentation: Raspberry Pi OS Lite + Bluetooth speaker + PipeWire

$
0
0
Hi, I made a tiny bash script that detects when a bluetooth speaker is connected, and it starts playing back an online radio station with mpv, and when the speaker is turned off, the mpv processes get killed. It's great, it just works, so it's something I want to replicate on other Pis, or the same one after I move to a newer OS verison.

I made this script when Pulse Audio was still the go to solution for this. When I recently put this script on a Pi Zero 2 W, the sound was very choppy with Pulse Audio, and the solution I ended up with was using PipeWire instead, which only has a very short hiccup every 30-60 seconds or so (fairly tolerable). However, it's all been a lot of trial and error, I and I even used LLMs because I grew tired of lots of outdated advice online recommending either PA or compiling bluez-alsa from source. I want packages from (the default) APT repositories, so I can just apt update everything going forward.

To the Raspberry Pi people, please make a guide for a simple headless bluetooth setup for Raspberry Pi OS Lite with PipeWire. Better yet, make a meta package that does this, so that a single command installs what you need. If it will be a tutorial, put it in the online documentation, for easy access.

The problems I had to deal with were making sure that I can I have the necessary packages to be able to:
- pair a bluetooth speaker
- make the speaker usable as an audio sink
- set the bluetooth speaker as the default audio output
- have the means to adjust the volume via command line (something like alsamixer to control bluetooth speakers would be nice)

If you want to reproduce this scenario, just install the latest Raspberry Pi OS Lite and try to play online radio through a bluetooth speaker with mpv. That's a lot of "fun". :D

Statistics: Posted by kneekoo — Thu Oct 09, 2025 7:44 pm



Viewing all articles
Browse latest Browse all 8609

Trending Articles