Play videos in jMonkeyEngine (vlcj)

For my own amusement I wanted to see what it took to play videos in jMonkeyEngine. As the question pops up in the forum from time to time (followed by a lengthy discussion about licenses, codecs and usages) I thought I’d share the few lines of code required.
Admittedly, the implementation is a bit naive. I had an idea which I did not go through with entirely. I think the way the image buffer is used could be improved.

Since the original project is GPL v3 I assume this has to be, as well.

6 Likes

Works great , thanks. :grinning:
Can we also play videos from web URL ? (for example YouTube videos)

Just tested and it played video from url successfully.:grinning:
@rickard thanks so much.