.TH "libpipewire-module-snapcast-discover" 7 "1.6.8" "PipeWire" \" -*- nroff -*-
.ad l
.nh
.SH NAME
libpipewire-module-snapcast-discover \- Snapcast Discover 
.SH DESCRIPTION
.PP
Automatically creates a Snapcast sink device based on zeroconf information\&.

.PP
This module will load module-protocol-simple for each announced stream that matches the rule with the create-stream action and passes the properties to the module\&.

.PP
If no stream\&.rules are given, it will create a sink for all announced snapcast servers\&.

.PP
A new stream will be created on the snapcast server with the given \fRsnapcast\&.stream-name\fP or \fRPipeWire-<hostname>\fP\&. You will need to route this new stream to clients with the snapcast control application\&.

.PP
.SH "MODULE NAME"
.PP

.PP
\fRlibpipewire-module-snapcast-discover\fP

.PP
.SH "MODULE OPTIONS"
.PP

.PP
Options specific to the behavior of this module

.PP
.IP "\(bu" 2
\fRsnapcast\&.discover-local\fP = allow discovery of local services as well\&. false by default\&.
.IP "\(bu" 2
\fRstream\&.rules\fP = <rules>: match rules, use create-stream actions\&. See \fBProtocol Simple\fP for module properties\&.
.PP

.PP
.SS "stream\&.rules matches"

.PP
.IP "\(bu" 2
\fRsnapcast\&.ip\fP: the IP address of the snapcast server
.IP "\(bu" 2
\fRsnapcast\&.port\fP: the port of the snapcast server
.IP "\(bu" 2
\fRsnapcast\&.ifindex\fP: the interface index where the snapcast announcement was received\&.
.IP "\(bu" 2
\fRsnapcast\&.ifname\fP: the interface name where the snapcast announcement was received\&.
.IP "\(bu" 2
\fRsnapcast\&.name\fP: the name of the snapcast server
.IP "\(bu" 2
\fRsnapcast\&.hostname\fP: the hostname of the snapcast server
.IP "\(bu" 2
\fRsnapcast\&.domain\fP: the domain of the snapcast server
.PP

.PP
.SS "stream\&.rules create-stream"

.PP
In addition to all the properties that can be passed to \fBProtocol Simple\fP, you can also set:

.PP
.IP "\(bu" 2
\fRsnapcast\&.stream-name\fP: The name of the stream on a snapcast server\&.
.IP "\(bu" 2
\fRnode\&.name\fP: The name of the sink that is created on the sender\&.
.PP

.PP
.SH "EXAMPLE CONFIGURATION"
.PP

.PP
.PP
.nf
# ~/\&.config/pipewire/pipewire\&.conf\&.d/my\-snapcast\-discover\&.conf

context\&.modules = [
{   name = libpipewire\-module\-snapcast\-discover
    args = {
        stream\&.rules = [
            {   matches = [
                    {    snapcast\&.ip = "~\&.*"
                         #snapcast\&.port = 1000
                         #snapcast\&.ifindex = 1
                         #snapcast\&.ifname = eth0
                         #snapcast\&.name = ""
                         #snapcast\&.hostname = ""
                         #snapcast\&.domain = ""
                    }
                ]
                actions = {
                    create\-stream = {
                        #audio\&.rate = 44100
                        #audio\&.format = S16LE   # S16LE, S24_32LE, S32LE
                        #audio\&.channels = 2
                        #audio\&.position = [ FL FR ]
                        #
                        # The stream name as is appears on the snapcast
                        # server:
                        #snapcast\&.stream\-name = "PipeWire"
                        #
                        # The name of the sink on the sender:
                        #node\&.name = "Snapcast Sink"
                        #
                        #capture = true
                        #server\&.address = [ "tcp:4711" ]
                        #capture\&.props = {
                            #target\&.object = ""
                            #node\&.latency = 2048/48000
                            #media\&.class = "Audio/Sink"
                        #}
                    }
                }
            }
        ]
    }
}
]
.fi
.PP

.PP
.SH "SEE ALSO"
.PP

.PP
\fBProtocol Simple\fP 

