Firstly, I could only offer to capture a small part of the screen, and not to zoom out and possibly lose information, perhaps with something like a sliding window that can be moved by pressing the edges with the cursor. This is really just a small design proposal.
As for compression, I would think that a series of images would not be compressed separately, as well as with an acceptable video compression scheme, especially since frames are likely to remain consistent between captures in this scenario.
One option is to use Xuggle, which is capable of capturing the desktop via Robot in a number of afaiu video formats, but I cannot say if you can stream and decode with this.
You can also use this to capture jpeg and convert them.
Streaming video seems a bit more complicated.
In addition, it seems that the abandoned Java Media Framework supports this functionality.
My knowledge in this area is not fantastic tbh, so I'm sorry if I spent your time, but it seems that some more useful information about the possibility of using Xuggle as a screenshot was compiled here . It also appears to be related to their own notes on existing approaches.
If you do not need pure Java, I would think that all this will be much simpler, just using the interface with its own screen capture tool ...
Perhaps it would be easiest to post the video as a series of jpegs in the end! You can always implement your own compression scheme if you feel a little crazy ...
source share