Re: Grab a pixmap / screenshot thing

On Tue, 7 Nov 2006 15:41:52 -0500 (EST)
"muppet" <scott asofyet org> wrote:

A. Pagaltzis wrote:
* zentara <zentara1 sbcglobal net> [2006-11-07 21:00]:
I wonder if it can be used in a thread, to take a series of
screenshots thru a timer, which can then be assembled into an
mpg movie of the screen action. ?

Theoretically yes. Too much CPU load in practice for any useful
framerate. To do this well would require speaking XDamage to the
server to pick up only parts that have changed from frame to

Really, it's more the fact that the image is sent back to the client from the
server with XGetImage().  That means marshalling from device pixels to 24-bit
RGB and sending that over the wire to the client (possibly shm on the same
machine, but still, IPC).  The performance suckiness of such a scheme is why
things like XDamage and XVnc exist.  ;-)

muppet <scott at asofyet dot org>

Yes, I finally discover Gstreamer, and it's ximagesrc plugin,
I read it uses XDamage if available.

This pipeline does a rudimentary job of capturing, without using
too much cpu. 

gst-launch -v ximagesrc ! video/x-raw-rgb,framerate=5/1 ! ffmpegcolorspace !
mux. avimux name=mux ! filesink location=ztest.avi 
#mencoder ztest.avi  -ovc lavc  -o ztest.mpg   

I'm not really a human, but I play one on earth.

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]