PipeWire: PipeWire Module: Unix Pipe Tunnel

PipeWire 0.3.59

PipeWire Module: Unix Pipe Tunnel

The pipe-tunnel module provides a source or sink that tunnels all audio to a unix pipe.

## Module Options

- `tunnel.mode`: the desired tunnel to create. (Default `playback`)
- `pipe.filename`: the filename of the pipe.
- `stream.props`: Extra properties for the local stream.

When `tunnel.mode` is `capture`, a capture stream on the default source is created. Samples read from the pipe will be the contents of the captured source.

When `tunnel.mode` is `sink`, a sink node is created. Samples read from the pipe will be the samples played on the sink.

When `tunnel.mode` is `playback`, a playback stream on the default sink is created. Samples written to the pipe will be played on the sink.

When `tunnel.mode` is `source`, a source node is created. Samples written to the pipe will be made available to streams connected to the source.

When `pipe.filename` is not given, a default fifo in `/tmp/fifo_input` or `/tmp/fifo_output` will be created that can be written and read respectively, depending on the selected `tunnel.mode`.

## General options

Options with well-known behavior.

- PW_KEY_REMOTE_NAME
- PW_KEY_AUDIO_FORMAT
- PW_KEY_AUDIO_RATE
- PW_KEY_AUDIO_CHANNELS
- SPA_KEY_AUDIO_POSITION
- PW_KEY_NODE_LATENCY
- PW_KEY_NODE_NAME
- PW_KEY_NODE_DESCRIPTION
- PW_KEY_NODE_GROUP
- PW_KEY_NODE_VIRTUAL
- PW_KEY_MEDIA_CLASS
- PW_KEY_TARGET_OBJECT to specify the remote name or serial id to link to

When not otherwise specified, the pipe will accept or produce a 16 bits, stereo, 48KHz sample stream.

## Example configuration of a pipe playback stream

context.modules = [
{ name = libpipewire-module-pipe-tunnel
args = {
tunnel.mode = playback
# Set the pipe name to tunnel to
pipe.filename = "/tmp/fifo_output"
#audio.format=<sample format>
#audio.rate=<sample rate>
#audio.channels=<number of channels>
#audio.position=<channel map>
#target.object=<remote target node>
stream.props = {
# extra sink properties
}
}
}
]