打开Audio Station,如能选择刚才连接的蓝牙音箱播放,连接即成功。
在群晖docker中搜索mpd,下载vimagick/mpd的镜像(耗时较多)。
在docker文件夹下创建mpd目录,然后ssh进群晖,cd进mpd目录(注意docker目录在哪个volmue下)。
代码: 全选
touch database mpd.log mpd.conf state sticker.sql
mkdir music
mkdir playlists
代码: 全选
mpd:
image: schumyhao/mpd
net: host
privileged: true
volumes:
- /volume3/docker/mpd/mpd.conf:/etc/mpd.conf
- /volume3/docker/mpd/music:/var/lib/mpd/music
- /volume3/docker/mpd/playlists:/var/lib/mpd/playlists
- ~/.pulse:/root/.pulse
- /tmp/pulse-PKdhtXMmr18n:/tmp/pulse-PKdhtXMmr18n
代码: 全选
music_directory "/var/lib/mpd/music"
playlist_directory "/var/lib/mpd/playlists"
db_file "/var/lib/mpd/database"
log_file "/var/lib/mpd/mpd.log"
pid_file "/var/lib/mpd/mpd.pid"
state_file "/var/lib/mpd/state"
sticker_file "/var/lib/mpd/sticker.sql"
audio_output {
type "pulse"
name "BT Speaker"
sink "bluez_sink.xx_xx_xx_xx_xx_xx"
mixer_type "software"
}
代码: 全选
pip install docker-compose
代码: 全选
docker-compose up -d
参考资料:
PS:踩到的两个坑
- 启动容器时如果遇到错误
代码: 全选
ERROR: client and server don't have same version (client : 1.21, server: 1.18)
代码: 全选
export COMPOSE_API_VERSION=1.18
- 如果启动容器后载入不了type,日志如下
代码: 全选
pulse_output: Failed to enable "BTSpeaker" [pulse]: pa_context_connect() has failed: Connection refused
在docker-compose.yml将image改成原容器名vimagick/mpd,命令行启动后再改回,命令行再启动就可以了。