I use this:
Code:
vc = cv2.VideoCapture()
vc.set(cv2.cv.CV_CAP_PROP_FPS, 1)
if not vc.open('http://%s/mjpg/video.mjpg' % self.camera_ip):
return
while True:
retval, img = vc.read(buffer)
...
One bug present in OpenCV that hasn't been fixed can be found on their bug tracker here:
http://code.opencv.org/issues/2877 . If you compile your own OpenCV you can patch the bug. I've been meaning to patch it in a better way but haven't done so yet, as I don't have an axis camera easily available for testing.