mirror of
https://github.com/badaix/snapcast.git
synced 2025-04-30 18:57:37 +02:00
Fix Markdown lint warnings
This commit is contained in:
parent
e15800450e
commit
ab90f418d9
1 changed files with 76 additions and 76 deletions
140
README.md
140
README.md
|
@ -1,5 +1,4 @@
|
||||||
Snapcast
|
# Snapcast
|
||||||
========
|
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
|
@ -13,13 +12,14 @@ https://travis-ci.org/badaix/snapcast.svg?branch=master)](https://travis-ci.org/
|
||||||
Snapcast is a multiroom client-server audio player, where all clients are time synchronized with the server to play perfectly synced audio. It's not a standalone player, but an extension that turns your existing audio player into a Sonos-like multiroom solution.
|
Snapcast is a multiroom client-server audio player, where all clients are time synchronized with the server to play perfectly synced audio. It's not a standalone player, but an extension that turns your existing audio player into a Sonos-like multiroom solution.
|
||||||
The server's audio input is a named pipe `/tmp/snapfifo`. All data that is fed into this file will be sent to the connected clients. One of the most generic ways to use Snapcast is in conjunction with the music player daemon ([MPD](http://www.musicpd.org/)) or [Mopidy](https://www.mopidy.com/), which can be configured to use a named pipe as audio output.
|
The server's audio input is a named pipe `/tmp/snapfifo`. All data that is fed into this file will be sent to the connected clients. One of the most generic ways to use Snapcast is in conjunction with the music player daemon ([MPD](http://www.musicpd.org/)) or [Mopidy](https://www.mopidy.com/), which can be configured to use a named pipe as audio output.
|
||||||
|
|
||||||
How does it work
|
## How does it work
|
||||||
----------------
|
|
||||||
The Snapserver reads PCM chunks from the pipe `/tmp/snapfifo`. The chunk is encoded and tagged with the local time. Supported codecs are:
|
The Snapserver reads PCM chunks from the pipe `/tmp/snapfifo`. The chunk is encoded and tagged with the local time. Supported codecs are:
|
||||||
* **PCM** lossless uncompressed
|
|
||||||
* **FLAC** lossless compressed [default]
|
- **PCM** lossless uncompressed
|
||||||
* **Vorbis** lossy compression
|
- **FLAC** lossless compressed [default]
|
||||||
* **Opus** lossy low-latency compression
|
- **Vorbis** lossy compression
|
||||||
|
- **Opus** lossy low-latency compression
|
||||||
|
|
||||||
The encoded chunk is sent via a TCP connection to the Snapclients.
|
The encoded chunk is sent via a TCP connection to the Snapclients.
|
||||||
Each client does continuous time synchronization with the server, so that the client is always aware of the local server time.
|
Each client does continuous time synchronization with the server, so that the client is always aware of the local server time.
|
||||||
|
@ -29,59 +29,66 @@ Typically the deviation is below 0.2ms.
|
||||||
|
|
||||||
For more information on the binary protocol, please see the [documentation](doc/binary_protocol.md).
|
For more information on the binary protocol, please see the [documentation](doc/binary_protocol.md).
|
||||||
|
|
||||||
Installation
|
## Installation
|
||||||
------------
|
|
||||||
You can either install Snapcast from a prebuilt package (recommended for new users), or build and install snapcast from source.
|
You can either install Snapcast from a prebuilt package (recommended for new users), or build and install snapcast from source.
|
||||||
|
|
||||||
### Install Linux packages (recommended for beginners)
|
### Install Linux packages (recommended for beginners)
|
||||||
|
|
||||||
Snapcast packages are available for several Linux distributions.
|
Snapcast packages are available for several Linux distributions.
|
||||||
|
|
||||||
#### Debian
|
#### Debian
|
||||||
|
|
||||||
For Debian (and Debian-based systems, such as Ubuntu, Linux Mint, ElementaryOS) download the package for your CPU architecture from the [latest release page](https://github.com/badaix/snapcast/releases/latest).
|
For Debian (and Debian-based systems, such as Ubuntu, Linux Mint, ElementaryOS) download the package for your CPU architecture from the [latest release page](https://github.com/badaix/snapcast/releases/latest).
|
||||||
|
|
||||||
e.g. for Raspberry Pi `snapclient_0.x.x_armhf.deb`, for laptops `snapclient_0.x.x_amd64.deb`
|
e.g. for Raspberry Pi `snapclient_0.x.x_armhf.deb`, for laptops `snapclient_0.x.x_amd64.deb`
|
||||||
|
|
||||||
Install the package:
|
Install the package:
|
||||||
|
|
||||||
$ sudo dpkg -i snapclient_0.x.x_armhf.deb
|
sudo dpkg -i snapclient_0.x.x_armhf.deb
|
||||||
or
|
or
|
||||||
$ sudo dpkg -i snapclient_0.x.x_amd64.deb
|
sudo dpkg -i snapclient_0.x.x_amd64.deb
|
||||||
|
|
||||||
Install missing dependencies:
|
Install missing dependencies:
|
||||||
|
|
||||||
$ sudo apt-get -f install
|
sudo apt-get -f install
|
||||||
|
|
||||||
#### OpenWrt
|
#### OpenWrt
|
||||||
|
|
||||||
On OpenWrt do:
|
On OpenWrt do:
|
||||||
|
|
||||||
$ opkg install snapclient_0.x.x_ar71xx.ipk
|
opkg install snapclient_0.x.x_ar71xx.ipk
|
||||||
|
|
||||||
#### Alpine Linux
|
#### Alpine Linux
|
||||||
|
|
||||||
On Alpine Linux do:
|
On Alpine Linux do:
|
||||||
|
|
||||||
$ apk add snapcast
|
apk add snapcast
|
||||||
|
|
||||||
Or, for just the client:
|
Or, for just the client:
|
||||||
|
|
||||||
$ apk add snapcast-client
|
apk add snapcast-client
|
||||||
|
|
||||||
Or, for just the server:
|
Or, for just the server:
|
||||||
|
|
||||||
$ apk add snapcast-server
|
apk add snapcast-server
|
||||||
|
|
||||||
#### Gentoo Linux
|
#### Gentoo Linux
|
||||||
|
|
||||||
On Gentoo Linux do:
|
On Gentoo Linux do:
|
||||||
|
|
||||||
$ emerge --ask media-sound/snapcast
|
emerge --ask media-sound/snapcast
|
||||||
|
|
||||||
#### Archlinux
|
#### Archlinux
|
||||||
|
|
||||||
On Archlinux, Snapcast is available through the AUR. To install, use your favorite AUR helper, or do:
|
On Archlinux, Snapcast is available through the AUR. To install, use your favorite AUR helper, or do:
|
||||||
|
|
||||||
$ git clone https://aur.archlinux.org/snapcast
|
git clone https://aur.archlinux.org/snapcast
|
||||||
$ cd snapcast
|
cd snapcast
|
||||||
$ makepkg -si
|
makepkg -si
|
||||||
|
|
||||||
#### Void Linux
|
#### Void Linux
|
||||||
|
|
||||||
To install the client:
|
To install the client:
|
||||||
|
|
||||||
# xbps-install snapclient
|
# xbps-install snapclient
|
||||||
|
@ -94,77 +101,68 @@ To install the server:
|
||||||
|
|
||||||
Please follow this [guide](doc/build.md) to build Snapcast for
|
Please follow this [guide](doc/build.md) to build Snapcast for
|
||||||
|
|
||||||
* [Linux](doc/build.md#linux-native)
|
- [Linux](doc/build.md#linux-native)
|
||||||
|
- [FreeBSD](doc/build.md#freebsd-native)
|
||||||
|
- [macOS](doc/build.md#macos-native)
|
||||||
|
- [Android](doc/build.md#android-cross-compile)
|
||||||
|
- [OpenWrt](doc/build.md#openwrtlede-cross-compile)
|
||||||
|
- [Buildroot](doc/build.md#buildroot-cross-compile)
|
||||||
|
- [Raspberry Pi](doc/build.md#raspberry-pi-cross-compile)
|
||||||
|
|
||||||
* [FreeBSD](doc/build.md#freebsd-native)
|
## SnapOS
|
||||||
|
|
||||||
* [macOS](doc/build.md#macos-native)
|
|
||||||
|
|
||||||
* [Android](doc/build.md#android-cross-compile)
|
|
||||||
|
|
||||||
* [OpenWrt](doc/build.md#openwrtlede-cross-compile)
|
|
||||||
|
|
||||||
* [Buildroot](doc/build.md#buildroot-cross-compile)
|
|
||||||
|
|
||||||
* [Raspberry Pi](doc/build.md#raspberry-pi-cross-compile)
|
|
||||||
|
|
||||||
SnapOS
|
|
||||||
------
|
|
||||||
The bravest among you may be interested in [SnapOS](https://github.com/badaix/snapos), a small and fast-booting "just enough" OS to run Snapcast as an appliance.
|
The bravest among you may be interested in [SnapOS](https://github.com/badaix/snapos), a small and fast-booting "just enough" OS to run Snapcast as an appliance.
|
||||||
|
|
||||||
There is a guide (with the necessary buildfiles) available to build SnapOS, which comes in two flavors:
|
There is a guide (with the necessary buildfiles) available to build SnapOS, which comes in two flavors:
|
||||||
|
|
||||||
- [Buildroot](https://github.com/badaix/snapos/blob/master/buildroot-external/README.md) based, or
|
- [Buildroot](https://github.com/badaix/snapos/blob/master/buildroot-external/README.md) based, or
|
||||||
- [OpenWrt](https://github.com/badaix/snapos/tree/master/openwrt) based.
|
- [OpenWrt](https://github.com/badaix/snapos/tree/master/openwrt) based.
|
||||||
|
|
||||||
Please note that there are no pre-built firmware packages available.
|
Please note that there are no pre-built firmware packages available.
|
||||||
|
|
||||||
Configuration
|
## Configuration
|
||||||
-------------
|
|
||||||
After installation, Snapserver and Snapclient are started with the command line arguments that are configured in `/etc/default/snapserver` and `/etc/default/snapclient`.
|
After installation, Snapserver and Snapclient are started with the command line arguments that are configured in `/etc/default/snapserver` and `/etc/default/snapclient`.
|
||||||
Allowed options are listed in the man pages (`man snapserver`, `man snapclient`) or by invoking the snapserver or snapclient with the `-h` option.
|
Allowed options are listed in the man pages (`man snapserver`, `man snapclient`) or by invoking the snapserver or snapclient with the `-h` option.
|
||||||
|
|
||||||
The server configuration is done in `/etc/snapserver.conf`. Different streams can by configured in the `[stream]` section with a list of `stream` options, e.g.:
|
The server configuration is done in `/etc/snapserver.conf`. Different streams can by configured in the `[stream]` section with a list of `stream` options, e.g.:
|
||||||
|
|
||||||
```
|
|
||||||
[stream]
|
[stream]
|
||||||
stream = pipe:///tmp/snapfifo?name=Radio&sampleformat=48000:16:2&codec=flac
|
stream = pipe:///tmp/snapfifo?name=Radio&sampleformat=48000:16:2&codec=flac
|
||||||
stream = file:///home/user/Musik/Some%20wave%20file.wav?name=File
|
stream = file:///home/user/Musik/Some%20wave%20file.wav?name=File
|
||||||
```
|
|
||||||
|
|
||||||
The pipe stream (`stream = pipe`) will per default create the pipe. Sometimes your audio source might insist in creating the pipe itself. So the pipe creation mode can by changed to "not create, but only read mode", using the `mode` option set to `create` or `read`:
|
The pipe stream (`stream = pipe`) will per default create the pipe. Sometimes your audio source might insist in creating the pipe itself. So the pipe creation mode can by changed to "not create, but only read mode", using the `mode` option set to `create` or `read`:
|
||||||
|
|
||||||
stream = pipe:///tmp/snapfifo?name=Radio&mode=read"
|
stream = pipe:///tmp/snapfifo?name=Radio&mode=read"
|
||||||
|
|
||||||
Test
|
## Test
|
||||||
----
|
|
||||||
You can test your installation by copying random data into the server's fifo file
|
You can test your installation by copying random data into the server's fifo file
|
||||||
|
|
||||||
$ sudo cat /dev/urandom > /tmp/snapfifo
|
sudo cat /dev/urandom > /tmp/snapfifo
|
||||||
|
|
||||||
All connected clients should play random noise now. You might raise the client's volume with "alsamixer".
|
All connected clients should play random noise now. You might raise the client's volume with "alsamixer".
|
||||||
It's also possible to let the server play a WAV file. Simply configure a `file` stream in `/etc/snapserver.conf`, and restart the server:
|
It's also possible to let the server play a WAV file. Simply configure a `file` stream in `/etc/snapserver.conf`, and restart the server:
|
||||||
|
|
||||||
```
|
|
||||||
[stream]
|
[stream]
|
||||||
stream = file:///home/user/Musik/Some%20wave%20file.wav?name=test
|
stream = file:///home/user/Musik/Some%20wave%20file.wav?name=test
|
||||||
```
|
|
||||||
|
|
||||||
When you are using a Raspberry Pi, you might have to change your audio output to the 3.5mm jack:
|
When you are using a Raspberry Pi, you might have to change your audio output to the 3.5mm jack:
|
||||||
|
|
||||||
#The last number is the audio output with 1 being the 3.5 jack, 2 being HDMI and 0 being auto.
|
#The last number is the audio output with 1 being the 3.5 jack, 2 being HDMI and 0 being auto.
|
||||||
$ amixer cset numid=3 1
|
amixer cset numid=3 1
|
||||||
|
|
||||||
To setup WiFi on a Raspberry Pi, you can follow this guide:
|
To setup WiFi on a Raspberry Pi, you can follow this [guide](https://www.raspberrypi.org/documentation/configuration/wireless/wireless-cli.md)
|
||||||
https://www.raspberrypi.org/documentation/configuration/wireless/wireless-cli.md
|
|
||||||
|
## Control
|
||||||
|
|
||||||
Control
|
|
||||||
-------
|
|
||||||
Snapcast can be controlled using a [JSON-RPC API](doc/json_rpc_api/v2_0_0.md):
|
Snapcast can be controlled using a [JSON-RPC API](doc/json_rpc_api/v2_0_0.md):
|
||||||
* Set client's volume
|
|
||||||
* Mute clients
|
- Set client's volume
|
||||||
* Rename clients
|
- Mute clients
|
||||||
* Assign a client to a stream
|
- Rename clients
|
||||||
* ...
|
- Assign a client to a stream
|
||||||
|
- ...
|
||||||
|
|
||||||
There is an Android client [snapdroid](https://github.com/badaix/snapdroid) available in [Releases](https://github.com/badaix/snapdroid/releases/latest) and on [Google Play](https://play.google.com/store/apps/details?id=de.badaix.snapcast)
|
There is an Android client [snapdroid](https://github.com/badaix/snapdroid) available in [Releases](https://github.com/badaix/snapdroid/releases/latest) and on [Google Play](https://play.google.com/store/apps/details?id=de.badaix.snapcast)
|
||||||
|
|
||||||
|
@ -184,8 +182,8 @@ Another web interface running on any device is [snapcast-websockets-ui](https://
|
||||||
|
|
||||||
A web interface called [HydraPlay](https://github.com/mariolukas/HydraPlay) integrates Snapcast and multiple Mopidy instances. It is JavaScript based and uses Angular 7. A Snapcast web socket proxy server is needed to connect Snapcast to HydraPlay over web sockets.
|
A web interface called [HydraPlay](https://github.com/mariolukas/HydraPlay) integrates Snapcast and multiple Mopidy instances. It is JavaScript based and uses Angular 7. A Snapcast web socket proxy server is needed to connect Snapcast to HydraPlay over web sockets.
|
||||||
|
|
||||||
Setup of audio players/server
|
## Setup of audio players/server
|
||||||
-----------------------------
|
|
||||||
Snapcast can be used with a number of different audio players and servers, and so it can be integrated into your favorite audio-player solution and make it synced-multiroom capable.
|
Snapcast can be used with a number of different audio players and servers, and so it can be integrated into your favorite audio-player solution and make it synced-multiroom capable.
|
||||||
The only requirement is that the player's audio can be redirected into the Snapserver's fifo `/tmp/snapfifo`. In the following configuration hints for [MPD](http://www.musicpd.org/) and [Mopidy](https://www.mopidy.com/) are given, which are base of other audio player solutions, like [Volumio](https://volumio.org/) or [RuneAudio](http://www.runeaudio.com/) (both MPD) or [Pi MusicBox](http://www.pimusicbox.com/) (Mopidy).
|
The only requirement is that the player's audio can be redirected into the Snapserver's fifo `/tmp/snapfifo`. In the following configuration hints for [MPD](http://www.musicpd.org/) and [Mopidy](https://www.mopidy.com/) are given, which are base of other audio player solutions, like [Volumio](https://volumio.org/) or [RuneAudio](http://www.runeaudio.com/) (both MPD) or [Pi MusicBox](http://www.pimusicbox.com/) (Mopidy).
|
||||||
|
|
||||||
|
@ -194,28 +192,30 @@ The goal is to build the following chain:
|
||||||
audio player software -> snapfifo -> snapserver -> network -> snapclient -> alsa
|
audio player software -> snapfifo -> snapserver -> network -> snapclient -> alsa
|
||||||
|
|
||||||
This [guide](doc/player_setup.md) shows how to configure different players/audio sources to redirect their audio signal into the Snapserver's fifo:
|
This [guide](doc/player_setup.md) shows how to configure different players/audio sources to redirect their audio signal into the Snapserver's fifo:
|
||||||
* [MPD](doc/player_setup.md#mpd)
|
|
||||||
* [Mopidy](doc/player_setup.md#mopidy)
|
|
||||||
* [FFmpeg](doc/player_setup.md#ffmpeg)
|
|
||||||
* [mpv](doc/player_setup.md#mpv)
|
|
||||||
* [MPlayer](doc/player_setup.md#mplayer)
|
|
||||||
* [Alsa](doc/player_setup.md#alsa)
|
|
||||||
* [PulseAudio](doc/player_setup.md#pulseaudio)
|
|
||||||
* [AirPlay](doc/player_setup.md#airplay)
|
|
||||||
* [Spotify](doc/player_setup.md#spotify)
|
|
||||||
* [Process](doc/player_setup.md#process)
|
|
||||||
* [Line-in](doc/player_setup.md#line-in)
|
|
||||||
|
|
||||||
Roadmap
|
- [MPD](doc/player_setup.md#mpd)
|
||||||
-------
|
- [Mopidy](doc/player_setup.md#mopidy)
|
||||||
|
- [FFmpeg](doc/player_setup.md#ffmpeg)
|
||||||
|
- [mpv](doc/player_setup.md#mpv)
|
||||||
|
- [MPlayer](doc/player_setup.md#mplayer)
|
||||||
|
- [Alsa](doc/player_setup.md#alsa)
|
||||||
|
- [PulseAudio](doc/player_setup.md#pulseaudio)
|
||||||
|
- [AirPlay](doc/player_setup.md#airplay)
|
||||||
|
- [Spotify](doc/player_setup.md#spotify)
|
||||||
|
- [Process](doc/player_setup.md#process)
|
||||||
|
- [Line-in](doc/player_setup.md#line-in)
|
||||||
|
|
||||||
|
## Roadmap
|
||||||
|
|
||||||
Unordered list of features that should make it into the v1.0
|
Unordered list of features that should make it into the v1.0
|
||||||
|
|
||||||
- [X] **Remote control** JSON-RPC API to change client latency, volume, zone,...
|
- [X] **Remote control** JSON-RPC API to change client latency, volume, zone,...
|
||||||
- [X] **Android client** JSON-RPC client and Snapclient
|
- [X] **Android client** JSON-RPC client and Snapclient
|
||||||
- [X] **Streams** Support multiple streams
|
- [X] **Streams** Support multiple streams
|
||||||
- [X] **Debian packages** prebuild deb packages
|
- [X] **Debian packages** prebuild deb packages
|
||||||
- [X] **Endian** independent code
|
- [X] **Endian** independent code
|
||||||
- [X] **OpenWrt** port Snapclient to OpenWrt
|
- [X] **OpenWrt** port Snapclient to OpenWrt
|
||||||
- [X] **Hi-Res audio** support (like 192kHz 24bit)
|
- [X] **Hi-Res audio** support (like 96kHz 24bit)
|
||||||
- [X] **Groups** support multiple Groups of clients ("Zones")
|
- [X] **Groups** support multiple Groups of clients ("Zones")
|
||||||
- [ ] **JSON-RPC** Possibility to add, remove, rename streams
|
- [ ] **JSON-RPC** Possibility to add, remove, rename streams
|
||||||
- [ ] **Protocol specification** Snapcast binary streaming protocol, JSON-RPC protocol
|
- [ ] **Protocol specification** Snapcast binary streaming protocol, JSON-RPC protocol
|
||||||
|
|
Loading…
Add table
Reference in a new issue