1

I am only doing a 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 raspberry pi camera but 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 return None.

Hardware: Raspberry Pi 4 4GB

OS: Raspbian Buster

Hope anyone can help, thank you.

0

Running the following commands have resolved the issue for me:

sudo rmmod uvcvideo
sudo modprobe uvcvideo nodrop=1 timeout=10000 quirks=0x80
| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.