ffmpeg-devices
List available multimedia devices
SYNOPSIS
ffmpeg-devices [-h | --help] [--loglevel LEVEL]
PARAMETERS
-h, --help
Display usage information and exit
--loglevel LEVEL
Set FFmpeg logging verbosity (e.g., quiet, error, info, verbose)
DESCRIPTION
The ffmpeg-devices command is a utility script bundled with FFmpeg, designed to enumerate and display all multimedia devices available on a Linux system that FFmpeg can access for capture (input) or playback (output). It simplifies identifying hardware like webcams, microphones, sound cards, and framebuffers by probing FFmpeg's device support through demuxers (e.g., v4l2, alsa) and muxers.
This tool outputs categorized lists, such as 'Video devices', 'Audio devices', and 'Video output devices', showing device paths (e.g., /dev/video0, hw:0) and descriptions. It's invaluable for users constructing FFmpeg pipelines for live capture, streaming, or recording without trial-and-error device names. Run it as a regular user (no sudo needed) to see accessible devices, revealing permissions issues if devices are missing.
Unlike lsusb or lspci, it focuses solely on FFmpeg-compatible devices, filtering USB cams or ALSA cards FFmpeg supports. Output aids commands like ffmpeg -f v4l2 -i /dev/video0. Note: results depend on kernel modules loaded (e.g., uvcvideo for USB cams) and user group memberships (video, audio).
CAVEATS
Linux-only; requires FFmpeg >= 2.4 with device support compiled in. Perl interpreter needed (script-based). Lists only user-accessible devices—use sudo cautiously or fix groups. No support for PulseAudio/JACK unless FFmpeg built with them. Output varies by kernel/modules.
OUTPUT SECTIONS
Prints: Video devices (V4L2), Audio devices (ALSA), Video output devices (framebuffer), Audio output devices. Each lists [device path] - description.
PROBING METHOD
Internally runs ffmpeg -sources, -sinks, and targeted probes (e.g., -f v4l2) to detect usable devices without capturing.
HISTORY
Introduced in FFmpeg 2.4 (2015) as a convenience script by James Almer. Evolved with FFmpeg device backends; now in tools/ dir of source. Maintained alongside core FFmpeg, focusing on simplifying device discovery amid growing hardware support.


