vispy / jupyter_rfb

Remote Frame Buffer for Jupyter
https://jupyter-rfb.readthedocs.io
MIT License
58 stars 10 forks source link

Apply JPEG encoding for better performance #45

Closed almarklein closed 3 years ago

almarklein commented 3 years ago

This example, but with a canvas size of 800x600, renders 5 FPS before this PR. But with JPEG encoding it renders at 28 FPS. cube1

This Vispy example, at 800x600 renders at 30+ FPS (20 FPS with lossless (PNG)), spheres1

djhoese commented 3 years ago

I was thinking about it more...is the "end with PNG" feature worth the complexity? Do you see a difference in the quality? I guess if it can be controlled then that isn't too big of a deal.

almarklein commented 3 years ago

is the "end with PNG" feature worth the complexity?

I think it is. The difference in quality would be barely noticeable with quality 90. But thanks to this addition:

djhoese commented 3 years ago

If you do right-click and save image, it's always the picture perfect version.

Good point. Forgot about saving the image.

You can lower the quality on slow connections and still see the high quality image when the scene is static.

I like that idea. Kind of like video buffering but it is a more literal stream of images.

almarklein commented 3 years ago

Comments addressed.