Snapcast: Difference between revisions

Article was severly outdated. I updated it using the settings I used.,
Minor changes after reworking my configuration
 
(One intermediate revision by the same user not shown)
Line 6: Line 6:
https://github.com/badaix/snapcast
https://github.com/badaix/snapcast


If you are using MPD, you can directly output audio to a FIFO sink and read that sink using Snapcast. For example, see the setup in this blog: https://blog.firedrake.org/archive/2022/11/Home_audio_with_mpd_and_snapcast.html.
Note that MPD can directly act as a Snapcast audio source (see https://mpd.readthedocs.io/en/stable/plugins.html#snapcast). However, it does not provide all features of a Snapcast server such as the web interface.


== Pipewire Sink ==
== Pipewire Sink ==
Line 18: Line 18:
     enable = true;
     enable = true;
     settings = {
     settings = {
       stream.source = "pipe:///tmp/snapfifo?name=NAME";
       stream.source = "pipe:///run/snapserver/pipe?name=NAME";
     };
     };
     openFirewall = true;
     openFirewall = true;
Line 31: Line 31:
       {
       {
         cmd = "load-module";
         cmd = "load-module";
         args = "module-pipe-sink file=/tmp/snapfifo sink_name=Snapcast format=s16le rate=48000";
         args = "module-pipe-sink file=/run/snapserver/pipe sink_name=Snapcast format=s16le rate=48000";
       }
       }
     ];
     ];
Line 52: Line 52:
     ];
     ];
     serviceConfig = {
     serviceConfig = {
       ExecStart = "${pkgs.snapcast}/bin/snapclient tcp://localhost:1704";
       ExecStart = "${pkgs.snapcast}/bin/snapclient --player pipewire tcp://localhost:1704";
     };
     };
   };
   };