List DirectShow Audio Devices on Windows with FFmpeg

Finding the correct name of your audio input device is a crucial first step when recording or streaming audio on Windows using FFmpeg. This article provides a direct, step-by-step guide on how to use the command line to query and list all available DirectShow audio devices connected to your Windows system.

The Command to List Devices

To discover your Windows audio devices, open Command Prompt (cmd) or PowerShell and run the following FFmpeg command:

ffmpeg -list_devices true -f dshow -i dummy

Understanding the Command Breakdown

Analyzing the Output

After running the command, FFmpeg will print several lines of text. Look specifically for the section labeled [dshow @ ...] in the console output.

You will see output formatted similarly to this:

[dshow @ 0000021a36154c00] DirectShow video devices (some may be both video and audio devices)
[dshow @ 0000021a36154c00]  "Integrated Camera"
[dshow @ 0000021a36154c00]     Alternative name "@device_pnp_\\?\usb#vid_04f2&pid_b6d0..."
[dshow @ 0000021a36154c00] DirectShow audio devices
[dshow @ 0000021a36154c00]  "Microphone (Realtek(R) Audio)"
[dshow @ 0000021a36154c00]     Alternative name "@device_cm_{33D9A762-90C8-11D0-BD43-00A0C911CE86}\wave_{C7D1B9A1-9D2E-4D04-8D82-2C62F8B744A3}"

Under the DirectShow audio devices header, you will find the exact names of your microphones, line-in inputs, and virtual audio cables enclosed in quotation marks (e.g., "Microphone (Realtek(R) Audio)").

How to Use the Device Name

Once you have identified the exact name of your audio device from the list, you can use it in an FFmpeg command to record audio. Use the following syntax, replacing "Your Audio Device Name" with the name displayed in your terminal:

ffmpeg -f dshow -i audio="Microphone (Realtek(R) Audio)" output.mp3