pw-link Command Examples in Linux

In PipeWire, ports are used to represent audio and video sources and sinks, such as microphones, speakers, cameras, and displays. Ports can be linked together to create pipelines that allow audio and video data to flow between them. The pw-link tool is used to manage these links between ports in PipeWire.

The pw-link tool allows users to create, modify, and delete links between ports. This can be useful when setting up complex audio and video configurations, such as routing audio from one application to another or setting up a virtual audio device.

To use pw-link, users need to specify the source and destination ports using their port IDs. Port IDs can be obtained using the pw-cli tool or other PipeWire tools. Once the source and destination ports are specified, users can use pw-link to create a link between them.

pw-link Command Examples

1. List all audio output and input ports:

# pw-link --output --input

2. Create a link between an output and an input port:

# pw-link {{output_port_name}} {{input_port_name}}

3. Disconnect two ports:

# pw-link --disconnect {{output_port_name}} {{input_port_name}}

4. Display help:

# pw-link -h

Summary

Overall, pw-link is a powerful tool for managing links between ports in PipeWire, allowing users to create complex audio and video configurations with ease. More information about virtual devices and how to use them can be found in the PipeWire documentation.

Related Post