For those intrested: JMF seems to be capable of playing XVID Avi files (not however, DivX). But even with the MP3 plugin on the JMF page, no MP3 in Avi. This all without trying JFFMPEG yet though.
If anyone want to try this on linux and especially osx, please let me know if it works.
As for Sun slowly letting JMF die, I can see why, the lack of NIO in the design of the API makes it seem very outdated. <mini-rant> But you wonder why they don’t just release the source for it under a useable license right away…</mini-rant>
But can it be fast enough for fullscreen videos with that intermediate image? How much work would it be to render straight to a buffer? Meaning - does JMF support the required output format?
Llama, I'm just giving people the straight dope. :-p
Great job, I can't wait to try this out. SurePlayer seems like a really nice potential option as well. It sure would be nice if we could have video with sound in our games, but MPEG1s are HUGE. MPEG2 wouldn't be too bad…Camael, in your plethora of links to useful information can you give us a link to an entirely Java MPEG2 player? :-p
EDIT: I’ve done some more examining of the MediaFrame API, though difficult to find I now have the source code and it looks as though it was designed to run through an applet. However, I think it should be pretty trivial to modify it for our purposes. I’ve been looking at the MPEG4 stuff but I’m assuming the MPEG1 support is pretty similar.
I've made a renderer plugin for JMF, that renders frames directly to a texture.
If FOBS is present on the classpath (it should still without), it can also attempt to use FOBS, which will use FFMPEG to render directly into the native buffer, that is then used for updating the texture. However, this requires a small (1 line) change to FOBS (I'll take that to their list). It'll still work without this change, but not as efficient.
This gives excellent performance for video… the CPU usage (when using FOBS) can be compared to normal media player (no wonder since mplayer, VLC, directshow + ffdshow all use ffmpeg too), and will improve a bit more after I make some small changes to jME (support for better pixel packing and such). If you use FOBS you can load practically every format there is too (except WMV9, but who cares).
The only problem is audio. JavaSound is unreliable as ever, has incompatabilites between 1.4 and 1.5, and doesn't always seem to work with JMF. JMF for windows ships with a different audio renderer (directsound), maybe the linux pack has one for linux? However, DirectSound also isn't perfect, either the sound is broken up a bit (because jME takes all CPU), or it somehow drags down the framerate (when you limit jME to a certain FPS to reduce it's CPU usage) without actually using up CPU time! (so the processor will be largely idle). Maybe a jME audio renderer would solve this. Of course, you can make movies with no audio, or audio in a seperate file (or maybe use a null renderer).
The install is horribly complex right now, I'll try to make it a bit more simple, and then post the files tommorow.