I'm writing a screen capture module using the Robot class. I'm taking screenshots of the application every x milliseconds and writing them to disk. After screen capture is finished, I'm compiling the screenshots to video with FFMPEG.
However, writing images to disk is extremely slow and grinds my application to a halt. What am I missing? Is there a better way to write a simple screen capture module?
Thank you.
Edit: I've tried several ways of writing the images to disk, and all are very slow. I've been sticking with the following, due to its ease of use:
ImageIO.write(bufferedImage ,"jpg", file);