exporting video from screen

This is tough one for me, not sure what to do

I have a program that waits for the user to input text and move it around - this is for an installation, meaning it will run for a couple of days in a row

I need to be able to save everything in some video file.

is there a way to capture video from screen ?? How efficient and cpu expensive this is ??

in order to avoid complications I have think of the following:

append all strings in a file with coordinates and date. track text movement and append them to the file to. Then another program could read this file calculate the movements and render everything in a file in NonRealTime

is this possible to do this with openFrameworks ?? how hard would it be to code ??

any other ideas ?