Ffmpeg screen capture x11grab
From thelinuxwiki
screen capture whole display, where this example resolution 1920x1080 = monitor resolution sarting at the top left corner of screen
ffmpeg -f x11grab -r 10 -s 1920x1080 -i :0.0 /var/tmp/video.mp4
same but with audio from your microphone
ffmpeg -f x11grab -r 10 -s 1920x1080 -i :0.0 -f pusle -i default /var/tmp/video.mp4
screen capture part of display, where example resolution starts at an offset of 1250x525(x,y) which effectively records the the bottom right hand corner of the screen.
ffmpeg -f x11grab -r 10 -s 650x480 -i :0.0+1250,525 /var/tmp/video.mp4