cv2.VideoCapture CV_CAP_PROP_FPS not implemented ?

asked 2012-12-23 13:58:42 -0500

this post is marked as community wiki

This post is a wiki. Anyone with karma >50 is welcome to improve it.

I have a PS3 Eyetoy that can capture 640x480@60fps,but ;

camcapture = cv2.VideoCapture(1)
camcapture.set(3,640)
camcapture.set(4,480)
camcapture.set(5,60)
_,f = camcapture.read()
filename = "image.png" 
cv2.imwrite(filename, f)

results in ;

VIDIOC_QUERYMENU: Invalid argument
VIDIOC_QUERYMENU: Invalid argument
VIDIOC_QUERYMENU: Invalid argument
VIDIOC_QUERYMENU: Invalid argument
HIGHGUI ERROR: V4L: Property <unknown property string>(5) not supported by device

where feature ;

CV_CAP_PROP_FPS Frame rate.

is not being supported by OpenCV eventhough v4l2 supports it. I can set the cam parameters via ;

v4l2-ctl -d 1 --set-fmt-video=width=640,height=480 --set-parm=60

seamlessly and camera switches to 640x480@60fps mode as expected. When I switch to this mode and use the python code above to capture, camera switches to 320x240@60fps mode automatically.

camcapture = cv2.VideoCapture(1)

changes the resolution of capture but not the fps, weird behavior.

I need to capture 640x480@60fps, any ideas ?

edit retag flag offensive close merge delete

Comments

Are you using opencv 2 or 3 ? I think your syntax could be wrong.

naeluh gravatar imagenaeluh ( 2017-03-29 18:38:00 -0500 )edit