DanM
DanM

Reputation: 7197

Simple MPEG Video Stream player, cross-platform, in java, via NetBeans + Swing?

Trying to build a very simple video player component in a JPanel (or something similar) to sit in a swing app, connect to an mpeg (or, really, anything VLC can output) video stream, and play it. Don't need any controls or anything -- just a live connection to the video stream.

It has to be cross-platform -- at least Mac and Windows (linux would be a nice bonus, but not necessary).

I'm developing in NetBeans, so any specifics regarding that would be extra-helpful.

JMF? Xuggler? Help! Thanks.

Upvotes: 4

Views: 9199

Answers (2)

ewall
ewall

Reputation: 28110

I would suggest integrating one of the two best-known Open Source media players, VLC or mplayer. Both projects are widely used, in active development, highly flexible and open to integration. Out of the box they are both able to play dozens of video & audio formats on Windows, OS X, and Linux.

For VLC, there are Java bindings jvlc (older, no longer maintained) or vlcj (newer, simpler). Mplayer can be embedded into a Java component in "slave mode".

As an alternative, the Java Media Framework (JMF) may be a Java-friendly way of embedding video, but it is not so up-to-date and few people recommend it. Docs can be found here.

Upvotes: 3

Chuk Lee
Chuk Lee

Reputation: 3608

JavaFX will do just that. It's quite simple to use and it'll support both Win, Mac and Linux. Playing most static video files are okay but you do have to test streaming.

Upvotes: 1

Related Questions