pw-record(1)
Record audio from PipeWire sources to a file.
Synopsis
pw-record [OPTION]... [FILE]Description
pw-record is a PipeWire utility that captures audio from a source node and writes it to a file. It connects to the PipeWire audio server, selects an input device or source, and records the audio stream in various formats including WAV, FLAC, and raw audio.
The command automatically negotiates the sample rate, bit depth, and channel configuration with the source. Output format is typically determined by the file extension, though it can be specified explicitly with options.
Common options
| Flag | What it does |
|---|---|
-h, --help | Show help message and exit |
-v, --verbose | Increase verbosity; can be used multiple times |
-q, --quiet | Suppress output messages |
-r, --rate RATE | Set sample rate in Hz (e.g., 44100, 48000) |
-c, --channels CHANNELS | Set number of channels (1 for mono, 2 for stereo, etc.) |
-f, --format FORMAT | Set sample format (S16, S32, F32, etc.) |
-p, --properties PROPS | Set PipeWire node properties as key=value pairs |
-t, --target TARGET | Connect to specific source node by name or ID |
--max-latency LATENCY | Set maximum latency in milliseconds |
--min-quantum QUANTUM | Set minimum quantum (buffer size) in samples |
Examples
Record audio to recording.wav from the default input source
pw-record recording.wavRecord mono audio at 16kHz sample rate (common for voice)
pw-record -c 1 -r 16000 voice.wavRecord 32-bit stereo audio at 48kHz (studio quality)
pw-record -f S32 -r 48000 -c 2 stereo.wavRecord from a specific audio input device by its ID
pw-record -t alsa_input.pci-0000_00_1f.3.analog-stereo output.wavRecord to FLAC format with verbose output to monitor the process
pw-record -v recording.flacRecord with lower latency (100ms) at CD quality sample rate
pw-record --max-latency 100 -r 44100 podcast.wavRecord from a source matching the description 'Line In'
pw-record -p node.description='Line In' recording.wav