How to real time got the real FPS of USB Webcam on OS X?

in my case need got realtime FPS on MAC OS X 10.11

but i try search some software, only found some for settings for usb camera;

so i base: Reading and Writing Images and Video — OpenCV documentation

try to base OpenCV, got the usb camera 's top FPS:

# 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(
    print "Frames per second using video.get( {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)

CV_CAP_PROP_FPS alwasy is 0.0

in fact i need some way can realtime report currently real FPS,
like @Daan showed awesome GIF plotting the FPS:

from Best USB HD Webcam with control on OSX or alternatives? - beginners - openFrameworks

thanx for any suggest.

Hey, see my reply on the other post. You should interface the webcam with OF then increment an FPS counter each time you receive a new frame. See this piece of code as an example.

Note: with this approach, if your application lags, the shown webcam FPS will be incorrect…