I'm thinking it might be easier to simply offscreen the stage and do a gdk_pixbuf_get_from_drawable for each frame, then send that frame on for encoding to video. Has anybody tried this?
On Fri, Jun 5, 2009 at 2:46 PM, Mustafizur Rahaman < mustafizur.raha...@azingo.com> wrote: > Hi, > > You can use glReadPixels, but the problem is glReadPixels reads the data > assuming origin at *lower left corner* of the screen, where your video > data may be shown in a window where the origin is *top left corner. *So > the image data you get here is actually vertically flipped, so you have to > manually manipulate the data (in s/w) i guess before you can use them. and > to do that for each frame, is quite expensive operation. > > My purpose was at some time depending on certain scenario, i had to take > snapshot of the current framebuffer/GL surface data and then dump it on to > the frame buffer later on when reqd.I followed the above mechanism.Because > for me, it was at certain scenario and not in every frame, i am fine with > the s/w manipulation of the image data captured.. > > May be this will give you certain hints.. > > Regs, > Rahaman > > > Saul Lethbridge wrote: > > Would I be able to use glReadBuffer & glReadPixels to get the image data? > Am I on the right track? > > > > http://www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/readbuffer.html > > http://www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/readpixels.html > > > > > On Thu, Jun 4, 2009 at 6:59 AM, Florent <fthi...@gmail.com> wrote: > >> Hello, >> >> > I'm wanting an efficient way of capturing image data on the stage. I'd >> like >> > to be able to take video of the stage and save it to a file. So being >> able >> > to grab image data, frame by frame, from an animation. Has anybody >> attempted >> > this or have any idea where I should start looking? >> >> See >> http://lists.o-hand.com/clutter/0175.html >> http://lists.o-hand.com/clutter/2163.html >> >> I recall pippin to have some patch for rendering video using ffmpeg, >> but in short there is nothing like that in the main code (yet?). >> >> There are ongoing experiments around gst-gl with clutter, might be >> your best chance. Or simply try general purpose screen capture >> software. >> >> >I guess the best way >> > would be for clutter-gst to offer this kind of feature. >> >> clutter-gst just displays video frames to an actor. >> >> Florent >> > >