opencv - Problem with Python and IP camera -


i'm having problems video stream ip camera have. i'm using opencv images it. here's code have:

import sys import cv  video="http://prot-on.dyndns.org:8080/video2.mjpeg" capture =cv.capturefromfile(video) cv.namedwindow('video stream', 1 ) while true:   # capture current frame   frame = cv.queryframe(capture)   if frame none:     break   else:     #detect(frame)     cv.showimage('video stream', frame)   if k == 0x1b: # esc     print 'esc pressed. exiting ...'     break 

actually, thing works, takes time display images. i'm guessing it's because of error ffmpeg.

    [mjpeg @ 0x8cd0940]max_analyze_duration reached     [mjpeg @ 0x8cd0940]estimating duration bitrate, may inaccurate 

i'm not python expert appreciated!

first, mjpeg relatively simple video format. if read ip camera's manual, it's can find how display video in browser bit javascript code. in fact, if open link of http://prot-on.dyndns.org:8080/video2.mjpeg in google chrome, see video without problem. (maybe shouldn't leave real url of camera)

second, far can see, frame rate of camera pretty slow. might due internet latency or camera's setting. compare see in chrome video displayed code, if of same quality, it's not code's problem.


Comments

Popular posts from this blog

c# - how to write client side events functions for the combobox items -

exception - Python, pyPdf OCR error: pyPdf.utils.PdfReadError: EOF marker not found -