Hi, I'm a developer for a Minecraft Group called Noxcrew. Basically, what I'm trying to do, is get videos with an alpha channel drawn in Minecraft (LWJGL).
Right now, I'm using VLCj to load and render the video to a OpenGL texture, and then drawing this to the screen. When I started, I would get segfault every time I loaded a video. This was because the memory buffer was being freed by Java's GC before VLC was finished with it.
After storing the memory of the VLCj MediaPlayer in a static variable, I get a crash after 10 mins to 30 mins of running. I would assume also it's because of the Java GC. I'm guessing it is because the directmemorybuffer is being moved by Java from eden to a more permanent space, but this corrupts any pointers that VLCj stores.
I've been struggling to get VLCj to work for a few weeks now, and have a working-ish solution that just means I have to re-initialise VLCj every 15 mins of running.
The other half of the problem, is the video we are trying to render has an alpha channel. At first, we used just a chroma key to filter out a color as each frame rendered.. But there were problems with the way most video formats compress the video data. Then we tried using the Quicktime 32-bit MOV format, which supports an alpha channel in the video.. But results in a bitrate of ~300Mbps... Manageable as a last resort, but not ideal..
So my two questions are:
1) Is there a reliable way to load and render videos with an alpha channel in Java/OpenGL. Without using a 32-bit mov file with a fixed huge bitrate.
2) Is there a more stable alternative to VLCj to render this video ingame?
Thanks for the help guys!