树莓派配置Airplay服务

shairport

获取更新

$ sudo apt-get update
$ sudo apt-get upgrade
$ sudo apt-get install libssl-dev libavahi-client-dev libasound2-dev avahi-daemon

安装Shairport

$ cd ~
$ git clone https://github.com/abrasive/shairport.git
$ cd shairport
$ ./configure
$ make
$ sudo make install

获取Shairport脚本

$ sudo cp scripts/debian/init.d/shairport /etc/init.d/
$ sudo cp scripts/debian/default/shairport /etc/default/

编辑/etc/default/shairport和/etc/init.d/shairport

# User and group under which shairport should be run
# user should have permission to output sound
# Check the audio output documentation for details.
USER=pi # 用户
GROUP=nogroup
...
# Set the AirPlay advertised name.
# Defaults to computer's hostname
AP_NAME=AirPlay
...
# Force the mDNS backend
# By default, shairport will try all backends until one works.
# Check 'shairport -h' for details
MDNS=avahi

测试Shairport

$ shairport -a 'Shairport Test'
Starting Shairport 1.1.1-22-gd679d19
Listening for connections.
$ sudo update-rc.d shairport defaults # 自启动配置
$ sudo service shairport start # 开启服务

参考:https://www.jianshu.com/p/03d28aeba009
http://www.raspberry-pi-geek.com/Archive/2015/09/Using-the-Raspberry-Pi-as-an-AirPlay-server

最后编辑于 :
©著作权归作者所有,转载或内容合作请联系作者
【社区内容提示】社区部分内容疑似由AI辅助生成,浏览时请结合常识与多方信息审慎甄别。
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

相关阅读更多精彩内容

友情链接更多精彩内容