We are considering writing a software in Java that records whats monitor for certain durations of time while it is running. Do you have any suggestions on how to efficiently capture the monitor output?

The less CPU it takes the more often we can capture the screen and the smoother a video we can generate without interfering with the other apps that are running.

An existing Open Source program in Java would work if it is not too difficult to copy out the screen capture section. I hope it won't require a call to another programming language. We will see.