I'm wondering if there is a tool (or a tool-set) to record every single X11 message received from the server, to post-render them in a movie. I think this could be very useful to create screen-cast: theoretically, it should reproduces perfectly the capture and, once serialized to a stream, it should be less memory-expensive w.r.t. a classic video (I just suppose it).

Does anybody know anything about it?