arecord
Quick Reference
Command Name:
arecord
Category:
multimedia
Platform:
linux
Basic Usage:
Common Use Cases
- 1
Audio recording
Record audio from microphones and other input devices
- 2
Sound testing
Test audio input devices and verify recording capabilities
- 3
Audio capture
Capture audio streams for processing or analysis
- 4
System audio recording
Record system audio output for documentation or analysis
Syntax
arecord [options] [filename]
Options
| Option | Description |
|---|---|
| -h, --help | Display help and exit |
| -l, --list-devices | List all soundcards and digital audio devices |
| -L, --list-pcms | List all PCM devices |
| -D, --device=NAME | Select PCM device by name |
| -q, --quiet | Quiet mode (no messages output) |
| -t, --file-type TYPE | File type (voc, wav, raw, or au) |
| -c, --channels=# | Number of channels |
| -f, --format=FORMAT | Sample format (S8, S16_LE, S24_LE, etc.) |
| -r, --rate=# | Sampling rate in Hz |
| -d, --duration=# | Record for # seconds |
| -s, --sleep-min=# | Min ticks to sleep |
| -M, --mmap | Use mmap-based access |
| -N, --nonblock | Use non-blocking mode |
| -F, --period-time=# | Distance between interrupts in microseconds |
| -B, --buffer-time=# | Buffer duration in microseconds |
| -A, --avail-min=# | Min available space for wakeup in microseconds |
| -R, --start-delay=# | Delay for automatic PCM start in microseconds |
| -T, --stop-delay=# | Delay for automatic PCM stop in microseconds |
| -v, --verbose | Show PCM structure and setup |
| -V, --vumeter=TYPE | Enable VU meter (TYPE: mono or stereo) |
| -I, --separate-channels | Write each channel to a separate file |
| --max-file-time=# | Maximum time per file in seconds |
| --use-strftime | Apply strftime function to output filename |
Examples
How to Use These Examples
The examples below show common ways to use the arecord command. Try them in your terminal to see the results. You can copy any example by clicking on the code block.
Basic Examples:
arecord -f cd output.wav
arecord -d 5 -f cd output.wav
arecord -f S16_LE -c 2 -r 44100 output.wav
arecord -l
arecord -L