Code:
recordmydesktop -delay 2 --overwrite -o out.ogv -device hw:1,0 --fps 270
mencoder -vc theora out.ogv -ovc lavc -lavcopts vcodec=mpeg4:vpass=1 -oac faac -o out.avi
mencoder -vc theora out.ogv -ovc lavc -lavcopts vcodec=mpeg4:vpass=2:vbitrate=8000 -oac faac -o out.avi
mencoder out.ogv -o out.flv -of lavf -ovc lavc -oac mp3lame -lavcopts vcodec=flv:vbitrate=250:autoaspect:mbd=2:mv0:trell:v4mv:cbp:last_pred=3:predia=2:dia=2:precmp=2:cmp=2:subcmp=2:preme=2:turbo -srate 22050 -af lavcresample=22050
hw:1,0 is the sound recording alsa device.
You can obtain it by using
The above creates output in OGV, AVI and FLV formats. You can add -vf scale=320:240 for standard flash video resolution to the flash conversion line.