Use Owntone Server to stream audio from a record player (or any audio source) to an Airplay device.
The script auto-detects when a record is playing and automatically starts streaming. After a configurable timeout (default 300s / 5min) the stream disconnects.
All config lives in a .env file — see .env.example for available options.
- Raspberry Pi 4/5
- Hifiberry ADC Pro
- Audio cable (mini-jack) to connect to the ADC port
- Optional: 3D printed case
- Install DietPi — https://dietpi.com/
- Login as root
- Configure hostname and audio card:
dietpi-config - Clone this repo:
cd ~ git clone git@github.com:juliusvaart/auto-stream.git
./install.sh
Follow the on-screen steps.
To change the Airplay output device later:
./install.sh --select-output
Copy the contents of ~/auto-stream/asound.conf to ~/.asoundrc, then open alsamixer:
alsamixer
Set PGA Gain Left and PGA Gain Right to 12dB (value: 24).
wget -q -O - https://raw.githubusercontent.com/owntone/owntone-apt/refs/heads/master/repo/rpi/owntone.gpg \
| sudo gpg --dearmor --output /usr/share/keyrings/owntone-archive-keyring.gpg
wget -q -O /etc/apt/sources.list.d/owntone.list \
https://raw.githubusercontent.com/owntone/owntone-apt/refs/heads/master/repo/rpi/owntone-trixie.list
apt update
apt install git owntone alsa-utils sox bc curl jq
Access the Owntone web UI at: http://HOSTNAME.local:3689
mkdir -p /root/music/pipes/
mkfifo /root/music/pipes/platenspeler.fifo
The FIFO filename is used as the "now playing" metadata title.
Edit /etc/owntone.conf and update the directories setting under the library {} block:
directories = { "/root/music" }
cp ~/auto-stream/.env.example ~/auto-stream/.env
Edit .env and configure to your setup.
~/auto-stream/owntone-auto-stream.sh
cp ~/auto-stream/auto-stream.service /etc/systemd/system/auto-stream.service
systemctl daemon-reload
systemctl enable auto-stream
systemctl start auto-stream
Add square artwork (JPG) with the same base name as the FIFO file, placed in the same directory:
/root/music/pipes/platenspeler.fifo
/root/music/pipes/platenspeler.png
To enable SFTP for uploading artwork, switch the SSH server to OpenSSH:
dietpi-software