If I want to record my desktop, I use:
ffmpeg -f x11grab -s `xdpyinfo | grep -i dimensions: | sed 's/[^0-9]*pixels.*(.*).*//' | sed 's/[^0-9x]*//'` -r 25 -i :0.0 -sameq valami.avi
But it doesn't save any audio -- how can I include sound with the video?
Extra: How can I set on-the-fly encoding like with x264 + mp3:128kbit?
xdpyinfo |awk '/dimensions:/{printf $2}'