I'm attempting to use easycap to record from my camcorder but I'm having a slight problem. Using their test script I'm able to get audio and video. I've noticed that in the script on line 159 it makes a call to "DEV_ADUIO
", which is reported as being "plughw:2,0
".
Exactly what is this device? Is it located in /dev/
somewhere?
I've done ls /dev/
and I can't find anything that would suggest an audio device
Run the command (in the terminal)
The output looks like
The device for this is plughw:0,0. The two zeros come from the device 0 and Subdevice #0.
Generally, there are a few ways to get audio playback and recording devices on Linux. I'm focusing on command-line tools in this answer.
With PipeWire tools
If you are running PipeWire as your sound server, you can use
pw-cli
to get the names of all your inputs and outputs (recording and playback devices):Example output:
Often, audio devices like the USB microphone (listed last in the previous output) have shorter nicknames; Running
produces the nickname of the USB mic:
This can make for shorter commands when, for example, recording audio from the command line.
See also
pw-link
which can list input and output PipeWire ports.With PulseAudio tools
Alternatively, you can use command line tools that come with PulseAudio (another sound server) to do the same:
produces similar output to
pw-cli list-objects
on my machine:I found it useful to only display audio sinks, like loudspeakers and headphones:
Example output:
Mind that even if you use PipeWire as your audio server,
pactl
will probably still work since PipeWire aims to be a drop-in replacement for PulseAudio.With ALSA tools
As shown in user4124's answer, you can list playback devices using ALSA's command-line tools:
Sample output for playback devices on my machine:
For recording devices, use
Sample output for recording devices on my machine:
See also the
--list-pcms
option from the man page to list all PCM devices.