HIGHGUI ERROR: V4L2: getting property #5 is not supported

i am trying to know the frame rate per second of my web cam but when i run this code ,i have the following error : HIGHGUI ERROR: V4L2: getting property #5 is not supported


import cv2
import time

if name == ‘main’ :

# Start default camera
video = cv2.VideoCapture(0);
 
# Find OpenCV version
(major_ver, minor_ver, subminor_ver) = (cv2.__version__).split('.')
 
# With webcam get(CV_CAP_PROP_FPS) does not work.
# Let's see for ourselves.
 
if int(major_ver)  < 3 :
    fps = video.get(cv2.cv.CV_CAP_PROP_FPS)
    print "Frames per second using video.get(cv2.cv.CV_CAP_PROP_FPS): {0}".format(fps)
else :
    fps = video.get(cv2.CAP_PROP_FPS)
    print "Frames per second using video.get(cv2.CAP_PROP_FPS) : {0}".format(fps)

i try another code in c and i have the same error

the code owner write acomment # With webcam get(CV_CAP_PROP_FPS) does not work.
so if i want to know it and change it what sall i do?
i want a c code to do this or do it for my web cam and make it default setting by GUI or any way

thanks in advance

Please try v4l2-ctl to query the webcam info. Do you need to use this parameter in a program?

v4l2-ctl --list-formats

Hi eslam_bakr,

Is this still an issue or you have resolved it?

Any further information can be shared?

Thanks