ffmpeg is the swiss-army knife of sound and video: it reads, converts and writes essentially every format there is. It also grabs the screen, through its x11grab input, which is what actually takes the pictures in Timescreenlapse and what stitches them back into a film afterwards.
This page is still largely in progress.