Hi,
I have to Pi's and two different cameras (EyeToy and logitech 920) and trying to take pictures with fswebcam (called by a python script).
The EyeToy only worsk with 320x240 as a resolution. The Logitech camera can get up to 1280x720.
Is there a way to find out the max camera resolution before calling fswebcam? Because when I set my script to 1280x720 fswebcam will change the resolution only to 640x480: "Adjusting resolution from 1280x720 to 640x480" but it won't take any picture with the EyeToy. I want to use one script for both Pis
Re: Get max resolution of webcam?
Hi,
actually I have the same "Adjusting resolution from 1280x720 to 640x480" problem.
How can I find out the possible resolutions (e.g. the maximum one) of my new USB webcam?
("eBay" says it is a "WD108 12 Mega Pixel USB Webcam")
Any hints?
actually I have the same "Adjusting resolution from 1280x720 to 640x480" problem.
How can I find out the possible resolutions (e.g. the maximum one) of my new USB webcam?
("eBay" says it is a "WD108 12 Mega Pixel USB Webcam")
Any hints?
-
- Raspberry Pi Engineer & Forum Moderator
- Posts: 14861
- Joined: Wed Dec 04, 2013 11:27 am
- Location: ZZ9 Plural Z Alpha, aka just outside Cambridge.
Re: Get max resolution of webcam?
Code: Select all
v4l2-ctl --list-formats-ext
Software Engineer at Raspberry Pi Ltd. Views expressed are still personal views.
I'm not interested in doing contracts for bespoke functionality - please don't ask.
I'm not interested in doing contracts for bespoke functionality - please don't ask.
Re: Get max resolution of webcam?
@6by9: Thank you very much!
Your hint was very helpful.


$ v4l2-ctl -D
Driver Info (not using libv4l2):
Driver name : uvcvideo
Card type : USB2.0 PC CAMERA
Bus info : usb-20980000.usb-1.3.3
Driver version: 4.4.11
Capabilities : 0x84200001
Video Capture
Streaming
Extended Pix Format
Device Capabilities
Device Caps : 0x04200001
Video Capture
Streaming
Extended Pix Format
If I understand aright, my "webcam" seems to be not a "12 Mega Pixel" camera. Because of 640 x 480 = 307,200 pixel.
$ v4l2-ctl --list-formats-ext
ioctl: VIDIOC_ENUM_FMT
Index : 0
Type : Video Capture
Pixel Format: 'YUYV'
Name : YUYV 4:2:2
Size: Discrete 640x480
Interval: Discrete 0.033s (30.000 fps)
Interval: Discrete 0.067s (15.000 fps)
Size: Discrete 352x288
Interval: Discrete 0.033s (30.000 fps)
Interval: Discrete 0.067s (15.000 fps)
Size: Discrete 320x240
Interval: Discrete 0.033s (30.000 fps)
Interval: Discrete 0.067s (15.000 fps)
Size: Discrete 176x144
Interval: Discrete 0.033s (30.000 fps)
Interval: Discrete 0.067s (15.000 fps)
Size: Discrete 160x120
Interval: Discrete 0.033s (30.000 fps)
Interval: Discrete 0.067s (15.000 fps)

Re: Get max resolution of webcam?
If you search online for the WD108 camera (e.g. https://www.amazon.com/Megapixel-Webcam ... entries*=0) you can find the word 'interpolated' in the resolution description. This means that the (probably Windows only) driver guesses an additional 38 pixels for every single real pixel that the camera has.
If you want to buy a camera with a decent real resolution then you should look at the supported video resolutions rather than the still image resolution - it is more likely to be the true one. On that basis, real resolutions beyond 1920x1080 (HD resolution) are rare.
If you want to buy a camera with a decent real resolution then you should look at the supported video resolutions rather than the still image resolution - it is more likely to be the true one. On that basis, real resolutions beyond 1920x1080 (HD resolution) are rare.