something like ofxQtVideoSaver but for animations

Hello, i made a little app in openframework that allows me to make simple animation with the movement of the mouse. I would like to have something like the ofxQtVideoSaver functionality that allows me to record in a video the animation of is generating. what i mean is that i dont need to save in a video the frames from the camera as the example but instead save in a video all what it happens in the main of window (the animation)

how can i do this?

thanks

A.