fsphil / fswebcam

A neat and simple webcam app
http://www.sanslogic.co.uk/fswebcam/
GNU General Public License v2.0
415 stars 86 forks source link

Random behaviour. Ignores parameters? #36

Open JohnCC330 opened 6 years ago

JohnCC330 commented 6 years ago

I've been playing around with a few methods to capture images from a USB OV2710-based camera. I liked the idea of fswebcam (instead of using mplayer or ffmpeg). I've been suffering with some issues though:

The camera comes with a 3m cable. I have some reservations about that, with the USB specs stating 1.8m as a maximum. Still, no signs of protocol errors. No errors in the downloaded images either.

I'd appreciate suggestions for further testing!

fsphil commented 6 years ago

I'm really not sure. It sounds like the driver may not fully support some of the controls, or is unable to. Not all hardware will allow manual adjustments even if the driver provides the option.

Some devices need to capture some frames before auto adjustments get the correct values. Does the --skip argument help at all?

JohnCC330 commented 6 years ago

Some devices need to capture some frames before auto adjustments get the correct values. Does the --skip argument help at all?

Difficult to assess, as the behaviour is so random, but I'm inclined to say it doesn't. If the darkening appears, it just goes on and on. If it doesn't appear, the image remains perfect all the time. In both cases, the capture command is exactly the same (I'm sending the command using a Python script, so it's guaranteed to be identical).

Also, the --skip command results terribly slow. --skip 10 takes 4-5 seconds, which makes it impractical. According to the specs, it should be able to do 6 fps at 1920x1080 pixels (in YUYV mode).This might be limited by the USB bandwidth? 1920x1080x2 = 4MB/frame, which would mean 200Mbits/s (at 6fps).

More confusion: I've noticed that, though I tried sending --palette YUYV, the capturing still seems to be compressed (artifacts appear on the screen, indicative of the jpeg compression). The cam does report it supports YUYV.