Ask Your Question

Revision history [back]

cv2.VideoCapture(0).grab and cv2.VideoCapture(0).read hangs

My OS is Ubuntu 14.04 LTS.

I am using Python 2.7 with OpenCV 3.0 Beta and my webcam is Logitech webcam pro 9000.

Cheese application is running fine indicating no issue with the webcam driver.

On calling cv2.VideoCapture(0).read() (or grab()), I get the error 'select timeout' after about 10 seconds.

I googled this extensively and found the following solution:

sudo rmmod uvcvideo

sudo modprobe uvcvideo nodrop=1 timeout=5000 quirks=0x80

Now the API cv2.VideoCapture(0).read() (or grab()) just hangs.