Select webcam
Opened this issue · 4 comments
First, congratulations on the great project! (I have made quite a bit of google search before deciding to go with your project...)
Is there a way to select the webcam? In my case, on Ubuntu 22.04, it automatically selects the notebook integrated webcam. However, I would need to use a webcam connected with USB.
Thank you, I'm honored! :)
It's something that I didn't think of, thank you for letting me know.
Well, I expect it to be fairly easy to solve by just changing the integer index here. At the moment, I enforce this index to be zero, because I only expect one device to be connected (a built-in camera for a laptop, or a USB camera for a larger computer). If your USB camera is properly detected, it should simply be given 1 as index.
Unfortunately, I cannot try this myself as I have no USB camera (only a built-in one)... If you have the opportunity to do it, I would kindly ask you to clone the repo, change this index to 1 in hamoco_run.py, locally install the project and tell me whether this solved your problem. If so, I will release a new version on PyPI where one can specify the device index directly in the command line or in the configuration file.
Thanks again. Let me know.
Thanks! It works when I change the integer to 4
. The thing is Linux creates more device nodes for each device to store additional metadata in them as I just recently learned. So if you would like to make it user friendly, then you would somehow need to extract these mapping between these virtual devices and the actual hardware. For me personally, in would be enough to be able to set this integer via a command line argument.
This is great, thank you. I'll explore a bit your reference about device nodes and update the code accordingly, depending on my ability to create such a mapping.