Currently I’m trying to develop RTSP video player, which can show many streams at one time (2, 4, 5 etc). It has to be fast and be able to run on Windows, Mac and Linux.
First app version has been written on Swing and VLC. Good performance, ability to play many streams at one time on slow PC. But not impressive UI and video playing is unsupported on Mac
So, after a lot of researching I stopped on JavaFX and VLC. Great UI, support on all platforms, but performance issues on slow PCs.
Here is simple project which can play one video: https://github.com/costello/vpfx
(don’t forget to set your media link in class java/app/AppController.java, line 22)
Unfortunately it’s using too much CPU, even if I play only one video. I tried to play 2 or 4 videos (from different RTSP streams), completely nightmare.
Here is CPU usage graph on PC with Intel® Pentium® Processor E5300 (2M Cache, 2.60 GHz, 800 MHz FSB) and integrated video card: https://i.sstatic.net/kVzIq.jpg
vlcj version: 3.0.1
VLC version: 2.1.5
Java: 7 and 8 (java fx 2.2 and java fx 8), same result.
Found this OpenGL discussion: How to use OpenGL in JavaFX?
But I don’t know how to use OpenGL to render image from given RGB array and even I don’t know will it help.