Creating videos from output on screen arducamstill

Hi,
I am trying to create videos of the stream I get from the arucamstill output shown on the screen that is at 54 fps, but I cannot find a guide on how to do it and maintain a similar frame rate.
this is the device I am using