i was trying to set FPS property to limit the frame per second... but, values are same and no frame are setting.
vid=cv.CaptureFromFile('out.mp4') print cv.GetCaptureProperty(vid,cv.CV_CAP_PROP_FPS) cv.SetCaptureProperty(vid,cv.CV_CAP_PROP_FPS,1) print cv.GetCaptureProperty(vid,cv.CV_CAP_PROP_FPS) fgbg = cv2.BackgroundSubtractorMOG()
success,image=vid.read()
image=cv.QueryFrame(vid) count=0 while image: #fgmask=fgbg.apply(image) #cv2.imwrite("frame%d.jpg" % count,fgmask) cv.SaveImage('pic'+str(count)+'.jpg', image) if cv.WaitKey(10)==27: break count+=1 #success,image=vid.read() image=cv.QueryFrame(vid)