Send the original frame and a scaled version in a single buffer?

Nicolas Dufresne nicolas at
Mon Jul 22 19:28:37 UTC 2019

Le dimanche 21 juillet 2019 à 23:18 -0500, Fabián Orccón a écrit :
> Hello,
> I see a common practice in image processing to gain improve the speed
> scaling down the image or getting the pyramid of an image, so the
> process (for example object detection) is done on the scaled image
> and the output of the process mapped to the original one by applying
> a scale factor for example.

Seems like a good practice.

> I wonder if there is an element available in GStreamer that allows me
> to whether scale down or apply a pyramid while keeping the original
> buffer, or maybe you can suggest something different. And... I think
> that using a tee may be a solution, but would be annoying to work
> with multiple branches in the pipeline (at least to me) because I am
> not sure if in that case I believe I would have to synchronize both
> branches.

Indeed using a tee would require to sync and match the frames, which
seems complex. For single filter, you could hide the scaling in the
element (some of the OpenCV element do that, but they are not yet all
ported). But then it's annoying if you want to chain multiple filters.

In absence of a defacto standard, what I may suggest is to create your
down GstMeta, and attach the scaled down image to your original image
as a meta. Then all you need is a library to create the meta when
missing, that meta will simply ignored in elements that aren't aware of

> Thanks,
> Fabián Orccón
> _______________________________________________
> gstreamer-devel mailing list
> gstreamer-devel at

More information about the gstreamer-devel mailing list