ffmpeg can record the X server screen for you and store it directly for example in Flash Screen Video format. This is much more favourable than some other solutions in my opinion :-)

example: ffmpeg -f x11grab -s 1024x600 -r 120 -i :0.0 -vcodec flashsv /tmp/out.flv

1024x600 is the screen size and 120 the rate. Important is the .flv-extension for the suitable container format.