libpipewire-module-protocol-simple(7) Miscellaneous Information Manual libpipewire-module-protocol-simple(7)

# [NAME](#NAME)

libpipewire-module-protocol-simple - Protocol Simple

# [DESCRIPTION](#DESCRIPTION)

The simple protocol provides a bidirectional audio stream on a network socket.

It is meant to be used with the simple protocol player app, available on Android to play and record a stream.

Each client that connects will create a capture and/or playback stream, depending on the configuration options.

You can also use it to feed audio data to other clients such as the snapcast server.

# [MODULE NAME](#MODULE_NAME)

libpipewire-module-protocol-simple

# [MODULE OPTIONS](#MODULE_OPTIONS)

- capture: boolean if capture is enabled. This will create a capture stream or sink for each connected client.
- playback: boolean if playback is enabled. This will create a playback or source stream for each connected client.
- local.ifname = &lt;str&gt;: interface name to use
- local.ifaddress = &lt;str&gt;: interface address to use
- server.address = \[]: an array of server addresses to listen on as tcp:(&lt;ip&gt;:)&lt;port&gt;.
- capture.props: optional properties for the capture stream
- playback.props: optional properties for the playback stream

# [GENERAL OPTIONS](#GENERAL_OPTIONS)

Options with well-known behavior.

- **remote.name**
- **audio.rate**
- **audio.format**
- **audio.channels**
- **audio.layout**
- **audio.position**
- **node.latency**
- **node.rate**
- **stream.capture.sink**
- **node.name**
- **node.virtual**
- **node.network**
- **target.object**

By default the server will work with stereo 16 bits samples at 44.1KHz.

# [EXAMPLE CONFIGURATION](#EXAMPLE_CONFIGURATION)

```
# ~/.config/pipewire/pipewire.conf.d/my-protocol-simple.conf
context.modules = [
{   name = libpipewire-module-protocol-simple


    args = {


        # Provide capture stream, clients can capture data from PipeWire


        capture = true


        #


        # Provide playback stream, client can send data to PipeWire for playback


        playback = true


        #


        #audio.rate = 44100


        #audio.format = S16


        #audio.channels = 2


        #audio.position = [ FL FR ]


        #


        # The addresses this server listens on for new


        # client connections


        server.address = [


            "tcp:4711"


        ]


        capture.props = {


            # The node name or id to use for capture.


            #target.object = null


            #


            # To make the capture stream capture the monitor ports


            #stream.capture.sink = false


            #


            # Make this a sink instead of a capture stream


            #media.class = Audio/Sink


        }


        playback.props = {


            # The node name or id to use for playback.


            #target.object = null


            #


            # Make this a source instead of a playback stream


            #media.class = Audio/Source


        }


    }
}
]
```

# [EXAMPLE CONFIGURATION FOR A SNAPCAST SERVER](#EXAMPLE_CONFIGURATION_FOR_A_SNAPCAST_SERVER)

```


 context.modules = [


 {   name = libpipewire-module-protocol-simple


     args = {


         # Provide sink


         capture = true


         audio.rate = 48000


         audio.format = S16


         audio.channels = 2


         audio.position = [ FL FR ]


         # The addresses this server listens on for new


         # client connections


         server.address = [


             "tcp:4711"


         ]


         capture.props = {


             # Make this a sink instead of a capture stream


             media.class = Audio/Sink


         }


     }


 }


 ]


 On the snapcast server, add the following to the `snapserver.conf` file:
\code{.unparsed}


 [stream]


 sampleformat =  48000:16:2


 source = tcp://127.0.0.1:4711?name=PipeWireSnapcast&mode=client
```

Snapcast will try to connect to the protocol-simple server and fetch the samples from it. Snapcast tries to reconnect when the connection is somehow broken.

1.6.11 PipeWire

---

Document: libpipewire-module-protocol-simple(7) from pipewire 1.6.11-r2 (Chainguard OS)
Source: https://gitlab.freedesktop.org/pipewire/pipewire
