[數位音樂] Mopidy with Spotify and Snapcast 實現多空間音樂聆聽 (Server 端)

image-12

一、Install Modipy (Ubuntu)

Udoo X86 use Ubuntu 17.04 (Zesty Zapus)

apt update
apt install mopidy mopidy-spotify

二、Install Snapcast (Ubuntu)

Download From: https://github.com/badaix/snapcast/releases/latest

image-8

Get snapserver_0.11.1_amd64.deb

wget https://github.com/badaix/snapcast/releases/download/v0.11.1/snapserver_0.11.1_amd64.deb
dpkg -i snapserver_0.11.1_amd64.deb

三、Edit Mopidy Config file

sudo vi /etc/mopidy/mopidy.conf

Add This

[spotify]
username = spotify premium account username
password = spotify premium account password
client_id = client_id you got from mopidy.com
client_secret = client_secret you got from mopidy.com
enabled = true
bitrate = 320

[audio]
output = audioresample ! audioconvert ! audio/x-raw,rate=48000,channels=2,format=S16LE ! wavenc ! filesink location=/tmp/mopidyfifo
mixer_volume = 100

Client ID and Client Secret get from: https://www.mopidy.com/authenticate/#spotify

四、Edit Snapcast Config file

sudo vi /etc/default/snapserver

START_SNAPSERVER=true
USER_OPTS="--user snapserver:snapserver"
SNAPSERVER_OPTS="-d -s pipe:///tmp/mopidyfifo?name=mopidy"

五、服務重啟

sudo service mopidy restart
sudo service snapserver restart

六、Mopidy Web 介面推薦

https://github.com/jaedb/Iris
https://github.com/dirkgroenen/mopidy-mopify

留言

這個網誌中的熱門文章

有點誇張的準專業機.Minolta Alpha 7 (Dynax 7、Maxxum 7).2000

在 Excel 裡轉換 Unixtime 格式

Lightroom.製作並匯出 Preset