The easiest way to capture linux desktop which I know
#determinate screen resolution xdpyinfo | grep 'dimensions:'|awk '{print $2}' #how to grab you display where 0.0, same as the DISPLAY environment variable ffmpeg -f x11grab -i :0.0 /tmp/out.mpg #here we grub display, -r will be used to set the output file to 25 fps. ffmpeg -f x11grab -s `xdpyinfo | grep 'dimensions:'|awk '{print $2}'` -r 25 -i :0.0 -sameq videoOutput.mpg