I'm a semi-new user to the raspberry pi USB webcam world, although I'm used to the RPi camera. My question is, can I use two cameras taking pictures at the same time without the pictures being overwritten by the other camera? Would I be able to use the RPi command or do I have to use C or cron? Any help would be appreciated.
You can't use the RPi camera commands with a webcam. Those only work with the pi camera. However, there are other options for reading input from a webcam. One of the most commonly used tools for this is fswebcam. There are other options too, though.
Install fswebcam with
sudo apt install fswebcam. Then, you can use it with command
fswebcam image.jpg --no-banner -i 0
To use the second webcam, just change the
--input switch to
-i 1 instead of
Fswebcam has some other options as well, such as the
-r switch to change the resolution, or the
-l switch to take an image every x seconds. You can find the fswebcam documentation here.
And yes, the cameras should work together. They should each mount at different files:
Hope this answer helps!