7

JMF is old, and doesn't support a lot of codecs properly. I get by these days by using FFMPEG in the background, but I would like to switch to a native java solution if one exists, does anyone know of a current open source Java project that has media manipulation functionality?

shipmaster
  • 3,994
  • 4
  • 30
  • 33
  • Did you try http://fobs.sourceforge.net/features.html It's a Java/JNI wrapper around ffmpeg lib. I asked myself the same question sever month ago and ended up using lame for MP3 decoding and encoding. I'm not happy with my solution either, so please report back your finding! Cheers – sfussenegger Oct 07 '09 at 06:57

2 Answers2

3

While not 100% native, you could also use Xuggler. It's an open-source (LGPL) wrapper that runs FFmpeg inside Java so you don't have to shell out, and is used by over 250 developers already today.

Art Clarke
  • 2,495
  • 18
  • 15
2

It depends what you want to do.

Since you are using ffmpeg, then I assume you are encoding videos. I am pessimistic that Java will do such work 'native' in the short or medium term--it very much goes against many Java philosophies/baggage.

That said, with Java 7, codecs in general should become easier to access, be more available and start showing up in real applications. Unfortunately, from what I've read, the emphasis seems to be on playback and GUIs.

I do allot of shelling out from Java to ffmpeg to encode videos and other media. Fact is, ffmpeg is one of the best tools out there for programmatically encoding videos, proprietary or open source. I predict that it will stay that way for the foreseeable future.

If ffmpeg is just not working for you, then you may want to investigate Quicktime for Java. I personally have not looked to deeply at it, but it seems to be 'big'. Note that it seems to have been deprecated as of the release of QuickTime X (Fall 2009).

QuickTime for Java provides a set of cross-platform APIs which allows Java developers to build multimedia, including streaming audio and video, into applications and applets.

Stu Thompson
  • 38,370
  • 19
  • 110
  • 156