How to record a screencast with sound from the sound server (e.g.: ALSA) using ffmpeg:
ffmpeg -f oss -i /dev/audio -f x11grab -s 800x600 -r 15 -i :0.0 output.avi
ffmpeg -f oss -i /dev/audio -f x11grab -s 800x600 -r 15 -i :0.0 output.avi