pw-record 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 recording audio using pw-cat, the pw-record tool was introduced. pw-record is a shorthand tool for pw-cat –record, which allows users to record audio with a single command.

To use pw-record, users need to specify the audio source they want to record from, such as a microphone or an audio file. Users can also specify any additional options they want to use, such as the audio format or the duration of the recording.

pw-record Command Examples

1. List all available record targets:

# pw-record --list-targets

2. Record a sample recording using the default target:

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

3. Record a sample recording at a different volume level:

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

4. Record a sample recording using a different sample rate:

# pw-record --rate={{6000}} {{path/to/file.wav}}

Summary

Overall, pw-record is a convenient tool for recording audio in PipeWire, allowing users to quickly and easily record 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