Fwd: Python: procedural video and audio mix in

Nathanael D. Noblet nathanael at gnat.ca
Sat Aug 6 07:57:08 PDT 2011


Perhaps look at appsrc and the signals it provides. I've never done this 
but assume that that element would be what you are looking for. You'd 
then listen for some signal it emits and provide it with data when it 
asked for it.



On 08/06/2011 01:39 AM, Mikko Ohtamaa wrote:
> On Sat, Aug 6, 2011 at 10:12 AM, Kapil Agrawal<kapil.agl at gmail.com>  wrote:
>> What do you mean by dumping video frames from python to gstreamer. So for
>> example if you want to write a gstreamer pipeline for doing gst-launch-0.10
>> filesrc location=test.mp4 ! decodebin2 ! xvimagesink ,
>
> For example I generate a series of images like this:
>
> for frame in range(0, 10000): # let's render 10000 frames of video
>   data = []
>   for y in range(0, height):
>       for x in range(0, width):
>             data[y*width+x] = random.randint(0, 2**31) # rgba pixel
>   # XXX: how to create a video frame in GStreamer pipeline in this
> point based on the image data created above
>
> ... now, how do I feed this raw image data to gstreamer, so that it'll
> put it to the video track alongside audio coming from a file.
>
> I probably need to interact with buffers somehow, but I didn't find
> example and I am very clueless with GStreamer, so if anyone could
> point me to the right direction I'd be happy.
>
> Hope this helps,
> Mikko
> _______________________________________________
> gstreamer-devel mailing list
> gstreamer-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
>



More information about the gstreamer-devel mailing list