Seeing huge volume of buffers with HLS/TS source compared to RTSP sources

Matt Feury mattfeury at gmail.com
Wed Jan 18 22:30:50 UTC 2023


Hello group! First time messaging, hope this is detailed enough.

I'm currently running a pipeline that can support either rtspsrc or HLS
sources (via souphttpsrc). The pipeline generally looks something like this:

> rtspsrc/souphttpsrc (depending on url structure) ! parsebin ! decodebin !
videoconvert ! identity ! tee ! queue ! multiple sinks (e.g. appsink,
webrtc, etc, all from tee).

Note this has been scrubbed of detailed pipeline info like specific sinks
and extra queues/identities for simplicity's sake.

I am using the identity element to calculate the number of buffers per
second passing through. When running the pipeline with an RTSPsrc, i am
seeing a BPS value that corresponds heavily to the FPS (e.g. 5). However,
when I run with an HLS source, i am seeing BPS values 10-100x as large as
FPS (e.g. 250).

Weirdly, in my appsink, if i just do a simple cv2.imwrite to the local
machine, I can confirm that each buffer coming through corresponds to a
unique frame of the stream.

So I guess my question is: what could be causing these increased buffer
counts for the same pipeline but only when HLS/TS data is flowing through
it? While the stream sources are different, the FPS of each is roughly
similar. I would presume that after the decodebin and videoconvert, I am
left with raw video of the same general media type / caps regardless of the
input source, so I am surprised to see such variation.

For example:

truncated version of pipeline from decode -> identity for an HLS stream:
[image: image.png]
truncated version of pipeline from decode -> identity for an RTSP stream:
[image: image.png]

Output looks identical between the two, but BPS values through the identity
element are ~50x.

Ideally i'd like things to be standardized at this point in the pipeline.
Output data actually looks fine, but i think the sheer amount of buffers is
overloading my system and this feels like an area to chase it down. Eager
to hear any thoughts.

Thanks,
Matt
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/gstreamer-devel/attachments/20230118/ce094c4c/attachment-0001.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image.png
Type: image/png
Size: 184470 bytes
Desc: not available
URL: <https://lists.freedesktop.org/archives/gstreamer-devel/attachments/20230118/ce094c4c/attachment-0002.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image.png
Type: image/png
Size: 157823 bytes
Desc: not available
URL: <https://lists.freedesktop.org/archives/gstreamer-devel/attachments/20230118/ce094c4c/attachment-0003.png>


More information about the gstreamer-devel mailing list