> ## Content Index
> Fetch the complete content index at: https://ffmpeguru.com/llms.txt
> Use this file to discover other available public pages before exploring further.

# Stream from a USB microphone
- URL: https://ffmpeguru.com/stream-from-a-usb-microphone/
- Published: 2026-09-22T09:00:00.000Z
- Updated: 2026-10-13T17:59:46.000Z
- Author: FFmpeguru
- Tags: ffmpeg

![](https://picsum.photos/seed/ffback37/1200/630)

Capturing a USB microphone is a one-line command on Linux (ALSA), macOS (AVFoundation), or Windows (DirectShow). The output is a raw audio file you can use for a podcast, a voiceover, or a live stream.

## The command

```
ffmpeg -f alsa -ac 2 -ar 48000 -i hw:0,0 -c:a pcm_s16le out.wav
```

## What it does

The command opens the first ALSA device (\`hw:0,0\`) at 48 kHz stereo, captures the audio, and writes it to a 16-bit PCM WAV file. The \`hw:0,0\` syntax is \`card:device\`; use \`arecord -l\` to list the available cards and devices. For macOS, the command is \`ffmpeg -f avfoundation -i ":0" -c:a pcm\_s16le out.wav\` (the first \`0\` is the audio device index).

## Requirements

A USB microphone that the OS recognizes. The platform-specific input format (\`alsa\`, \`avfoundation\`, \`dshow\`). The output codec \`pcm\_s16le\` is the standard 16-bit signed little-endian PCM, which is what every audio editor and player reads. No hardware acceleration needed.

## Things to avoid

- Using a device name that does not exist. On Linux, run \`arecord -l\` to see the available devices; on macOS, run \`ffmpeg -f avfoundation -list\_devices true -i ""\`.
- Capturing at a sample rate the microphone does not support. A 192 kHz USB mic may not produce a 192 kHz signal; check the datasheet for the supported rates.
- Re-encoding the audio multiple times. The output is already PCM, so leave the codec as \`pcm\_s16le\` for the cleanest file.
- Forgetting the \`-ac 2\` flag. The default is mono, which may not match the microphone's stereo output, and the result will be a silent right channel.