xvidcap is a tool (like Lotus ScreenCam and Camtasia) that captures
movement on a selected area of an X11 screen to files. Frame output
formats include: XWD, PPM, PNG, MNG, JPEG and MPEG.

Homepage:
https://xvidcap.sourceforge.net/
