Skip to content

Commit bd19b36

Browse files
committed
v1.1.4
1 parent 33258b0 commit bd19b36

52 files changed

Lines changed: 2044 additions & 519 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.gitignore

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,9 @@
1-
source/lib/
2-
source/udp_player.conf
3-
source/udp_player.dbg
4-
build_release.sh
1+
player/source/lib/
2+
player/source/udp_player.conf
3+
player/source/udp_player.dbg
4+
player/build_release.sh
5+
6+
sender/source/lib/
7+
sender/source/udp_player.conf
8+
sender/source/udp_player.dbg
9+
sender/build_release.sh

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@
22

33
All notable changes to this project are documented in this file.
44

5+
## [1.1.4] – 2026-04-06
6+
* Added multicast support to the player
7+
* Added FFmpeg Sender frontend
8+
59
## [1.1.1] – 2026-03-21
610
###Realtime UDP Audio Improvements
711
Audio delay display changed from samples to milliseconds (ms) for better readability

README.md

Lines changed: 101 additions & 130 deletions
Original file line numberDiff line numberDiff line change
@@ -1,207 +1,178 @@
1-
---
2-
# 🎶 Network Audio Receiver (UDP) for Raspberry Pi
1+
# 🎶 Network Audio Receiver and Sender (UDP) for Raspberry Pi
2+
3+
A lightweight UDP stereo audio receiver together with an FFmpeg-based sender frontend for Raspberry Pi.
34

4-
A lightweight **UDP stereo audio receiver** for Raspberry Pi.
5-
- Lightweight UDP stereo audio receiver for Raspberry Pi with very low latency via ALSA and PipeWire. Developed in Free Pascal on Debian Bookworm and Trixie.
6-
- It outputs directly to **ALSA** (also compatible with **PipeWire** via ALSA emulation).
7-
- Ideal for real-time monitoring and live audio.
5+
* Ultra-low latency audio streaming over UDP
6+
* Direct ALSA output with PipeWire compatibility via ALSA emulation
7+
* Developed in Free Pascal using Codetyphon
8+
* Tested on Debian Bookworm and Debian Trixie
9+
* Ideal for real-time monitoring, live audio, and low-latency streaming setups
810

911
---
1012

1113
## ✨ Features
1214

13-
* Receives **stereo audio over UDP** (e.g., RTP stream) with selectable audio output: 3.5 mm jack, HDMI, USB, and more (choose one device at a time)
14-
* Direct **ALSA audio output** for minimal delay
15-
* Fully compatible with **PipeWire** via ALSA emulation
16-
* Developed in **Free Pascal** using **Codetyphon** on **Debian Bookworm and Debian Trixie**
17-
* **No codec** → uncompressed audio, maximum quality, minimal processing delay
18-
* Supports multiple audio outputs: **3.5 mm jack, HDMI, USB, and more** (selectable in settings)
19-
* On startup, the window is visible
20-
* If the “Start Minimized” checkbox is selected, the application will start minimized
21-
* **Lightweight** with minimal dependencies (ALSA or PipeWire via ALSA)
15+
* Receives stereo audio over UDP with selectable audio outputs such as 3.5 mm jack, HDMI, USB audio, and more
16+
* Supports both multicast and unicast (singlecast)
17+
* Default multicast settings work out of the box in almost any local network
18+
* FFmpeg sender frontend included
19+
* Direct ALSA audio output for minimal delay
20+
* Fully compatible with PipeWire via ALSA emulation
21+
* Uncompressed audio for maximum quality and minimal processing delay
22+
* Lightweight with minimal dependencies
23+
* Developed in Free Pascal using Codetyphon
24+
* Window is visible on startup
25+
* Optional “Start Minimized” mode
26+
* Supports multiple audio devices with individual settings
2227

2328
---
2429

25-
⚡ Ultra-Low Latency Audio Streaming
26-
27-
This project is optimized for extremely low end-to-end latency — achieving sub-7 ms audio transmission over network.
30+
## ⚡ Ultra-Low Latency Audio Streaming
2831

29-
By tuning FFmpeg RTP packet size from the default 1472 bytes down to 736 bytes, latency is significantly reduced across the entire pipeline:
32+
This project is optimized for extremely low end-to-end latency and can achieve less than 7 ms total audio delay over the network.
3033

31-
🚀 ~3.9 ms sender latency
32-
🌐 ~0.5 ms network latency
33-
🎧 ~2.5 ms receiver latency
34+
By reducing the FFmpeg RTP packet size from the default 1472 bytes to 736 bytes, latency is significantly reduced across the entire transmission path.
3435

35-
👉 Total latency: < 7 ms
36+
* 🚀 Sender latency: approximately 3.9 ms
37+
* 🌐 Network latency: approximately 0.5 ms
38+
* 🎧 Receiver latency: approximately 2.5 ms
3639

37-
🔊 Real-World Comparison
40+
👉 Total latency: less than 7 ms
3841

39-
That’s roughly the same delay as standing just ~2.5 meters away from a speaker — effectively real-time audio.
42+
### 🔊 Real-World Comparison
4043

41-
💡 Designed for Performance
42-
Buffer and delay values are displayed in milliseconds (ms) for intuitive monitoring
43-
Optimized for low-latency ALSA playback
44-
Smaller packets = faster delivery (with minimal overhead trade-off)
44+
This is roughly the same delay as standing about 2.5 meters away from a speaker.
4545

46+
### 💡 Designed for Performance
4647

48+
* Buffer and delay values are displayed in milliseconds for easier monitoring
49+
* Optimized for low-latency ALSA playback
50+
* Smaller packets improve response time with only minimal protocol overhead
4751

52+
---
4853

4954
## 💡 Example Test Setup
5055

51-
* **Sender**: Raspberry Pi 5 connected via Wlan streaming audio over UDP
52-
* **Receiver**: Raspberry Pi 4 connected via Ethernet
53-
* **Output**: 3.5 mm jack HiFi amplifier, or HDMI/USB audio
56+
* Sender: Raspberry Pi 5 connected via Wi-Fi streaming audio over UDP
57+
* Receiver: Raspberry Pi 4 connected via Ethernet
58+
* Output: 3.5 mm jack to HiFi amplifier, HDMI audio, or USB audio
5459

5560
Result: Stable low-latency playback on a typical home network, even while streaming video.
5661

5762
---
5863

59-
## ▶️ Usage
64+
## 📦 Downloads
6065

61-
### 📤 Sender (System Audio)
66+
Downloads are available from:
6267

63-
Install `ffmpeg`:
68+
* [https://sourceforge.net/projects/raspberry-udp-audio-receiver/](https://sourceforge.net/projects/raspberry-udp-audio-receiver/)
69+
* [https://github.com/RaspberryFpc/Raspberry-UDP_audio_receiver/](https://github.com/RaspberryFpc/Raspberry-UDP_audio_receiver/)
6470

65-
```bash
66-
sudo apt install ffmpeg
67-
```
71+
---
72+
73+
## 📥 Installation
6874

69-
To transmit system audio, use the provided startup script **ffmpeg_transmitter.sh**:
75+
Use the provided `.deb` packages from the `bin` directory.
7076

71-
1. Edit the script and replace the IP address with the address of your receiver.
72-
2. Set the port number to match the configuration on the receiver.
73-
3. Make the script executable:
77+
Install the player:
7478

7579
```bash
76-
chmod +x ffmpeg_transmitter.sh
80+
sudo apt install ./udp-player.deb
7781
```
7882

79-
4. Save the file, place it on the desktop, and start it with a double-click.
80-
81-
### 📥 Receiver
82-
83-
Start the player:
83+
Install the sender:
8484

8585
```bash
86-
sudo ./udp_player
87-
```
88-
- If the receiver is **installed via the provided `.deb` package**, it can also be started conveniently via the system menu.
89-
- In this case the player **does not require sudo**, as the necessary capabilities (`cap_net_raw,cap_sys_nice+ep`) are set during installation.
90-
- On first start, it will create a **configuration file** at:
91-
92-
```
93-
/var/lib/udp_player/udp_player.conf
86+
sudo apt install ./udp-sender.deb
9487
```
9588

96-
- A window appears and starts playback automatically.
97-
- Select the desired audio output in the settings window.
98-
- Repeats the last valid audio block up to five times if new data is missing, preventing audible dropouts.
99-
10089
---
10190

102-
## ⚙️ Settings Description
103-
104-
Control / Field | Description
105-
--- | ---
106-
**Audio Output Selection** | Choose the audio output device (Headphones/JACK, HDMI, USB audio, etc.). If no configuration exists for a device, a default configuration is created automatically at first start.
107-
**IP** | IP address to receive audio from. Use `0.0.0.0` to listen on all network interfaces.
108-
**Port** | UDP port for incoming audio. Default is `5010`.
109-
**Frequency** | Audio sample rate in Hz.
110-
**Latency** | Audio latency in samples. Typical values: 22000 for JACK/Headphones, 4000 for USB audio.
111-
**Swap Byte Order** | Enable this if the incoming audio uses a different byte order (big/little endian).
112-
**Hide Window** | If enabled, the application window remains minimized or hidden once audio starts.
113-
**Test changes** | This button immediately applies the current settings without saving them.
114-
**Save changes** | This button saves the current settings to the configuration file for future use.
115-
**Delete Device** | This button deletes the selected device configuration. If the device exists, it will be recreated with default values at the next program start.
91+
## ▶️ Usage
11692

117-
---
93+
### ▶️ Start the Player
11894

119-
## 🎯 Latency Optimization
95+
Start the player using the desktop menu entry created during installation.
12096

121-
* **Lower buffer size** → lower delay
122-
* **Too low** → possible dropouts or crackling audio
123-
* Best settings depend on:
124-
* Network type (**LAN** allows lower latency than Wi-Fi)
125-
* Raspberry Pi performance
126-
* Audio hardware
97+
### 📤 Sender
12798

128-
---
99+
Start the sender using the desktop menu entry.
129100

130-
## 🔊 Audio Volume
101+
In the sender settings, you can configure:
131102

132-
If sound is too quiet:
103+
* Audio source
104+
* Destination IP address
105+
* UDP port
133106

134-
```bash
135-
alsamixer
136-
```
107+
Default multicast address:
137108

138-
* Press `F6` to select the right device
139-
* Raise the **Master** volume
140-
141-
Or via terminal:
142-
143-
```bash
144-
amixer set 'Master' 100% unmute
109+
```text
110+
239.255.0.1
145111
```
146112

147-
---
148-
# 📦 Installation / Deinstallation via dpkg
149-
150-
## Installation Steps
113+
For multicast, use an address in the range:
151114

152-
1. Copy the `.deb` package to your Raspberry Pi.
115+
```text
116+
224.0.0.0 – 239.255.255.255
117+
```
153118

154-
2. Install the package:
119+
For unicast (singlecast), use a free IPv4 address in your local network.
155120

156-
```bash
157-
sudo dpkg -i udp_player_x.y.z.deb
158-
```
121+
---
159122

160-
This will install:
123+
## ⚙️ Player Settings Description
124+
125+
| Control / Field | Description |
126+
| ---------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------- |
127+
| Audio Output Selection | Select the audio output device such as headphones, HDMI, or USB audio. If no configuration exists, a default configuration is created automatically. |
128+
| IP | IP address to receive audio from. Use `0.0.0.0` to listen on all network interfaces. |
129+
| Port | UDP port for incoming audio. Default: `5010` |
130+
| Frequency | Audio sample rate in Hz |
131+
| Latency | Audio latency in samples. Typical values: `22000` for headphone output and `4000` for USB audio |
132+
| Swap Byte Order | Enable this if the incoming audio stream uses a different byte order |
133+
| Hide Window | If enabled, the application window is minimized or hidden after audio playback starts |
134+
| Test Changes | Applies the current settings immediately without saving |
135+
| Save Changes | Saves the current settings to the configuration file |
136+
| Delete Device | Deletes the selected device configuration. Missing configurations are recreated automatically at the next start |
161137

162-
```
163-
/usr/bin/udp_player # Binary
164-
/usr/share/applications/... # Desktop menu entry
165-
~/.udp_player/ # Config folder (empty on first start)
166-
```
138+
---
167139

168-
Necessary capabilities are automatically set (`cap_net_raw,cap_sys_nice+ep`) → no sudo required for running the player.
140+
## 🎯 Latency Optimization
169141

170-
3. Start the player:
142+
* Lower buffer sizes reduce delay
143+
* Too low values may cause dropouts or crackling audio
144+
* Best values depend on:
171145

172-
```bash
173-
udp_player
174-
or use the menu entry created during installation.
175-
```
146+
* Network type (LAN is usually faster than Wi-Fi)
147+
* Raspberry Pi performance
148+
* Audio hardware
176149

177150
---
178151

179-
## Deinstallation Steps
180-
181-
To remove the player completely:
152+
## 🔊 Audio Volume
182153

183-
```bash
184-
sudo dpkg -r udp_player
185-
```
154+
If the sound is too quiet, increase the volume in the player settings.
186155

187-
This removes the binary and the menu entry.
156+
---
188157

189-
To also remove the config folder (if you want a clean uninstall):
158+
## 📦 Deinstallation
190159

191160
```bash
192-
rm -rf ~/.udp_player
161+
sudo apt purge udp-player
162+
sudo apt purge udp-sender
193163
```
194164

165+
---
195166

196167
## 📜 License
197168

198-
This project is licensed under the **MIT License**.
169+
This project is licensed under the MIT License.
199170

200171
---
201172

202173
## 🌐 Other Projects by the Author
203174

204-
* [pibackup](https://github.com/RaspberryFpc/pibackup) – Portable live backup and restore tool with GUI, Zstandard compression, auto-shrinking (resize2fs) and flexible restore options.
205-
* [DS18B20-FPC-Pi-GUI](https://github.com/RaspberryFpc/DS18B20-FPC-Pi-GUI) – GUI tool to read DS18B20 temperature sensors with linearization for high accuracy.
206-
* [RaspberryPi-BME280-GUI](https://github.com/RaspberryFpc/RaspberryPi-BME280-GUI)Complete GUI application for accessing the BME280 I²C sensor using Free Pascal.
207-
* [RaspberryPi-GPIOv2-FPC](https://github.com/RaspberryFpc/RaspberryPi-GPIOv2-FPC)Simple and fast Pascal unit for controlling GPIO pins via the Linux GPIO character device interface.
175+
* [pibackup](https://github.com/RaspberryFpc/pibackup) – Portable live backup and restore tool with GUI, Zstandard compression, auto-shrinking and flexible restore options.
176+
* [DS18B20-FPC-Pi-GUI](https://github.com/RaspberryFpc/DS18B20-FPC-Pi-GUI) – GUI tool for reading DS18B20 temperature sensors with linearization for high accuracy.
177+
* [RaspberryPi-BME280-GUI](https://github.com/RaspberryFpc/RaspberryPi-BME280-GUI) – GUI application for accessing the BME280 I²C sensor using Free Pascal.
178+
* [RaspberryPi-GPIOv2-FPC](https://github.com/RaspberryFpc/RaspberryPi-GPIOv2-FPC)Fast Pascal unit for controlling GPIO pins via the Linux GPIO character device interface.

0 commit comments

Comments
 (0)