News about playing videos on jme?

Damn java 1.8, ofc I’m not. I assume that it is impossible to run it on 1.7, so do you know any other good solution for video? I’m able to show video on my own, drawing every frame on BufferedImage or even write there a raster data.
I’m trying JCodec 0.1.5 and 0.1.9 right now, I found that FrameGrab with small modifications meets my requirements, but for unknown reason every call to decoder.decodeFrame is slow like hell.

Update, you have to anyway:

As outlined in the Oracle JDK Support Roadmap, after April 2015, Oracle will not post further updates of Java SE 7 to its public download sites.
Oracle Java SE Support Roadmap

1 Like

I’ll bundle java7 with my game so for me it does not matter. I prefer to use a version that I’ve tested for a long time, the excelsior jet tool, which I’ll use in future does not support java8 right now. I’ll consider the update if everything else fails.

Also I want to point out that java7 user are forced to upgrade to java8 since January.
Java 7 is effectively dead, unless you keep it alive by disabling automatic updates or bundling an jvm.

Well using excelsior is an argument here in this case, at least till they support java8. However the JavaFX classes necessary simulate a swing host for swing → jfx integration wich is only in Java8, with 7 there is no way to relay events to the jfx side.

Guess the main question is, will your game be ready before exelsior is with java 8 ready :stuck_out_tongue:

It is working.

I tested it with Java7 u45 with built-in JavaFX.
The main thing that everyone should be aware is: playing an mp4 video requires external codec installed in operating system. Windows 7 and 8 have that codec preinstalled but in xp/vista there is a huge problem. Just tested it on Vista machine where I have all the standard codecs packs (everything just works). The .mp4 video is working under Media Player Classic for example, but JavaFX refuses to open it.

So far, the best solution is to encode video with VP6 codec and pack it into .flv container. Now it will work just everywhere, on every system, it is not dependent of installed codecs.

Why I’m telling it in 2015? Because some people still have Vista, even good old XP! And some of them will not reinstall their systems just because ‘a video in some indie game is not working’. It is up to developer to care that everything will work on the user’s machine.

Converting the video to VP6 is easy.

I’ve got a good enough reason for them to upgrade though.

After 12 years, support for Windows XP will end on April 8, 2014.

And that’s that. Same goes for Java 7, no more public updates will be made available any longer and don’t even get me started on browsers. As long as developers choose to support old stuff, old stuff will still be around.

Vista is still supported afaik.
Anyway, someone would upgrade if he wants to play new game made by big studio/developer. But if he does not care, he will probably never upgrade for an indie game. He would rather decide to not play such game. Anyway, I just want to be prepared for such extreme situation. It costs me nothing.

2 Likes

How did you do that? I’ve (lazily) checked but found that I needed to install several things and ultimately gave up. Also: does VP6 affect quality/compression ratio/CPU performance?

My naive suggestion would be ffmpeg. It can do almost all things and is free + works on all operating systems.

roughly something like this (look up the correct codec names)

ffmpeg -i input.mp4 -c:v vp6 out.flv

1 Like

It is not so easy, since .flv is only the container, the default compression that most software is trying to do for .flv is flv1, which is not readable by JavaFX.

The fast way: use http://zencoder.com , it is not free, they want 0.05$ for every minute of converted material.

The other way:
Install: http://www.afterdawn.com/software/audio_video/codecs/vp6_vfw_codec.cfm
Then use VirtualDub to compress your video with VP6 codec. Save it as AVI.
AVI is not readable by JavaFX, so use FFCoder to change the file format from avi to flv (use ‘copy’ for the video stream).
The most important thing is that you can’t use that video for commercial. VP6 license is clear in that. On2, the developer of VP6 was purchased by Google, there is no way to purchase vp6 encoder anymore, so the mentioned zencoder is the only way to have a flv video for commercial game.

1 Like

Extended support until April 2017 it seems, ouch.

I think you will find it costing you quite a bit, but I do admire your persistence :smiley: