All Projects → se-msys → pulsertp-multiroom

se-msys / pulsertp-multiroom

Licence: other
Synchronized multiroom audio with PulseAudio RTP

Programming Languages

shell
77523 projects

Projects that are alternatives of or similar to pulsertp-multiroom

airtunes2mqtt
Multi-Room Audio based on Airplay/Airtunes with MQTT support 🔈
Stars: ✭ 47 (+88%)
Mutual labels:  airplay
OpenWrtAction
Openwrt automatic compilation project of github action
Stars: ✭ 28 (+12%)
Mutual labels:  openwrt
YAWAC
Yet Another Wifi Auto Connect (YAWAC) is a shell script to connect to a dataset of wireless connection and free hotspot like FreeWifi. It's works on OpenWrt.
Stars: ✭ 22 (-12%)
Mutual labels:  openwrt
openwrt
OpenWrt Stable 1907 with lean's package
Stars: ✭ 55 (+120%)
Mutual labels:  openwrt
feed-netkeeper
Openwrt闪讯插件
Stars: ✭ 107 (+328%)
Mutual labels:  openwrt
pulseaudio-module-xrdp
xrdp sink / source pulseaudio modules
Stars: ✭ 105 (+320%)
Mutual labels:  pulseaudio
Phicomm-K2P-K3-OpenWrt-Firmware
Phicomm K3 OpenWrt firmware Compile by Github Actions,(K2P firmware update,see my mood)
Stars: ✭ 42 (+68%)
Mutual labels:  openwrt
openwrt-vm-tools
vmware tools open-vm-tools for OpenWRT, segfault and crashes free😊😊
Stars: ✭ 45 (+80%)
Mutual labels:  openwrt
koolcenter
提供评测文章,固件教程,插件使用说明等。
Stars: ✭ 189 (+656%)
Mutual labels:  openwrt
bobcaygeon
Multi-room streaming, built on airplay
Stars: ✭ 19 (-24%)
Mutual labels:  airplay
ucode
JavaScript-like language with optional templating
Stars: ✭ 27 (+8%)
Mutual labels:  openwrt
OpenWRT-x86 64-Install
Create and deploy a LEGACY or EFI OpenWRT bootable image for x86_64 processors
Stars: ✭ 15 (-40%)
Mutual labels:  openwrt
shairport-sync
AirPlay audio player. Shairport Sync adds multi-room capability with Audio Synchronisation
Stars: ✭ 5,532 (+22028%)
Mutual labels:  airplay
NanoPi-R2C-Plus
基于lean和immortalwrt编译第三方固件,每天自动更新插件和内核,Fusion编译法
Stars: ✭ 89 (+256%)
Mutual labels:  openwrt
pulseviz.py
Audio visualizer for PulseAudio written in Python
Stars: ✭ 24 (-4%)
Mutual labels:  pulseaudio
music visualizer
Shader viewer / music visualizer for Windows and Linux
Stars: ✭ 137 (+448%)
Mutual labels:  pulseaudio
ansible-nnxx
Ansible configurations for the nnxx infrastructure
Stars: ✭ 11 (-56%)
Mutual labels:  openwrt
owntone-server
OwnTone is forked-daapd's new name. Linux/FreeBSD DAAP (iTunes) and MPD media server with support for AirPlay devices (multiroom), Apple Remote (and compatibles), Chromecast, Spotify and internet radio.
Stars: ✭ 1,408 (+5532%)
Mutual labels:  airplay
HandsomeMod
IOT freedom for end users!
Stars: ✭ 39 (+56%)
Mutual labels:  openwrt
mdns-tunneller
Tunnels two (or more) mDNS domains together
Stars: ✭ 74 (+196%)
Mutual labels:  airplay

Synchronized multiroom audio with PulseAudio RTP

This is a collection of example scripts and configuration to achieve synchronized multiroom audio with PulseAudio.

pulsertp

Master

This is the sending node. It runs PulseAudio with the master "sink", and uses the rtp-send module to transmit RTP PCM audio over the network.

It can be any Linux system with enough juice to run PulseAudio and the desired playback applications. I run it on my Ubuntu home server, but a RaspberryPi 2 or better should do fine.

The playback application may call the scripts scripts/pulsertpm-start.sh and scripts/pulsertpm-stop.sh according to the condition, or the rtp-send lines could be placed in your /etc/pulse/default.pa permanently.

If you are running Librespot, then use scripts/pulsertpm-librespot.sh.

Note! Beware that running multicast audio over wireless networks will severly affect all your wireless devices, and will drain the battery on your mobile devices (they are forced to wake up and process packets). I strongly recommend always using unicast-mode when using in wireless networks shared with other devices.

Receiver

This is the receiving end. Running PulseAudio with one rtp-recv module, depending on if you want unicast or multicast. It builds up a buffer according to the specified latency, then it performs sample rate correction with the embedded NTP timecode in the RTP stream. Thus is very important that the Master and Receiver nodes have their system clocks tightly synchronized. Running a local NTP service on the Master is recommended.

The helper script scripts/pulsewatcher.sh monitors the PulseAudio syslog and looks for ALSA device playback/suspend messages. Adjust for you needs. I use it for toggling GPIOs to power on the amplifier.

Note! It is also recommended to use similar type of platform and soundcard for the receiving devices. Using mixed hardware setups will require you to manually calibrate the differences in latency.

See OPENWRT.md how to setup a OpenWRT device to run as receiver.

Playback clients

A client can be any playback application with PulseAudio backend support, or can output PCM as a UNIX-pipe. You can also configure a soundcard input as source.

  • Shairport-sync - Apple® AirPlay™ compatible receiver
  • Librespot - Spotify® Connect compatible player
  • MPD - Plays locally stored music headless

My setup

I run the Master and playback applications on my Linux-based NAS/mini-server.

  • Master runnning Ubuntu Linux on Intel N3150.
  • Receiver on wired ethernet GL.inet AR150 running OpenWRT (PCM2704 USB-Audio analog to Class-D amp)
  • Receiver on wired ethernet Rasperry Pi 2 running Volumio (HifiBerry Digi HiFi S/PDIF to Recevier)
  • Dedicated VLAN for Multicast Audio

Known issues

  • Sometimes when starting a stream, it starts completly out of sync. Sometimes if finds itself in sync again after a few minutes, sometimes I don't.

  • When running on wireless, and a sudden network dropout occurs, a severe out-of-sync occurs and the playback samplerate escalates. It will never find itself back in sync. Then it's just better to restart the streaming from scratch.

  • After a while some crackling sound may introduce itself, but often it disappears of its own after a while. Might be USB-Audio related, or some buffert bug in PulseAudio, not sure.

  • If using Multicast, either use a dedicated VLAN or make sure that IGMP Snooping works on your switches.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].