Display camera FPS and displayed FPS

Hey guys!

I adapted a python script to stream video from a CSI Raspberry Pi camera and display it on screen.
It works well enough but now I would like to display on top of the image, using the osd_sink_pad_buffer_probe() method, the FPS count from the CSI camera, which I can already do, but also the FPS displayed on the screen.

What I mean by this is that I can have streams from the camera ranging from 21 to 120 FPS, but my monitor is 60Hz, so it can’t show anything above 60 FPS. So, what I would like to know is how to count the actual number of frames being displayed on the screen.

Thank you for your help! Cheers

When you set the “sync” property of gstreamer display sink plugin to true, the frames will be displayed sync on the clock. Only the display driver knows which frames are not displayed on the screen. There is no interface foe application to show this data.