3

I was wondering if anyone could point me in the right direction with this:

I am making a basic screen-share application in Java. So far I have all the server/client code done but the best performance I am getting from Robot.createScreenCapture is 12FPS at 720p, and that's on localhost + a fairly powerful machine. From my logs it is clear that the actual capturing of the screen is the part that is taking unacceptably long (~44ms per screen-cap).

Could anyone point me in the right direction with a faster (possibly native?) method for capturing the screen as a whole? I have seen various posts such as this and this but they seem to suggest libraries with little to no explanation of what they are and how they'd help.

Thanks in advance to anyone who can point me in the right direction!

Community
  • 1
  • 1
Ollie
  • 1,355
  • 1
  • 10
  • 22

1 Answers1

0

The screenshot taking of Robot is not optimized for speed. You won´t really be able to achieve >= 30 fps easily.

Your best bet is to use a platform specific library for that task.

Look at this answer for more details!
https://stackoverflow.com/a/24737914/2498301

Community
  • 1
  • 1
Lukas Makor
  • 1,947
  • 2
  • 17
  • 24