I’m starting to implement some sort of remote screencasting (VNC-alike) client/server software in C++ (Windows platform), which just transmits the screen updates (image tiles) over the network.
The screen is divided in blocks and each tile is compressed into JPEG (probably I’ll use libjpeg-turbo), before sending over network. So my question is, will it be good to implement another layer of compression (lossless) for these (already-JPEG-compressed) tiles, e.g. using zlib?
I have a feeling that zlib won’t give any significant improvement in terms of bandwidth as the JPEG files will be already compressed. I’d like to avoid further time and money investment for implementing additional compression layer just for testing purposes, so I’d like to hear your suggestions.
P.S.: As a side question, are there any better alternatives than encoding tiles into JPEG? Maybe lossless compression right away? Is the above-mentioned technique (dividing screen into tiles => selecting updated tiles => compressing them into JPEG => sending over network) good way to implement such software?
Any kind of input would be much appreciated!
Absolutely unneccessary.
Better option is to use both methods: count the colors in the block and use zlib/rle/etc for few colors and jpeg for many. That’s the very basic approach. I recommend you to take a look at the Remote Framebuffer Protocol of the VNC.