mirror of
https://github.com/badaix/snapcast.git
synced 2025-08-04 00:59:32 +02:00
Update player_setup.md
This commit is contained in:
parent
043f76e35e
commit
3814e5b234
1 changed files with 20 additions and 5 deletions
|
@ -7,7 +7,7 @@ The goal is to build the following chain:
|
|||
|
||||
audio player software -> snapfifo -> snapserver -> network -> snapclient -> alsa
|
||||
|
||||
###MPD setup
|
||||
###MPD
|
||||
To connect [MPD](http://www.musicpd.org/) to the Snapserver, edit `/etc/mpd.conf`, so that mpd will feed the audio into the snapserver's named pipe
|
||||
|
||||
Disable alsa audio output by commenting out this section:
|
||||
|
@ -38,19 +38,19 @@ To test your mpd installation, you can add a radio station by
|
|||
$ sudo su
|
||||
$ echo "http://1live.akacast.akamaistream.net/7/706/119434/v1/gnl.akacast.akamaistream.net/1live" > /var/lib/mpd/playlists/einslive.m3u
|
||||
|
||||
###Mopidy setup
|
||||
###Mopidy
|
||||
[Mopidy](https://www.mopidy.com/) can stream the audio output into the Snapserver's fifo with a `filesink` as audio output in `mopidy.conf`:
|
||||
|
||||
[audio]
|
||||
#output = autoaudiosink
|
||||
output = audioresample ! audioconvert ! audio/x-raw,rate=48000,channels=2,format=S16LE ! wavenc ! filesink location=/tmp/snapfifo
|
||||
|
||||
###MPlayer setup
|
||||
###MPlayer
|
||||
Use `-novideo` and `-ao` to pipe MPlayer's audio output to the snapfifo:
|
||||
|
||||
mplayer http://wms-15.streamsrus.com:11630 -novideo -channels 2 -srate 48000 -af format=s16le -ao pcm:file=/tmp/snapfifo
|
||||
|
||||
###Alsa setup
|
||||
###Alsa
|
||||
If the player cannot be configured to route the audio stream into the snapfifo, Alsa or PulseAudio can be redirected, resulting in this chain:
|
||||
|
||||
audio player software -> Alsa -> Alsa file plugin -> snapfifo -> snapserver -> network -> snapclient -> Alsa
|
||||
|
@ -80,7 +80,7 @@ pcm.writeFile {
|
|||
}
|
||||
```
|
||||
|
||||
###PulseAudio setup
|
||||
###PulseAudio
|
||||
Redirect the PulseAudio stream into the snapfifo:
|
||||
|
||||
audio player software -> PulseAudio -> PulsaAudio pipe sink -> snapfifo -> snapserver -> network -> snapclient -> Alsa
|
||||
|
@ -93,3 +93,18 @@ Load the module `pipe-sink` like this:
|
|||
pacmd update-sink-proplist Snapcast device.description=Snapcast
|
||||
|
||||
It might me neccessary to set the pulse audio latency environment variable to 60 msec: `PULSE_LATENCY_MSEC=60`
|
||||
|
||||
|
||||
###AirPlay
|
||||
Snapserver supports (shairport-sync)[https://github.com/mikebrady/shairport-sync] with `stdout` backend.
|
||||
1. Build shairport-sync with `stdout` backend: `./configure --with-stdout --with-avahi --with-ssl=openssl --with-metadata`
|
||||
2. Copy the `shairport-sync` binary somewhere to your `PATH`, e.g. `/usr/local/bin/`
|
||||
3. Configure snapserver with `-s "airplay:///shairport-sync?name=Airplay[&devicename=Snapcast][&port=5000]"`
|
||||
|
||||
|
||||
###Spotify
|
||||
Snapserver supports (librespot)[https://github.com/badaix/librespot] with `stdout` backend.
|
||||
1. Build `librespot` with `stdout` backend: `cargo build --features stdout-backend`
|
||||
2. Copy the `librespot` binary somewhere to your `PATH`, e.g. `/usr/local/bin/`
|
||||
3. Configure snapserver with `-s "spotify:///librespot?name=Spotify&username=<my username>&password=<my password>[&devicename=Snapcast][&bitrate=320]"`
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue