I just followed the simple command as described on LinuxQuestions.org forum.
ffmpeg -f x11grab -y -r 45 -s 1366x768 -i :0.0+0,0 -vcodec libx264 -sameq ~/screencast.avi
Its quite good, compared to my old laptop where same command would produce sluggish video performance, probably due to crappy graphics card. With my Intel HD 3000, it works great. By the way, recordmydesktop doesn’t work well for me.
Here is the unedited video.