OpenCV and WIFI IP Camera Issue

Sam Berry sambez_14 at
Thu Feb 14 18:25:02 CET 2013


Iv installed OpenCV on my windows machine. I can successfully view the camera stream from my laptop so the installation was successful. However when i edited the code adding in the address of my IP camera like so....

import cv2

vc = cv2.VideoCapture('')

if vc.isOpened(): # try to get the first frame
    rval, frame =
    rval = False

while rval:
    cv2.imshow("preview", frame)
    rval, frame =
    key = cv2.waitKey(20)
    if key == 27: # exit on ESC

When run, python tries to open the window to display the camera feed then closes  before displaying the feed. Anyone have any ideas why? I read somewhere that there is an issue with this been run on windows?

Any insight would be appreciated! Im all googled out.

Thanks, Sam

More information about the Python-list mailing list