32

I have a web camera on my T500 Thinkpad. I would like to know its supported resolutions. Is there a way to find it out by means of software (and without having to consult the documentation)?

25

Two possible approaches:

Use any software which can interact with the webcam (eg, cheese), save an image and look at the resolution.

Examine the output of lsusb in a terminal, to find a line describing a webcam:

$ lsusb
Bus 001 Device 002: ID 5986:0241 Acer, Inc BisonCam, NB Pro
...

Then use the Bus and Device numbers to get more information on that device:

$ lsusb -s 001:002 -v | egrep "Width|Height"
    wWidth    640
    wHeight   480
    wWidth    1280
    wHeight   1024
...

Which should print the height, width pairs the camera is capable of - in this case, 1280x1024 plus some smaller ones.

  • Thanks, I got WWidth 640 WHeight 480 WWidth 320 WHeight 240 WWidth 800 WHeight 600 WWidth 1024 WHeight 600 WWidth 1024 WHeight 768 WWidth 1280 WHeight 800 WWidth 1280 WHeight 1024 WWidth 640 WHeight 480 WWidth 320 WHeight 240 WWidth 800 WHeight 600 WWidth 1024 WHeight 600 WWidth 1024 WHeight 768 WWidth 1280 WHeight 800 WWidth 1280 WHeight 1024 I guess I can assume that the highest combination is the physical resolution. – sup Nov 10 '12 at 9:48
  • 1
    What if it's not usb, but builtin? – NoBugs Aug 16 '16 at 1:10
  • @NoBugs built-in cameras are also usually connected via internal usb interfaces. Mine is internal, and still shows up on the lsusb list as "Sunplus Innovation Technology Inc." – Masoud Mar 16 '17 at 1:02
20

if you have video 4 linux try this

v4l2-ctl --list-formats-ext

Source : How can I list the available video modes for a USB webcam in Linux?

  • 4
    First you need to install the utility: sudo apt-get install v4l-utils – sup Feb 21 '16 at 13:31
6

Also possible with ffmpeg:

ffmpeg -f video4linux2 -list_formats all -i /dev/video0

Example output:

...
[video4linux2,v4l2 @ 0x7fa3a8000b40] Raw       :     yuyv422 :           YUYV 4:2:2 : 640x480 320x240 800x600 1024x600 1024x768 1280x800 1280x1024
[video4linux2,v4l2 @ 0x7fa3a8000b40] Compressed:       mjpeg :          Motion-JPEG : 640x480 320x240 800x600 1024x600 1024x768 1280x800 1280x1024
...
  • use ffmpeg if you have no X server running as an alternative – Benjamin Peter Feb 18 '18 at 17:17
  • 2
    Thanks for the hint, ffmpeg is better/more generic. – sebix Feb 27 '18 at 17:19

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.