You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+76-19Lines changed: 76 additions & 19 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,4 +1,4 @@
1
-
---
1
+
---
2
2
layout: default
3
3
title: Network Audio Receiver (UDP) for Raspberry Pi
4
4
description: Lightweight UDP stereo audio receiver for Raspberry Pi with very low latency via ALSA and PipeWire. Developed in Free Pascal on Debian Bookworm.
@@ -16,22 +16,23 @@ It outputs directly to **ALSA** (also compatible with **PipeWire** via ALSA emul
16
16
* 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)
17
17
* Direct **ALSA audio output** for minimal delay
18
18
* Fully compatible with **PipeWire** via ALSA emulation
19
-
* Developed in **Free Pascal** using **Codetyphon** on **Debian Bookworm/Trixie**
19
+
* Developed in **Free Pascal** using **Codetyphon** on **Debian Bookworm**
20
20
***No codec** → uncompressed audio, maximum quality, minimal processing delay
21
21
* Supports multiple audio outputs: **3.5 mm jack, HDMI, USB, and more** (selectable in settings)
22
22
* On startup, the window is visible
23
23
* If the “Start Minimized” checkbox is selected, the application will start minimized
24
24
***Lightweight** with minimal dependencies (ALSA or PipeWire via ALSA)
25
-
* Repeats the last valid audio block up to five times if new data is missing, preventing audible dropouts.
25
+
26
26
---
27
27
28
28
## 💡 Example Test Setup
29
29
30
-
***Sender**: Raspberry Pi 4 streaming YouTube audio via Wi-Fi
31
-
***Receiver**: Raspberry Pi 4 or Pi 5 connected via Ethernet
30
+
***Sender**: Raspberry Pi 4 or Pi 5 streaming audio over UDP
31
+
***Receiver**: Raspberry Pi 4 or Pi 5 connected via Ethernet
32
32
***Output**: 3.5 mm jack → HiFi amplifier, or HDMI/USB audio
33
33
34
-
Result: Stable low-latency playback on a typical home network, even while streaming video via RealVNC.
34
+
Result: Stable low-latency playback on a typical home network, even while streaming video.
35
+
35
36
---
36
37
37
38
## ▶️ Usage
@@ -44,10 +45,10 @@ Install `ffmpeg`:
44
45
sudo apt install ffmpeg
45
46
```
46
47
47
-
To transmit system audio, use the provided startup script **`StartFFmpegTransmitter.sh`**:
48
+
To transmit system audio, use the provided startup script **StartFFmpegTransmitter.sh**:
48
49
49
-
1. Edit the script and replace the IP address with the address of your receiver.
50
-
2. Set the port number to match the configuration on the receiver.
50
+
1. Edit the script and replace the IP address with the address of your receiver.
51
+
2. Set the port number to match the configuration on the receiver.
51
52
3. Make the script executable:
52
53
53
54
```bash
@@ -64,31 +65,40 @@ Start the player:
64
65
./udp_player
65
66
```
66
67
67
-
A window appears and starts playback automatically. Select the desired audio output in the settings window.
68
+
- The player **does not require sudo**, as the necessary capabilities (`cap_net_raw,cap_sys_nice+ep`) are set during installation.
69
+
- On first start, it will create a **configuration file** at:
70
+
71
+
```
72
+
/var/lib/udp_player/udp_player.conf
73
+
```
74
+
75
+
- A window appears and starts playback automatically.
76
+
- Select the desired audio output in the settings window.
77
+
- Repeats the last valid audio block up to five times if new data is missing, preventing audible dropouts.
78
+
68
79
---
69
80
70
81
## ⚙️ Settings Description
71
82
72
83
Control / Field | Description
73
84
--- | ---
74
-
**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 program start.
85
+
**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.
75
86
**IP** | IP address to receive audio from. Use `0.0.0.0` to listen on all network interfaces.
76
87
**Port** | UDP port for incoming audio. Default is `5010`.
77
-
**Network Buffer** | Size of the receive buffer in bytes. Must be at least as large as a single sent audio block.
78
88
**Frequency** | Audio sample rate in Hz.
79
-
**Latency** | Audio latency in samples. Typical values: 22000 for JACK/Headphones, 3000 for USB audio.
89
+
**Latency** | Audio latency in samples. Typical values: 22000 for JACK/Headphones, 4000 for USB audio.
80
90
**Swap Byte Order** | Enable this if the incoming audio uses a different byte order (big/little endian).
81
91
**Hide Window** | If enabled, the application window remains minimized or hidden once audio starts.
82
-
**Test changes** | This button mmediately applies the current settings without saving them.
92
+
**Test changes** | This button immediately applies the current settings without saving them.
83
93
**Save changes** | This button saves the current settings to the configuration file for future use.
84
-
**Delete** | This button deletes the selected device configuration. If the device exists, it will be recreated with default values at the next program start.
94
+
**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.
85
95
86
96
---
87
97
88
98
## 🎯 Latency Optimization
89
99
90
-
***Lower buffer size** → lower delay
91
-
***Too low** → possible dropouts or crackling audio
100
+
***Lower buffer size** → lower delay
101
+
***Too low** → possible dropouts or crackling audio
92
102
* Best settings depend on:
93
103
* Network type (**LAN** allows lower latency than Wi-Fi)
94
104
* Raspberry Pi performance
@@ -104,8 +114,8 @@ If sound is too quiet:
104
114
alsamixer
105
115
```
106
116
107
-
* Press `F6` to select the right device
108
-
* Raise the **Master** volume
117
+
* Press `F6` to select the right device
118
+
* Raise the **Master** volume
109
119
110
120
Or via terminal:
111
121
@@ -114,6 +124,53 @@ amixer set 'Master' 100% unmute
114
124
```
115
125
116
126
---
127
+
# 📦 Installation / Deinstallation via dpkg
128
+
129
+
## Installation Steps
130
+
131
+
1. Copy the `.deb` package to your Raspberry Pi.
132
+
133
+
2. Install the package:
134
+
135
+
```bash
136
+
sudo dpkg -i udp_player_x.y.z.deb
137
+
```
138
+
139
+
This will install:
140
+
141
+
```
142
+
/usr/bin/udp_player # Binary
143
+
/usr/share/applications/... # Desktop menu entry
144
+
~/.udp_player/ # Config folder (empty on first start)
145
+
```
146
+
147
+
Necessary capabilities are automatically set (`cap_net_raw,cap_sys_nice+ep`) → no sudo required for running the player.
148
+
149
+
3. Start the player:
150
+
151
+
```bash
152
+
udp_player
153
+
or use the menu entry created during installation.
154
+
```
155
+
156
+
---
157
+
158
+
## Deinstallation Steps
159
+
160
+
To remove the player completely:
161
+
162
+
```bash
163
+
sudo dpkg -r udp_player
164
+
```
165
+
166
+
This removes the binary and the menu entry.
167
+
168
+
To also remove the config folder (if you want a clean uninstall):
Copy file name to clipboardExpand all lines: bin/README.md
+73-17Lines changed: 73 additions & 17 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,4 +1,4 @@
1
-
---
1
+
---
2
2
layout: default
3
3
title: Network Audio Receiver (UDP) for Raspberry Pi
4
4
description: Lightweight UDP stereo audio receiver for Raspberry Pi with very low latency via ALSA and PipeWire. Developed in Free Pascal on Debian Bookworm.
@@ -27,11 +27,12 @@ It outputs directly to **ALSA** (also compatible with **PipeWire** via ALSA emul
27
27
28
28
## 💡 Example Test Setup
29
29
30
-
***Sender**: Raspberry Pi 4 or pi 5 streaming YouTube audio via Wi-Fi
31
-
***Receiver**: Raspberry Pi 4 or pi 5 connected via Ethernet
30
+
***Sender**: Raspberry Pi 4 or Pi 5 streaming audio over UDP
31
+
***Receiver**: Raspberry Pi 4 or Pi 5 connected via Ethernet
32
32
***Output**: 3.5 mm jack → HiFi amplifier, or HDMI/USB audio
33
33
34
-
Result: Stable low-latency playback on a typical home network, even while streaming video via RealVNC.
34
+
Result: Stable low-latency playback on a typical home network, even while streaming video.
35
+
35
36
---
36
37
37
38
## ▶️ Usage
@@ -44,10 +45,10 @@ Install `ffmpeg`:
44
45
sudo apt install ffmpeg
45
46
```
46
47
47
-
To transmit system audio, use the provided startup script **`StartFFmpegTransmitter.sh`**:
48
+
To transmit system audio, use the provided startup script **StartFFmpegTransmitter.sh**:
48
49
49
-
1. Edit the script and replace the IP address with the address of your receiver.
50
-
2. Set the port number to match the configuration on the receiver.
50
+
1. Edit the script and replace the IP address with the address of your receiver.
51
+
2. Set the port number to match the configuration on the receiver.
51
52
3. Make the script executable:
52
53
53
54
```bash
@@ -63,21 +64,29 @@ Start the player:
63
64
```bash
64
65
./udp_player
65
66
```
66
-
A window appears and starts playback automatically when UDP packets arrive.
67
-
Select the desired audio output in the settings window.
68
-
Repeats the last valid audio block up to five times if new data is missing, preventing audible dropouts.
67
+
68
+
- The player **does not require sudo**, as the necessary capabilities (`cap_net_raw,cap_sys_nice+ep`) are set during installation.
69
+
- On first start, it will create a **configuration file** at:
70
+
71
+
```
72
+
/var/lib/udp_player/udp_player.conf
73
+
```
74
+
75
+
- A window appears and starts playback automatically.
76
+
- Select the desired audio output in the settings window.
77
+
- Repeats the last valid audio block up to five times if new data is missing, preventing audible dropouts.
78
+
69
79
---
70
80
71
81
## ⚙️ Settings Description
72
82
73
83
Control / Field | Description
74
84
--- | ---
75
-
**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 program start.
85
+
**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.
76
86
**IP** | IP address to receive audio from. Use `0.0.0.0` to listen on all network interfaces.
77
87
**Port** | UDP port for incoming audio. Default is `5010`.
78
-
**Network Buffer** | Size of the receive buffer in bytes. Must be at least as large as a single sent audio block.
79
88
**Frequency** | Audio sample rate in Hz.
80
-
**Latency** | Audio latency in samples. Typical values: 22000 for JACK/Headphones, 3000 for USB audio.
89
+
**Latency** | Audio latency in samples. Typical values: 22000 for JACK/Headphones, 4000 for USB audio.
81
90
**Swap Byte Order** | Enable this if the incoming audio uses a different byte order (big/little endian).
82
91
**Hide Window** | If enabled, the application window remains minimized or hidden once audio starts.
83
92
**Test changes** | This button immediately applies the current settings without saving them.
@@ -88,8 +97,8 @@ Control / Field | Description
88
97
89
98
## 🎯 Latency Optimization
90
99
91
-
***Lower buffer size** → lower delay
92
-
***Too low** → possible dropouts or crackling audio
100
+
***Lower buffer size** → lower delay
101
+
***Too low** → possible dropouts or crackling audio
93
102
* Best settings depend on:
94
103
* Network type (**LAN** allows lower latency than Wi-Fi)
95
104
* Raspberry Pi performance
@@ -105,8 +114,8 @@ If sound is too quiet:
105
114
alsamixer
106
115
```
107
116
108
-
* Press `F6` to select the right device
109
-
* Raise the **Master** volume
117
+
* Press `F6` to select the right device
118
+
* Raise the **Master** volume
110
119
111
120
Or via terminal:
112
121
@@ -115,6 +124,53 @@ amixer set 'Master' 100% unmute
115
124
```
116
125
117
126
---
127
+
# 📦 Installation / Deinstallation via dpkg
128
+
129
+
## Installation Steps
130
+
131
+
1. Copy the `.deb` package to your Raspberry Pi.
132
+
133
+
2. Install the package:
134
+
135
+
```bash
136
+
sudo dpkg -i udp_player_x.y.z.deb
137
+
```
138
+
139
+
This will install:
140
+
141
+
```
142
+
/usr/bin/udp_player # Binary
143
+
/usr/share/applications/... # Desktop menu entry
144
+
~/.udp_player/ # Config folder (empty on first start)
145
+
```
146
+
147
+
Necessary capabilities are automatically set (`cap_net_raw,cap_sys_nice+ep`) → no sudo required for running the player.
148
+
149
+
3. Start the player:
150
+
151
+
```bash
152
+
udp_player
153
+
or use the menu entry created during installation.
154
+
```
155
+
156
+
---
157
+
158
+
## Deinstallation Steps
159
+
160
+
To remove the player completely:
161
+
162
+
```bash
163
+
sudo dpkg -r udp_player
164
+
```
165
+
166
+
This removes the binary and the menu entry.
167
+
168
+
To also remove the config folder (if you want a clean uninstall):
0 commit comments