measuring FPS of a source live stream (using identity elements)

Matt Feury mattfeury at gmail.com
Thu Mar 16 21:43:43 UTC 2023


hello all,

i am attempting to measure FPS of a source stream (e.g. rtsp or hls). I am
currently using an identity element immediately after the source element
(e.g. rtspsrc -> identity -> decodebin -> fakesink). Using the handoff
signal on identity, I am able to get a good calculation of buffers per
second.

However, it seems that this value is not always 1:1 with frames per second.
It very frequently is on stable streams (e.g. I often see 29-31 buffers/sec
on a 30fps stream). However, on streams with intermittent connectivity, it
doesn't seem to tell the whole story.

I've seen fpsdisplaysink which actually works really well (I am able to see
"real" fps values that are dynamically changing as the pipeline plays).
However, a) I don't want to measure the fps at the sink (i have a tee'd
pipeline with multiple sinks and more interesting in measuring source fps
than that of my pipeline) and b) this element seems to just overlay it –
ideally i would be able to get the average "recent" fps as a property.

I've seen ridgerun's gst-perf element, but that only seems to log values.

Is there a recommended approach to monitoring "real" FPS of an incoming
live stream? Ideally using identity, but open to other options.

Thanks,
Matt
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/gstreamer-devel/attachments/20230316/f7db9b4b/attachment.htm>


More information about the gstreamer-devel mailing list