List DirectShow Devices Using FFmpeg on Windows

Finding and identifying connected audio and video hardware on Windows is essential for multimedia recording and streaming. This article provides a quick, step-by-step guide on how to use FFmpeg to list all available DirectShow devices, such as webcams, microphones, and capture cards, using a simple command-line instruction.

The Command to List Devices

To discover your Windows multimedia devices, open either Command Prompt (cmd.exe) or PowerShell and execute 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 the results to the console. The output will group your hardware into two distinct categories: DirectShow video devices and DirectShow audio devices.

The output will look similar to this:

[dshow @ 0000021c97a9f0c0] DirectShow video devices (some may be both video and audio devices)
[dshow @ 0000021c97a9f0c0]  "Integrated Webcam"
[dshow @ 0000021c97a9f0c0]     Alternative name "@device_pnp_\\?\usb#vid_04f2&pid_b624..."
[dshow @ 0000021c97a9f0c0] DirectShow audio devices
[dshow @ 0000021c97a9f0c0]  "Microphone Array (Realtek(R) Audio)"
[dshow @ 0000021c97a9f0c0]     Alternative name "@device_cm_{33d9a762-90c8-11d0-bd43-00a0c911ce86}\..."

Saving the Device List to a Text File

Because FFmpeg prints this information to the standard error (stderr) stream rather than the standard output (stdout), standard command-line redirection using > will not work. To save the list of devices directly to a text file for future reference, redirect the error stream using 2>:

ffmpeg -list_devices true -f dshow -i dummy 2> devices.txt