measuring FPS of a source live stream (using identity elements)
Michael Gruner
michael.gruner at ridgerun.com
Fri Mar 17 21:18:37 UTC 2023
Hey Matt
The perf element <https://github.com/RidgeRun/gst-perf> will also send messages to the bus with the measured frame rate, in this case every second.
We also have submitted a PR to GStreamer with a new tracer named “buffer rate” which basically measures buffers per second in every pad. But that output is displayed on the debug log only:
https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3207
Michael
> On 17 Mar 2023, at 14:12, Matt Feury via gstreamer-devel <gstreamer-devel at lists.freedesktop.org> wrote:
>
> Thanks Nicolas for the response. I'm trying to avoid using fpsdisplaysink because i want to measure fps just after the source of the pipeline (and not the sink). Additionally, I want to be able to get the FPS via a property which fpsdisplaysink doesn't support.
>
> Matt
>
> On Fri, Mar 17, 2023 at 10:01 AM Nicolas Dufresne <nicolas at ndufresne.ca <mailto:nicolas at ndufresne.ca>> wrote:
>> Le jeudi 16 mars 2023 à 17:43 -0400, Matt Feury via gstreamer-devel a écrit :
>>> 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.
>>
>> Just set sync=false on fps display sink, and it will include the source jitter. I strongly recommend using fakevideosink for that, as it will avoid software copies with HW decoders.
>>
>>>
>>> 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/20230317/7edf4fd5/attachment-0001.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: gst-logo-small.png
Type: image/png
Size: 1945 bytes
Desc: not available
URL: <https://lists.freedesktop.org/archives/gstreamer-devel/attachments/20230317/7edf4fd5/attachment-0001.png>
More information about the gstreamer-devel
mailing list