Fwd: Python: procedural video and audio mix in

Mikko Ohtamaa mikko+gstreamer at redinnovation.com
Sat Aug 6 00:39:50 PDT 2011


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


More information about the gstreamer-devel mailing list