JME2 Video Support

Hello,



I would like to use JME2 for another project. I have to make an In-Game-Main-Menu which has to look very neat. Therefore I want to put Menu Elements in front of a video. What is the current status on that? Can you put objects (Menu elements,  Mouse) in front of a running video? Is there an easy way to achieve that?





Schifty

yes, you can do that with jme2.


  1. Get the jme video texture renderer going
  2. create and add a Quad to render the video on
  3. create and add overlay elements



    just search for "jmf video render"



    as soon as you have your video on a quad you can add anything you like in front of it, cause for jme its just a texture.

Video Texture was my first guess - i already checked the "jmf video render" thread but the key word "complicated" made me create this thread in order to find an easy way to solve my problem



thx

Schifty

It's quite easy to do with jmc (from javafx), but I think that's windows only and there might be license issues. You might want to look into that.




I tried to use JMF, but it is really complicated. I can't make it work:


  1. I downloaded the package and modified it for jME2  according the code of mulova
  2. I downloaded and installed FOBS
  3. I included jmf.jar in the project
  4. I added the new renderer in JMStudio



    Running any video doesn't work in JMStudio!



    Unable to handle format: XVID, 428x240, FrameRate=25.0, Length=308160 0 extra bytes

    Unable to handle format: mpeglayer3, 44100.0 Hz, 0-bit, Stereo, Unsigned, 16000.0 frame rate, FrameSize=9216 bits

    Failed to realize: com.sun.media.PlaybackEngine@a98ce7e

    Error: Unable to realize com.sun.media.PlaybackEngine@a98ce7e

    Failed to realize: input media not supported: xvid video, mpeglayer3 audio



    Unable to handle format: SVQ3, 480x240, FrameRate=25.0, Length=41750

    Unable to handle format: QDM2, 44100.0 Hz, 16-bit, Stereo, BigEndian, Signed, FrameSize=32 bits

    Failed to realize: com.sun.media.PlaybackEngine@36867fc9

    Error: Unable to realize com.sun.media.PlaybackEngine@36867fc9

    Failed to realize: input media not supported: SVQ3 video, QDM2 audio



    UNABLE_CREATE_PLAYERjavax.media.NoPlayerException: Cannot find a Player for :file:C:Videovid.wmv





    (5 different formats tested!)





    When running TestJMFVideoImage:





    Unable to handle format: XVID, 428x240, FrameRate=25.0, Length=308160 0 extra bytes

     Unable to handle format: mpeglayer3, 44100.0 Hz, 0-bit, Stereo, Unsigned, 16000.0 frame rate, FrameSize=9216 bits

    Failed to realize: com.sun.media.PlaybackEngine@125b8827

    Error: Unable to realize com.sun.media.PlaybackEngine@125b8827





    Please help me :slight_smile:




Wow cool :slight_smile: Just what i still needed in JME3 :wink:

I just downloaded JME3 to check out the video playback features! (com.jme3.video)



Error at:

import com.jcraft.jogg.Packet;

import com.fluendo.jheora.Comment;



Is this the playback solution you talked about?

If not, could you provide me with something better than "in a few days"?

Schifty said:

I just downloaded JME3 to check out the video playback features! (com.jme3.video)

Error at:
import com.jcraft.jogg.Packet;
import com.fluendo.jheora.Comment;

Is this the playback solution you talked about?
If not, could you provide me with something better than "in a few days"?

It is what he was talking about and you're apparently missing some jar files in your classpath there. How much better than "in a few days" can it get? :D

Which jars are missing?

lib/jheora/jheora-debug-0.6.0.jar



I would think.



In my case, using netbeans,  the source folders (had to add src/jheora) and labels had also been mixed up a little, and I had to add dist/jme3testdata.jar to make the video player run (didn't find the Monkey.jpg otherwise).


bosun said:

In my case, using netbeans,  the source folders (had to add src/jheora) and labels had also been mixed up a little, and I had to add dist/jme3testdata.jar to make the video player run (didn't find the Monkey.jpg otherwise).

The current svn should have everything working in NetBeans and with pure ANT. Before there was some workaround where you would simply have to build jme3 once after downloading so that NetBeans wouldn't whine about the missing jme3testdata.jar library anymore. Now it creates and links/copies the jme3testdata.jar automatically on build and simply uses the src/test_data folder while working in the IDE.

Cheers,
Normen

P.S. you should always update the whole project to also get changes in the nbproject folder. We use the NetBeans ANT infrastructure heavily.

Yup, deleting the jme3 project and grabbing it all anew makes it work right out of the box. Much simpler than jme2 :slight_smile:

dhdd said:

You butting into every single thread in this forum and saying stuff like that is slowly killing off jme2. And thats the stable reference engine here. IMHO we shouldn't do that until jme3 is feature equivalent to jme2.

Have to agree partially but we also need some guinea pigs for jme3.. And every real developer should know the difference between pre-alpha and stable 2.0.1 ;)

I suppose we could tone it down a bit in the jME2-exclusive threads. On the other hand, people are always asking for comparisons, always encouraging us to 'sell it' :wink: But I think you're right; we're better off just making proper announcements out of it, and putting the comparisons into a maintained article.

Have to agree partially but we also need some guinea pigs for jme3.. And every real developer should know the difference between pre-alpha and stable 2.0.1

Yeah that and also I don't believe anymore that jME2 is stable. People complain about it too much and there are too many hacks around various quirks.. not the sign of a stable engine to me. We can only make jME3 better if people actively use it, request features and post bugs.

huh, just stumbled upon this thread and have tested video playback it works great, is there any chance of setting up a custom format of video with a palette for reduced size

what about other existing formats that allow for an indexed pallete, they should work out much smaller than normal video shouldn't they

An indexed palette theoretically only reduces filesize by 3 since a 24 bit RGB color is converted to 8 bit index.

A 1:3 reduction is nothing :stuck_out_tongue: A 5 minutes standard definition video takes about 2 GB, converting to indexed yields 3 times reduction = 700 MB. Modern video codecs can compress same video to about 15-30 MB, through techniques like DCT and motion compensation.

I can’t find the com.jme3.video package (mentioned above) at all.

Where is it, what became of it?



I want to get a video texture rendering to work.

How do i do it? Could you supply a code snippet on how to do it?



Thanks in advance!