Ask Your Question

VideoCapture .read() on OSX always gives False, None

asked 2013-10-10 09:34:42 -0500

ddollar gravatar image

updated 2013-10-10 11:06:37 -0500

berak gravatar image

I am able to successfully open the webcam and retrieve the resolution which looks correct.

Every attempt to either .read() a frame or .grab() / .retrieve() ends up with False, None.

How can I begin to debug this?

edit retag flag offensive close merge delete


I have the same problem. When I process the frames in a while loop I'm able to work around it by checking if the frame is None and only proceeding with that loop round if that's not the case. I guess the read only fails in the beginning and later iterations are ok. Not really an optimal solution though. I suspect the webcam isn't really ready after cv2.VideoCapture() for some strange reason.

ohra gravatar imageohra ( 2013-10-13 12:17:36 -0500 )edit

1 answer

Sort by ยป oldest newest most voted

answered 2013-10-14 12:01:20 -0500

ohra gravatar image

After a bit of googling I found this issue: camera pipeline fix. It seems the OSX webcam functionality is busted in the latest release. So, as a quick fix I reverted this one change in the OpenCV sources: modules/highgui/src/

After rebuilding OpenCV the camera seems to work normally in all the OpenCV samples which didn't work at all before.

edit flag offensive delete link more

Question Tools


Asked: 2013-10-10 09:34:42 -0500

Seen: 1,234 times

Last updated: Oct 14 '13