Get image buffer from local video stream

Martin Vachovski Martin.Vachovski at
Mon Nov 27 10:24:01 UTC 2017

Hi Herman

>>> Can I get the image data into something like pixel array instead of solid file?

It looks like you can use a


element. It allows for extracting of data from a pipeline into your app

You can make a pipeline like

autovideosrc ! videoconvert ! video/x-raw,format=rgb,width=640,height=480,framerate=20/1 ! appsink name="appsink_element" emit-signals=true

Then in your app you can register a callback

when a


signal arrives.

Have a look at the element's documentation

Hope that's what you are looking for


From: gstreamer-devel <gstreamer-devel-bounces at> on behalf of Théo LAVAUX <lavauxtheo at>
Sent: Friday, November 24, 2017 7:27 PM
To: Discussion of the development of and with GStreamer
Subject: Re: Get image buffer from local video stream

First of all, I'm actually working under Windows, not Linux.
Second, isn't there a Gstreamer tool that would prevent me from reading the file and seeking the cursor by myself?
Thanks for your response by the way.

Le 24 nov. 2017 19:50, "HermannSW" <hermann at<mailto:hermann at>> a écrit :
> Can I get the image data into something like pixel array instead of solid
Others may know.

>From a performance perspective I would store the files of multifilesink
under "/dev/shm", a tmpfs filesystem under many Unix-like OSes (exists even
on Raspbian).

All files will end up in memory which is efficient, but they are paged and
not contiguous.
For getting access to a single of those frames as pixel array in memory you
would have to read them (eg. with fopen/fseek/ftell/fread).
If you do that on a one frame after the other basis, your memory consumption
would be N+1 frames, not bad compared to the N frames memory consumption you

Sent from:
gstreamer-devel mailing list
gstreamer-devel at<mailto:gstreamer-devel at>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the gstreamer-devel mailing list