Ncmjb – an easy way to play videos on a texture

Hi folks,

i created a mplayer java binding and now it is quite easy to play videos (any type mplayer can handle) with jmonkey on a texture. at the moment it runs only on linux 32bit/64bit, mac osx 10.6, but a windows-port is planed too. it should also work on mac os x, but i never tried.

so if you want to try it out, you can find a jar on the project-page: http://code.google.com/p/ncmjb/ (with videos)

there is a jmonkeyengine-howto in the wiki. the source is stored on github. go into the MPlayerIPC directory and type “ant”. you find the created jar in MPlayerIPC/dist.

if someone has the time:

- i need someone who tries it on a mac

- it would be nice if someone tries it on a 64bit linux (build and run)

there is for both a build-howto in the wiki

to test that it works on your machine, try the java2d-vo with: java -jar ncmjb.jar

optional with -Dsun.java2d.opengl=True (or -Dsun.java2d.xrender=True if you use java7 and the opengl-pipe doesn’t work (only for X))

before i forget it: pulseaudio has to be installed (change that in MPlayerControl.java if you try it on mac)

install ia32-libs on 64bit linux, even you use a 64bit java-vm.

thanks to all for such a great engine.

Just downloading and trying to run the jar file on a 10.6 osx mac gives:

.:/Library/Java/Extensions:/System/Library/Java/Extensions:/usr/lib/java
Apple Inc.
Exception in thread "main" java.lang.UnsatisfiedLinkError: /private/var/folders/n4/n44GnWgAG5iUgW-QDwR25++++TM/-Tmp-/libMPlayerSharedMemory.so1299280161263985742:  no suitable image found.  Did find:  /private/var/folders/n4/n44GnWgAG5iUgW-QDwR25++++TM/-Tmp-/libMPlayerSharedMemory.so1299280161263985742: unknown file type, first eight bytes: 0x7F 0x45 0x4C 0x46 0x01 0x01 0x01 0x00
   at java.lang.ClassLoader$NativeLibrary.load(Native Method)
   at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1823)
   at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1699)
   at java.lang.Runtime.load0(Runtime.java:770)
   at java.lang.System.load(System.java:1020)
   at mplayeripc.MPlayerSharedMemory.<clinit>(Unknown Source)
   at mplayeripc.demo.SimplePlayerUI.main(Unknown Source)


yeah, you have to build it on your own :wink:

there are only linux32bit executeables in the jar

http://code.google.com/p/ncmjb/wiki/HowToBuild

That was more steps then I wanted to do. :stuck_out_tongue:



Will try and test tomorrow.

Despite the whining about setup, thanks for the contribution :wink:

normen said:

Despite the whining about setup, thanks for the contribution ;)

I'm working on a package which contains linux, mac and windows binaries (32 and 64bit). so don't worry ;)

Thanks for recognizing the project. I’m aware that it is unfinished. To be short: i got a job and was quite busy :wink:



Nice that jme now has a plugin-infrastructure. I will look into that and will try to update the jme-binding.

1 Like

I am doing a “UP” of this topic, because this functionality is a real nice added value …



There was this solution proposed, but unfortunatly, no activity since long time ago (despite the message - soon version for windows)

Someone did plane to do so? Or any alternative in JMonkey for that video texturing stuff ?



thanks,

It would be nice if this library could be wrapped into a jMP plugin so it can be tested and maybe improved by others too:

See “create a library plugin from a jar file” here:

That would be terrific! :slight_smile: Thanks Zstegi !