$ ls -ltrh /dev/video*
crw-rw----+ 1 root video 81, 1 Mai  4 00:17 /dev/video1
crw-rw----+ 1 root video 81, 0 Mai  4 00:17 /dev/video0

This is a laptop so I guess one is the built in camera, and one is the screen. But how can I check which? Is there a way to get more information about one of them?

  • The best but most stupid way is to use a video chat app like Discord and put on your camera. If one camera doen't work, use the other one. My sister and I use this method to test cam and mic – Irsu85 May 8 at 14:16
  • OK but when I open say zoom, it only lists cameras, so I guess my question might be... How does zoom know? – Alex028502 May 8 at 14:18
  • I really don't know how zoom knows – Irsu85 May 8 at 14:20

You can do this with v4l2-ctl in a terminal:

  1. Open Terminal (if it’s not already open)
  2. Install the utility (if it’s not already installed)
    sudo apt update 
    sudo apt install v4l2-ctl
  3. Run the utility:
    v4l2-ctl --list-devices
    You will see output like this:
    Integrated Camera (usb-0000:00:3b.0-1.2):

One of the video devices you see in /dev/video* is a virtual device.

  • 1
    I think there is a typo in the install command; shouldn't it be sudo apt install v4l-utils ? – PJ Singh May 8 at 14:25
  • That does not always work, in my laptop I get HP TrueVision HD: HP TrueVision (usb-0000:00:14.0-5): /dev/video0 /dev/video1, but I have only one camera. – Archisman Panigrahi May 8 at 14:29
  • @Archisman, I also have an HP machine, and v4l2-ctl also lists two devices (/dev/video0, /dev/video1). I wonder if one of these is the IR camera? – PJ Singh May 8 at 14:49
  • @PJSingh I don't think I have an IR camera. – Archisman Panigrahi May 8 at 15:23

There is a package called usbutils which can be an invaluable tool:

sudo apt install usbutils

Then you can query any USB device and get a lot of information:

$ sudo lsusb -v | grep -i webcam -a14

Bus 001 Device 009: ID 1bcf:2b8c Sunplus Innovation Technology Inc. 
Device Descriptor:
  bLength                18
  bDescriptorType         1
  bcdUSB               2.00
  bDeviceClass          239 Miscellaneous Device
  bDeviceSubClass         2 ?
  bDeviceProtocol         1 Interface Association
  bMaxPacketSize0        64
  idVendor           0x1bcf Sunplus Innovation Technology Inc.
  idProduct          0x2b8c 
  bcdDevice           47.14
  iManufacturer           1 SunplusIT Inc
  iProduct                2 Integrated_Webcam_HD
  iSerial                 0 
  bNumConfigurations      1
  Configuration Descriptor:
    bLength                 9
    bDescriptorType         2
    wTotalLength          767
    bNumInterfaces          2
    bConfigurationValue     1
    iConfiguration          0 
    bmAttributes         0x80
      (Bus Powered)
    MaxPower              500mA
    Interface Association:
      bLength                 8
      bDescriptorType        11
      bFirstInterface         0
      bInterfaceCount         2
      bFunctionClass         14 Video
      bFunctionSubClass       3 Video Interface Collection
      bFunctionProtocol       0 
      iFunction               4 Integrated Webcam
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        0
      bAlternateSetting       0
      bNumEndpoints           1
      bInterfaceClass        14 Video
      bInterfaceSubClass      1 Video Control
      bInterfaceProtocol      0 
      iInterface              4 Integrated Webcam
      VideoControl Interface Descriptor:
        bLength                13
        bDescriptorType        36
        bDescriptorSubtype      1 (HEADER)
        bcdUVC               1.00
        wTotalLength          109
        dwClockFrequency       48.000000MHz
        bInCollection           1
        baInterfaceNr( 0)       1
      VideoControl Interface Descriptor:
        bLength                18
        bDescriptorType        36
        bDescriptorSubtype      2 (INPUT_TERMINAL)
        bTerminalID             1

  • I didn't expect -a (--text) receiving arguments. It seems to work like -C, they are equivalents? – Pablo Bianchi May 8 at 16:29
  • @PabloBianchi You can use -a# for number of lines before and after grep match. You can use -A# for number of lines after grep match. I haven't used -C in grep before. What do you use it for? – WinEunuuchs2Unix May 8 at 16:48
  • -C (--context) is for context. Seems exactly the same as -a#, which is undocumented, AFAIK. Notice that -a could output binary garbage – Pablo Bianchi May 8 at 20:50

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.