pw-play Command Examples in Linux

In PipeWire, pw-cat is a command-line tool used for reading and writing audio data to and from PipeWire clients. It can be used to capture audio from a source, process it, and play it back on a sink. However, using pw-cat can require specifying several command-line options, which can be cumbersome for some users.

To simplify the process of playing audio using pw-cat, the pw-play tool was introduced. pw-play is a shorthand tool for pw-cat –playback, which allows users to play audio files with a single command.

To use pw-play, users need to specify the audio file they want to play using its file path. Users can also specify any additional options they want to use, such as the audio format or the sink to play the audio on

pw-play Command Examples

1. List all available playback targets:

# pw-play --list-targets

2. Play a wav sound file over the default target:

# pw-play {{path/to/file.wav}}

3. Play a wav sound file at a different volume level:

# pw-play --volume={{0.1}} {{path/to/file.wav}}

Summary

Overall, pw-play is a convenient tool for playing audio files in PipeWire, allowing users to quickly and easily play audio without having to specify multiple command-line options. More information about using PipeWire CLI tools can be found in the PipeWire documentation.

Related Post