Performance impact of bins/ghostpads?

Florian Echtler floe at butterbrot.org
Fri Mar 3 08:29:04 UTC 2023


Hello again,

I came across an interesting performance issue yesterday: I have video streams 
with fixed 15 FPS coming in through webrtcbin and decodebin, into a tee, and 
then feed them into a fpsdisplaysink. So far, so good.

Now, I made a small change (because I wanted the output part to be more easily 
configurable): instead of directly adding a videoconvert and fpsdisplaysink 
element, I've switched to "Gst.parse_bin_from_description( videopipe, True )". 
The default content of videopipe is just "videoconvert ! fpsdisplaysink".

And what happens now is that in most cases, the displayed framerate drops to 7.5 
FPS. I know with certainty that the decodebin is still pushing out 15 frames per 
second, but the fpsdisplaysink suddenly only shows half of that. There's no 
fluctuation, the framerate stays either exactly at 15 FPS or at 7.5. Also, 
there's no indication of dropped frames in fpsdisplaysink.

I remember reading somewhere that ghostpads (as created by parse_bin_from_desc) 
do have a small performance impact, but 50% doesn't look like a small impact...

On a hunch, I tried to add "sync=false" to the fpsdisplaysink, and that results 
in a reliable output of 15 FPS again, but at the cost of somewhat higher CPU load.

I realize this is really a bit of an esoteric issue, but I'd be quite curious to 
understand what's going on here, and how this is related - especially why the 
sync parameter to fpsdisplaysink makes a difference, and why this can be 
triggered just by putting things into a bin?

Thanks and best, Florian
-- 
SENT FROM MY DEC VT50 TERMINAL
-------------- next part --------------
A non-text attachment was scrubbed...
Name: OpenPGP_signature
Type: application/pgp-signature
Size: 203 bytes
Desc: OpenPGP digital signature
URL: <https://lists.freedesktop.org/archives/gstreamer-devel/attachments/20230303/d76d6929/attachment-0001.sig>


More information about the gstreamer-devel mailing list