Recording Desktop Without Compression Using X Events?

Peter Hutterer mailinglists at who-t.net
Sat Feb 9 21:10:13 PST 2008


Michael B Allen wrote:

> I'm aware of Xnee. Yes, it would work if it was reasonable that
> everyone use Xnest but they're not. I would like to ultimately have
> regular video such as an MPEG.
> 
> What I want is something that translates X events directly into
> "compressed" video.

X events only tell you what needs to be refreshed. They do not tell you 
the content of the image. Only the respective client does.

> How does video compression work? It looks at each frame and determines
> the areas of the view that have changed using a difference algorithm
> and writes only the changes to the stream.

Yes. and video compression algorithms have knowledge of the video frame.
An X client does not.

> How does X window renderering work? It looks at each event and
> determines the areas of the view that are affected and only updates
> those areas of the display accoringly.

No. The X server sends expose events about areas that may need to be 
refreshed. The client then decides what to actually paint. Until the 
client does so, you cannot know what will appear.

To get the content you need to snapshot the area and hope that you got 
it at a time when it was appropriate. The only way to get around this to 
sit in the server. In which case you actually have the composited image 
lying around. Xvnc does this for example, so your best guess is probably 
hooking into VNC and going from there.

Cheers,
   Peter



More information about the xorg mailing list