This is an extended work after I submitted two patchs to libav for mouse following and grabbing region indicator. I believe that any further development is better off libav, and it would be better to be a standalone program.
In this very first stage, x11grabr tries to do the same as it is in libav.
Currently, x11grabr requires libav and a few X libraries to build. Simply run
make should do the trick, then you should be able to run a comannd as follows:
./x11grabr -s hd720 -r 25 -b | ffmpeg -f rawvideo -pix_fmt bgra -s hd720 -r 25 -i - test.mp4
If you are interested in this, be sure you check out
TODO.mkd in source files, so you know what I have in mind.
x11grab.c is licensed under it.