I am only running this simple code in my Raspberry Pi 4:
from imutils.video import VideoStream
# initialize the video streams and allow them to warmup
print("[INFO] starting cameras...")
webcam = VideoStream(src=0).start()
I can run this code without any problem with the Raspberry Pi camera, but I get error with my Logitech C310 webcam.
The error is: VIDIOC_QBUF: Invalid argument
The camera works perfectly when used with fswebcam
in the terminal. I also tried using it with online webcam test, and it works. My only problem is the camera can't be used with my Python code. I also tried using it with opencv and it returned None
.
Hardware: Raspberry Pi 4 4GB
OS: Raspbian Buster
Hope anyone can help me, thank you.