LinuxCommandLibrary

pw-loopback

Create virtual loopback audio devices

TLDR

Create a loopback device with default behavior

$ pw-loopback
copy
Create a loopback device that automatically connects to the speakers
$ pw-loopback -m '[FL FR]' -i 'media.class=Audio/Sink'
copy
Create a loopback device that automatically connects to the microphone
$ pw-loopback -m '[FL FR]' -o 'media.class=Audio/Source'
copy
Create a dummy loopback device that doesn't automatically connect
$ pw-loopback -m '[FL FR]' -i 'media.class=Audio/Sink' -o 'media.class=Audio/Source'
copy
Create a loopback that swaps left and right channels to speakers
$ pw-loopback -i 'media.class=Audio/Sink audio.position=[FL FR]' -o 'audio.position=[FR FL]'
copy

SYNOPSIS

pw-loopback [options]

DESCRIPTION

pw-loopback creates virtual loopback audio devices in PipeWire. Loopback devices capture audio from one source and play it back to another destination, enabling audio routing between applications or devices.
The tool can create sink devices (for capturing audio output), source devices (for providing audio input), or combined loopback configurations for audio monitoring and routing.

PARAMETERS

-m, --channel-map map

Set the channel map for the loopback
-i, --capture-props props
Set properties for the capture side (sink)
-o, --playback-props props
Set properties for the playback side (source)
-h, --help
Display help message

CAVEATS

Channel mapping and media class properties must be specified correctly for proper automatic connection behavior. Incorrect configuration may result in audio routing issues or silent devices.

HISTORY

Part of PipeWire, the modern multimedia framework for Linux. Provides flexible audio routing capabilities similar to PulseAudio's module-loopback but with PipeWire's graph-based architecture.

SEE ALSO

pipewire(1), pw-cli(1), pw-link(1)

> TERMINAL_GEAR

Curated for the Linux community

Copied to clipboard

> TERMINAL_GEAR

Curated for the Linux community