Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Random behaviour. Ignores parameters? #36

Open
JohnCC330 opened this issue Aug 23, 2018 · 2 comments
Open

Random behaviour. Ignores parameters? #36

JohnCC330 opened this issue Aug 23, 2018 · 2 comments

Comments

@JohnCC330
Copy link

JohnCC330 commented Aug 23, 2018

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:

  • Regularly, most frequently when recently switched on, the image progressively gets darker and darker, even though the command line parameters don't change at all. After maybe 10-15 exposures the image stored is completely black. Suddenly, after some time, things start working, and continue to work for hours.

  • --set brightness=xx doesn't seem to have any effect. Brightness does appear in the controls list

  • setting exposure to manual, then setting certain exposure values, doesn't seem to have any effect either.

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
Copy link
Owner

fsphil commented Aug 23, 2018

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
Copy link
Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants