Video Support on Java found lacking
Much of the excitement the technology today is what can be done with media, by combining micro formats like RSS with audio formats like MP3 and devices like iPods with the increasing high speed Internet people are empowered to broadcast and listen to anything they want. With major media distributers such as the BBC putting their weight behind podcasts and vodcasts (video podcasts) the time to start using the video support in Java is now (actually it was yesterday).
So what support is there for Video on Java? Well there is JMF (Java Media Framework), however this was last updated in May 2003 (yep it’s 3 years old). It is also a pain in the arse to install and you can forget about a good user story for using it in applets. I was considering providing the Java applet video player on my website so that I could guarantee that if Java was installed on the user machine then they could watch video (sort of like YouTube’s flash player). However these are the install notes for JMF, I can’t see Joe Six Pack or Grandma managing that and I can see why both Google Video and YouTube choose Flash now for their players.
What other video support is their for Java? There is Java QuickTime but this only supports the platforms that normal QuickTime supports because it is all backed with native calls to the QuickTime libraries. So Java QuickTime only works on Mac and Windows, not much use for me on Linux.
Also I have my reservations on what the licensing terms are on both these APIs I think it is fairly unlikely I could distribute them as freely as I would need to if I was using them in a applet.
So far these are the only two free APIs I have found for Video with Java, if anyone knows of any others then please let me know. As it is I can see this issue losing Java mind share quickly in the new world of pub/sub media on consumer devices.
Technorati Tags: JMF, freedbacking, Java
May 29th, 2006 at 6:52 pm
Hey Andy,
Couldn’t agree more. We’ve been looking at this for the SimpleCenter project (http://www.simplecenter.org), and are considering contributing to the FMJ project (http://fmj.sourceforge.net/), an open source implementation of JMF. It looks like there is some interest in this. Hopefully things improve in this area for Java.
May 29th, 2006 at 7:29 pm
Sounds like you want JavaSE 7 to come with Video as standard
May 29th, 2006 at 8:07 pm
You should ask people from opentv which wrote a great video application running on windows, macos and linux (http://iondb.com/player/), as webstart
May 30th, 2006 at 11:44 am
Check out this posting in my old blog http://jroller.com/page/vprise/?anchor=jmf_is_dead_jdic_should
This explains pretty well why there is no decent video support in Java and why even some basic audio formats are/were missing.
Technically the media world is a nightmare of lawsuits and patents, I hope an open source project won’t expose itself to such harrasment but the moment it will be successful then these problems will rise.
Anyway, be careful. Even if you use an open source project that was not developed by yourself you are liable to a lawsuit like the LZW guys (forgot the company name) who started suing sites that used GIF’s that were created by software that didn’t pay their license blackmail.
May 31st, 2006 at 4:29 pm
You should check out JMyron on the webcamxtra site:
http://webcamxtra.sourceforge.net/
There’s an Eclipse project example to get you started.
I don’t know if it works on Linux, but it does a really nice job of making one set of code work for Windows and OSX. The latest version (now in Beta), boasts some very good frame rates.
I went through the same search, JMF to QuickTime, and found them both difficult to use. JMF does appear to be dead in the water (which seems odd to me). You could also look at the projects that back the JMyron code, which ultimately access the camera.
You’ll notice there is another focus to JMyron (tracking objects in video), but it doesn’t get in the way if all you want to do is capture (or playback). The API is small, clean, and easy to understand.
June 1st, 2006 at 11:31 am
@Steve: I think video should be in the Desktop Profile as you state also in your blog here
http://service-architecture.blogspot.com/2006/05/keep-crap-out-of-javase-7.html
June 1st, 2006 at 11:32 am
Thanks everyone for the pointers
June 4th, 2006 at 2:32 am
I’ve been trying to figure this out myself. I think Myron does NOT support video input on Linux, though it is planned for a future release. They’re planning to go with video4linux, which is evidently a newer library. Just getting video input on Linux (java or otherwise) seems like a major pain. And it’s not just Linux that would benefit from a universal library — there are problems getting QTforJava to work right on Mac, even, with recent QT releases. On Windows, without significant work with DirectX/DirectShow, you have to rely on QuickTime AND WinVDIG, with a big performance hit. Noticing a pattern here?
If you find anything out, I’d love to hear about it . . . and I’ll be glad to share if I can figure any of this out! I can be reached via the website above.
Peter
June 7th, 2006 at 6:33 pm
The FMJ (fmj.sourceforge.net) aims to implement JMF, and as far as codecs, we’ll be able to avoid legal issues (and also a lot of code writing) by simply wrapping the native infrastructure (Quicktime, DirectShow, GStreamer). We are still heavy in the development phase, and not yet working on this part.
For video capture, we are also using another new (working, but under development) open-source project, lti-civil (http://sourceforge.net/projects/lti-civil). This supports Linux, Windows, and Mac OSX.