From 6b3573d4f511797cac85f5337f59557c4891fdb1 Mon Sep 17 00:00:00 2001 From: ejurgensen Date: Sun, 7 Mar 2021 15:54:47 +0100 Subject: [PATCH] [docs] Add Spocon instructions Credit @GaWeiss, issue #295 --- README.md | 30 +++++++++++++++++++++++++----- 1 file changed, 25 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index e2256ea7..14c305a0 100644 --- a/README.md +++ b/README.md @@ -476,6 +476,8 @@ curl "http://localhost:3689/logout?session-id=50" ## Spotify +### Via libspotify + forked-daapd has support for playback of the tracks in your Spotify library. 1. Go to the [web interface](http://forked-daapd.local:3689) and check that your @@ -519,11 +521,29 @@ a Spotify client for that. You also can only listen to your music by letting forked-daapd do the playback - so that means you can't stream from forked-daapd to DAAP clients (e.g. iTunes) and RSP clients. -Alternatives: -If you want forked-daapd to be a selectable metaspeaker in Spotify's client, you -can use [librespot](https://github.com/librespot-org/librespot) to write audio -to a pipe in your library. There will be some lag with volume adjustments, and -getting metadata to work also requires extra tinkering. +### Via librespot/spocon + +You can also use forked-daapd with one of the various incarnations of +[librespot](https://github.com/librespot-org/librespot). This adds librespot as +a selectable metaspeaker in Spotify's client, and when you start playback, +librespot can be configured to start writing audio to a pipe that you have added +to your library. This will be detected by forked-daapd that then starts +playback. You can also have a pipe for metadata and playback events, e.g. volume +changes. + +The easiest way of accomplishing this may be with [Spocon](https://github.com/spocon/spocon), +since it requires minimal configuration. After installing, create two pipes +(with mkfifo) and set the configuration in the player section: + +``` +# Audio output device (MIXER, PIPE, STDOUT) +output = "PIPE" +# Output raw (signed) PCM to this file (`player.output` must be PIPE) +pipe = "/srv/music/spotify" +# Output metadata in Shairport Sync format (https://github.com/mikebrady/shairport-sync-metadata-reader) +metadataPipe = "/srv/music/spotify.metadata" +``` + ## LastFM