[數位音樂] 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

留言

這個網誌中的熱門文章

[古典相機] 巧緻實用的簡單精神.Nikon FE.1978

[古典相機] M42 機皇.快門最速機身.Fujica ST801.1973

[古典相機] 世界第一台 TTL 分區測光 SLR,Minolta SRT-101.1966

[中判相機] 開始 120 吧.Pentax 6x7.1969

在 Excel 裡轉換 Unixtime 格式