本帖最后由 ytsam 于 2024-10-30 14:43 编辑
懂的拿走。
1、家庭UPNP系统典型架构
- (UPnP Server) minidlna,
- (UPnP Control Points) iOS/mConnect, Android/BubbleUPnP
- (UPnP Renderer) Raspberry Pi 4B, PI OS Lite (Debian 12) mpd+upmpdcli .
- (DAC/USB Audio Interfaces) Matrix Audio X-SPDIF3,RME ADI-2 DAC/Holo Audio Cyan 2
2、(UPnP Server) minidlna安装,pc机安装 Debian 12或者 Ubuntu 22/24 LTS Server Headless系统
sudo apt update sudo apt install minidlna -y
编辑minidlna配置文件,设置音乐资源 所在目录 sudo nano /etc/minidlna.conf inotify=yes media_dir=A,/media/musics |
sudo service minidlna force-reload sudo service minidlna restart
3、(UPnP Control Points) 在苹果手机安装mConnect,安卓手机安装BubbleUPNP
4、(UPnP Renderer) Raspberry Pi 4B, PI OS Lite (Debian 12),设置保证解码器或者usb界面 默认设备代码是1.
a、安装alsa等库
sudo apt install alsa-utils -y sudo apt install ffmpeg -y sudo apt install cifs-utils curl -y b、安装mpd sudo apt update sudo apt install mpd -y
编辑mpd配置文件,设置相关参数 sudo nano /etc/mpd.conf
port "6600" restore_paused "yes" auto_update "no" zeroconf_enabled "no" input_cache { size "1 GB" } audio_output { type "alsa" name "USB DAC" device "hw:1,0" mixer_type "none" dop "no" }
|
sudo systemctl enable mpd
c、安装upmpdcli .
[size=13.3333px]sudo apt update
cd /usr/share/keyrings/ sudo wget https://www.lesbonscomptes.com/pages/lesbonscomptes.gpg
cd /etc/apt/sources.list.d
sudo wget https://www.lesbonscomptes.com/upmpdcli/pages/upmpdcli-rbookworm.list
sudo apt update sudo apt install upmpdcli -y
编辑upmpdcli配置文件,设置相关参数 sudo nano /etc/upmpdcli.conf
# Specific friendly name for the UPnP/AV Media Renderer. avfriendlyname = hostname # Enable OpenHome services (0/1). openhome = 0 # Check that input format is supported. checkcontentformat = 0 # Path to the Renderer icon. iconpath = /usr/share/upmpdcli/icon.png |
sudo systemctl enable upmpdcli sudo reboot 5、树莓派Airplay 支持,安装shairport-sync sudo apt-get install --no-install-recommends build-essential git autoconf automake libtool \ libpopt-dev libconfig-dev libasound2-dev avahi-daemon libavahi-client-dev libssl-dev libsoxr-dev
git clone https://github.com/mikebrady/shairport-sync.git cd shairport-sync sudo autoreconf -fi
sudo ./configure --sysconfdir=/etc --with-alsa \ --with-soxr --with-avahi --with-ssl=openssl --with-systemd --with-metadata
sudo make sudo make install
sudo systemctl enable shairport-sync
必要时配置shairport-sync sudo nano /etc/shairport-sync.conf
# 在 alsa 选项修改:
至此,通过Airplay/UPNP,手机所有流媒可以投放到音箱系统;
mpd+upmpdcli的加持,使树莓派4B UPnP Renderer支持PCM 到705.6/768kHz ;DSD到DSD512(22.4MHz)
声音嘛,只要你的局域网千兆以上,不拉跨,妥妥的。
|