Using GStreamer AppSink from Python

So I decided to play a bit with how to get raw audio samples from gstreamer pipelines. This is normally done (in C or whatever) with an `appsink` element in your gstreamer pipeline. You hook up the pipeline, watch for the buffer, and then you can map it into a Numpy buffer (or whatever you like really). I haven't actually got a use-case for this right now; when I sat down I was toying with the idea of running neural nets on the samples to try to detect phonemes, but that will be some other day.

For today, consider this spike test sample code for how to use an appsink in python-gstreamer.

Still to figure out; whether you can get a nice ring-buffer or similar setup where you pre-map the Gstreamer appsink's buffers onto N numpy arrays such that gstreamer is filling out the arrays and your new-buffer callbacks just update the current ring-buffer indices.


  1. mom charm

    mom charm on 09/17/2014 10:32 p.m. #

    Hello, I think your ssite might be having browser compatibility issues.When I look at your blog site in Chrome, it looks fine but
    when opening in Internet Explorer, it has some overlapping.
    I just wanted to give you a quick heads up! Other then that, fantastic blog!

  2. marathon watch bracelet

    marathon watch bracelet on 09/17/2014 11:39 p.m. #

    I am regular visitor, how are you everybody? This article posted at this web page is genuinely good.


Pingbacks are closed.

Post your comment