Try the following command and modify it accordingly:
ffmpeg -f x11grab -i :0.0+10,20 -r 10 -vf format=pix_fmts=yuv420p output.mp4
Since my system build does not have an output on
/dev/video0, I replaced it with a filename as an output.
-f for input/output. Input source: x11grab, indicates a screen capture provided by the libxcb1 library. Output source: /dev/video0, assuming there is a connected monitor.
-i Screen 0 is selected (run
xrandr to view the available connected screens). 10 pixels and 20 pixels for x-offset and y-offset (set in the question).
-r for framerate (Hz) for recording. (10 fps selected).
-vf filtergraph flag for filtering the stream.