Forrest logo
back to the pw-loopback tool

pw-loopback:tldr:bba7e

pw-loopback: Create a dummy loopback device that doesn't automatically connect to anything.
$ pw-loopback -m '${[FL FR]}' --capture-props='${media-class=Audio-Sink}' --playback-props='${media-class=Audio-Source}'
try on your machine

The command pw-loopback is used to create a loopback audio stream between two pulseaudio sinks and sources. Let's break down the different parts of the command:

  • -m '${[FL FR]}': This option specifies the mapping of channels which is set to Front Left (FL) and Front Right (FR). This means that only the audio from the FL and FR channels will be looped back.

  • --capture-props='${media-class=Audio-Sink}': This option specifies the properties for the capture (input) stream. Here, it is set to capture from the audio sinks. The media-class=Audio-Sink property filters the audio inputs that are identified as audio sinks.

  • --playback-props='${media-class=Audio-Source}': This option specifies the properties for the playback (output) stream. Here, it is set to playback from the audio sources. The media-class=Audio-Source property filters the audio outputs that are identified as audio sources.

Overall, this command sets up a loopback audio stream that captures audio from the Front Left and Front Right channels of the sinks and plays it back through the sources.

This explanation was created by an AI. In most cases those are correct. But please always be careful and never run a command you are not sure if it is safe.
back to the pw-loopback tool