kingcos / Perspective

📝 Write something with perspectives.
https://kingcos.me
185 stars 15 forks source link

将树莓派作为 AirPlay 音频服务器 #20

Open kingcos opened 6 years ago

kingcos commented 6 years ago
Raspberry Pi Platform juhovh/shairplay
3 B Raspbian 4.14 765148f98f343b3b9911cc05504ac276cfc44c26

Info

树莓派是个很容易吃灰的设备,配置太低,又弃之可惜。何不作为 AirPlay 来解放你的有线音箱呢?

Solution

SSH 或直接在树莓派的终端中运行以下命令,关于 SSH、VNC、替换源等操作请自行搜索。

Basic setup

sudo apt-get install autoconf automake libtool
sudo apt-get install libltdl-dev libao-dev libavahi-compat-libdnssd-dev
sudo apt-get install avahi-daemon
cd ~/Desktop
mkdir AirPlay
cd AirPlay

git clone https://github.com/juhovh/shairplay.git
cd shairplay

./autogen.sh
./configure
make
sudo make install
shairplay -a HomePod

shairplay -a HomePod

后台运行

; shareplay.ini
[program:shairplay]
command=cd /home/pi/Desktop/ShairPlay/shairplay
command=shairplay -a HomePod
autostart=true
autorestart=true
startretries=5
user=pi

[supervisord]
[include]
files=shairplay.ini

[supervisorctl]
# superviord -c ${SUPERVISOR_CONFIG_PATH}
sudo supervisord -c /etc/supervisor/conf.d/supervisord.conf

AirPlay on iPhone

Reference

Extension