Video Playback

You want to playback videos in your game, eg. cutscenes, what can you use ?

it seems like everything is old (jmf) or very impractical (install codec for jmf lateron and so on)

best format I got for JMF is like .mov video: H.263 audio: a-law, no resolution bigger than 350x280 or so… and still doesnt look at that good

so its obviously completely unacceptable in 2011.
I don’t even see any proposed improvement in that area in java 7… maybe I just didn’t see it.

xuggler is that way to go.

but it doesnt work with applets at the moment.

I have seen it, but didn’t try it yet, seemed a little complicated. But I’ll have a closer look.

I don’t do web stuff anyway, do it doesn’t matter.

[quote]I don’t even see any proposed improvement in that area in java 7… maybe I just didn’t see it.
[/quote]
All in JavaFX. You will need to wait for 2.0 though for the Java library.

Xuggler’s ace. A bit big tho.

Cas :slight_smile:

All in JavaFX.
[/quote]
Doesn’t really help… it’s not like I can use JavaFx inside Java… I might as well write a C++ program then :stuck_out_tongue:

Yeah Xuggler seems quite sophisticated… but there is no player yet, because everybody seems as lazy as I am
I just want a player, not dealing with internal stuff =P
Also it uses JavaSound for audio, kind of annoying
Gotta wait until someone writes a player.

JFlashPlayer seems nice too… just use flash video
but its not free

other alternatives have problems with being able to distribute it / or not being allowed to
or stuff which isn’t cross platform like FOBS4JMF seems to have only win32 support

Sad part of java.

For audio I use a Java binding of FMOD EX, industry standard, which is free for non profit projects.
If only video playback support would be as easy to get.

like Bink video for java… that would be great.

Doesn’t really help… it’s not like I can use JavaFx inside Java… I might as well write a C++ program then :stuck_out_tongue:
[/quote]
AFAIK you can. In fact you can use JavaFX only inside Java nowerdays, since FX script was axed by oracle.

Well if thats true, I’m gonna look into that.

Video can be done in an applet. I did a few local tests and FMJ seems OK, but I’ve never actually used it anywhere.

fully compatible back to Java 1.1 => this one is nice : source code available, start fast, play high quality movies

JavaFx / JMC is no option either, it seems, since:

[quote]The problem with all these JMC/Swing integration projects is that the Sun JavaFX license SPECIFICALLY PROHIBITS redistributing all or any JavaFX components.
[/quote]

I’m gonna look into that next then.

So I tried the Cortado Applet, implementing it into a JFrame - no problems.
Actually the best thing I have seen so far (excluding JavaFx(jmc.jar) and Xuggler(no Player yet))

However it’s not perfect. Cortado decodes Theora Video.
Cortado will stop occasionally on every video I make. If your video is only like 1 min long (like an intro) it might play through without problems, but the next time you play it, it will stop again.
Actually it pauses, and “buffers” and after a few seconds may play again.
It’s obviously an applet, therefore made for internet usage, so you have to File.toURI.toURL to get it to play, and obviously it shouldn’t have to buffer.
This effect is completely random when or if it happens - but the higher quality (framerate & video-screensize), the higher the chance it will happen.

This actually seems to be an audio problem as opposed to be a video problem - some people have suggested turning off audio, which you can.
And I have not once experienced this problem with audio off. However, without audio, it’s obviously pretty useless - and trying to play the audio stream by yourself - you never get it to sync.

So my conclusion to this point is:

JMF - laughable, won’t be improved anyway, as far as I see
JMC(JavaFx) - Never actually tried it, but it seems very good. However the JavaFx license prohibits to distribute it, especially just partially.
Xuggler - Very nice, however there is no player, and people who are much more skilled than I try to write a player still have sync problems.
Cortado - Ok, but mentioned problem ,also annoying codec.

So I’ll just hope that, when my project is done, and I really need it, either Xuggler has a good player, JavaFx (when going 2.0) has no more of this license bullshit or Cortado will actually get fixed.