A simple cross-platform MPEG Video Stream player in Java through NetBeans + Swing?

Trying to create a very simple video player component in JPanel (or something similar) to sit in a swing application, connect to mpeg (or, indeed, something VLC can output) the video stream and play it. No controls or anything else are needed - just a live connection to the video stream.

It should be cross-platform - at least Mac and Windows (linux will be a good bonus, but not necessary).

I am developing at NetBeans, so any features regarding this will be helpful.

Jmf? Xuggler? Help! Thanks.

+4
source share
2 answers

I would suggest integrating one of the two most famous open source media players, VLC or mplayer . Both projects are widely used, actively developed, highly flexible and open for integration. Out of the box, they can play dozens of video and audio formats on Windows, OS X, and Linux.

For VLC, there are Java jvlc bindings (older, no longer supported) or vlcj (newer, easier). Mplayer can be integrated into the Java component in "slave mode" .

Alternatively, the Java Media Framework (JMF) may be a Java-friendly way to embed videos, but this is not updated as few recommend it. Documents can be found here .

+3
source

JavaFX does just that. It is fairly easy to use and supports both Win, Mac, and Linux. Most static video files are playing fine, but you need to test streaming video.

+1
source

Source: https://habr.com/ru/post/1307060/