Recording live video stream from IP camera issue

Xavier Ho contact at xavierho.com
Sun Feb 17 14:57:54 EST 2013


Hi Sam,

Did you compile your OpenCV with gstreamer?  That's where I'd look first.

Cheers,
Xav


On 18 February 2013 01:15, Sam Berry <sambez_14 at hotmail.co.uk> wrote:

> Hi Xav,
>
> Iv been looking into OpenCV, i can easily stream my laptops webcam using
> this code.
>
> import cv2
>
> cv2.namedWindow("preview")
>
> vc = cv2.VideoCapture(0)
>
> if vc.isOpened(): # try to get the first frame
>     rval, frame = vc.read()
> else:
>     rval = False
>
> while rval:
>     cv2.imshow("preview", frame)
>     rval, frame = vc.read()
>     key = cv2.waitKey(20)
>     if key == 27: # exit on ESC
>         break
>
> However using the cv2.Videocapture(ip_address) method will not load my IP
> camera video feed into the new window. I can view the stream in any web
> browser or VLC using the IP address
> http://192.168.1.72:1025/videostream.cgi?user=&pwd=&resolution=8.
>
> Did you have this issue? Is there some lines of code i may need to add?
>
> Any help would be appreciated!
>
> Thanks, Sam
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20130218/6509c3a5/attachment.html>


More information about the Python-list mailing list