Using VLCJ to draw video onto a texture


1.I have installed a VLC player.
2.Yes,I have setted path.
3.Yes,The video play in the VLC player.
4.mp4 format
5.Not any error.But hang and not work,

and I try to modify value of width and height to be both below 1000.(960*540)
Then,The video is work.


If don’t compress the Video.
How can support Ultra Video(2560*1440)?


I have no idea. It might be that it takes so long to render one frame that by time it has finished it has to render the next and so just consumes the entire loop constantly.

You could try looking at using a different rasterisation method maybe, or optimising the current way.


I refer to rickard GitHub(,
Use and modify some Code.

    Image image = new Image();
    image.setData(BufferUtils.createByteBuffer(image.getWidth() * image.getHeight() * 4));

    jmeTexture = new Texture2D(image);
    factory = new MediaPlayerFactory("--video-filter=transform", "--transform-type=vflip");
    mediaPlayer = factory.mediaPlayers().newEmbeddedMediaPlayer();

            new TestBufferFormatCallback(),
            new JmeRenderCallbackAdapter(jmeTexture),

    Material material = new Material(assetManager, "Common/MatDefs/Misc/Unshaded.j3md");
    material.setTexture("ColorMap", jmeTexture);

The Ultra Video(2560*1440) is work!


Thanks - I’ve updated the gist with your findings for everyone else :slight_smile: