Essentially it's the same as the last one from the FFmpeg wiki, but the preset is defined via -vpre (instead of -preset) and it's value is lossless_ultrafast, which means there'll be no quality loss due to the double encoding. And -threads 0 gives FFmpeg all the available computing power there is.

In another blog post the use of xwininfo -frame is explained to get the capture width+height and the offset of the upper-left corner for FFmpeg's -s and -i options.