HOWTO+-+Make+a+Good+Screencast+Only+by+Using+FFMPEG

code format="bash"
 * 1) Only video

ffmpeg -f x11grab -r 25 -s 1366x768 -s hd720 -i :0+0,0 -f avi -sameq -threads 2 video.avi code

code format="bash"
 * 1) Video and Audio

ffmpeg -f alsa -ac 2 -i pulse -f x11grab -r 25 -s 1366x768 -s hd720 -i :0+0,0 -acodec pcm_s16le -f avi -sameq -threads 0 video.avi code

code format="bash"
 * 1) Example with more parameters to experiment - Might not be working
 * 2) This did not work for me with output.mkv.
 * 3) If you change it to output.avi it works but very low quality.

ffmpeg -f alsa -ac 2 -i pulse -f x11grab -r 30 -s 1024x768 -i :0.0 -acodec pcm_s16le -vcodec libx264 -vpre ultrafast -crf 0 -threads 0 output.mkv code