¿Java es lo suficientemente rápido como para compartir la pantalla en vivo?

For the past few months, a developer and I have been working on a screensharing applet that streams to a media server like Wowza or Red5, but no matter what we do, we have about 5 seconds of latency, which is too long for a live application where people are interacting with each other. We've tried xuggle, different encoders, different players, different networks, different media servers, and even streaming locally, there's significant latency.

So, I'm beginning to wonder…

¿Java es lo suficientemente rápido como para compartir la pantalla en vivo?

I've seen lots of screen recording applets written in Java, but none of them are streaming live. Everything that's done live, such as GoToMeeting, seems to use C++. I'm thinking maybe there's a reason.

It's not a compression problem. Using ScreenVideo, we've compressed an hour-long stream down to about 100 MB, and we have plenty of bandwidth. The processor isn't overloaded doing the compression, either, but it seems to be taking too much time. We are getting the best results from some code pulled out of BigBlueButton, but still, the latency is terrible.

Streaming the WebCam, on the other hand, is nice and snappy. Almost no latency at all. So, the problem is the applet.

The only other idea I can think of is somehow emulating a WebCam with Java. Not sure if that would be faster or not.

Ideas? Or should I just give up on Java and do this in C++? I would hate to do that, because then I would have to create different versions for different platforms, but if it's the only way, it's the only way.

preguntado el 10 de marzo de 12 a las 02:03

If you reduce the screen resolution, does the performance improve? -

1 Respuestas

Many video streaming subsystems deliberately buffer so that a blip in connectivity doesn't impact the video, but that makes more sense in a recorded media scenario.

Make sure these systems have buffering turned off or turned down.

Also, while this isn't exactly scientific, you could run an app like wireshark on the outgoing and incoming computers, and try to see how long the tráfico actually takes. If it's very fast, then I'd more seriously consider that buffering is the issue.

If you are on Windows, maybe just running Task Manager/Network tab would prove this or not (rather than installing something like wireshark, which isn't difficult... just trying to suggest a fast way to check)

respondido 10 mar '12, 02:03

No es la respuesta que estás buscando? Examinar otras preguntas etiquetadas or haz tu propia pregunta.