使用ffmpeg来进行屏幕录像 man里面的:

   X11 grabbing
       FFmpeg can grab the X11 display.

               ffmpeg -f x11grab -s cif -i :0.0 /tmp/out.mpg

       0.0 is display.screen number of your X11 server, same as the DISPLAY environment variable.

               ffmpeg -f x11grab -s cif -i :0.0+10,20 /tmp/out.mpg

       0.0 is display.screen number of your X11 server, same as the DISPLAY environment variable. 10 is the x-offset and 20 the
       y-offset for the grabbing.

保存为a.avi

ffmpeg -f x11grab -s 1024x768 -r 60 -i :0.0  a.avi

结束后q退出,效果还不错。