πΆ Network Audio Receiver (UDP) for Raspberry Pi
A lightweight UDP stereo audio receiver for Raspberry Pi.
It outputs directly to ALSA, ensuring very low latency β ideal for real-time monitoring and live audio.
β¨ Features
- Receives stereo audio over UDP (e.g., RTP stream)
- Direct ALSA audio output for minimal delay
- Developed in Free Pascal using Codetyphon on Debian Bookworm
- Automatic detection of incoming packets:
- Packets arrive β audio plays instantly
- No or silent packets for 5 seconds β audio output stops
- No codec β uncompressed audio, maximum quality, minimal processing delay
- On startup, the window is visible
-
If the βStart Minimizedβ checkbox is selected, the application will start minimized.
π‘ Example Test Setup
- Sender: Raspberry Pi 4 streaming YouTube audio via Wi-Fi
- Receiver: Raspberry Pi 4 connected via Ethernet
- Output: 3.5 mm jack β HiFi amplifier
Result: Stable low-latency playback in a typical home network.
βΆοΈ Usage
π€ Sender (System Audio)
Install ffmpeg
:
sudo apt install ffmpeg
To transmit system audio, use the provided startup script StartFFmpegTransmitter.sh
:
- Edit the script and replace the IP address with the address of your receiver.
- Set the port number to match the configuration on the receiver.
-
Make the script executable:
```bash
chmod +x StartFFmpegTransmitter.sh
Save the file, place it on the desktop, and start it with a double-click.
π₯ Receiver
Start the player:
./udp_player
A window appears and starts playback automatically when UDP packets arrive.
π― Latency Optimization
- Lower buffer size β lower delay
- Too low β possible dropouts or crackling audio
- Best settings depend on:
- Network type (LAN allows lower latency than Wi-Fi)
- Raspberry Pi performance
- Audio hardware
π Audio Volume
If sound is too quiet:
alsamixer
- Press
F6
to select the right device
- Raise the Master volume
Or via terminal:
amixer set βMasterβ 100% unmute
π License
This project is licensed under the MIT License.
π Other Projects by the Author
π Other Projects by the Author
π Other Projects by the Author
- pibackup β Portable live backup and restore tool with GUI, Zstandard compression, auto-shrinking (resize2fs) and flexible restore options.
- DS18B20-FPC-Pi-GUI β GUI tool to read DS18B20 temperature sensors with linearization for high accuracy.
- RaspberryPi-BME280-GUI β Complete GUI application for accessing the BME280 IΒ²C sensor using Free Pascal.
- RaspberryPi-GPIOv2-FPC β Simple and fast Pascal unit for controlling GPIO pins via the Linux GPIO character device interface.