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

Can't use multiple cameras on Ubuntu 20.04 #216

Closed
frnsys opened this issue Aug 5, 2022 · 4 comments
Closed

Can't use multiple cameras on Ubuntu 20.04 #216

frnsys opened this issue Aug 5, 2022 · 4 comments

Comments

@frnsys
Copy link

frnsys commented Aug 5, 2022

Hi, thanks for all your work on this project. I'm excited to see where it goes.

I'm having an issue where I can't seem to get this working with multiple cameras. I have three webcams plugged directly into my laptop (I also tried plugging into a hub, but didn't change anything).

When I go through the camera setup process and click "Submit", only the first camera lights up and only a blank rectangular window appears.

This is the output I see:

__________________________________________
cv2::videocapture properties for Camera# 0
CV_CAP_PROP_FRAME_WIDTH: '640.0'
CV_CAP_PROP_FRAME_HEIGHT : '480.0'
CAP_PROP_FPS : '30.0'
CAP_PROP_EXPOSURE : '0.008200820082008202'
CAP_PROP_POS_MSEC : '0.0'
CAP_PROP_FRAME_COUNT  : '-1.0'
CAP_PROP_BRIGHTNESS : '0.5019607843137255'
CAP_PROP_CONTRAST : '0.12549019607843137'
CAP_PROP_SATURATION : '0.12549019607843137'
CAP_PROP_HUE : '-1.0'
CAP_PROP_GAIN  : '0.20392156862745098'
CAP_PROP_CONVERT_RGB : '1.0'
__________________________________________

It looks like it's getting stuck on the first camera and never manages to start up the other cameras?

It works fine if I select just one camera.

@frnsys
Copy link
Author

frnsys commented Aug 8, 2022

I looked into this and the camera setup/recording threads were blocking each other. I switched to using multiprocessing instead and that seems to work.

I had to make a few other small changes to get things working; they're all in this commit: frnsys@3036555

I realize though those changes might not be relevant as you're refactoring the code anyways, but hopefully it's helpful to someone :)

@frnsys frnsys closed this as completed Aug 8, 2022
@HitLyn
Copy link

HitLyn commented Aug 26, 2022

Many thanks for sharing the solution. I have the same problem here. Why not create a pull request? I guess this should be a common problem for all ubuntu 20.04 users.

@jonmatthis
Copy link
Member

Great thought, but not the right time :)

We've frozen development on the pre-alpha version of the code at v0.0.54, so we aren't in a position to incorporate the PR

We're getting UNBEARABLY CLOSE to release of the new alpha version of this software which will include a full GUI based controller will be cross-platform compatible.

Thanks for the interest and the work! Stay tuned :D

@HitLyn
Copy link

HitLyn commented Aug 28, 2022

Great thought, but not the right time :)

We've frozen development on the pre-alpha version of the code at v0.0.54, so we aren't in a position to incorporate the PR

We're getting UNBEARABLY CLOSE to release of the new alpha version of this software which will include a full GUI based controller will be cross-platform compatible.

Thanks for the interest and the work! Stay tuned :D

Exciting to hear about that! Thanks for your contribution to the community. I have already recommended your work to my colleagues.

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

3 participants